GET /geode/v1/queries/adhoc?q=<OQL-statement>
Run an unnamed (unidentified), ad-hoc query passed as a URL parameter.
Resource URL
http://<hostname_or_http-service-bind-address>:<http-service-port>/geode/v1/queries/adhoc?q=<OQL-statement>
Parameters
Parameter | Description | Example Values |
---|---|---|
q | Required. OQL query statement.
**Note:**
Since the query string is passed in the URL, the OQL must be URL-encoded. Some HTTP clients such as Web browsers will automatically encode URLs; however, if you are not using one of those clients, you will need to URL encode the query string yourself. |
SELECT o FROM /orders o WHERE o.quantity > 2 AND o.totalprice > 110.00
(or URL encoded:
(or URL encoded: |
Example Request
curl -i "http://localhost:8080/geode/v1/queries/adhoc?q=select%20*%20%20from%20/customers"
Example Success Response
Response Payload: application/json
200 OK
Content-Length: <#-of-bytes>
Content-Type: application/json
[
{
"firstName": "John",
"lastName": "Doe",
"customerId": 101,
},
{
"firstName": "Jane",
"lastName": "Doe",
"customerId": 102,
},
{
....
}
]
Error Codes
Status Code | Description |
---|---|
401 UNAUTHORIZED | Invalid Username or Password |
403 FORBIDDEN | Insufficient privileges for operation |
500 INTERNAL SERVER ERROR | Error encountered at Geode server. Check the HTTP response body for a stack trace of the exception. Some possible exceptions include:
|