GET
, POST
, PUT
, or DELETE
)POST
requests, a data payload (i.e., request body) in JSON encoding unless otherwise specifiedSET
or BAG
of primitivesSET<INT>
parameter named p1
is assigned 3 integers:
p1=1&p1=5&p1=10
VERTEX
with a defined typeVERTEX<person>
parameter namedvp
is assigned a vertex whose ID is "person2"
:
vp=person2
VERTEX
without a defined type<parameter_name>.<parameter_type>
to specify the type of the parameter, and also provide the primary key of the vertex.VERTEX
parameter named va
is assigned a person
type vertex whose ID is"person1"
va=person1&va.type=person
SET
or BAG
of vertices with a defined typeSET
or BAG
of primitives, where the value for each element is the primary key of the vertex.SET<VERTEX<person>>
parameter named vp
is assigned two vertices with IDs person3
and person4
:
vp=person3&vp=person4
SET
or BAG
of vertices without a defined typeSET
or BAG
must be treated as an array, specifying the order of the elements with indices [0]
, [1]
, etc.SET<VERTEX>
parameter named vp
is assigned a person
type vertex with an ID of person1
and a post
type vertex with an ID of 11
:vp[0]=person1&vp[0].type=person&vp[1]=11&vp[1].type=post
POST
requestsPOST
requests should be in JSON format, unless the endpoint specifically accepts data in other formats. There are two ways to supply the data: inline or in a separate file.-d
option, followed by the JSON string.POST /graph
endpoint to insert one User type vertex whose ID is "id6
" into the graph called "socialNet"
.--data-binary <path_to_file>
as in the example below:INT, UINT, FLOAT, DOUBLE, STRING, BOOL
, and DATETIME
, as well as arrays and objects, follow the standard JSON Data Interchange Syntax. This subsection describes how to format complex data types.SET
, LIST
or BAG
of primitives[0.5, 0,6, 0.7]
VERTEX
id
field
whose value is the primary key of the
vertex and a"type"
field whose value
is the type of the vertex.person
vertex with an ID of "Tom"
: {"id": "Tom", "type": "person"}
MAP
keyList
and
valueList
, each containing the
keys and the values of the map respectively.
The order of items in the valueList should correspond to the order of items in the keyList.{
"keyList": ["England", "Germany"],
"valueList": ["London", "Berlin"]
}
keyList
and
valueList
. The keyList
array contains the field names of the tuple, and the valueList
array contains the values of the fields.
The order of items in the valueList should correspond to the order of items in the keyList.TYPEDEF TUPLE <name STRING, age INT> person
A person
tuple written in JSON:{"keyList: ["name", "age"], "valueList": ["Sam", 24]}
"id"
. The values can be presented either as a JSON object with N key-value pairs, or as a JSON array with a list of N values in the same order as defined in the schema.v
having a composite primary key composed of the three attributes id
, name
, and label.
SET
or BAG
of VerticesSET
or BAG
of vertices in JSON, use a JSON array with vertex objects nested in the SET
or BAG
array."version"
, "error"
, "message"
, and "result"
. "version"
- this field describes the version of the running TigerGraph instance. error"
- a boolean value to indicate if there is an error in processing the request. If there is an error, the "error"
field will be true
."message"
- the error message when there is an error. If a request is successful, the field will be an empty string or a brief message conveying the result of the request. "results"
- this field contains the resulting data from the request. Details about the result of each built-in endpoint are described in the Built-in Endpoints section.jq
command or Python json library built into most Linux installations:Nginx.ClientMaxBodySize
. The default value is 200 (in MB). To increase this limit, use the following gadmin
command:curl
optionscurl
. Below is a list of curl
options used in our code examples:-d <data>
POST
request to the HTTP server in the same way that a browser does when a user has filled in an HTML form and presses the submit button. This will cause curl to pass the data to the server using the content-type application/x-www-form-urlencoded
.@
, the rest should be a filepath from which to read the data. The command curl -d @foobar
will read data from a file named foobar
. --data-binary <data>
POST
request exactly as specified with no extra processing.--fail
-H <header>
-s
-u <user:password>
-X <request_method>
GET
request by default.