REST query API