# Query: /query/service # Flags: CaseSensitive RegExp # Including: ./docs-server/ # Excluding: *.html,*.json,*.jsonc,*.svg,*.n1ql # ContextLines: 1 modules/guides/examples/javascript-udfs/create-scoped-n1ql-udf-with-rest.sh: 1: curl -v http://localhost:8093/query/service \ 2 -u Administrator:password \ modules/guides/examples/javascript-udfs/drop-scoped-n1ql-udf.sh: 1: curl -v http://localhost:8093/query/service \ 2 -u Administrator:password \ modules/guides/examples/javascript-udfs/execute-javascript-function.sh: 1: curl -v http://localhost:8093/query/service \ 2 -u Administrator:password \ modules/guides/examples/javascript-udfs/execute-scoped-function.sh: 1: curl -v http://localhost:8093/query/service \ 2 -u Administrator:password \ modules/manage/pages/monitor/monitoring-n1ql-query.adoc: 84 The monitoring settings can be set for each query engine (using the REST API) or for each query statement (using the cbq command line tool). 85: Both settings are actually set via REST endpoints: using the xref:n1ql:n1ql-rest-api/admin.adoc[Admin REST API] (`/admin/settings` endpoint) and the xref:n1ql:n1ql-rest-api/index.adoc[Query REST API] (`/query/service` endpoint). 86 178 ---- 179: $ curl http://localhost:8093/query/service -u user:pword \ 180 -d 'profile=timings&statement=SELECT * FROM "world" AS hello;' modules/n1ql/pages/n1ql-language-reference/curl.adoc: 515 route.destinationairport, route.stops, route.airline 516: FROM CURL("http://localhost:8093/query/service", 517 {"data": "statement=SELECT * FROM `travel-sample`.inventory.route t 721 "disallowed_urls" : ["https://maps.googleapis.com/maps/api/geocode/json"], 722: "allowed_urls" : ["http://127.0.0.1:9499/query/service"] 723 }' http://localhost:8091/settings/querySettings/curlWhitelist modules/n1ql/pages/n1ql-language-reference/execute.adoc: 52 53: * Using the xref:n1ql:n1ql-rest-api/index.adoc[Query REST API] (`/query/service` endpoint). 54 102 ==== 103: Alternatively, you can specify named parameters and positional parameters using the N1QL REST API (`/query/service` endpoint), the `cbq` command line tool, or a software development kit (SDK). 104 Named parameters can be specified as request-level parameters, and positional parameters can be specified using the `args` parameter. 131 ---- 132: curl -v http://localhost:8093/query/service \ 133 -d 'statement=PREPARE SELECT text FROM tweets 172 ---- 173: curl -v http://localhost:8093/query/service \ 174 -d 'prepared="a1355198-2576-4e3d-af04-5acc77d8a681"&$r=9.5&$date="1-1-2014"' 207 ---- 208: curl -v http://localhost:8093/query/service \ 209 -d 'statement=PREPARE fave_tweets FROM SELECT text FROM tweets WHERE rating >= $r' 234 ---- 235: curl -v http://localhost:8093/query/service -d 'prepared="fave_tweets"&$r=9.5' 236 ---- modules/n1ql/pages/n1ql-language-reference/insert.adoc: 1001 ---- 1002: curl -v http://localhost:8093/query/service -u Administrator:password \ 1003 -d 'prepared="ins_india"&$key="airport_10002"&$faa_code="BLR"' modules/n1ql/pages/n1ql-language-reference/n1ql-auditing.adoc: 474 Audit records will be issued by the query engine for requests to its secondary APIs. 475: This does not include the main URL used for queries (/query/service) but does include all other URLs the query engine listens to. 476 modules/n1ql/pages/n1ql-language-reference/prepare.adoc: 56 57: * Using the xref:n1ql:n1ql-rest-api/index.adoc[Query REST API] (`/query/service` endpoint). 58 modules/n1ql/pages/n1ql-rest-api/exauthhttp.adoc: 10 ---- 11: curl -v http://localhost:8093/query/service \ 12 -d 'statement=SELECT name FROM `travel-sample`.inventory.hotel LIMIT 1;' \ modules/n1ql/pages/n1ql-rest-api/exauthrequest.adoc: 10 ---- 11: curl -v http://localhost:8093/query/service \ 12 -d 'statement=SELECT hotel.name, airport.airportname modules/n1ql/pages/n1ql-rest-api/exn1qlerror.adoc: 10 ---- 11: curl -v http://localhost:8093/query/service \ 12 -d 'statement=SLECT name FROM `travel-sample`.inventory.hotel LIMIT 1;' \ 43 ---- 44: curl -v http://localhost:8093/query/service \ 45 -d 'statement=SELECT name FROM `travel-sample`.inventory.motel LIMIT 1;' \ modules/n1ql/pages/n1ql-rest-api/exnamed.adoc: 26 ---- 27: curl -v http://localhost:8093/query/service \ 28 -d 'statement=SELECT airline FROM `travel-sample`.inventory.route 71 ---- 72: curl -v http://localhost:8093/query/service \ 73 -u Administrator:password \ 114 ---- 115: curl -v http://localhost:8093/query/service \ 116 -u Administrator:password \ modules/n1ql/pages/n1ql-rest-api/expositional.adoc: 25 ---- 26: curl -v http://localhost:8093/query/service \ 27 -d 'statement=SELECT airline FROM `travel-sample`.inventory.route 70 ---- 71: curl -v http://localhost:8093/query/service \ 72 -d 'statement=SELECT airline FROM `travel-sample`.inventory.route 115 ---- 116: curl -v http://localhost:8093/query/service \ 117 -u Administrator:password \ modules/n1ql/pages/n1ql-rest-api/exrequesterror.adoc: 10 ---- 11: curl -v http://localhost:8093/query/service 12 ---- modules/n1ql/pages/n1ql-rest-api/exserviceerror.adoc: 10 ---- 11: curl -v http://localhost:8093/query/service \ 12 -d "statement=SELECT text FROM tweets LIMIT 1" modules/n1ql/pages/n1ql-rest-api/exsuccessful.adoc: 7 ---- 8: curl -v http://localhost:8093/query/service \ 9 -d 'statement=SELECT name FROM `travel-sample`.inventory.hotel LIMIT 1' \ 43 ---- 44: curl -v http://localhost:8093/query/service?statement=SELECT%20name%20FROM%20%60travel-sample%60.inventory.hotel%20LIMIT%201%3B \ 45 -u Administrator:password modules/n1ql/pages/n1ql-rest-api/extimeout.adoc: 10 ---- 11: curl -v http://localhost:8093/query/service \ 12 -d 'statement=SELECT name FROM `travel-sample`.inventory.hotel LIMIT 1; modules/n1ql/pages/n1ql-rest-api/exunsupportedhttp.adoc: 10 ---- 11: curl -v http://localhost:8093/query/service -X PUT \ 12 -d 'statement=SELECT name FROM `travel-sample`.inventory.hotel LIMIT 1;' \ modules/rest-api/partials/rest-analytics-service-table.adoc: 15 | `POST` 16: | `/query/service` 17 | xref:analytics:rest-service.adoc#query-service-alternative[Query Service (Alternative)] 19 | `GET` 20: | `/query/service` 21 | xref:analytics:rest-service.adoc#read-only-query-service-alternative[Read-Only Query Service (Alternative)] modules/rest-api/partials/rest-query-service-table.adoc: 136 | `POST` 137: | `/query/service` 138 | xref:n1ql:n1ql-rest-api/index.adoc#_post_service[Query Service] 140 | `GET` 141: | `/query/service` 142 | xref:n1ql:n1ql-rest-api/index.adoc#_get_service[Read-Only Query Service] modules/settings/pages/query-settings.adoc: 454 455: To set a request-level parameter, use the {n1ql-rest-api-index}[N1QL REST API] (`/query/service` endpoint) with a cURL statement, or the {cbq-shell}[cbq] command, or a client program. 456 You can also set request-level parameters using the {query-preferences}[Run-Time Preferences] window in the Query Workbench.