End point for the data definition statements
Endpoint: /ddl
Parameters:
This call does not return any result. If the operations were successful, HTTP OK status code is returned.
drop dataverse company if exists; create dataverse company; use dataverse company; create type Emp as open { id : int32, name : string }; create dataset Employee(Emp) primary key id;
API call for the above DDL statements in the URL-encoded form.
HTTP OK 200<NO PAYLOAD>
End point for update statements (INSERT, DELETE and LOAD)
Endpoint: /update
Parameters:
This call does not return any result. If the operations were successful, HTTP OK status code is returned.
use dataverse company; insert into dataset Employee({ "id":123,"name":"John Doe"});
API call for the above update statement in the URL-encoded form.
HTTP OK 200<NO PAYLOAD>
End point for query statements
Endpoint: /query
Parameters:
Result: The result is returned as a JSON object as follows
{ results: <result as a string, if mode = synchronous> error-code: [<code>, <message>] (if an error occurs) handle: <opaque result handle, if mode = asynchronous> }
use dataverse company; for $l in dataset('Employee') return $l;
API call for the above query statement in the URL-encoded form.
HTTP OK 200
Payload
{ "results": [ [ "{ "id": 123, "name": "John Doe" }" ] ] }
API call for the above query statement in the URL-encoded form with mode=asynchronous
HTTP OK 200
Payload
{ "handle": [45,0] }
End point for any/mixed statement
Endpoint: /aql
Parameters:
Similar to /update but allows any arbitrary AQL statement rather than only modifications.
End point to fetch the results of an asynchronous query
Endpoint: /query/result
Parameters:
Result: The result is returned as a JSON object as follows:
{ results: <result as a string, if mode = synchronous, or mode = asynchronous and results are available> error-code: [<code>, <message>] (if an error occurs) }
If mode = asynchronous and results are not available, the returned JSON object is empty: { }
We use the handle returned by the asynchronous query to get the results for the query. The handle returned was:
{ "handle": [45,0] }
API call for reading results from the previous asynchronous query in the URL-encoded form.
http://localhost:19002/query/result?handle=%7B%22handle%22%3A+%5B45%2C+0%5D%7D
HTTP OK 200
Payload
{ "results": [ [ "{ "id": 123, "name": "John Doe" }" ] ] }
End point to check the status of the query asynchronous
Endpoint: /query/status
Parameters:
Result: The result is returned as a JSON object as follows:
{ status: ("RUNNING" | "SUCCESS" | "ERROR") }
Table of error codes and their types: