Query format
All transaction POST requests can accept one or more Cypher queries within the request payload. This enables a large amount of flexibility in how, and when, queries are sent, and can help to reduce the number of individual HTTP requests overall.
The payload is sent as JSON with the following general structure:
{
"statements": [
{
"statement": "...",
"parameters": {...}
},
{
"statement": "...",
"parameters": {...}
},
...
]
}
For example:
{
"statements": [
{
"statement": "CREATE (n $props) RETURN n",
"parameters": {
"props": {
"name": "My Node"
}
}
},
{
"statement": "CREATE (n $props) RETURN n",
"parameters": {
"props": {
"name": "Another Node"
}
}
}
]
}
Parameters are included as key-value pairs, with each value adopting a type that corresponds to an entry in the mapping table below:
JSON Type | Cypher Type |
---|---|
|
Null |
|
Boolean |
|
Float |
|
String |
|
List |
|
Map |
Was this page helpful?