LATEST VERSION: 8.1.0 - CHANGELOG
Pivotal GemFire® v8.1

POST /gemfire-api/v1/queries?id=<queryId>&q=<OQL-statement>

POST /gemfire-api/v1/queries?id=<queryId>&q=<OQL-statement>

Create (prepare) the specified parameterized query and assign the corresponding ID for lookup.

Resource URL

http://<hostname_or_http-service-bind-address>:<http-service-port>/gemfire-api/v1/queries?id=<queryId>&q="<OQL-statement>"

Parameters

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.
"SELECT o FROM /orders o WHERE o.quantity > $1 AND o.totalprice > $2"
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.

Example Request

POST /gemfire-api/v1/queries?id=selectOrders&q="SELECT o FROM /orders o WHERE o.quantity > $1 AND o.totalprice > $2"
Accept: application/json

Example Success Response

Response Payload: null

201 CREATED
Location: http://localhost:8080/gemfire-api/v1/queries/selectOrders

Error Codes

Status Code Description
400 BAD REQUEST Returned if user does not specify a query ID or a malformed OQL statement.
500 INTERNAL SERVER ERROR Error encountered at GemFire server. Check the HTTP response body for a stack trace of the exception.
  • Query store does not exist!