Create (prepare) the specified parameterized query and assign the corresponding ID for lookup.
http://<hostname_or_http-service-bind-address>:<http-service-port>/geode/v1/queries?id=<queryId>&q="<OQL-statement>"
Parameter | Description | Example Values |
---|---|---|
id | Required. Unique identifier for the named parameterized query. | selectCustomers |
q | Required. OQL query statement. Use doublequotes to surround the OQL query statement. |
|
Note: For this release, you cannot specify the query string inside the request body (as JSON). You must specify the query as a URL parameter.
POST /geode/v1/queries?id=selectOrders&q="SELECT o FROM /orders o WHERE o.quantity > $1 AND o.totalprice > $2"
Accept: application/json
Response Payload: null
201 CREATED
Location: http://localhost:8080/geode/v1/queries/selectOrders
Status Code | Description |
---|---|
400 BAD REQUEST | Query ID not specified or malformed OQL statement |
401 UNAUTHORIZED | Invalid Username or Password |
403 FORBIDDEN | Insufficient privileges for operation |
409 CONFLICT | QueryId already assigned to another query |
500 INTERNAL SERVER ERROR | Error encountered at Tanzu GemFire server. Check the HTTP response body for a stack trace of the exception.
|