Gremlin query status API
You can list all active Gremlin queries or get the status of a specific query.
The underlying HTTP endpoint for both operations is
https://.your-neptune-endpoint:port/gremlin/status
Listing active Gremlin queries
To list all active Gremlin queries, call the endpoint with no
queryId parameter.
Request parameters
-
includeWaiting (optional) – If set to
TRUE, the response includes waiting queries in addition to running queries.
Response syntax
{ "acceptedQueryCount": integer, "runningQueryCount": integer, "queries": [ { "queryId": "guid", "queryEvalStats": { "waited": integer, "elapsed": integer, "cancelled": boolean }, "queryString": "string" } ] }
-
acceptedQueryCount – The number of queries that have been accepted but not yet completed, including queries in the queue.
-
runningQueryCount – The number of currently running Gremlin queries.
-
queries – A list of the current Gremlin queries.
Example
The following output shows a single running query.
{ "acceptedQueryCount": 9, "runningQueryCount": 1, "queries": [ { "queryId": "fb34cd3e-f37c-4d12-9cf2-03bb741bf54f", "queryEvalStats": { "waited": 0, "elapsed": 23, "cancelled": false }, "queryString": "g.V().out().count()" } ] }
Getting the status of a specific Gremlin query
To get the status of a specific Gremlin query, provide the
queryId parameter.
Request parameters
-
queryId (required) – The ID of the Gremlin query. Neptune automatically assigns this ID value to each query, or you can assign your own ID (see Inject a Custom ID Into a Neptune Gremlin or SPARQL Query).
Response syntax
{ "queryId": "guid", "queryString": "string", "queryEvalStats": { "waited": integer, "elapsed": integer, "cancelled": boolean, "subqueries": document } }
-
queryId – The ID of the query.
-
queryString – The submitted query. This is truncated to 1024 characters if it is longer than that.
-
queryEvalStats – Statistics for the query, including
waited(wait time in milliseconds),elapsed(run time in milliseconds),cancelled(whether the query was cancelled), andsubqueries(the number of subqueries).
Example
The following is an example response.
{ "queryId": "fb34cd3e-f37c-4d12-9cf2-03bb741bf54f", "queryString": "g.V().out().count()", "queryEvalStats": { "waited": 0, "elapsed": 23, "cancelled": false } }