with the one in\nthe body, provided there is such a document and no precondition is\nviolated.\n\nIf the *If-Match* header is specified and the revision of the\ndocument in the database is unequal to the given revision, the\nprecondition is violated.\n\nIf *If-Match* is not given and *ignoreRevs* is *false* and there\nis a *_rev* attribute in the body and its value does not match\nthe revision of the document in the database, the precondition is\nviolated.\n\nIf a precondition is violated, an *HTTP 412* is returned.\n\nIf the document exists and can be updated, then an *HTTP 201* or\nan *HTTP 202* is returned (depending on *waitForSync*, see below),\nthe *Etag* header field contains the new revision of the document\nand the *Location* header contains a complete URL under which the\ndocument can be queried.\n\nOptionally, the query parameter *waitForSync* can be used to force\nsynchronization of the document replacement operation to disk even in case\nthat the *waitForSync* flag had been disabled for the entire collection.\nThus, the *waitForSync* query parameter can be used to force synchronization\nof just specific operations. To use this, set the *waitForSync* parameter\nto *true*. If the *waitForSync* parameter is not specified or set to\n*false*, then the collection's default *waitForSync* behavior is\napplied. The *waitForSync* query parameter cannot be used to disable\nsynchronization for collections that have a default *waitForSync* value\nof *true*.\n\nIf *silent* is not set to *true*, the body of the response contains a JSON \nobject with the information about the handle and the revision. The attribute \n*_id* contains the known *document-handle* of the updated document, *_key* \ncontains the key which uniquely identifies a document in a given collection, \nand the attribute *_rev* contains the new document revision.\n\nIf the query parameter *returnOld* is *true*, then\nthe complete previous revision of the document\nis returned under the *old* attribute in the result.\n\nIf the query parameter *returnNew* is *true*, then\nthe complete new document is returned under\nthe *new* attribute in the result.\n\nIf the document does not exist, then a *HTTP 404* is returned and the\nbody of the response contains an error document.\n\n\n\n\n**Example:**\n Using a document handle\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/document/products/104046 <<EOF\n
{\"Hello\": \"you\"}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: \"_YOn1PRa--D\"\n
location: /_db/_system/_api/document/products/104046\n
x-content-type-options: nosniff\n
\n
{ \n
\"_id\" : \"products/104046\", \n
\"_key\" : \"104046\", \n
\"_rev\" : \"_YOn1PRa--D\", \n
\"_oldRev\" : \"_YOn1PRa--B\" \n
}\n
\n\n\n\n\n**Example:**\n Unknown document handle\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/document/products/104082 <<EOF\n
{}\n
EOF\n
\n
HTTP/1.1 Not Found\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"document not found\", \n
\"code\" : 404, \n
\"errorNum\" : 1202 \n
}\n
\n\n\n\n\n**Example:**\n Produce a revision conflict\n\nshell> curl -X PUT --header 'If-Match: \"_YOn1PSi--B\"' --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/document/products/104063 <<EOF\n
{\"other\":\"content\"}\n
EOF\n
\n
HTTP/1.1 Precondition Failed\n
content-type: application/json; charset=utf-8\n
etag: \"_YOn1PSi--_\"\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"code\" : 412, \n
\"errorNum\" : 1200, \n
\"errorMessage\" : \"precondition failed\", \n
\"_id\" : \"products/104063\", \n
\"_key\" : \"104063\", \n
\"_rev\" : \"_YOn1PSi--_\" \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "A JSON representation of a single document.\n\n",
@@ -8942,7 +8942,7 @@
},
"/_api/edges/{collection-id}": {
"get": {
- "description": "\n\nReturns an array of edges starting or ending in the vertex identified by\n*vertex-handle*.\n\n\n\n\n**Example:**\n Any direction\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"6\", \n
\"_id\" : \"edges/6\", \n
\"_from\" : \"vertices/2\", \n
\"_to\" : \"vertices/1\", \n
\"_rev\" : \"_YNEaLMG--F\", \n
\"$label\" : \"v2 -> v1\" \n
}, \n
{ \n
\"_key\" : \"7\", \n
\"_id\" : \"edges/7\", \n
\"_from\" : \"vertices/4\", \n
\"_to\" : \"vertices/1\", \n
\"_rev\" : \"_YNEaLMG--H\", \n
\"$label\" : \"v4 -> v1\" \n
}, \n
{ \n
\"_key\" : \"5\", \n
\"_id\" : \"edges/5\", \n
\"_from\" : \"vertices/1\", \n
\"_to\" : \"vertices/3\", \n
\"_rev\" : \"_YNEaLMG--D\", \n
\"$label\" : \"v1 -> v3\" \n
} \n
], \n
\"error\" : false, \n
\"code\" : 200, \n
\"stats\" : { \n
\"scannedIndex\" : 3, \n
\"filtered\" : 0 \n
} \n
}\n
\n\n\n\n\n**Example:**\n In edges\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&direction=in\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"6\", \n
\"_id\" : \"edges/6\", \n
\"_from\" : \"vertices/2\", \n
\"_to\" : \"vertices/1\", \n
\"_rev\" : \"_YNEaLOK--D\", \n
\"$label\" : \"v2 -> v1\" \n
}, \n
{ \n
\"_key\" : \"7\", \n
\"_id\" : \"edges/7\", \n
\"_from\" : \"vertices/4\", \n
\"_to\" : \"vertices/1\", \n
\"_rev\" : \"_YNEaLOK--F\", \n
\"$label\" : \"v4 -> v1\" \n
} \n
], \n
\"error\" : false, \n
\"code\" : 200, \n
\"stats\" : { \n
\"scannedIndex\" : 2, \n
\"filtered\" : 0 \n
} \n
}\n
\n\n\n\n\n**Example:**\n Out edges\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&direction=out\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"5\", \n
\"_id\" : \"edges/5\", \n
\"_from\" : \"vertices/1\", \n
\"_to\" : \"vertices/3\", \n
\"_rev\" : \"_YNEaLQO--D\", \n
\"$label\" : \"v1 -> v3\" \n
} \n
], \n
\"error\" : false, \n
\"code\" : 200, \n
\"stats\" : { \n
\"scannedIndex\" : 1, \n
\"filtered\" : 0 \n
} \n
}\n
\n\n\n\n\n",
+ "description": "\n\nReturns an array of edges starting or ending in the vertex identified by\n*vertex-handle*.\n\n\n\n\n**Example:**\n Any direction\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"6\", \n
\"_id\" : \"edges/6\", \n
\"_from\" : \"vertices/2\", \n
\"_to\" : \"vertices/1\", \n
\"_rev\" : \"_YOn1PWK--B\", \n
\"$label\" : \"v2 -> v1\" \n
}, \n
{ \n
\"_key\" : \"7\", \n
\"_id\" : \"edges/7\", \n
\"_from\" : \"vertices/4\", \n
\"_to\" : \"vertices/1\", \n
\"_rev\" : \"_YOn1PWK--D\", \n
\"$label\" : \"v4 -> v1\" \n
}, \n
{ \n
\"_key\" : \"5\", \n
\"_id\" : \"edges/5\", \n
\"_from\" : \"vertices/1\", \n
\"_to\" : \"vertices/3\", \n
\"_rev\" : \"_YOn1PWK--_\", \n
\"$label\" : \"v1 -> v3\" \n
} \n
], \n
\"error\" : false, \n
\"code\" : 200, \n
\"stats\" : { \n
\"scannedIndex\" : 3, \n
\"filtered\" : 0 \n
} \n
}\n
\n\n\n\n\n**Example:**\n In edges\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&direction=in\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"6\", \n
\"_id\" : \"edges/6\", \n
\"_from\" : \"vertices/2\", \n
\"_to\" : \"vertices/1\", \n
\"_rev\" : \"_YOn1PYy--H\", \n
\"$label\" : \"v2 -> v1\" \n
}, \n
{ \n
\"_key\" : \"7\", \n
\"_id\" : \"edges/7\", \n
\"_from\" : \"vertices/4\", \n
\"_to\" : \"vertices/1\", \n
\"_rev\" : \"_YOn1PYy--J\", \n
\"$label\" : \"v4 -> v1\" \n
} \n
], \n
\"error\" : false, \n
\"code\" : 200, \n
\"stats\" : { \n
\"scannedIndex\" : 2, \n
\"filtered\" : 0 \n
} \n
}\n
\n\n\n\n\n**Example:**\n Out edges\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&direction=out\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"5\", \n
\"_id\" : \"edges/5\", \n
\"_from\" : \"vertices/1\", \n
\"_to\" : \"vertices/3\", \n
\"_rev\" : \"_YOn1Pba--F\", \n
\"$label\" : \"v1 -> v3\" \n
} \n
], \n
\"error\" : false, \n
\"code\" : 200, \n
\"stats\" : { \n
\"scannedIndex\" : 1, \n
\"filtered\" : 0 \n
} \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "The id of the collection.\n\n",
@@ -8989,7 +8989,7 @@
},
"/_api/endpoint": {
"get": {
- "description": "\n\nReturns an array of all configured endpoints the server is listening on.\n\nThe result is a JSON array of JSON objects, each with `\"entrypoint\"' as\nthe only attribute, and with the value being a string describing the\nendpoint.\n\n**Note**: retrieving the array of all endpoints is allowed in the system database\nonly. Calling this action in any other database will make the server return\nan error.\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nIt is considered as deprecated from version 3.4.0 on.\n\n\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/endpoint\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
[ \n
{ \n
\"endpoint\" : \"http://127.0.0.1:33956\" \n
} \n
]\n
\n\n\n\n\n",
+ "description": "\n\nReturns an array of all configured endpoints the server is listening on.\n\nThe result is a JSON array of JSON objects, each with `\"entrypoint\"' as\nthe only attribute, and with the value being a string describing the\nendpoint.\n\n**Note**: retrieving the array of all endpoints is allowed in the system database\nonly. Calling this action in any other database will make the server return\nan error.\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nIt is considered as deprecated from version 3.4.0 on.\n\n\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/endpoint\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
[ \n
{ \n
\"endpoint\" : \"http://127.0.0.1:18836\" \n
} \n
]\n
\n\n\n\n\n",
"parameters": [],
"responses": {
"200": {
@@ -9038,7 +9038,7 @@
},
"/_api/explain": {
"post": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **query**: the query which you want explained; If the query references any bind variables,\n these must also be passed in the attribute *bindVars*. Additional\n options for the query can be passed in the *options* attribute.\n - **options**:\n - **optimizer.rules** (string): an array of to-be-included or to-be-excluded optimizer rules\n can be put into this attribute, telling the optimizer to include or exclude\n specific rules. To disable a rule, prefix its name with a `-`, to enable a rule, prefix it\n with a `+`. There is also a pseudo-rule `all`, which will match all optimizer rules.\n - **maxNumberOfPlans**: an optional maximum number of plans that the optimizer is \n allowed to generate. Setting this attribute to a low value allows to put a\n cap on the amount of work the optimizer does.\n - **allPlans**: if set to *true*, all possible execution plans will be returned.\n The default is *false*, meaning only the optimal plan will be returned.\n - **bindVars** (object): key/value pairs representing the bind parameters.\n\n\n\n\n\nTo explain how an AQL query would be executed on the server, the query string\ncan be sent to the server via an HTTP POST request. The server will then validate\nthe query and create an execution plan for it. The execution plan will be\nreturned, but the query will not be executed.\n\nThe execution plan that is returned by the server can be used to estimate the\nprobable performance of the query. Though the actual performance will depend\non many different factors, the execution plan normally can provide some rough\nestimates on the amount of work the server needs to do in order to actually run \nthe query.\n\nBy default, the explain operation will return the optimal plan as chosen by\nthe query optimizer The optimal plan is the plan with the lowest total estimated\ncost. The plan will be returned in the attribute *plan* of the response object.\nIf the option *allPlans* is specified in the request, the result will contain \nall plans created by the optimizer. The plans will then be returned in the \nattribute *plans*.\n\nThe result will also contain an attribute *warnings*, which is an array of \nwarnings that occurred during optimization or execution plan creation. Additionally,\na *stats* attribute is contained in the result with some optimizer statistics.\nIf *allPlans* is set to *false*, the result will contain an attribute *cacheable* \nthat states whether the query results can be cached on the server if the query\nresult cache were used. The *cacheable* attribute is not present when *allPlans*\nis set to *true*.\n\nEach plan in the result is a JSON object with the following attributes:\n- *nodes*: the array of execution nodes of the plan. The array of available node types\n can be found [here](../../AQL/ExecutionAndPerformance/Optimizer.html)\n\n- *estimatedCost*: the total estimated cost for the plan. If there are multiple\n plans, the optimizer will choose the plan with the lowest total cost.\n\n- *collections*: an array of collections used in the query\n\n- *rules*: an array of rules the optimizer applied. An overview of the\n available rules can be found [here](../../AQL/ExecutionAndPerformance/Optimizer.html)\n\n- *variables*: array of variables used in the query (note: this may contain\n internal variables created by the optimizer)\n\n\n\n\n**Example:**\n Valid query\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/explain <<EOF\n
{ \n
\"query\" : \"FOR p IN products RETURN p\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"plan\" : { \n
\"nodes\" : [ \n
{ \n
\"type\" : \"SingletonNode\", \n
\"dependencies\" : [ ], \n
\"id\" : 1, \n
\"estimatedCost\" : 1, \n
\"estimatedNrItems\" : 1 \n
}, \n
{ \n
\"type\" : \"EnumerateCollectionNode\", \n
\"dependencies\" : [ \n
1 \n
], \n
\"id\" : 2, \n
\"estimatedCost\" : 12, \n
\"estimatedNrItems\" : 10, \n
\"random\" : false, \n
\"outVariable\" : { \n
\"id\" : 0, \n
\"name\" : \"p\" \n
}, \n
\"projections\" : [ ], \n
\"producesResult\" : true, \n
\"database\" : \"_system\", \n
\"collection\" : \"products\", \n
\"satellite\" : false \n
}, \n
{ \n
\"type\" : \"ReturnNode\", \n
\"dependencies\" : [ \n
2 \n
], \n
\"id\" : 3, \n
\"estimatedCost\" : 22, \n
\"estimatedNrItems\" : 10, \n
\"inVariable\" : { \n
\"id\" : 0, \n
\"name\" : \"p\" \n
}, \n
\"count\" : true \n
} \n
], \n
\"rules\" : [ ], \n
\"collections\" : [ \n
{ \n
\"name\" : \"products\", \n
\"type\" : \"read\" \n
} \n
], \n
\"variables\" : [ \n
{ \n
\"id\" : 0, \n
\"name\" : \"p\" \n
} \n
], \n
\"estimatedCost\" : 22, \n
\"estimatedNrItems\" : 10, \n
\"initialize\" : true, \n
\"isModificationQuery\" : false \n
}, \n
\"cacheable\" : true, \n
\"warnings\" : [ ], \n
\"stats\" : { \n
\"rulesExecuted\" : 35, \n
\"rulesSkipped\" : 0, \n
\"plansCreated\" : 1 \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n A plan with some optimizer rules applied\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/explain <<EOF\n
{ \n
\"query\" : \"FOR p IN products LET a = p.id FILTER a == 4 LET name = p.name SORT p.id LIMIT 1 RETURN name\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"plan\" : { \n
\"nodes\" : [ \n
{ \n
\"type\" : \"SingletonNode\", \n
\"dependencies\" : [ ], \n
\"id\" : 1, \n
\"estimatedCost\" : 1, \n
\"estimatedNrItems\" : 1 \n
}, \n
{ \n
\"type\" : \"IndexNode\", \n
\"dependencies\" : [ \n
1 \n
], \n
\"id\" : 11, \n
\"estimatedCost\" : 4.321928094887362, \n
\"estimatedNrItems\" : 1, \n
\"outVariable\" : { \n
\"id\" : 0, \n
\"name\" : \"p\" \n
}, \n
\"projections\" : [ ], \n
\"producesResult\" : true, \n
\"database\" : \"_system\", \n
\"collection\" : \"products\", \n
\"satellite\" : false, \n
\"needsGatherNodeSort\" : true, \n
\"indexCoversProjections\" : false, \n
\"indexes\" : [ \n
{ \n
\"id\" : \"104244\", \n
\"type\" : \"skiplist\", \n
\"fields\" : [ \n
\"id\" \n
], \n
\"unique\" : false, \n
\"sparse\" : false, \n
\"deduplicate\" : true \n
} \n
], \n
\"condition\" : { \n
\"type\" : \"n-ary or\", \n
\"typeID\" : 63, \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"n-ary and\", \n
\"typeID\" : 62, \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"compare ==\", \n
\"typeID\" : 25, \n
\"excludesNull\" : false, \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"attribute access\", \n
\"typeID\" : 35, \n
\"name\" : \"id\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"reference\", \n
\"typeID\" : 45, \n
\"name\" : \"p\", \n
\"id\" : 0 \n
} \n
] \n
}, \n
{ \n
\"type\" : \"value\", \n
\"typeID\" : 40, \n
\"value\" : 4, \n
\"vType\" : \"int\", \n
\"vTypeID\" : 2 \n
} \n
] \n
} \n
] \n
} \n
] \n
}, \n
\"sorted\" : true, \n
\"ascending\" : true, \n
\"reverse\" : false, \n
\"evalFCalls\" : true, \n
\"fullRange\" : false, \n
\"limit\" : 0 \n
}, \n
{ \n
\"type\" : \"CalculationNode\", \n
\"dependencies\" : [ \n
11 \n
], \n
\"id\" : 4, \n
\"estimatedCost\" : 5.321928094887362, \n
\"estimatedNrItems\" : 1, \n
\"expression\" : { \n
\"type\" : \"compare ==\", \n
\"typeID\" : 25, \n
\"excludesNull\" : false, \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"attribute access\", \n
\"typeID\" : 35, \n
\"name\" : \"id\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"reference\", \n
\"typeID\" : 45, \n
\"name\" : \"p\", \n
\"id\" : 0 \n
} \n
] \n
}, \n
{ \n
\"type\" : \"value\", \n
\"typeID\" : 40, \n
\"value\" : 4, \n
\"vType\" : \"int\", \n
\"vTypeID\" : 2 \n
} \n
] \n
}, \n
\"outVariable\" : { \n
\"id\" : 4, \n
\"name\" : \"3\" \n
}, \n
\"canThrow\" : false, \n
\"expressionType\" : \"simple\" \n
}, \n
{ \n
\"type\" : \"FilterNode\", \n
\"dependencies\" : [ \n
4 \n
], \n
\"id\" : 5, \n
\"estimatedCost\" : 6.321928094887362, \n
\"estimatedNrItems\" : 1, \n
\"inVariable\" : { \n
\"id\" : 4, \n
\"name\" : \"3\" \n
} \n
}, \n
{ \n
\"type\" : \"LimitNode\", \n
\"dependencies\" : [ \n
5 \n
], \n
\"id\" : 9, \n
\"estimatedCost\" : 7.321928094887362, \n
\"estimatedNrItems\" : 1, \n
\"offset\" : 0, \n
\"limit\" : 1, \n
\"fullCount\" : false \n
}, \n
{ \n
\"type\" : \"CalculationNode\", \n
\"dependencies\" : [ \n
9 \n
], \n
\"id\" : 6, \n
\"estimatedCost\" : 8.321928094887362, \n
\"estimatedNrItems\" : 1, \n
\"expression\" : { \n
\"type\" : \"attribute access\", \n
\"typeID\" : 35, \n
\"name\" : \"name\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"reference\", \n
\"typeID\" : 45, \n
\"name\" : \"p\", \n
\"id\" : 0 \n
} \n
] \n
}, \n
\"outVariable\" : { \n
\"id\" : 2, \n
\"name\" : \"name\" \n
}, \n
\"canThrow\" : false, \n
\"expressionType\" : \"attribute\" \n
}, \n
{ \n
\"type\" : \"ReturnNode\", \n
\"dependencies\" : [ \n
6 \n
], \n
\"id\" : 10, \n
\"estimatedCost\" : 9.321928094887362, \n
\"estimatedNrItems\" : 1, \n
\"inVariable\" : { \n
\"id\" : 2, \n
\"name\" : \"name\" \n
}, \n
\"count\" : true \n
} \n
], \n
\"rules\" : [ \n
\"move-calculations-up\", \n
\"remove-redundant-calculations\", \n
\"remove-unnecessary-calculations\", \n
\"move-calculations-up-2\", \n
\"use-indexes\", \n
\"use-index-for-sort\", \n
\"remove-unnecessary-calculations-2\", \n
\"move-calculations-down\" \n
], \n
\"collections\" : [ \n
{ \n
\"name\" : \"products\", \n
\"type\" : \"read\" \n
} \n
], \n
\"variables\" : [ \n
{ \n
\"id\" : 6, \n
\"name\" : \"5\" \n
}, \n
{ \n
\"id\" : 4, \n
\"name\" : \"3\" \n
}, \n
{ \n
\"id\" : 2, \n
\"name\" : \"name\" \n
}, \n
{ \n
\"id\" : 1, \n
\"name\" : \"a\" \n
}, \n
{ \n
\"id\" : 0, \n
\"name\" : \"p\" \n
} \n
], \n
\"estimatedCost\" : 9.321928094887362, \n
\"estimatedNrItems\" : 1, \n
\"initialize\" : true, \n
\"isModificationQuery\" : false \n
}, \n
\"cacheable\" : true, \n
\"warnings\" : [ ], \n
\"stats\" : { \n
\"rulesExecuted\" : 35, \n
\"rulesSkipped\" : 0, \n
\"plansCreated\" : 1 \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Using some options\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/explain <<EOF\n
{ \n
\"query\" : \"FOR p IN products LET a = p.id FILTER a == 4 LET name = p.name SORT p.id LIMIT 1 RETURN name\", \n
\"options\" : { \n
\"maxNumberOfPlans\" : 2, \n
\"allPlans\" : true, \n
\"optimizer\" : { \n
\"rules\" : [ \n
\"-all\", \n
\"+use-index-for-sort\", \n
\"+use-index-range\" \n
] \n
} \n
} \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"plans\" : [ \n
{ \n
\"nodes\" : [ \n
{ \n
\"type\" : \"SingletonNode\", \n
\"dependencies\" : [ ], \n
\"id\" : 1, \n
\"estimatedCost\" : 1, \n
\"estimatedNrItems\" : 1 \n
}, \n
{ \n
\"type\" : \"IndexNode\", \n
\"dependencies\" : [ \n
1 \n
], \n
\"id\" : 11, \n
\"estimatedCost\" : 11, \n
\"estimatedNrItems\" : 10, \n
\"outVariable\" : { \n
\"id\" : 0, \n
\"name\" : \"p\" \n
}, \n
\"projections\" : [ ], \n
\"producesResult\" : true, \n
\"database\" : \"_system\", \n
\"collection\" : \"products\", \n
\"satellite\" : false, \n
\"needsGatherNodeSort\" : true, \n
\"indexCoversProjections\" : false, \n
\"indexes\" : [ \n
{ \n
\"id\" : \"104290\", \n
\"type\" : \"skiplist\", \n
\"fields\" : [ \n
\"id\" \n
], \n
\"unique\" : false, \n
\"sparse\" : false, \n
\"deduplicate\" : true \n
} \n
], \n
\"condition\" : { \n
}, \n
\"sorted\" : true, \n
\"ascending\" : true, \n
\"reverse\" : false, \n
\"evalFCalls\" : true, \n
\"fullRange\" : false, \n
\"limit\" : 0 \n
}, \n
{ \n
\"type\" : \"CalculationNode\", \n
\"dependencies\" : [ \n
11 \n
], \n
\"id\" : 3, \n
\"estimatedCost\" : 21, \n
\"estimatedNrItems\" : 10, \n
\"expression\" : { \n
\"type\" : \"attribute access\", \n
\"typeID\" : 35, \n
\"name\" : \"id\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"reference\", \n
\"typeID\" : 45, \n
\"name\" : \"p\", \n
\"id\" : 0 \n
} \n
] \n
}, \n
\"outVariable\" : { \n
\"id\" : 1, \n
\"name\" : \"a\" \n
}, \n
\"canThrow\" : false, \n
\"expressionType\" : \"attribute\" \n
}, \n
{ \n
\"type\" : \"CalculationNode\", \n
\"dependencies\" : [ \n
3 \n
], \n
\"id\" : 4, \n
\"estimatedCost\" : 31, \n
\"estimatedNrItems\" : 10, \n
\"expression\" : { \n
\"type\" : \"compare ==\", \n
\"typeID\" : 25, \n
\"excludesNull\" : false, \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"reference\", \n
\"typeID\" : 45, \n
\"name\" : \"a\", \n
\"id\" : 1 \n
}, \n
{ \n
\"type\" : \"value\", \n
\"typeID\" : 40, \n
\"value\" : 4, \n
\"vType\" : \"int\", \n
\"vTypeID\" : 2 \n
} \n
] \n
}, \n
\"outVariable\" : { \n
\"id\" : 4, \n
\"name\" : \"3\" \n
}, \n
\"canThrow\" : false, \n
\"expressionType\" : \"simple\" \n
}, \n
{ \n
\"type\" : \"FilterNode\", \n
\"dependencies\" : [ \n
4 \n
], \n
\"id\" : 5, \n
\"estimatedCost\" : 41, \n
\"estimatedNrItems\" : 10, \n
\"inVariable\" : { \n
\"id\" : 4, \n
\"name\" : \"3\" \n
} \n
}, \n
{ \n
\"type\" : \"CalculationNode\", \n
\"dependencies\" : [ \n
5 \n
], \n
\"id\" : 6, \n
\"estimatedCost\" : 51, \n
\"estimatedNrItems\" : 10, \n
\"expression\" : { \n
\"type\" : \"attribute access\", \n
\"typeID\" : 35, \n
\"name\" : \"name\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"reference\", \n
\"typeID\" : 45, \n
\"name\" : \"p\", \n
\"id\" : 0 \n
} \n
] \n
}, \n
\"outVariable\" : { \n
\"id\" : 2, \n
\"name\" : \"name\" \n
}, \n
\"canThrow\" : false, \n
\"expressionType\" : \"attribute\" \n
}, \n
{ \n
\"type\" : \"CalculationNode\", \n
\"dependencies\" : [ \n
6 \n
], \n
\"id\" : 7, \n
\"estimatedCost\" : 61, \n
\"estimatedNrItems\" : 10, \n
\"expression\" : { \n
\"type\" : \"attribute access\", \n
\"typeID\" : 35, \n
\"name\" : \"id\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"reference\", \n
\"typeID\" : 45, \n
\"name\" : \"p\", \n
\"id\" : 0 \n
} \n
] \n
}, \n
\"outVariable\" : { \n
\"id\" : 6, \n
\"name\" : \"5\" \n
}, \n
\"canThrow\" : false, \n
\"expressionType\" : \"attribute\" \n
}, \n
{ \n
\"type\" : \"LimitNode\", \n
\"dependencies\" : [ \n
7 \n
], \n
\"id\" : 9, \n
\"estimatedCost\" : 62, \n
\"estimatedNrItems\" : 1, \n
\"offset\" : 0, \n
\"limit\" : 1, \n
\"fullCount\" : false \n
}, \n
{ \n
\"type\" : \"ReturnNode\", \n
\"dependencies\" : [ \n
9 \n
], \n
\"id\" : 10, \n
\"estimatedCost\" : 63, \n
\"estimatedNrItems\" : 1, \n
\"inVariable\" : { \n
\"id\" : 2, \n
\"name\" : \"name\" \n
}, \n
\"count\" : true \n
} \n
], \n
\"rules\" : [ \n
\"use-index-for-sort\" \n
], \n
\"collections\" : [ \n
{ \n
\"name\" : \"products\", \n
\"type\" : \"read\" \n
} \n
], \n
\"variables\" : [ \n
{ \n
\"id\" : 6, \n
\"name\" : \"5\" \n
}, \n
{ \n
\"id\" : 4, \n
\"name\" : \"3\" \n
}, \n
{ \n
\"id\" : 2, \n
\"name\" : \"name\" \n
}, \n
{ \n
\"id\" : 1, \n
\"name\" : \"a\" \n
}, \n
{ \n
\"id\" : 0, \n
\"name\" : \"p\" \n
} \n
], \n
\"estimatedCost\" : 63, \n
\"estimatedNrItems\" : 1, \n
\"initialize\" : true, \n
\"isModificationQuery\" : false \n
} \n
], \n
\"warnings\" : [ ], \n
\"stats\" : { \n
\"rulesExecuted\" : 3, \n
\"rulesSkipped\" : 32, \n
\"plansCreated\" : 1 \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Returning all plans\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/explain <<EOF\n
{ \n
\"query\" : \"FOR p IN products FILTER p.id == 25 RETURN p\", \n
\"options\" : { \n
\"allPlans\" : true \n
} \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"plans\" : [ \n
{ \n
\"nodes\" : [ \n
{ \n
\"type\" : \"SingletonNode\", \n
\"dependencies\" : [ ], \n
\"id\" : 1, \n
\"estimatedCost\" : 1, \n
\"estimatedNrItems\" : 1 \n
}, \n
{ \n
\"type\" : \"IndexNode\", \n
\"dependencies\" : [ \n
1 \n
], \n
\"id\" : 6, \n
\"estimatedCost\" : 1.99, \n
\"estimatedNrItems\" : 1, \n
\"outVariable\" : { \n
\"id\" : 0, \n
\"name\" : \"p\" \n
}, \n
\"projections\" : [ ], \n
\"producesResult\" : true, \n
\"database\" : \"_system\", \n
\"collection\" : \"products\", \n
\"satellite\" : false, \n
\"needsGatherNodeSort\" : false, \n
\"indexCoversProjections\" : false, \n
\"indexes\" : [ \n
{ \n
\"id\" : \"104206\", \n
\"type\" : \"hash\", \n
\"fields\" : [ \n
\"id\" \n
], \n
\"selectivityEstimate\" : 1, \n
\"unique\" : false, \n
\"sparse\" : false, \n
\"deduplicate\" : true \n
} \n
], \n
\"condition\" : { \n
\"type\" : \"n-ary or\", \n
\"typeID\" : 63, \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"n-ary and\", \n
\"typeID\" : 62, \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"compare ==\", \n
\"typeID\" : 25, \n
\"excludesNull\" : false, \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"attribute access\", \n
\"typeID\" : 35, \n
\"name\" : \"id\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"reference\", \n
\"typeID\" : 45, \n
\"name\" : \"p\", \n
\"id\" : 0 \n
} \n
] \n
}, \n
{ \n
\"type\" : \"value\", \n
\"typeID\" : 40, \n
\"value\" : 25, \n
\"vType\" : \"int\", \n
\"vTypeID\" : 2 \n
} \n
] \n
} \n
] \n
} \n
] \n
}, \n
\"sorted\" : true, \n
\"ascending\" : true, \n
\"reverse\" : false, \n
\"evalFCalls\" : true, \n
\"fullRange\" : false, \n
\"limit\" : 0 \n
}, \n
{ \n
\"type\" : \"ReturnNode\", \n
\"dependencies\" : [ \n
6 \n
], \n
\"id\" : 5, \n
\"estimatedCost\" : 2.99, \n
\"estimatedNrItems\" : 1, \n
\"inVariable\" : { \n
\"id\" : 0, \n
\"name\" : \"p\" \n
}, \n
\"count\" : true \n
} \n
], \n
\"rules\" : [ \n
\"use-indexes\", \n
\"remove-filter-covered-by-index\", \n
\"remove-unnecessary-calculations-2\" \n
], \n
\"collections\" : [ \n
{ \n
\"name\" : \"products\", \n
\"type\" : \"read\" \n
} \n
], \n
\"variables\" : [ \n
{ \n
\"id\" : 2, \n
\"name\" : \"1\" \n
}, \n
{ \n
\"id\" : 0, \n
\"name\" : \"p\" \n
} \n
], \n
\"estimatedCost\" : 2.99, \n
\"estimatedNrItems\" : 1, \n
\"initialize\" : true, \n
\"isModificationQuery\" : false \n
} \n
], \n
\"warnings\" : [ ], \n
\"stats\" : { \n
\"rulesExecuted\" : 35, \n
\"rulesSkipped\" : 0, \n
\"plansCreated\" : 1 \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n A query that produces a warning\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/explain <<EOF\n
{ \n
\"query\" : \"FOR i IN 1..10 RETURN 1 / 0\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"plan\" : { \n
\"nodes\" : [ \n
{ \n
\"type\" : \"SingletonNode\", \n
\"dependencies\" : [ ], \n
\"id\" : 1, \n
\"estimatedCost\" : 1, \n
\"estimatedNrItems\" : 1 \n
}, \n
{ \n
\"type\" : \"CalculationNode\", \n
\"dependencies\" : [ \n
1 \n
], \n
\"id\" : 2, \n
\"estimatedCost\" : 2, \n
\"estimatedNrItems\" : 1, \n
\"expression\" : { \n
\"type\" : \"range\", \n
\"typeID\" : 49, \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"value\", \n
\"typeID\" : 40, \n
\"value\" : 1, \n
\"vType\" : \"int\", \n
\"vTypeID\" : 2 \n
}, \n
{ \n
\"type\" : \"value\", \n
\"typeID\" : 40, \n
\"value\" : 10, \n
\"vType\" : \"int\", \n
\"vTypeID\" : 2 \n
} \n
] \n
}, \n
\"outVariable\" : { \n
\"id\" : 2, \n
\"name\" : \"1\" \n
}, \n
\"canThrow\" : false, \n
\"expressionType\" : \"simple\" \n
}, \n
{ \n
\"type\" : \"CalculationNode\", \n
\"dependencies\" : [ \n
2 \n
], \n
\"id\" : 4, \n
\"estimatedCost\" : 3, \n
\"estimatedNrItems\" : 1, \n
\"expression\" : { \n
\"type\" : \"value\", \n
\"typeID\" : 40, \n
\"value\" : null, \n
\"vType\" : \"null\", \n
\"vTypeID\" : 0 \n
}, \n
\"outVariable\" : { \n
\"id\" : 4, \n
\"name\" : \"3\" \n
}, \n
\"canThrow\" : false, \n
\"expressionType\" : \"json\" \n
}, \n
{ \n
\"type\" : \"EnumerateListNode\", \n
\"dependencies\" : [ \n
4 \n
], \n
\"id\" : 3, \n
\"estimatedCost\" : 13, \n
\"estimatedNrItems\" : 10, \n
\"inVariable\" : { \n
\"id\" : 2, \n
\"name\" : \"1\" \n
}, \n
\"outVariable\" : { \n
\"id\" : 0, \n
\"name\" : \"i\" \n
} \n
}, \n
{ \n
\"type\" : \"ReturnNode\", \n
\"dependencies\" : [ \n
3 \n
], \n
\"id\" : 5, \n
\"estimatedCost\" : 23, \n
\"estimatedNrItems\" : 10, \n
\"inVariable\" : { \n
\"id\" : 4, \n
\"name\" : \"3\" \n
}, \n
\"count\" : true \n
} \n
], \n
\"rules\" : [ \n
\"move-calculations-up\", \n
\"move-calculations-up-2\" \n
], \n
\"collections\" : [ ], \n
\"variables\" : [ \n
{ \n
\"id\" : 4, \n
\"name\" : \"3\" \n
}, \n
{ \n
\"id\" : 2, \n
\"name\" : \"1\" \n
}, \n
{ \n
\"id\" : 0, \n
\"name\" : \"i\" \n
} \n
], \n
\"estimatedCost\" : 23, \n
\"estimatedNrItems\" : 10, \n
\"initialize\" : true, \n
\"isModificationQuery\" : false \n
}, \n
\"cacheable\" : false, \n
\"warnings\" : [ \n
{ \n
\"code\" : 1562, \n
\"message\" : \"division by zero\" \n
} \n
], \n
\"stats\" : { \n
\"rulesExecuted\" : 35, \n
\"rulesSkipped\" : 0, \n
\"plansCreated\" : 1 \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Invalid query (missing bind parameter)\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/explain <<EOF\n
{ \n
\"query\" : \"FOR p IN products FILTER p.id == @id LIMIT 2 RETURN p.n\" \n
}\n
EOF\n
\n
HTTP/1.1 Bad Request\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"no value specified for declared bind parameter 'id' (while parsing)\", \n
\"code\" : 400, \n
\"errorNum\" : 1551 \n
}\n
\n\n\n\n\n**Example:**\n The data returned in the **plan** attribute of the result contains one element per AQL top-level statement\n(i.e. `FOR`, `RETURN`, `FILTER` etc.). If the query optimizer removed some unnecessary statements,\nthe result might also contain less elements than there were top-level statements in the AQL query.\n\nThe following example shows a query with a non-sensible filter condition that\nthe optimizer has removed so that there are less top-level statements.\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/explain <<EOF\n
{ \"query\" : \"FOR i IN [ 1, 2, 3 ] FILTER 1 == 2 RETURN i\" }\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"plan\" : { \n
\"nodes\" : [ \n
{ \n
\"type\" : \"SingletonNode\", \n
\"dependencies\" : [ ], \n
\"id\" : 1, \n
\"estimatedCost\" : 1, \n
\"estimatedNrItems\" : 1 \n
}, \n
{ \n
\"type\" : \"CalculationNode\", \n
\"dependencies\" : [ \n
1 \n
], \n
\"id\" : 2, \n
\"estimatedCost\" : 2, \n
\"estimatedNrItems\" : 1, \n
\"expression\" : { \n
\"type\" : \"array\", \n
\"typeID\" : 41, \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"value\", \n
\"typeID\" : 40, \n
\"value\" : 1, \n
\"vType\" : \"int\", \n
\"vTypeID\" : 2 \n
}, \n
{ \n
\"type\" : \"value\", \n
\"typeID\" : 40, \n
\"value\" : 2, \n
\"vType\" : \"int\", \n
\"vTypeID\" : 2 \n
}, \n
{ \n
\"type\" : \"value\", \n
\"typeID\" : 40, \n
\"value\" : 3, \n
\"vType\" : \"int\", \n
\"vTypeID\" : 2 \n
} \n
] \n
}, \n
\"outVariable\" : { \n
\"id\" : 2, \n
\"name\" : \"1\" \n
}, \n
\"canThrow\" : false, \n
\"expressionType\" : \"json\" \n
}, \n
{ \n
\"type\" : \"NoResultsNode\", \n
\"dependencies\" : [ \n
2 \n
], \n
\"id\" : 7, \n
\"estimatedCost\" : 0.5, \n
\"estimatedNrItems\" : 0 \n
}, \n
{ \n
\"type\" : \"EnumerateListNode\", \n
\"dependencies\" : [ \n
7 \n
], \n
\"id\" : 3, \n
\"estimatedCost\" : 0.5, \n
\"estimatedNrItems\" : 0, \n
\"inVariable\" : { \n
\"id\" : 2, \n
\"name\" : \"1\" \n
}, \n
\"outVariable\" : { \n
\"id\" : 0, \n
\"name\" : \"i\" \n
} \n
}, \n
{ \n
\"type\" : \"ReturnNode\", \n
\"dependencies\" : [ \n
3 \n
], \n
\"id\" : 6, \n
\"estimatedCost\" : 0.5, \n
\"estimatedNrItems\" : 0, \n
\"inVariable\" : { \n
\"id\" : 0, \n
\"name\" : \"i\" \n
}, \n
\"count\" : true \n
} \n
], \n
\"rules\" : [ \n
\"move-calculations-up\", \n
\"move-filters-up\", \n
\"remove-unnecessary-filters\", \n
\"remove-unnecessary-calculations\" \n
], \n
\"collections\" : [ ], \n
\"variables\" : [ \n
{ \n
\"id\" : 4, \n
\"name\" : \"3\" \n
}, \n
{ \n
\"id\" : 2, \n
\"name\" : \"1\" \n
}, \n
{ \n
\"id\" : 0, \n
\"name\" : \"i\" \n
} \n
], \n
\"estimatedCost\" : 0.5, \n
\"estimatedNrItems\" : 0, \n
\"initialize\" : true, \n
\"isModificationQuery\" : false \n
}, \n
\"cacheable\" : true, \n
\"warnings\" : [ ], \n
\"stats\" : { \n
\"rulesExecuted\" : 35, \n
\"rulesSkipped\" : 0, \n
\"plansCreated\" : 1 \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **query**: the query which you want explained; If the query references any bind variables,\n these must also be passed in the attribute *bindVars*. Additional\n options for the query can be passed in the *options* attribute.\n - **options**:\n - **optimizer.rules** (string): an array of to-be-included or to-be-excluded optimizer rules\n can be put into this attribute, telling the optimizer to include or exclude\n specific rules. To disable a rule, prefix its name with a `-`, to enable a rule, prefix it\n with a `+`. There is also a pseudo-rule `all`, which will match all optimizer rules.\n - **maxNumberOfPlans**: an optional maximum number of plans that the optimizer is \n allowed to generate. Setting this attribute to a low value allows to put a\n cap on the amount of work the optimizer does.\n - **allPlans**: if set to *true*, all possible execution plans will be returned.\n The default is *false*, meaning only the optimal plan will be returned.\n - **bindVars** (object): key/value pairs representing the bind parameters.\n\n\n\n\n\nTo explain how an AQL query would be executed on the server, the query string\ncan be sent to the server via an HTTP POST request. The server will then validate\nthe query and create an execution plan for it. The execution plan will be\nreturned, but the query will not be executed.\n\nThe execution plan that is returned by the server can be used to estimate the\nprobable performance of the query. Though the actual performance will depend\non many different factors, the execution plan normally can provide some rough\nestimates on the amount of work the server needs to do in order to actually run \nthe query.\n\nBy default, the explain operation will return the optimal plan as chosen by\nthe query optimizer The optimal plan is the plan with the lowest total estimated\ncost. The plan will be returned in the attribute *plan* of the response object.\nIf the option *allPlans* is specified in the request, the result will contain \nall plans created by the optimizer. The plans will then be returned in the \nattribute *plans*.\n\nThe result will also contain an attribute *warnings*, which is an array of \nwarnings that occurred during optimization or execution plan creation. Additionally,\na *stats* attribute is contained in the result with some optimizer statistics.\nIf *allPlans* is set to *false*, the result will contain an attribute *cacheable* \nthat states whether the query results can be cached on the server if the query\nresult cache were used. The *cacheable* attribute is not present when *allPlans*\nis set to *true*.\n\nEach plan in the result is a JSON object with the following attributes:\n- *nodes*: the array of execution nodes of the plan. The array of available node types\n can be found [here](../../AQL/ExecutionAndPerformance/Optimizer.html)\n\n- *estimatedCost*: the total estimated cost for the plan. If there are multiple\n plans, the optimizer will choose the plan with the lowest total cost.\n\n- *collections*: an array of collections used in the query\n\n- *rules*: an array of rules the optimizer applied. An overview of the\n available rules can be found [here](../../AQL/ExecutionAndPerformance/Optimizer.html)\n\n- *variables*: array of variables used in the query (note: this may contain\n internal variables created by the optimizer)\n\n\n\n\n**Example:**\n Valid query\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/explain <<EOF\n
{ \n
\"query\" : \"FOR p IN products RETURN p\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"plan\" : { \n
\"nodes\" : [ \n
{ \n
\"type\" : \"SingletonNode\", \n
\"dependencies\" : [ ], \n
\"id\" : 1, \n
\"estimatedCost\" : 1, \n
\"estimatedNrItems\" : 1 \n
}, \n
{ \n
\"type\" : \"EnumerateCollectionNode\", \n
\"dependencies\" : [ \n
1 \n
], \n
\"id\" : 2, \n
\"estimatedCost\" : 12, \n
\"estimatedNrItems\" : 10, \n
\"random\" : false, \n
\"outVariable\" : { \n
\"id\" : 0, \n
\"name\" : \"p\" \n
}, \n
\"projections\" : [ ], \n
\"producesResult\" : true, \n
\"database\" : \"_system\", \n
\"collection\" : \"products\", \n
\"satellite\" : false \n
}, \n
{ \n
\"type\" : \"ReturnNode\", \n
\"dependencies\" : [ \n
2 \n
], \n
\"id\" : 3, \n
\"estimatedCost\" : 22, \n
\"estimatedNrItems\" : 10, \n
\"inVariable\" : { \n
\"id\" : 0, \n
\"name\" : \"p\" \n
}, \n
\"count\" : true \n
} \n
], \n
\"rules\" : [ ], \n
\"collections\" : [ \n
{ \n
\"name\" : \"products\", \n
\"type\" : \"read\" \n
} \n
], \n
\"variables\" : [ \n
{ \n
\"id\" : 0, \n
\"name\" : \"p\" \n
} \n
], \n
\"estimatedCost\" : 22, \n
\"estimatedNrItems\" : 10, \n
\"initialize\" : true, \n
\"isModificationQuery\" : false \n
}, \n
\"cacheable\" : true, \n
\"warnings\" : [ ], \n
\"stats\" : { \n
\"rulesExecuted\" : 35, \n
\"rulesSkipped\" : 0, \n
\"plansCreated\" : 1 \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n A plan with some optimizer rules applied\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/explain <<EOF\n
{ \n
\"query\" : \"FOR p IN products LET a = p.id FILTER a == 4 LET name = p.name SORT p.id LIMIT 1 RETURN name\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"plan\" : { \n
\"nodes\" : [ \n
{ \n
\"type\" : \"SingletonNode\", \n
\"dependencies\" : [ ], \n
\"id\" : 1, \n
\"estimatedCost\" : 1, \n
\"estimatedNrItems\" : 1 \n
}, \n
{ \n
\"type\" : \"IndexNode\", \n
\"dependencies\" : [ \n
1 \n
], \n
\"id\" : 11, \n
\"estimatedCost\" : 4.321928094887362, \n
\"estimatedNrItems\" : 1, \n
\"outVariable\" : { \n
\"id\" : 0, \n
\"name\" : \"p\" \n
}, \n
\"projections\" : [ ], \n
\"producesResult\" : true, \n
\"database\" : \"_system\", \n
\"collection\" : \"products\", \n
\"satellite\" : false, \n
\"needsGatherNodeSort\" : true, \n
\"indexCoversProjections\" : false, \n
\"indexes\" : [ \n
{ \n
\"id\" : \"104254\", \n
\"type\" : \"skiplist\", \n
\"fields\" : [ \n
\"id\" \n
], \n
\"unique\" : false, \n
\"sparse\" : false, \n
\"deduplicate\" : true \n
} \n
], \n
\"condition\" : { \n
\"type\" : \"n-ary or\", \n
\"typeID\" : 63, \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"n-ary and\", \n
\"typeID\" : 62, \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"compare ==\", \n
\"typeID\" : 25, \n
\"excludesNull\" : false, \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"attribute access\", \n
\"typeID\" : 35, \n
\"name\" : \"id\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"reference\", \n
\"typeID\" : 45, \n
\"name\" : \"p\", \n
\"id\" : 0 \n
} \n
] \n
}, \n
{ \n
\"type\" : \"value\", \n
\"typeID\" : 40, \n
\"value\" : 4, \n
\"vType\" : \"int\", \n
\"vTypeID\" : 2 \n
} \n
] \n
} \n
] \n
} \n
] \n
}, \n
\"sorted\" : true, \n
\"ascending\" : true, \n
\"reverse\" : false, \n
\"evalFCalls\" : true, \n
\"fullRange\" : false, \n
\"limit\" : 0 \n
}, \n
{ \n
\"type\" : \"CalculationNode\", \n
\"dependencies\" : [ \n
11 \n
], \n
\"id\" : 4, \n
\"estimatedCost\" : 5.321928094887362, \n
\"estimatedNrItems\" : 1, \n
\"expression\" : { \n
\"type\" : \"compare ==\", \n
\"typeID\" : 25, \n
\"excludesNull\" : false, \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"attribute access\", \n
\"typeID\" : 35, \n
\"name\" : \"id\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"reference\", \n
\"typeID\" : 45, \n
\"name\" : \"p\", \n
\"id\" : 0 \n
} \n
] \n
}, \n
{ \n
\"type\" : \"value\", \n
\"typeID\" : 40, \n
\"value\" : 4, \n
\"vType\" : \"int\", \n
\"vTypeID\" : 2 \n
} \n
] \n
}, \n
\"outVariable\" : { \n
\"id\" : 4, \n
\"name\" : \"3\" \n
}, \n
\"canThrow\" : false, \n
\"expressionType\" : \"simple\" \n
}, \n
{ \n
\"type\" : \"FilterNode\", \n
\"dependencies\" : [ \n
4 \n
], \n
\"id\" : 5, \n
\"estimatedCost\" : 6.321928094887362, \n
\"estimatedNrItems\" : 1, \n
\"inVariable\" : { \n
\"id\" : 4, \n
\"name\" : \"3\" \n
} \n
}, \n
{ \n
\"type\" : \"LimitNode\", \n
\"dependencies\" : [ \n
5 \n
], \n
\"id\" : 9, \n
\"estimatedCost\" : 7.321928094887362, \n
\"estimatedNrItems\" : 1, \n
\"offset\" : 0, \n
\"limit\" : 1, \n
\"fullCount\" : false \n
}, \n
{ \n
\"type\" : \"CalculationNode\", \n
\"dependencies\" : [ \n
9 \n
], \n
\"id\" : 6, \n
\"estimatedCost\" : 8.321928094887362, \n
\"estimatedNrItems\" : 1, \n
\"expression\" : { \n
\"type\" : \"attribute access\", \n
\"typeID\" : 35, \n
\"name\" : \"name\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"reference\", \n
\"typeID\" : 45, \n
\"name\" : \"p\", \n
\"id\" : 0 \n
} \n
] \n
}, \n
\"outVariable\" : { \n
\"id\" : 2, \n
\"name\" : \"name\" \n
}, \n
\"canThrow\" : false, \n
\"expressionType\" : \"attribute\" \n
}, \n
{ \n
\"type\" : \"ReturnNode\", \n
\"dependencies\" : [ \n
6 \n
], \n
\"id\" : 10, \n
\"estimatedCost\" : 9.321928094887362, \n
\"estimatedNrItems\" : 1, \n
\"inVariable\" : { \n
\"id\" : 2, \n
\"name\" : \"name\" \n
}, \n
\"count\" : true \n
} \n
], \n
\"rules\" : [ \n
\"move-calculations-up\", \n
\"remove-redundant-calculations\", \n
\"remove-unnecessary-calculations\", \n
\"move-calculations-up-2\", \n
\"use-indexes\", \n
\"use-index-for-sort\", \n
\"remove-unnecessary-calculations-2\", \n
\"move-calculations-down\" \n
], \n
\"collections\" : [ \n
{ \n
\"name\" : \"products\", \n
\"type\" : \"read\" \n
} \n
], \n
\"variables\" : [ \n
{ \n
\"id\" : 6, \n
\"name\" : \"5\" \n
}, \n
{ \n
\"id\" : 4, \n
\"name\" : \"3\" \n
}, \n
{ \n
\"id\" : 2, \n
\"name\" : \"name\" \n
}, \n
{ \n
\"id\" : 1, \n
\"name\" : \"a\" \n
}, \n
{ \n
\"id\" : 0, \n
\"name\" : \"p\" \n
} \n
], \n
\"estimatedCost\" : 9.321928094887362, \n
\"estimatedNrItems\" : 1, \n
\"initialize\" : true, \n
\"isModificationQuery\" : false \n
}, \n
\"cacheable\" : true, \n
\"warnings\" : [ ], \n
\"stats\" : { \n
\"rulesExecuted\" : 35, \n
\"rulesSkipped\" : 0, \n
\"plansCreated\" : 1 \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Using some options\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/explain <<EOF\n
{ \n
\"query\" : \"FOR p IN products LET a = p.id FILTER a == 4 LET name = p.name SORT p.id LIMIT 1 RETURN name\", \n
\"options\" : { \n
\"maxNumberOfPlans\" : 2, \n
\"allPlans\" : true, \n
\"optimizer\" : { \n
\"rules\" : [ \n
\"-all\", \n
\"+use-index-for-sort\", \n
\"+use-index-range\" \n
] \n
} \n
} \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"plans\" : [ \n
{ \n
\"nodes\" : [ \n
{ \n
\"type\" : \"SingletonNode\", \n
\"dependencies\" : [ ], \n
\"id\" : 1, \n
\"estimatedCost\" : 1, \n
\"estimatedNrItems\" : 1 \n
}, \n
{ \n
\"type\" : \"IndexNode\", \n
\"dependencies\" : [ \n
1 \n
], \n
\"id\" : 11, \n
\"estimatedCost\" : 11, \n
\"estimatedNrItems\" : 10, \n
\"outVariable\" : { \n
\"id\" : 0, \n
\"name\" : \"p\" \n
}, \n
\"projections\" : [ ], \n
\"producesResult\" : true, \n
\"database\" : \"_system\", \n
\"collection\" : \"products\", \n
\"satellite\" : false, \n
\"needsGatherNodeSort\" : true, \n
\"indexCoversProjections\" : false, \n
\"indexes\" : [ \n
{ \n
\"id\" : \"104300\", \n
\"type\" : \"skiplist\", \n
\"fields\" : [ \n
\"id\" \n
], \n
\"unique\" : false, \n
\"sparse\" : false, \n
\"deduplicate\" : true \n
} \n
], \n
\"condition\" : { \n
}, \n
\"sorted\" : true, \n
\"ascending\" : true, \n
\"reverse\" : false, \n
\"evalFCalls\" : true, \n
\"fullRange\" : false, \n
\"limit\" : 0 \n
}, \n
{ \n
\"type\" : \"CalculationNode\", \n
\"dependencies\" : [ \n
11 \n
], \n
\"id\" : 3, \n
\"estimatedCost\" : 21, \n
\"estimatedNrItems\" : 10, \n
\"expression\" : { \n
\"type\" : \"attribute access\", \n
\"typeID\" : 35, \n
\"name\" : \"id\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"reference\", \n
\"typeID\" : 45, \n
\"name\" : \"p\", \n
\"id\" : 0 \n
} \n
] \n
}, \n
\"outVariable\" : { \n
\"id\" : 1, \n
\"name\" : \"a\" \n
}, \n
\"canThrow\" : false, \n
\"expressionType\" : \"attribute\" \n
}, \n
{ \n
\"type\" : \"CalculationNode\", \n
\"dependencies\" : [ \n
3 \n
], \n
\"id\" : 4, \n
\"estimatedCost\" : 31, \n
\"estimatedNrItems\" : 10, \n
\"expression\" : { \n
\"type\" : \"compare ==\", \n
\"typeID\" : 25, \n
\"excludesNull\" : false, \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"reference\", \n
\"typeID\" : 45, \n
\"name\" : \"a\", \n
\"id\" : 1 \n
}, \n
{ \n
\"type\" : \"value\", \n
\"typeID\" : 40, \n
\"value\" : 4, \n
\"vType\" : \"int\", \n
\"vTypeID\" : 2 \n
} \n
] \n
}, \n
\"outVariable\" : { \n
\"id\" : 4, \n
\"name\" : \"3\" \n
}, \n
\"canThrow\" : false, \n
\"expressionType\" : \"simple\" \n
}, \n
{ \n
\"type\" : \"FilterNode\", \n
\"dependencies\" : [ \n
4 \n
], \n
\"id\" : 5, \n
\"estimatedCost\" : 41, \n
\"estimatedNrItems\" : 10, \n
\"inVariable\" : { \n
\"id\" : 4, \n
\"name\" : \"3\" \n
} \n
}, \n
{ \n
\"type\" : \"CalculationNode\", \n
\"dependencies\" : [ \n
5 \n
], \n
\"id\" : 6, \n
\"estimatedCost\" : 51, \n
\"estimatedNrItems\" : 10, \n
\"expression\" : { \n
\"type\" : \"attribute access\", \n
\"typeID\" : 35, \n
\"name\" : \"name\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"reference\", \n
\"typeID\" : 45, \n
\"name\" : \"p\", \n
\"id\" : 0 \n
} \n
] \n
}, \n
\"outVariable\" : { \n
\"id\" : 2, \n
\"name\" : \"name\" \n
}, \n
\"canThrow\" : false, \n
\"expressionType\" : \"attribute\" \n
}, \n
{ \n
\"type\" : \"CalculationNode\", \n
\"dependencies\" : [ \n
6 \n
], \n
\"id\" : 7, \n
\"estimatedCost\" : 61, \n
\"estimatedNrItems\" : 10, \n
\"expression\" : { \n
\"type\" : \"attribute access\", \n
\"typeID\" : 35, \n
\"name\" : \"id\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"reference\", \n
\"typeID\" : 45, \n
\"name\" : \"p\", \n
\"id\" : 0 \n
} \n
] \n
}, \n
\"outVariable\" : { \n
\"id\" : 6, \n
\"name\" : \"5\" \n
}, \n
\"canThrow\" : false, \n
\"expressionType\" : \"attribute\" \n
}, \n
{ \n
\"type\" : \"LimitNode\", \n
\"dependencies\" : [ \n
7 \n
], \n
\"id\" : 9, \n
\"estimatedCost\" : 62, \n
\"estimatedNrItems\" : 1, \n
\"offset\" : 0, \n
\"limit\" : 1, \n
\"fullCount\" : false \n
}, \n
{ \n
\"type\" : \"ReturnNode\", \n
\"dependencies\" : [ \n
9 \n
], \n
\"id\" : 10, \n
\"estimatedCost\" : 63, \n
\"estimatedNrItems\" : 1, \n
\"inVariable\" : { \n
\"id\" : 2, \n
\"name\" : \"name\" \n
}, \n
\"count\" : true \n
} \n
], \n
\"rules\" : [ \n
\"use-index-for-sort\" \n
], \n
\"collections\" : [ \n
{ \n
\"name\" : \"products\", \n
\"type\" : \"read\" \n
} \n
], \n
\"variables\" : [ \n
{ \n
\"id\" : 6, \n
\"name\" : \"5\" \n
}, \n
{ \n
\"id\" : 4, \n
\"name\" : \"3\" \n
}, \n
{ \n
\"id\" : 2, \n
\"name\" : \"name\" \n
}, \n
{ \n
\"id\" : 1, \n
\"name\" : \"a\" \n
}, \n
{ \n
\"id\" : 0, \n
\"name\" : \"p\" \n
} \n
], \n
\"estimatedCost\" : 63, \n
\"estimatedNrItems\" : 1, \n
\"initialize\" : true, \n
\"isModificationQuery\" : false \n
} \n
], \n
\"warnings\" : [ ], \n
\"stats\" : { \n
\"rulesExecuted\" : 3, \n
\"rulesSkipped\" : 32, \n
\"plansCreated\" : 1 \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Returning all plans\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/explain <<EOF\n
{ \n
\"query\" : \"FOR p IN products FILTER p.id == 25 RETURN p\", \n
\"options\" : { \n
\"allPlans\" : true \n
} \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"plans\" : [ \n
{ \n
\"nodes\" : [ \n
{ \n
\"type\" : \"SingletonNode\", \n
\"dependencies\" : [ ], \n
\"id\" : 1, \n
\"estimatedCost\" : 1, \n
\"estimatedNrItems\" : 1 \n
}, \n
{ \n
\"type\" : \"IndexNode\", \n
\"dependencies\" : [ \n
1 \n
], \n
\"id\" : 6, \n
\"estimatedCost\" : 1.99, \n
\"estimatedNrItems\" : 1, \n
\"outVariable\" : { \n
\"id\" : 0, \n
\"name\" : \"p\" \n
}, \n
\"projections\" : [ ], \n
\"producesResult\" : true, \n
\"database\" : \"_system\", \n
\"collection\" : \"products\", \n
\"satellite\" : false, \n
\"needsGatherNodeSort\" : false, \n
\"indexCoversProjections\" : false, \n
\"indexes\" : [ \n
{ \n
\"id\" : \"104216\", \n
\"type\" : \"hash\", \n
\"fields\" : [ \n
\"id\" \n
], \n
\"selectivityEstimate\" : 1, \n
\"unique\" : false, \n
\"sparse\" : false, \n
\"deduplicate\" : true \n
} \n
], \n
\"condition\" : { \n
\"type\" : \"n-ary or\", \n
\"typeID\" : 63, \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"n-ary and\", \n
\"typeID\" : 62, \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"compare ==\", \n
\"typeID\" : 25, \n
\"excludesNull\" : false, \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"attribute access\", \n
\"typeID\" : 35, \n
\"name\" : \"id\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"reference\", \n
\"typeID\" : 45, \n
\"name\" : \"p\", \n
\"id\" : 0 \n
} \n
] \n
}, \n
{ \n
\"type\" : \"value\", \n
\"typeID\" : 40, \n
\"value\" : 25, \n
\"vType\" : \"int\", \n
\"vTypeID\" : 2 \n
} \n
] \n
} \n
] \n
} \n
] \n
}, \n
\"sorted\" : true, \n
\"ascending\" : true, \n
\"reverse\" : false, \n
\"evalFCalls\" : true, \n
\"fullRange\" : false, \n
\"limit\" : 0 \n
}, \n
{ \n
\"type\" : \"ReturnNode\", \n
\"dependencies\" : [ \n
6 \n
], \n
\"id\" : 5, \n
\"estimatedCost\" : 2.99, \n
\"estimatedNrItems\" : 1, \n
\"inVariable\" : { \n
\"id\" : 0, \n
\"name\" : \"p\" \n
}, \n
\"count\" : true \n
} \n
], \n
\"rules\" : [ \n
\"use-indexes\", \n
\"remove-filter-covered-by-index\", \n
\"remove-unnecessary-calculations-2\" \n
], \n
\"collections\" : [ \n
{ \n
\"name\" : \"products\", \n
\"type\" : \"read\" \n
} \n
], \n
\"variables\" : [ \n
{ \n
\"id\" : 2, \n
\"name\" : \"1\" \n
}, \n
{ \n
\"id\" : 0, \n
\"name\" : \"p\" \n
} \n
], \n
\"estimatedCost\" : 2.99, \n
\"estimatedNrItems\" : 1, \n
\"initialize\" : true, \n
\"isModificationQuery\" : false \n
} \n
], \n
\"warnings\" : [ ], \n
\"stats\" : { \n
\"rulesExecuted\" : 35, \n
\"rulesSkipped\" : 0, \n
\"plansCreated\" : 1 \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n A query that produces a warning\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/explain <<EOF\n
{ \n
\"query\" : \"FOR i IN 1..10 RETURN 1 / 0\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"plan\" : { \n
\"nodes\" : [ \n
{ \n
\"type\" : \"SingletonNode\", \n
\"dependencies\" : [ ], \n
\"id\" : 1, \n
\"estimatedCost\" : 1, \n
\"estimatedNrItems\" : 1 \n
}, \n
{ \n
\"type\" : \"CalculationNode\", \n
\"dependencies\" : [ \n
1 \n
], \n
\"id\" : 2, \n
\"estimatedCost\" : 2, \n
\"estimatedNrItems\" : 1, \n
\"expression\" : { \n
\"type\" : \"range\", \n
\"typeID\" : 49, \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"value\", \n
\"typeID\" : 40, \n
\"value\" : 1, \n
\"vType\" : \"int\", \n
\"vTypeID\" : 2 \n
}, \n
{ \n
\"type\" : \"value\", \n
\"typeID\" : 40, \n
\"value\" : 10, \n
\"vType\" : \"int\", \n
\"vTypeID\" : 2 \n
} \n
] \n
}, \n
\"outVariable\" : { \n
\"id\" : 2, \n
\"name\" : \"1\" \n
}, \n
\"canThrow\" : false, \n
\"expressionType\" : \"simple\" \n
}, \n
{ \n
\"type\" : \"CalculationNode\", \n
\"dependencies\" : [ \n
2 \n
], \n
\"id\" : 4, \n
\"estimatedCost\" : 3, \n
\"estimatedNrItems\" : 1, \n
\"expression\" : { \n
\"type\" : \"value\", \n
\"typeID\" : 40, \n
\"value\" : null, \n
\"vType\" : \"null\", \n
\"vTypeID\" : 0 \n
}, \n
\"outVariable\" : { \n
\"id\" : 4, \n
\"name\" : \"3\" \n
}, \n
\"canThrow\" : false, \n
\"expressionType\" : \"json\" \n
}, \n
{ \n
\"type\" : \"EnumerateListNode\", \n
\"dependencies\" : [ \n
4 \n
], \n
\"id\" : 3, \n
\"estimatedCost\" : 13, \n
\"estimatedNrItems\" : 10, \n
\"inVariable\" : { \n
\"id\" : 2, \n
\"name\" : \"1\" \n
}, \n
\"outVariable\" : { \n
\"id\" : 0, \n
\"name\" : \"i\" \n
} \n
}, \n
{ \n
\"type\" : \"ReturnNode\", \n
\"dependencies\" : [ \n
3 \n
], \n
\"id\" : 5, \n
\"estimatedCost\" : 23, \n
\"estimatedNrItems\" : 10, \n
\"inVariable\" : { \n
\"id\" : 4, \n
\"name\" : \"3\" \n
}, \n
\"count\" : true \n
} \n
], \n
\"rules\" : [ \n
\"move-calculations-up\", \n
\"move-calculations-up-2\" \n
], \n
\"collections\" : [ ], \n
\"variables\" : [ \n
{ \n
\"id\" : 4, \n
\"name\" : \"3\" \n
}, \n
{ \n
\"id\" : 2, \n
\"name\" : \"1\" \n
}, \n
{ \n
\"id\" : 0, \n
\"name\" : \"i\" \n
} \n
], \n
\"estimatedCost\" : 23, \n
\"estimatedNrItems\" : 10, \n
\"initialize\" : true, \n
\"isModificationQuery\" : false \n
}, \n
\"cacheable\" : false, \n
\"warnings\" : [ \n
{ \n
\"code\" : 1562, \n
\"message\" : \"division by zero\" \n
} \n
], \n
\"stats\" : { \n
\"rulesExecuted\" : 35, \n
\"rulesSkipped\" : 0, \n
\"plansCreated\" : 1 \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Invalid query (missing bind parameter)\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/explain <<EOF\n
{ \n
\"query\" : \"FOR p IN products FILTER p.id == @id LIMIT 2 RETURN p.n\" \n
}\n
EOF\n
\n
HTTP/1.1 Bad Request\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"no value specified for declared bind parameter 'id' (while parsing)\", \n
\"code\" : 400, \n
\"errorNum\" : 1551 \n
}\n
\n\n\n\n\n**Example:**\n The data returned in the **plan** attribute of the result contains one element per AQL top-level statement\n(i.e. `FOR`, `RETURN`, `FILTER` etc.). If the query optimizer removed some unnecessary statements,\nthe result might also contain less elements than there were top-level statements in the AQL query.\n\nThe following example shows a query with a non-sensible filter condition that\nthe optimizer has removed so that there are less top-level statements.\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/explain <<EOF\n
{ \"query\" : \"FOR i IN [ 1, 2, 3 ] FILTER 1 == 2 RETURN i\" }\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"plan\" : { \n
\"nodes\" : [ \n
{ \n
\"type\" : \"SingletonNode\", \n
\"dependencies\" : [ ], \n
\"id\" : 1, \n
\"estimatedCost\" : 1, \n
\"estimatedNrItems\" : 1 \n
}, \n
{ \n
\"type\" : \"CalculationNode\", \n
\"dependencies\" : [ \n
1 \n
], \n
\"id\" : 2, \n
\"estimatedCost\" : 2, \n
\"estimatedNrItems\" : 1, \n
\"expression\" : { \n
\"type\" : \"array\", \n
\"typeID\" : 41, \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"value\", \n
\"typeID\" : 40, \n
\"value\" : 1, \n
\"vType\" : \"int\", \n
\"vTypeID\" : 2 \n
}, \n
{ \n
\"type\" : \"value\", \n
\"typeID\" : 40, \n
\"value\" : 2, \n
\"vType\" : \"int\", \n
\"vTypeID\" : 2 \n
}, \n
{ \n
\"type\" : \"value\", \n
\"typeID\" : 40, \n
\"value\" : 3, \n
\"vType\" : \"int\", \n
\"vTypeID\" : 2 \n
} \n
] \n
}, \n
\"outVariable\" : { \n
\"id\" : 2, \n
\"name\" : \"1\" \n
}, \n
\"canThrow\" : false, \n
\"expressionType\" : \"json\" \n
}, \n
{ \n
\"type\" : \"NoResultsNode\", \n
\"dependencies\" : [ \n
2 \n
], \n
\"id\" : 7, \n
\"estimatedCost\" : 0.5, \n
\"estimatedNrItems\" : 0 \n
}, \n
{ \n
\"type\" : \"EnumerateListNode\", \n
\"dependencies\" : [ \n
7 \n
], \n
\"id\" : 3, \n
\"estimatedCost\" : 0.5, \n
\"estimatedNrItems\" : 0, \n
\"inVariable\" : { \n
\"id\" : 2, \n
\"name\" : \"1\" \n
}, \n
\"outVariable\" : { \n
\"id\" : 0, \n
\"name\" : \"i\" \n
} \n
}, \n
{ \n
\"type\" : \"ReturnNode\", \n
\"dependencies\" : [ \n
3 \n
], \n
\"id\" : 6, \n
\"estimatedCost\" : 0.5, \n
\"estimatedNrItems\" : 0, \n
\"inVariable\" : { \n
\"id\" : 0, \n
\"name\" : \"i\" \n
}, \n
\"count\" : true \n
} \n
], \n
\"rules\" : [ \n
\"move-calculations-up\", \n
\"move-filters-up\", \n
\"remove-unnecessary-filters\", \n
\"remove-unnecessary-calculations\" \n
], \n
\"collections\" : [ ], \n
\"variables\" : [ \n
{ \n
\"id\" : 4, \n
\"name\" : \"3\" \n
}, \n
{ \n
\"id\" : 2, \n
\"name\" : \"1\" \n
}, \n
{ \n
\"id\" : 0, \n
\"name\" : \"i\" \n
} \n
], \n
\"estimatedCost\" : 0.5, \n
\"estimatedNrItems\" : 0, \n
\"initialize\" : true, \n
\"isModificationQuery\" : false \n
}, \n
\"cacheable\" : true, \n
\"warnings\" : [ ], \n
\"stats\" : { \n
\"rulesExecuted\" : 35, \n
\"rulesSkipped\" : 0, \n
\"plansCreated\" : 1 \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n",
"parameters": [
{
"in": "body",
@@ -9817,7 +9817,7 @@
},
"/_api/gharial": {
"get": {
- "description": "\n\nLists all graphs stored in this database.\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nIs returned if the module is available and the graphs could be listed.\n\n- **graphs**: \n - **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"graphs\" : [ \n
{ \n
\"_key\" : \"routeplanner\", \n
\"_id\" : \"_graphs/routeplanner\", \n
\"_rev\" : \"_YNEaE9G--B\", \n
\"numberOfShards\" : 1, \n
\"replicationFactor\" : 1, \n
\"isSmart\" : false, \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"frenchHighway\", \n
\"from\" : [ \n
\"frenchCity\" \n
], \n
\"to\" : [ \n
\"frenchCity\" \n
] \n
}, \n
{ \n
\"collection\" : \"germanHighway\", \n
\"from\" : [ \n
\"germanCity\" \n
], \n
\"to\" : [ \n
\"germanCity\" \n
] \n
}, \n
{ \n
\"collection\" : \"internationalHighway\", \n
\"from\" : [ \n
\"frenchCity\", \n
\"germanCity\" \n
], \n
\"to\" : [ \n
\"frenchCity\", \n
\"germanCity\" \n
] \n
} \n
], \n
\"orphanCollections\" : [ ] \n
}, \n
{ \n
\"_key\" : \"social\", \n
\"_id\" : \"_graphs/social\", \n
\"_rev\" : \"_YNEaE6C--B\", \n
\"numberOfShards\" : 1, \n
\"replicationFactor\" : 1, \n
\"isSmart\" : false, \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"relation\", \n
\"from\" : [ \n
\"female\", \n
\"male\" \n
], \n
\"to\" : [ \n
\"female\", \n
\"male\" \n
] \n
} \n
], \n
\"orphanCollections\" : [ ] \n
} \n
] \n
}\n
\n\n\n\n\n",
+ "description": "\n\nLists all graphs stored in this database.\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nIs returned if the module is available and the graphs could be listed.\n\n- **graphs**: \n - **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"graphs\" : [ \n
{ \n
\"_key\" : \"routeplanner\", \n
\"_id\" : \"_graphs/routeplanner\", \n
\"_rev\" : \"_YOn1HVm--B\", \n
\"numberOfShards\" : 1, \n
\"replicationFactor\" : 1, \n
\"isSmart\" : false, \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"frenchHighway\", \n
\"from\" : [ \n
\"frenchCity\" \n
], \n
\"to\" : [ \n
\"frenchCity\" \n
] \n
}, \n
{ \n
\"collection\" : \"germanHighway\", \n
\"from\" : [ \n
\"germanCity\" \n
], \n
\"to\" : [ \n
\"germanCity\" \n
] \n
}, \n
{ \n
\"collection\" : \"internationalHighway\", \n
\"from\" : [ \n
\"frenchCity\", \n
\"germanCity\" \n
], \n
\"to\" : [ \n
\"frenchCity\", \n
\"germanCity\" \n
] \n
} \n
], \n
\"orphanCollections\" : [ ] \n
}, \n
{ \n
\"_key\" : \"social\", \n
\"_id\" : \"_graphs/social\", \n
\"_rev\" : \"_YOn1HT---B\", \n
\"numberOfShards\" : 1, \n
\"replicationFactor\" : 1, \n
\"isSmart\" : false, \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"relation\", \n
\"from\" : [ \n
\"female\", \n
\"male\" \n
], \n
\"to\" : [ \n
\"female\", \n
\"male\" \n
] \n
} \n
], \n
\"orphanCollections\" : [ ] \n
} \n
] \n
}\n
\n\n\n\n\n",
"parameters": [],
"produces": [
"application/json"
@@ -9840,7 +9840,7 @@
"x-hints": ""
},
"post": {
- "description": "\n\nThe creation of a graph requires the name of the graph and a\ndefinition of its edges.\n[See also edge definitions](../../Manual/Graphs/GeneralGraphs/Management.html#edge-definitions).\n\n\n**A JSON object with these properties is required:**\n\n - **isSmart**: Define if the created graph should be smart.\n This only has effect in Enterprise Edition.\n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n - **name**: Name of the graph.\n - **options**:\n - **smartGraphAttribute**: Only has effect in Enterprise Edition and it is required if isSmart is true.\n The attribute name that is used to smartly shard the vertices of a graph.\n Every vertex in this SmartGraph has to have this attribute.\n Cannot be modified later.\n - **numberOfShards**: The number of shards that is used for every collection within this graph.\n Cannot be modified later.\n - **replicationFactor**: The replication factor used when initially creating collections for this graph.\n\n\n\n**HTTP 201**\n*A json document with these Properties is returned:*\n\nIs returned if the graph could be created and waitForSync is enabled\nfor the `_graphs` collection, or given in the request.\nThe response body contains the graph configuration that has been stored.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nIs returned if the graph could be created and waitForSync is disabled\nfor the `_graphs` collection and not given in the request.\nThe response body contains the graph configuration that has been stored.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 400**\n*A json document with these Properties is returned:*\n\nReturned if the request is in a wrong format.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to create a graph you at least need to have the following privileges:\n 1. `Administrate` access on the Database.\n 2. `Read Only` access on every collection used within this graph.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 409**\n*A json document with these Properties is returned:*\n\nReturned if there is a conflict storing the graph. This can occur\neither if a graph with this name is already stored, or if there is one\nedge definition with a the same\n[edge collection](../../Manual/Appendix/Glossary.html#edge-collection) but a\ndifferent signature used in any other graph.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial <<EOF\n
{ \n
\"name\" : \"myGraph\", \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"edges\", \n
\"from\" : [ \n
\"startVertices\" \n
], \n
\"to\" : [ \n
\"endVertices\" \n
] \n
} \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YNEaEYi--B\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"graph\" : { \n
\"_key\" : \"myGraph\", \n
\"numberOfShards\" : 1, \n
\"replicationFactor\" : 1, \n
\"isSmart\" : false, \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"edges\", \n
\"from\" : [ \n
\"startVertices\" \n
], \n
\"to\" : [ \n
\"endVertices\" \n
] \n
} \n
], \n
\"orphanCollections\" : [ ], \n
\"_rev\" : \"_YNEaEYi--B\", \n
\"_id\" : \"_graphs/myGraph\", \n
\"name\" : \"myGraph\" \n
} \n
}\n
\n\n\n\n\n**Example:**\n \n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial <<EOF\n
{ \n
\"name\" : \"myGraph\", \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"edges\", \n
\"from\" : [ \n
\"startVertices\" \n
], \n
\"to\" : [ \n
\"endVertices\" \n
] \n
} \n
], \n
\"isSmart\" : true, \n
\"options\" : { \n
\"replicationFactor\" : 2, \n
\"numberOfShards\" : 9, \n
\"smartGraphAttribute\" : \"region\" \n
} \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YNEaEbq--B\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"graph\" : { \n
\"_key\" : \"myGraph\", \n
\"numberOfShards\" : 9, \n
\"replicationFactor\" : 2, \n
\"isSmart\" : true, \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"edges\", \n
\"from\" : [ \n
\"startVertices\" \n
], \n
\"to\" : [ \n
\"endVertices\" \n
] \n
} \n
], \n
\"orphanCollections\" : [ ], \n
\"initial\" : \"startVertices\", \n
\"initialCid\" : 101271, \n
\"smartGraphAttribute\" : \"region\", \n
\"_rev\" : \"_YNEaEbq--B\", \n
\"_id\" : \"_graphs/myGraph\", \n
\"name\" : \"myGraph\" \n
} \n
}\n
\n\n\n\n\n",
+ "description": "\n\nThe creation of a graph requires the name of the graph and a\ndefinition of its edges.\n[See also edge definitions](../../Manual/Graphs/GeneralGraphs/Management.html#edge-definitions).\n\n\n**A JSON object with these properties is required:**\n\n - **isSmart**: Define if the created graph should be smart.\n This only has effect in Enterprise Edition.\n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n - **name**: Name of the graph.\n - **options**:\n - **smartGraphAttribute**: Only has effect in Enterprise Edition and it is required if isSmart is true.\n The attribute name that is used to smartly shard the vertices of a graph.\n Every vertex in this SmartGraph has to have this attribute.\n Cannot be modified later.\n - **numberOfShards**: The number of shards that is used for every collection within this graph.\n Cannot be modified later.\n - **replicationFactor**: The replication factor used when initially creating collections for this graph.\n\n\n\n**HTTP 201**\n*A json document with these Properties is returned:*\n\nIs returned if the graph could be created and waitForSync is enabled\nfor the `_graphs` collection, or given in the request.\nThe response body contains the graph configuration that has been stored.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nIs returned if the graph could be created and waitForSync is disabled\nfor the `_graphs` collection and not given in the request.\nThe response body contains the graph configuration that has been stored.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 400**\n*A json document with these Properties is returned:*\n\nReturned if the request is in a wrong format.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to create a graph you at least need to have the following privileges:\n 1. `Administrate` access on the Database.\n 2. `Read Only` access on every collection used within this graph.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 409**\n*A json document with these Properties is returned:*\n\nReturned if there is a conflict storing the graph. This can occur\neither if a graph with this name is already stored, or if there is one\nedge definition with a the same\n[edge collection](../../Manual/Appendix/Glossary.html#edge-collection) but a\ndifferent signature used in any other graph.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial <<EOF\n
{ \n
\"name\" : \"myGraph\", \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"edges\", \n
\"from\" : [ \n
\"startVertices\" \n
], \n
\"to\" : [ \n
\"endVertices\" \n
] \n
} \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YOn1G0O--B\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"graph\" : { \n
\"_key\" : \"myGraph\", \n
\"numberOfShards\" : 1, \n
\"replicationFactor\" : 1, \n
\"isSmart\" : false, \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"edges\", \n
\"from\" : [ \n
\"startVertices\" \n
], \n
\"to\" : [ \n
\"endVertices\" \n
] \n
} \n
], \n
\"orphanCollections\" : [ ], \n
\"_rev\" : \"_YOn1G0O--B\", \n
\"_id\" : \"_graphs/myGraph\", \n
\"name\" : \"myGraph\" \n
} \n
}\n
\n\n\n\n\n**Example:**\n \n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial <<EOF\n
{ \n
\"name\" : \"myGraph\", \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"edges\", \n
\"from\" : [ \n
\"startVertices\" \n
], \n
\"to\" : [ \n
\"endVertices\" \n
] \n
} \n
], \n
\"isSmart\" : true, \n
\"options\" : { \n
\"replicationFactor\" : 2, \n
\"numberOfShards\" : 9, \n
\"smartGraphAttribute\" : \"region\" \n
} \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YOn1G3a--_\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"graph\" : { \n
\"_key\" : \"myGraph\", \n
\"numberOfShards\" : 9, \n
\"replicationFactor\" : 2, \n
\"isSmart\" : true, \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"edges\", \n
\"from\" : [ \n
\"startVertices\" \n
], \n
\"to\" : [ \n
\"endVertices\" \n
] \n
} \n
], \n
\"orphanCollections\" : [ ], \n
\"initial\" : \"startVertices\", \n
\"initialCid\" : 101271, \n
\"smartGraphAttribute\" : \"region\", \n
\"_rev\" : \"_YOn1G3a--_\", \n
\"_id\" : \"_graphs/myGraph\", \n
\"name\" : \"myGraph\" \n
} \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "define if the request should wait until everything is synced to disc.\nWill change the success response code.\n\n",
@@ -9962,7 +9962,7 @@
"x-hints": ""
},
"get": {
- "description": "\n\nSelects information for a given graph.\nWill return the edge definitions as well as the orphan collections.\nOr returns a 404 if the graph does not exist.\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nReturns the graph if it could be found.\nThe result will have the following format:\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned if no graph with this name could be found.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/myGraph\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"graph\" : { \n
\"_key\" : \"myGraph\", \n
\"numberOfShards\" : 1, \n
\"replicationFactor\" : 1, \n
\"isSmart\" : false, \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"edges\", \n
\"from\" : [ \n
\"startVertices\" \n
], \n
\"to\" : [ \n
\"endVertices\" \n
] \n
} \n
], \n
\"orphanCollections\" : [ ], \n
\"_rev\" : \"_YNEaEzW--B\", \n
\"_id\" : \"_graphs/myGraph\", \n
\"name\" : \"myGraph\" \n
} \n
}\n
\n\n\n\n\n",
+ "description": "\n\nSelects information for a given graph.\nWill return the edge definitions as well as the orphan collections.\nOr returns a 404 if the graph does not exist.\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nReturns the graph if it could be found.\nThe result will have the following format:\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned if no graph with this name could be found.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/myGraph\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"graph\" : { \n
\"_key\" : \"myGraph\", \n
\"numberOfShards\" : 1, \n
\"replicationFactor\" : 1, \n
\"isSmart\" : false, \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"edges\", \n
\"from\" : [ \n
\"startVertices\" \n
], \n
\"to\" : [ \n
\"endVertices\" \n
] \n
} \n
], \n
\"orphanCollections\" : [ ], \n
\"_rev\" : \"_YOn1HMu--B\", \n
\"_id\" : \"_graphs/myGraph\", \n
\"name\" : \"myGraph\" \n
} \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "The name of the graph.\n\n",
@@ -10042,7 +10042,7 @@
"x-hints": ""
},
"post": {
- "description": "\n\nAdds an additional edge definition to the graph.\n\nThis edge definition has to contain a *collection* and an array of\neach *from* and *to* vertex collections. An edge definition can only\nbe added if this definition is either not used in any other graph, or\nit is used with exactly the same definition. It is not possible to\nstore a definition \"e\" from \"v1\" to \"v2\" in the one graph, and \"e\"\nfrom \"v2\" to \"v1\" in the other graph.\n\n\n**A JSON object with these properties is required:**\n\n - **to** (string): One or many vertex collections that can contain target vertices.\n - **from** (string): One or many vertex collections that can contain source vertices.\n - **collection**: The name of the edge collection to be used.\n\n\n\n**HTTP 201**\n*A json document with these Properties is returned:*\n\nReturned if the definition could be added successfully and\nwaitForSync is enabled for the `_graphs` collection.\nThe response body contains the graph configuration that has been stored.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nReturned if the definition could be added successfully and\nwaitForSync is disabled for the `_graphs` collection.\nThe response body contains the graph configuration that has been stored.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 400**\n*A json document with these Properties is returned:*\n\nReturned if the definition could not be added.\nThis could be because it is ill-formed, or\nif the definition is used in an other graph with a different signature.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to modify a graph you at least need to have the following privileges:\n 1. `Administrate` access on the Database.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned if no graph with this name could be found.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge <<EOF\n
{ \n
\"collection\" : \"works_in\", \n
\"from\" : [ \n
\"female\", \n
\"male\" \n
], \n
\"to\" : [ \n
\"city\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YNEaENW--B\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"graph\" : { \n
\"_key\" : \"social\", \n
\"numberOfShards\" : 1, \n
\"replicationFactor\" : 1, \n
\"isSmart\" : false, \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"relation\", \n
\"from\" : [ \n
\"female\", \n
\"male\" \n
], \n
\"to\" : [ \n
\"female\", \n
\"male\" \n
] \n
}, \n
{ \n
\"collection\" : \"works_in\", \n
\"from\" : [ \n
\"female\", \n
\"male\" \n
], \n
\"to\" : [ \n
\"city\" \n
] \n
} \n
], \n
\"orphanCollections\" : [ ], \n
\"_rev\" : \"_YNEaENW--B\", \n
\"_id\" : \"_graphs/social\", \n
\"name\" : \"social\" \n
} \n
}\n
\n\n\n\n",
+ "description": "\n\nAdds an additional edge definition to the graph.\n\nThis edge definition has to contain a *collection* and an array of\neach *from* and *to* vertex collections. An edge definition can only\nbe added if this definition is either not used in any other graph, or\nit is used with exactly the same definition. It is not possible to\nstore a definition \"e\" from \"v1\" to \"v2\" in the one graph, and \"e\"\nfrom \"v2\" to \"v1\" in the other graph.\n\n\n**A JSON object with these properties is required:**\n\n - **to** (string): One or many vertex collections that can contain target vertices.\n - **from** (string): One or many vertex collections that can contain source vertices.\n - **collection**: The name of the edge collection to be used.\n\n\n\n**HTTP 201**\n*A json document with these Properties is returned:*\n\nReturned if the definition could be added successfully and\nwaitForSync is enabled for the `_graphs` collection.\nThe response body contains the graph configuration that has been stored.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nReturned if the definition could be added successfully and\nwaitForSync is disabled for the `_graphs` collection.\nThe response body contains the graph configuration that has been stored.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 400**\n*A json document with these Properties is returned:*\n\nReturned if the definition could not be added.\nThis could be because it is ill-formed, or\nif the definition is used in an other graph with a different signature.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to modify a graph you at least need to have the following privileges:\n 1. `Administrate` access on the Database.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned if no graph with this name could be found.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge <<EOF\n
{ \n
\"collection\" : \"works_in\", \n
\"from\" : [ \n
\"female\", \n
\"male\" \n
], \n
\"to\" : [ \n
\"city\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YOn1Goy--B\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"graph\" : { \n
\"_key\" : \"social\", \n
\"numberOfShards\" : 1, \n
\"replicationFactor\" : 1, \n
\"isSmart\" : false, \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"relation\", \n
\"from\" : [ \n
\"female\", \n
\"male\" \n
], \n
\"to\" : [ \n
\"female\", \n
\"male\" \n
] \n
}, \n
{ \n
\"collection\" : \"works_in\", \n
\"from\" : [ \n
\"female\", \n
\"male\" \n
], \n
\"to\" : [ \n
\"city\" \n
] \n
} \n
], \n
\"orphanCollections\" : [ ], \n
\"_rev\" : \"_YOn1Goy--B\", \n
\"_id\" : \"_graphs/social\", \n
\"name\" : \"social\" \n
} \n
}\n
\n\n\n\n",
"parameters": [
{
"description": "The name of the graph.\n\n",
@@ -10113,7 +10113,7 @@
},
"/_api/gharial/{graph}/edge/{collection}": {
"post": {
- "description": "\n\nCreates a new edge in the collection.\nWithin the body the edge has to contain a *_from* and *_to* value referencing to valid vertices in the graph.\nFurthermore the edge has to be valid in the definition of the used \n[edge collection](../../Manual/Appendix/Glossary.html#edge-collection).\n\n\n**A JSON object with these properties is required:**\n\n - **_from**: The source vertex of this edge. Has to be valid within\n the used edge definition.\n - **_to**: The target vertex of this edge. Has to be valid within\n the used edge definition.\n\n\n\n**HTTP 201**\n*A json document with these Properties is returned:*\n\nReturned if the edge could be created and waitForSync is true.\n\n- **edge**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **code**: The response code.\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nReturned if the request was successful but waitForSync is false.\n\n- **edge**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **code**: The response code.\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 400**\n*A json document with these Properties is returned:*\n\nReturned if the input document is invalid.\nThis can for instance be the case if `_from` or `_to` is mising.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to insert edges into the graph you at least need to have the following privileges:\n 1. `Read Only` access on the Database.\n 2. `Write` access on the given collection.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned in any of the following cases:\n* no graph with this name could be found.\n* this edge collection is not part of the graph.\n* either `_from` or `_to` vertex does not exist.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge/relation <<EOF\n
{ \n
\"type\" : \"friend\", \n
\"_from\" : \"female/alice\", \n
\"_to\" : \"female/diana\" \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YNEaEJa--_\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"edge\" : { \n
\"_id\" : \"relation/100926\", \n
\"_key\" : \"100926\", \n
\"_rev\" : \"_YNEaEJa--_\" \n
} \n
}\n
\n\n\n\n",
+ "description": "\n\nCreates a new edge in the collection.\nWithin the body the edge has to contain a *_from* and *_to* value referencing to valid vertices in the graph.\nFurthermore the edge has to be valid in the definition of the used \n[edge collection](../../Manual/Appendix/Glossary.html#edge-collection).\n\n\n**A JSON object with these properties is required:**\n\n - **_from**: The source vertex of this edge. Has to be valid within\n the used edge definition.\n - **_to**: The target vertex of this edge. Has to be valid within\n the used edge definition.\n\n\n\n**HTTP 201**\n*A json document with these Properties is returned:*\n\nReturned if the edge could be created and waitForSync is true.\n\n- **edge**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **code**: The response code.\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nReturned if the request was successful but waitForSync is false.\n\n- **edge**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **code**: The response code.\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 400**\n*A json document with these Properties is returned:*\n\nReturned if the input document is invalid.\nThis can for instance be the case if `_from` or `_to` is mising.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to insert edges into the graph you at least need to have the following privileges:\n 1. `Read Only` access on the Database.\n 2. `Write` access on the given collection.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned in any of the following cases:\n* no graph with this name could be found.\n* this edge collection is not part of the graph.\n* either `_from` or `_to` vertex does not exist.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge/relation <<EOF\n
{ \n
\"type\" : \"friend\", \n
\"_from\" : \"female/alice\", \n
\"_to\" : \"female/diana\" \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YOn1Gku--_\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"edge\" : { \n
\"_id\" : \"relation/100926\", \n
\"_key\" : \"100926\", \n
\"_rev\" : \"_YOn1Gku--_\" \n
} \n
}\n
\n\n\n\n",
"parameters": [
{
"description": "The name of the graph.\n\n",
@@ -10302,7 +10302,7 @@
"x-hints": ""
},
"get": {
- "description": "\n\nGets an edge from the given collection.\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nReturned if the edge could be found.\n\n- **edge**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 304**\n*A json document with these Properties is returned:*\n\nReturned if the if-none-match header is given and the\ncurrently stored edge still has this revision value.\nSo there was no update between the last time the edge\nwas fetched by the caller.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to update vertices in the graph you at least need to have the following privileges:\n 1. `Read Only` access on the Database.\n 2. `Read Only` access on the given collection.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned in the following cases:\n* No graph with this name could be found.\n* This collection is not part of the graph.\n* The edge does not exist.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 412**\n*A json document with these Properties is returned:*\n\nReturned if if-match header is given, but the stored documents revision is different.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/social/edge/relation/101673\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
etag: _YNEaEuu--D\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"edge\" : { \n
\"_key\" : \"101673\", \n
\"_id\" : \"relation/101673\", \n
\"_from\" : \"male/charly\", \n
\"_to\" : \"female/diana\", \n
\"_rev\" : \"_YNEaEuu--D\", \n
\"type\" : \"married\", \n
\"vertex\" : \"charly\" \n
} \n
}\n
\n\n\n\n\n",
+ "description": "\n\nGets an edge from the given collection.\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nReturned if the edge could be found.\n\n- **edge**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 304**\n*A json document with these Properties is returned:*\n\nReturned if the if-none-match header is given and the\ncurrently stored edge still has this revision value.\nSo there was no update between the last time the edge\nwas fetched by the caller.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to update vertices in the graph you at least need to have the following privileges:\n 1. `Read Only` access on the Database.\n 2. `Read Only` access on the given collection.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned in the following cases:\n* No graph with this name could be found.\n* This collection is not part of the graph.\n* The edge does not exist.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 412**\n*A json document with these Properties is returned:*\n\nReturned if if-match header is given, but the stored documents revision is different.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/social/edge/relation/101670\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
etag: _YOn1HJG--J\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"edge\" : { \n
\"_key\" : \"101670\", \n
\"_id\" : \"relation/101670\", \n
\"_from\" : \"female/alice\", \n
\"_to\" : \"male/charly\", \n
\"_rev\" : \"_YOn1HJG--J\", \n
\"type\" : \"friend\", \n
\"vertex\" : \"alice\" \n
} \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "The name of the graph.\n\n",
@@ -10397,7 +10397,7 @@
"x-hints": ""
},
"patch": {
- "description": "\n\nUpdates the data of the specific edge in the collection.\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nReturned if the edge could be updated, and waitForSync is false.\n\n- **edge**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **code**: The response code.\n- **old**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nReturned if the request was successful but waitForSync is false.\n\n- **edge**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **code**: The response code.\n- **old**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to update edges in the graph you at least need to have the following privileges:\n 1. `Read Only` access on the Database.\n 2. `Write` access on the given collection.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned in the following cases:\n* No graph with this name could be found.\n* This collection is not part of the graph.\n* The edge to update does not exist.\n* either `_from` or `_to` vertex does not exist (if updated).\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 412**\n*A json document with these Properties is returned:*\n\nReturned if if-match header is given, but the stored documents revision is different.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X PATCH --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge/relation/102286 <<EOF\n
{ \n
\"since\" : \"01.01.2001\" \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YNEaFOa--_\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"edge\" : { \n
\"_id\" : \"relation/102286\", \n
\"_key\" : \"102286\", \n
\"_oldRev\" : \"_YNEaFOW--F\", \n
\"_rev\" : \"_YNEaFOa--_\" \n
} \n
}\n
\n\n\n\n",
+ "description": "\n\nUpdates the data of the specific edge in the collection.\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nReturned if the edge could be updated, and waitForSync is false.\n\n- **edge**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **code**: The response code.\n- **old**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nReturned if the request was successful but waitForSync is false.\n\n- **edge**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **code**: The response code.\n- **old**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to update edges in the graph you at least need to have the following privileges:\n 1. `Read Only` access on the Database.\n 2. `Write` access on the given collection.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned in the following cases:\n* No graph with this name could be found.\n* This collection is not part of the graph.\n* The edge to update does not exist.\n* either `_from` or `_to` vertex does not exist (if updated).\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 412**\n*A json document with these Properties is returned:*\n\nReturned if if-match header is given, but the stored documents revision is different.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X PATCH --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge/relation/102283 <<EOF\n
{ \n
\"since\" : \"01.01.2001\" \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YOn1HnK--_\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"edge\" : { \n
\"_id\" : \"relation/102283\", \n
\"_key\" : \"102283\", \n
\"_oldRev\" : \"_YOn1HnG--D\", \n
\"_rev\" : \"_YOn1HnK--_\" \n
} \n
}\n
\n\n\n\n",
"parameters": [
{
"description": "The name of the graph.\n\n",
@@ -10518,7 +10518,7 @@
"x-hints": ""
},
"put": {
- "description": "\n\nReplaces the data of an edge in the collection.\n\n\n**A JSON object with these properties is required:**\n\n - **_from**: The source vertex of this edge. Has to be valid within\n the used edge definition.\n - **_to**: The target vertex of this edge. Has to be valid within\n the used edge definition.\n\n\n\n**HTTP 201**\n*A json document with these Properties is returned:*\n\nReturned if the request was successful but waitForSync is true.\n\n- **edge**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **code**: The response code.\n- **old**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nReturned if the request was successful but waitForSync is false.\n\n- **edge**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **code**: The response code.\n- **old**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to replace edges in the graph you at least need to have the following privileges:\n 1. `Read Only` access on the Database.\n 2. `Write` access on the given collection.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned in the following cases:\n* No graph with this name could be found.\n* This collection is not part of the graph.\n* The edge to replace does not exist.\n* either `_from` or `_to` vertex does not exist.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 412**\n*A json document with these Properties is returned:*\n\nReturned if if-match header is given, but the stored documents revision is different.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge/relation/102353 <<EOF\n
{ \n
\"type\" : \"divorced\", \n
\"_from\" : \"female/alice\", \n
\"_to\" : \"male/bob\" \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YNEaFRm--_\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"edge\" : { \n
\"_id\" : \"relation/102353\", \n
\"_key\" : \"102353\", \n
\"_oldRev\" : \"_YNEaFRe--H\", \n
\"_rev\" : \"_YNEaFRm--_\" \n
} \n
}\n
\n\n\n\n",
+ "description": "\n\nReplaces the data of an edge in the collection.\n\n\n**A JSON object with these properties is required:**\n\n - **_from**: The source vertex of this edge. Has to be valid within\n the used edge definition.\n - **_to**: The target vertex of this edge. Has to be valid within\n the used edge definition.\n\n\n\n**HTTP 201**\n*A json document with these Properties is returned:*\n\nReturned if the request was successful but waitForSync is true.\n\n- **edge**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **code**: The response code.\n- **old**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nReturned if the request was successful but waitForSync is false.\n\n- **edge**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **code**: The response code.\n- **old**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n - **_from**: The _from value of the stored data.\n - **_to**: The _to value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to replace edges in the graph you at least need to have the following privileges:\n 1. `Read Only` access on the Database.\n 2. `Write` access on the given collection.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned in the following cases:\n* No graph with this name could be found.\n* This collection is not part of the graph.\n* The edge to replace does not exist.\n* either `_from` or `_to` vertex does not exist.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 412**\n*A json document with these Properties is returned:*\n\nReturned if if-match header is given, but the stored documents revision is different.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge/relation/102360 <<EOF\n
{ \n
\"type\" : \"divorced\", \n
\"_from\" : \"female/alice\", \n
\"_to\" : \"male/bob\" \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YOn1HqS--_\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"edge\" : { \n
\"_id\" : \"relation/102360\", \n
\"_key\" : \"102360\", \n
\"_oldRev\" : \"_YOn1HqO--D\", \n
\"_rev\" : \"_YOn1HqS--_\" \n
} \n
}\n
\n\n\n\n",
"parameters": [
{
"description": "The name of the graph.\n\n",
@@ -10639,7 +10639,7 @@
},
"/_api/gharial/{graph}/edge/{definition}": {
"delete": {
- "description": "\n\nRemove one edge definition from the graph. This will only remove the\nedge collection, the vertex collections remain untouched and can still\nbe used in your queries.\n\n\n**HTTP 201**\n*A json document with these Properties is returned:*\n\nReturned if the edge definition could be removed from the graph \nand waitForSync is true.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nReturned if the edge definition could be removed from the graph and\nwaitForSync is false.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to drop a vertex you at least need to have the following privileges:\n 1. `Administrate` access on the Database.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned if no graph with this name could be found,\nor if no edge definition with this name is found in the graph.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/social/edge/relation\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YNEaEqu--D\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"graph\" : { \n
\"_key\" : \"social\", \n
\"numberOfShards\" : 1, \n
\"replicationFactor\" : 1, \n
\"isSmart\" : false, \n
\"edgeDefinitions\" : [ ], \n
\"orphanCollections\" : [ \n
\"female\", \n
\"male\" \n
], \n
\"_rev\" : \"_YNEaEqu--D\", \n
\"_id\" : \"_graphs/social\", \n
\"name\" : \"social\" \n
} \n
}\n
\n\n\n\n",
+ "description": "\n\nRemove one edge definition from the graph. This will only remove the\nedge collection, the vertex collections remain untouched and can still\nbe used in your queries.\n\n\n**HTTP 201**\n*A json document with these Properties is returned:*\n\nReturned if the edge definition could be removed from the graph \nand waitForSync is true.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nReturned if the edge definition could be removed from the graph and\nwaitForSync is false.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to drop a vertex you at least need to have the following privileges:\n 1. `Administrate` access on the Database.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned if no graph with this name could be found,\nor if no edge definition with this name is found in the graph.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/social/edge/relation\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YOn1HG---F\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"graph\" : { \n
\"_key\" : \"social\", \n
\"numberOfShards\" : 1, \n
\"replicationFactor\" : 1, \n
\"isSmart\" : false, \n
\"edgeDefinitions\" : [ ], \n
\"orphanCollections\" : [ \n
\"female\", \n
\"male\" \n
], \n
\"_rev\" : \"_YOn1HG---F\", \n
\"_id\" : \"_graphs/social\", \n
\"name\" : \"social\" \n
} \n
}\n
\n\n\n\n",
"parameters": [
{
"description": "The name of the graph.\n\n",
@@ -10714,7 +10714,7 @@
"x-hints": ""
},
"put": {
- "description": "\n\nChange one specific edge definition.\nThis will modify all occurrences of this definition in all graphs known to your database.\n\n\n**A JSON object with these properties is required:**\n\n - **to** (string): One or many vertex collections that can contain target vertices.\n - **from** (string): One or many vertex collections that can contain source vertices.\n - **collection**: The name of the edge collection to be used.\n\n\n\n**HTTP 201**\n*A json document with these Properties is returned:*\n\nReturned if the request was successful and waitForSync is true.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nReturned if the request was successful but waitForSync is false.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 400**\n*A json document with these Properties is returned:*\n\nReturned if no edge definition with this name is found in the graph,\nor of the new definition is ill-formed and cannot be used.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to drop a vertex you at least need to have the following privileges:\n 1. `Administrate` access on the Database.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned if no graph with this name could be found.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge/relation <<EOF\n
{ \n
\"collection\" : \"relation\", \n
\"from\" : [ \n
\"female\", \n
\"male\", \n
\"animal\" \n
], \n
\"to\" : [ \n
\"female\", \n
\"male\", \n
\"animal\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YNEaFeK--_\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"graph\" : { \n
\"_key\" : \"social\", \n
\"numberOfShards\" : 1, \n
\"replicationFactor\" : 1, \n
\"isSmart\" : false, \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"relation\", \n
\"from\" : [ \n
\"animal\", \n
\"female\", \n
\"male\" \n
], \n
\"to\" : [ \n
\"animal\", \n
\"female\", \n
\"male\" \n
] \n
} \n
], \n
\"orphanCollections\" : [ ], \n
\"_rev\" : \"_YNEaFeK--_\", \n
\"_id\" : \"_graphs/social\", \n
\"name\" : \"social\" \n
} \n
}\n
\n\n\n\n",
+ "description": "\n\nChange one specific edge definition.\nThis will modify all occurrences of this definition in all graphs known to your database.\n\n\n**A JSON object with these properties is required:**\n\n - **to** (string): One or many vertex collections that can contain target vertices.\n - **from** (string): One or many vertex collections that can contain source vertices.\n - **collection**: The name of the edge collection to be used.\n\n\n\n**HTTP 201**\n*A json document with these Properties is returned:*\n\nReturned if the request was successful and waitForSync is true.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nReturned if the request was successful but waitForSync is false.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 400**\n*A json document with these Properties is returned:*\n\nReturned if no edge definition with this name is found in the graph,\nor of the new definition is ill-formed and cannot be used.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to drop a vertex you at least need to have the following privileges:\n 1. `Administrate` access on the Database.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned if no graph with this name could be found.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge/relation <<EOF\n
{ \n
\"collection\" : \"relation\", \n
\"from\" : [ \n
\"female\", \n
\"male\", \n
\"animal\" \n
], \n
\"to\" : [ \n
\"female\", \n
\"male\", \n
\"animal\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YOn1H1K--B\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"graph\" : { \n
\"_key\" : \"social\", \n
\"numberOfShards\" : 1, \n
\"replicationFactor\" : 1, \n
\"isSmart\" : false, \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"relation\", \n
\"from\" : [ \n
\"animal\", \n
\"female\", \n
\"male\" \n
], \n
\"to\" : [ \n
\"animal\", \n
\"female\", \n
\"male\" \n
] \n
} \n
], \n
\"orphanCollections\" : [ ], \n
\"_rev\" : \"_YOn1H1K--B\", \n
\"_id\" : \"_graphs/social\", \n
\"name\" : \"social\" \n
} \n
}\n
\n\n\n\n",
"parameters": [
{
"description": "The name of the graph.\n\n",
@@ -10846,7 +10846,7 @@
"x-hints": ""
},
"post": {
- "description": "\n\nAdds a vertex collection to the set of orphan collections of the graph.\nIf the collection does not exist, it will be created.\n\n\n**HTTP 201**\n*A json document with these Properties is returned:*\n\nIs returned if the collection could be created and waitForSync is enabled\nfor the `_graphs` collection, or given in the request.\nThe response body contains the graph configuration that has been stored.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nIs returned if the collection could be created and waitForSync is disabled\nfor the `_graphs` collection, or given in the request.\nThe response body contains the graph configuration that has been stored.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 400**\n*A json document with these Properties is returned:*\n\nReturned if the request is in an invalid format.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to modify a graph you at least need to have the following privileges:\n 1. `Administrate` access on the Database.\n 2. `Read Only` access on every collection used within this graph.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned if no graph with this name could be found.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/vertex <<EOF\n
{ \n
\"collection\" : \"otherVertices\" \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YNEaEU6--B\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"graph\" : { \n
\"_key\" : \"social\", \n
\"numberOfShards\" : 1, \n
\"replicationFactor\" : 1, \n
\"isSmart\" : false, \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"relation\", \n
\"from\" : [ \n
\"female\", \n
\"male\" \n
], \n
\"to\" : [ \n
\"female\", \n
\"male\" \n
] \n
} \n
], \n
\"orphanCollections\" : [ \n
\"otherVertices\" \n
], \n
\"_rev\" : \"_YNEaEU6--B\", \n
\"_id\" : \"_graphs/social\", \n
\"name\" : \"social\" \n
} \n
}\n
\n\n\n\n",
+ "description": "\n\nAdds a vertex collection to the set of orphan collections of the graph.\nIf the collection does not exist, it will be created.\n\n\n**HTTP 201**\n*A json document with these Properties is returned:*\n\nIs returned if the collection could be created and waitForSync is enabled\nfor the `_graphs` collection, or given in the request.\nThe response body contains the graph configuration that has been stored.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nIs returned if the collection could be created and waitForSync is disabled\nfor the `_graphs` collection, or given in the request.\nThe response body contains the graph configuration that has been stored.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 400**\n*A json document with these Properties is returned:*\n\nReturned if the request is in an invalid format.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to modify a graph you at least need to have the following privileges:\n 1. `Administrate` access on the Database.\n 2. `Read Only` access on every collection used within this graph.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned if no graph with this name could be found.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/vertex <<EOF\n
{ \n
\"collection\" : \"otherVertices\" \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YOn1Gwm--B\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"graph\" : { \n
\"_key\" : \"social\", \n
\"numberOfShards\" : 1, \n
\"replicationFactor\" : 1, \n
\"isSmart\" : false, \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"relation\", \n
\"from\" : [ \n
\"female\", \n
\"male\" \n
], \n
\"to\" : [ \n
\"female\", \n
\"male\" \n
] \n
} \n
], \n
\"orphanCollections\" : [ \n
\"otherVertices\" \n
], \n
\"_rev\" : \"_YOn1Gwm--B\", \n
\"_id\" : \"_graphs/social\", \n
\"name\" : \"social\" \n
} \n
}\n
\n\n\n\n",
"parameters": [
{
"description": "The name of the graph.\n\n",
@@ -10908,7 +10908,7 @@
},
"/_api/gharial/{graph}/vertex/{collection}": {
"delete": {
- "description": "\n\nRemoves a vertex collection from the graph and optionally deletes the collection,\nif it is not used in any other graph.\nIt can only remove vertex collections that are no longer part of edge definitions,\nif they are used in edge definitions you are required to modify those first.\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nReturned if the vertex collection was removed from the graph successfully\nand waitForSync is true.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nReturned if the request was successful but waitForSync is false.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 400**\n*A json document with these Properties is returned:*\n\nReturned if the vertex collection is still used in an edge definition.\nIn this case it cannot be removed from the graph yet, it has to be\nremoved from the edge definition first.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to drop a vertex you at least need to have the following privileges:\n 1. `Administrate` access on the Database.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned if no graph with this name could be found.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n You can remove vertex collections that are not used in any edge collection:\n\nshell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/social/vertex/otherVertices\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YNEaFVS--_\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"graph\" : { \n
\"_key\" : \"social\", \n
\"numberOfShards\" : 1, \n
\"replicationFactor\" : 1, \n
\"isSmart\" : false, \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"relation\", \n
\"from\" : [ \n
\"female\", \n
\"male\" \n
], \n
\"to\" : [ \n
\"female\", \n
\"male\" \n
] \n
} \n
], \n
\"orphanCollections\" : [ ], \n
\"_rev\" : \"_YNEaFVS--_\", \n
\"_id\" : \"_graphs/social\", \n
\"name\" : \"social\" \n
} \n
}\n
\n\n\n\n\n**Example:**\n You cannot remove vertex collections that are used in edge collections:\n\nshell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/social/vertex/male\n
\n
HTTP/1.1 Bad Request\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"not in orphan collection\", \n
\"code\" : 400, \n
\"errorNum\" : 1928 \n
}\n
\n\n\n\n\n",
+ "description": "\n\nRemoves a vertex collection from the graph and optionally deletes the collection,\nif it is not used in any other graph.\nIt can only remove vertex collections that are no longer part of edge definitions,\nif they are used in edge definitions you are required to modify those first.\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nReturned if the vertex collection was removed from the graph successfully\nand waitForSync is true.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nReturned if the request was successful but waitForSync is false.\n\n- **graph**:\n - **smartGraphAttribute**: The name of the sharding attribute in smart graph case (Enterprise Only)\n - **replicationFactor**: The replication factor used for every new collection in the graph.\n - **orphanCollections** (string): An array of additional vertex collections.\n Documents within these collections do not have edges within this graph.\n - **name**: The name of the graph\n - **_rev**: The revision of this graph. Can be used to make sure to not override\n concurrent modifications to this graph.\n - **numberOfShards**: Number of shards created for every new collection in the graph.\n - **isSmart**: Flag if the graph is a SmartGraph (Enterprise only) or not.\n - **_id**: The internal id value of this graph. \n - **edgeDefinitions**: An array of definitions for the relations of the graph.\n Each has the following type:\n - **to** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _to is in any of the collections here.\n - **from** (string): List of vertex collection names.\n Edges in collection can only be inserted if their _from is in any of the collections here.\n - **collection**: Name of the edge collection, where the edge are stored in.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 400**\n*A json document with these Properties is returned:*\n\nReturned if the vertex collection is still used in an edge definition.\nIn this case it cannot be removed from the graph yet, it has to be\nremoved from the edge definition first.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to drop a vertex you at least need to have the following privileges:\n 1. `Administrate` access on the Database.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned if no graph with this name could be found.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n You can remove vertex collections that are not used in any edge collection:\n\nshell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/social/vertex/otherVertices\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YOn1Htu--_\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"graph\" : { \n
\"_key\" : \"social\", \n
\"numberOfShards\" : 1, \n
\"replicationFactor\" : 1, \n
\"isSmart\" : false, \n
\"edgeDefinitions\" : [ \n
{ \n
\"collection\" : \"relation\", \n
\"from\" : [ \n
\"female\", \n
\"male\" \n
], \n
\"to\" : [ \n
\"female\", \n
\"male\" \n
] \n
} \n
], \n
\"orphanCollections\" : [ ], \n
\"_rev\" : \"_YOn1Htu--_\", \n
\"_id\" : \"_graphs/social\", \n
\"name\" : \"social\" \n
} \n
}\n
\n\n\n\n\n**Example:**\n You cannot remove vertex collections that are used in edge collections:\n\nshell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/social/vertex/male\n
\n
HTTP/1.1 Bad Request\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"not in orphan collection\", \n
\"code\" : 400, \n
\"errorNum\" : 1928 \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "The name of the graph.\n\n",
@@ -10983,7 +10983,7 @@
"x-hints": ""
},
"post": {
- "description": "\n\nAdds a vertex to the given collection.\n\n\n**HTTP 201**\n*A json document with these Properties is returned:*\n\nReturned if the vertex could be added and waitForSync is true.\n\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **code**: The response code.\n- **vertex**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nReturned if the request was successful but waitForSync is false.\n\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **code**: The response code.\n- **vertex**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to insert vertices into the graph you at least need to have the following privileges:\n 1. `Read Only` access on the Database.\n 2. `Write` access on the given collection.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned if no graph with this name could be found.\nOr if a graph is found but this collection is not part of the graph.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/vertex/male <<EOF\n
{ \n
\"name\" : \"Francis\" \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YNEaERu--J\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"vertex\" : { \n
\"_id\" : \"male/101105\", \n
\"_key\" : \"101105\", \n
\"_rev\" : \"_YNEaERu--J\" \n
} \n
}\n
\n\n\n\n\n",
+ "description": "\n\nAdds a vertex to the given collection.\n\n\n**HTTP 201**\n*A json document with these Properties is returned:*\n\nReturned if the vertex could be added and waitForSync is true.\n\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **code**: The response code.\n- **vertex**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nReturned if the request was successful but waitForSync is false.\n\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **code**: The response code.\n- **vertex**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to insert vertices into the graph you at least need to have the following privileges:\n 1. `Read Only` access on the Database.\n 2. `Write` access on the given collection.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned if no graph with this name could be found.\nOr if a graph is found but this collection is not part of the graph.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/vertex/male <<EOF\n
{ \n
\"name\" : \"Francis\" \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YOn1GtO--_\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"vertex\" : { \n
\"_id\" : \"male/101105\", \n
\"_key\" : \"101105\", \n
\"_rev\" : \"_YOn1GtO--_\" \n
} \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "The name of the graph.\n\n",
@@ -11167,7 +11167,7 @@
"x-hints": ""
},
"get": {
- "description": "\n\nGets a vertex from the given collection.\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nReturned if the vertex could be found.\n\n- **code**: The response code.\n- **vertex**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 304**\n*A json document with these Properties is returned:*\n\nReturned if the if-none-match header is given and the\ncurrently stored vertex still has this revision value.\nSo there was no update between the last time the vertex\nwas fetched by the caller.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to update vertices in the graph you at least need to have the following privileges:\n 1. `Read Only` access on the Database.\n 2. `Read Only` access on the given collection.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned in the following cases:\n* No graph with this name could be found.\n* This collection is not part of the graph.\n* The vertex does not exist.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 412**\n*A json document with these Properties is returned:*\n\nReturned if if-match header is given, but the stored documents revision is different.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/social/vertex/female/alice\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
etag: _YNEaE2i--_\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"vertex\" : { \n
\"_key\" : \"alice\", \n
\"_id\" : \"female/alice\", \n
\"_rev\" : \"_YNEaE2i--_\", \n
\"name\" : \"Alice\" \n
} \n
}\n
\n\n\n\n",
+ "description": "\n\nGets a vertex from the given collection.\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nReturned if the vertex could be found.\n\n- **code**: The response code.\n- **vertex**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 304**\n*A json document with these Properties is returned:*\n\nReturned if the if-none-match header is given and the\ncurrently stored vertex still has this revision value.\nSo there was no update between the last time the vertex\nwas fetched by the caller.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to update vertices in the graph you at least need to have the following privileges:\n 1. `Read Only` access on the Database.\n 2. `Read Only` access on the given collection.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned in the following cases:\n* No graph with this name could be found.\n* This collection is not part of the graph.\n* The vertex does not exist.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 412**\n*A json document with these Properties is returned:*\n\nReturned if if-match header is given, but the stored documents revision is different.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/social/vertex/female/alice\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
etag: _YOn1HP6--_\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"vertex\" : { \n
\"_key\" : \"alice\", \n
\"_id\" : \"female/alice\", \n
\"_rev\" : \"_YOn1HP6--_\", \n
\"name\" : \"Alice\" \n
} \n
}\n
\n\n\n\n",
"parameters": [
{
"description": "The name of the graph.\n\n",
@@ -11262,7 +11262,7 @@
"x-hints": ""
},
"patch": {
- "description": "\n\nUpdates the data of the specific vertex in the collection.\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nReturned if the vertex could be updated, and waitForSync is true.\n\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **old**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **code**: The response code.\n- **vertex**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nReturned if the request was successful, and waitForSync is false.\n\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **old**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **code**: The response code.\n- **vertex**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to update vertices in the graph you at least need to have the following privileges:\n 1. `Read Only` access on the Database.\n 2. `Write` access on the given collection.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned in the following cases:\n* No graph with this name could be found.\n* This collection is not part of the graph.\n* The vertex to update does not exist.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 412**\n*A json document with these Properties is returned:*\n\nReturned if if-match header is given, but the stored documents revision is different.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X PATCH --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/vertex/female/alice <<EOF\n
{ \n
\"age\" : 26 \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YNEaFLO--J\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"vertex\" : { \n
\"_id\" : \"female/alice\", \n
\"_key\" : \"alice\", \n
\"_oldRev\" : \"_YNEaFLK--_\", \n
\"_rev\" : \"_YNEaFLO--J\" \n
} \n
}\n
\n\n\n\n",
+ "description": "\n\nUpdates the data of the specific vertex in the collection.\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nReturned if the vertex could be updated, and waitForSync is true.\n\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **old**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **code**: The response code.\n- **vertex**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nReturned if the request was successful, and waitForSync is false.\n\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **old**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **code**: The response code.\n- **vertex**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to update vertices in the graph you at least need to have the following privileges:\n 1. `Read Only` access on the Database.\n 2. `Write` access on the given collection.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned in the following cases:\n* No graph with this name could be found.\n* This collection is not part of the graph.\n* The vertex to update does not exist.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 412**\n*A json document with these Properties is returned:*\n\nReturned if if-match header is given, but the stored documents revision is different.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X PATCH --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/vertex/female/alice <<EOF\n
{ \n
\"age\" : 26 \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YOn1Hjy--J\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"vertex\" : { \n
\"_id\" : \"female/alice\", \n
\"_key\" : \"alice\", \n
\"_oldRev\" : \"_YOn1Hju--_\", \n
\"_rev\" : \"_YOn1Hjy--J\" \n
} \n
}\n
\n\n\n\n",
"parameters": [
{
"description": "The name of the graph.\n\n",
@@ -11383,7 +11383,7 @@
"x-hints": ""
},
"put": {
- "description": "\n\nReplaces the data of a vertex in the collection.\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nReturned if the vertex could be replaced, and waitForSync is true.\n\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **old**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **code**: The response code.\n- **vertex**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nReturned if the vertex could be replaced, and waitForSync is false.\n\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **old**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **code**: The response code.\n- **vertex**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to replace vertices in the graph you at least need to have the following privileges:\n 1. `Read Only` access on the Database.\n 2. `Write` access on the given collection.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned in the following cases:\n* No graph with this name could be found.\n* This collection is not part of the graph.\n* The vertex to replace does not exist.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 412**\n*A json document with these Properties is returned:*\n\nReturned if if-match header is given, but the stored documents revision is different.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/vertex/female/alice <<EOF\n
{ \n
\"name\" : \"Alice Cooper\", \n
\"age\" : 26 \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YNEaFiS--L\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"vertex\" : { \n
\"_id\" : \"female/alice\", \n
\"_key\" : \"alice\", \n
\"_oldRev\" : \"_YNEaFiO--_\", \n
\"_rev\" : \"_YNEaFiS--L\" \n
} \n
}\n
\n\n\n\n",
+ "description": "\n\nReplaces the data of a vertex in the collection.\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nReturned if the vertex could be replaced, and waitForSync is true.\n\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **old**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **code**: The response code.\n- **vertex**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 202**\n*A json document with these Properties is returned:*\n\nReturned if the vertex could be replaced, and waitForSync is false.\n\n- **new**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **old**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **code**: The response code.\n- **vertex**:\n - **_key**: The _key value of the stored data.\n - **_rev**: The _rev value of the stored data.\n - **_id**: The _id value of the stored data.\n- **error**: Flag if there was an error (true) or not (false).\nIt is false in this response.\n\n\n**HTTP 403**\n*A json document with these Properties is returned:*\n\nReturned if your user has insufficient rights.\nIn order to replace vertices in the graph you at least need to have the following privileges:\n 1. `Read Only` access on the Database.\n 2. `Write` access on the given collection.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nReturned in the following cases:\n* No graph with this name could be found.\n* This collection is not part of the graph.\n* The vertex to replace does not exist.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n**HTTP 412**\n*A json document with these Properties is returned:*\n\nReturned if if-match header is given, but the stored documents revision is different.\n\n- **errorMessage**: A message created for this error.\n- **errorNum**: ArangoDB error number for the error that occured.\n- **code**: The response code.\n- **error**: Flag if there was an error (true) or not (false).\nIt is true in this response.\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/gharial/social/vertex/female/alice <<EOF\n
{ \n
\"name\" : \"Alice Cooper\", \n
\"age\" : 26 \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
etag: _YOn1H5C--D\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"vertex\" : { \n
\"_id\" : \"female/alice\", \n
\"_key\" : \"alice\", \n
\"_oldRev\" : \"_YOn1H5---_\", \n
\"_rev\" : \"_YOn1H5C--D\" \n
} \n
}\n
\n\n\n\n",
"parameters": [
{
"description": "The name of the graph.\n\n",
@@ -11709,7 +11709,7 @@
},
"/_api/index": {
"get": {
- "description": "\n\nReturns an object with an attribute *indexes* containing an array of all\nindex descriptions for the given collection. The same information is also\navailable in the *identifiers* as an object with the index handles as\nkeys.\n\n\n\n\n**Example:**\n Return information about all indexes\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/index?collection=products\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"indexes\" : [ \n
{ \n
\"fields\" : [ \n
\"_key\" \n
], \n
\"id\" : \"products/0\", \n
\"selectivityEstimate\" : 1, \n
\"sparse\" : false, \n
\"type\" : \"primary\", \n
\"unique\" : true \n
}, \n
{ \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"name\" \n
], \n
\"id\" : \"products/104718\", \n
\"selectivityEstimate\" : 1, \n
\"sparse\" : false, \n
\"type\" : \"hash\", \n
\"unique\" : false \n
}, \n
{ \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"price\" \n
], \n
\"id\" : \"products/104721\", \n
\"sparse\" : true, \n
\"type\" : \"skiplist\", \n
\"unique\" : false \n
} \n
], \n
\"identifiers\" : { \n
\"products/0\" : { \n
\"fields\" : [ \n
\"_key\" \n
], \n
\"id\" : \"products/0\", \n
\"selectivityEstimate\" : 1, \n
\"sparse\" : false, \n
\"type\" : \"primary\", \n
\"unique\" : true \n
}, \n
\"products/104718\" : { \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"name\" \n
], \n
\"id\" : \"products/104718\", \n
\"selectivityEstimate\" : 1, \n
\"sparse\" : false, \n
\"type\" : \"hash\", \n
\"unique\" : false \n
}, \n
\"products/104721\" : { \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"price\" \n
], \n
\"id\" : \"products/104721\", \n
\"sparse\" : true, \n
\"type\" : \"skiplist\", \n
\"unique\" : false \n
} \n
} \n
}\n
\n\n\n\n\n",
+ "description": "\n\nReturns an object with an attribute *indexes* containing an array of all\nindex descriptions for the given collection. The same information is also\navailable in the *identifiers* as an object with the index handles as\nkeys.\n\n\n\n\n**Example:**\n Return information about all indexes\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/index?collection=products\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"indexes\" : [ \n
{ \n
\"fields\" : [ \n
\"_key\" \n
], \n
\"id\" : \"products/0\", \n
\"selectivityEstimate\" : 1, \n
\"sparse\" : false, \n
\"type\" : \"primary\", \n
\"unique\" : true \n
}, \n
{ \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"name\" \n
], \n
\"id\" : \"products/104728\", \n
\"selectivityEstimate\" : 1, \n
\"sparse\" : false, \n
\"type\" : \"hash\", \n
\"unique\" : false \n
}, \n
{ \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"price\" \n
], \n
\"id\" : \"products/104731\", \n
\"sparse\" : true, \n
\"type\" : \"skiplist\", \n
\"unique\" : false \n
} \n
], \n
\"identifiers\" : { \n
\"products/0\" : { \n
\"fields\" : [ \n
\"_key\" \n
], \n
\"id\" : \"products/0\", \n
\"selectivityEstimate\" : 1, \n
\"sparse\" : false, \n
\"type\" : \"primary\", \n
\"unique\" : true \n
}, \n
\"products/104728\" : { \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"name\" \n
], \n
\"id\" : \"products/104728\", \n
\"selectivityEstimate\" : 1, \n
\"sparse\" : false, \n
\"type\" : \"hash\", \n
\"unique\" : false \n
}, \n
\"products/104731\" : { \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"price\" \n
], \n
\"id\" : \"products/104731\", \n
\"sparse\" : true, \n
\"type\" : \"skiplist\", \n
\"unique\" : false \n
} \n
} \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "The collection name.\n\n",
@@ -11735,7 +11735,7 @@
},
"/_api/index#fulltext": {
"post": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **fields** (string): an array of attribute names. Currently, the array is limited\n to exactly one attribute.\n - **type**: must be equal to *\"fulltext\"*.\n - **minLength**: Minimum character length of words to index. Will default\n to a server-defined value if unspecified. It is thus recommended to set\n this value explicitly when creating the index.\n\n\n\n\n**NOTE** Swagger examples won't work due to the anchor.\n\n\nCreates a fulltext index for the collection *collection-name*, if\nit does not already exist. The call expects an object containing the index\ndetails.\n\n\n\n\n**Example:**\n Creating a fulltext index\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=products <<EOF\n
{ \n
\"type\" : \"fulltext\", \n
\"fields\" : [ \n
\"text\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"fields\" : [ \n
\"text\" \n
], \n
\"id\" : \"products/104764\", \n
\"isNewlyCreated\" : true, \n
\"minLength\" : 2, \n
\"sparse\" : true, \n
\"type\" : \"fulltext\", \n
\"unique\" : false, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **fields** (string): an array of attribute names. Currently, the array is limited\n to exactly one attribute.\n - **type**: must be equal to *\"fulltext\"*.\n - **minLength**: Minimum character length of words to index. Will default\n to a server-defined value if unspecified. It is thus recommended to set\n this value explicitly when creating the index.\n\n\n\n\n**NOTE** Swagger examples won't work due to the anchor.\n\n\nCreates a fulltext index for the collection *collection-name*, if\nit does not already exist. The call expects an object containing the index\ndetails.\n\n\n\n\n**Example:**\n Creating a fulltext index\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=products <<EOF\n
{ \n
\"type\" : \"fulltext\", \n
\"fields\" : [ \n
\"text\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"fields\" : [ \n
\"text\" \n
], \n
\"id\" : \"products/104774\", \n
\"isNewlyCreated\" : true, \n
\"minLength\" : 2, \n
\"sparse\" : true, \n
\"type\" : \"fulltext\", \n
\"unique\" : false, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "The collection name.\n\n",
@@ -11822,7 +11822,7 @@
},
"/_api/index#geo": {
"post": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **fields** (string): An array with one or two attribute paths.\n If it is an array with one attribute path *location*, then a geo-spatial\n index on all documents is created using *location* as path to the\n coordinates. The value of the attribute must be an array with at least two\n double values. The array must contain the latitude (first value) and the\n longitude (second value). All documents, which do not have the attribute\n path or with value that are not suitable, are ignored.\n If it is an array with two attribute paths *latitude* and *longitude*,\n then a geo-spatial index on all documents is created using *latitude*\n and *longitude* as paths the latitude and the longitude. The value of\n the attribute *latitude* and of the attribute *longitude* must a\n double. All documents, which do not have the attribute paths or which\n values are not suitable, are ignored.\n - **type**: must be equal to *\"geo\"*.\n - **geoJson**: If a geo-spatial index on a *location* is constructed\n and *geoJson* is *true*, then the order within the array is longitude\n followed by latitude. This corresponds to the format described in\n http://geojson.org/geojson-spec.html#positions\n\n\n\n\n**NOTE** Swagger examples won't work due to the anchor.\n\n\nCreates a geo-spatial index in the collection *collection-name*, if\nit does not already exist. Expects an object containing the index details.\n\nGeo indexes are always sparse, meaning that documents that do not contain\nthe index attributes or have non-numeric values in the index attributes\nwill not be indexed.\n\n\n\n\n**Example:**\n Creating a geo index with a location attribute\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=products <<EOF\n
{ \n
\"type\" : \"geo\", \n
\"fields\" : [ \n
\"b\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"bestIndexedLevel\" : 17, \n
\"fields\" : [ \n
\"b\" \n
], \n
\"geoJson\" : false, \n
\"id\" : \"products/104750\", \n
\"isNewlyCreated\" : true, \n
\"maxNumCoverCells\" : 8, \n
\"sparse\" : true, \n
\"type\" : \"geo\", \n
\"unique\" : false, \n
\"worstIndexedLevel\" : 4, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n Creating a geo index with latitude and longitude attributes\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=products <<EOF\n
{ \n
\"type\" : \"geo\", \n
\"fields\" : [ \n
\"e\", \n
\"f\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"bestIndexedLevel\" : 17, \n
\"fields\" : [ \n
\"e\", \n
\"f\" \n
], \n
\"geoJson\" : false, \n
\"id\" : \"products/104736\", \n
\"isNewlyCreated\" : true, \n
\"maxNumCoverCells\" : 8, \n
\"sparse\" : true, \n
\"type\" : \"geo\", \n
\"unique\" : false, \n
\"worstIndexedLevel\" : 4, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **fields** (string): An array with one or two attribute paths.\n If it is an array with one attribute path *location*, then a geo-spatial\n index on all documents is created using *location* as path to the\n coordinates. The value of the attribute must be an array with at least two\n double values. The array must contain the latitude (first value) and the\n longitude (second value). All documents, which do not have the attribute\n path or with value that are not suitable, are ignored.\n If it is an array with two attribute paths *latitude* and *longitude*,\n then a geo-spatial index on all documents is created using *latitude*\n and *longitude* as paths the latitude and the longitude. The value of\n the attribute *latitude* and of the attribute *longitude* must a\n double. All documents, which do not have the attribute paths or which\n values are not suitable, are ignored.\n - **type**: must be equal to *\"geo\"*.\n - **geoJson**: If a geo-spatial index on a *location* is constructed\n and *geoJson* is *true*, then the order within the array is longitude\n followed by latitude. This corresponds to the format described in\n http://geojson.org/geojson-spec.html#positions\n\n\n\n\n**NOTE** Swagger examples won't work due to the anchor.\n\n\nCreates a geo-spatial index in the collection *collection-name*, if\nit does not already exist. Expects an object containing the index details.\n\nGeo indexes are always sparse, meaning that documents that do not contain\nthe index attributes or have non-numeric values in the index attributes\nwill not be indexed.\n\n\n\n\n**Example:**\n Creating a geo index with a location attribute\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=products <<EOF\n
{ \n
\"type\" : \"geo\", \n
\"fields\" : [ \n
\"b\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"bestIndexedLevel\" : 17, \n
\"fields\" : [ \n
\"b\" \n
], \n
\"geoJson\" : false, \n
\"id\" : \"products/104760\", \n
\"isNewlyCreated\" : true, \n
\"maxNumCoverCells\" : 8, \n
\"sparse\" : true, \n
\"type\" : \"geo\", \n
\"unique\" : false, \n
\"worstIndexedLevel\" : 4, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n Creating a geo index with latitude and longitude attributes\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=products <<EOF\n
{ \n
\"type\" : \"geo\", \n
\"fields\" : [ \n
\"e\", \n
\"f\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"bestIndexedLevel\" : 17, \n
\"fields\" : [ \n
\"e\", \n
\"f\" \n
], \n
\"geoJson\" : false, \n
\"id\" : \"products/104746\", \n
\"isNewlyCreated\" : true, \n
\"maxNumCoverCells\" : 8, \n
\"sparse\" : true, \n
\"type\" : \"geo\", \n
\"unique\" : false, \n
\"worstIndexedLevel\" : 4, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "The collection name.\n\n\n",
@@ -11863,7 +11863,7 @@
},
"/_api/index#hash": {
"post": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **fields** (string): an array of attribute paths.\n - **unique**: if *true*, then create a unique index.\n - **type**: must be equal to *\"hash\"*.\n - **sparse**: if *true*, then create a sparse index.\n - **deduplicate**: if *false*, the deduplication of array values is turned off.\n\n\n\n\n**NOTE** Swagger examples won't work due to the anchor.\n\n\nCreates a hash index for the collection *collection-name* if it\ndoes not already exist. The call expects an object containing the index\ndetails.\n\nIn a sparse index all documents will be excluded from the index that do not \ncontain at least one of the specified index attributes (i.e. *fields*) or that \nhave a value of *null* in any of the specified index attributes. Such documents \nwill not be indexed, and not be taken into account for uniqueness checks if\nthe *unique* flag is set.\n\nIn a non-sparse index, these documents will be indexed (for non-present\nindexed attributes, a value of *null* will be used) and will be taken into\naccount for uniqueness checks if the *unique* flag is set.\n\n**Note**: unique indexes on non-shard keys are not supported in a cluster.\n\n\n\n\n**Example:**\n Creating an unique constraint\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=products <<EOF\n
{ \n
\"type\" : \"hash\", \n
\"unique\" : true, \n
\"fields\" : [ \n
\"a\", \n
\"b\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"a\", \n
\"b\" \n
], \n
\"id\" : \"products/104834\", \n
\"isNewlyCreated\" : true, \n
\"selectivityEstimate\" : 1, \n
\"sparse\" : false, \n
\"type\" : \"hash\", \n
\"unique\" : true, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n Creating a non-unique hash index\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=products <<EOF\n
{ \n
\"type\" : \"hash\", \n
\"unique\" : false, \n
\"fields\" : [ \n
\"a\", \n
\"b\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"a\", \n
\"b\" \n
], \n
\"id\" : \"products/104778\", \n
\"isNewlyCreated\" : true, \n
\"selectivityEstimate\" : 1, \n
\"sparse\" : false, \n
\"type\" : \"hash\", \n
\"unique\" : false, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n Creating a sparse index\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=products <<EOF\n
{ \n
\"type\" : \"hash\", \n
\"unique\" : false, \n
\"sparse\" : true, \n
\"fields\" : [ \n
\"a\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"a\" \n
], \n
\"id\" : \"products/104848\", \n
\"isNewlyCreated\" : true, \n
\"selectivityEstimate\" : 1, \n
\"sparse\" : true, \n
\"type\" : \"hash\", \n
\"unique\" : false, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **fields** (string): an array of attribute paths.\n - **unique**: if *true*, then create a unique index.\n - **type**: must be equal to *\"hash\"*.\n - **sparse**: if *true*, then create a sparse index.\n - **deduplicate**: if *false*, the deduplication of array values is turned off.\n\n\n\n\n**NOTE** Swagger examples won't work due to the anchor.\n\n\nCreates a hash index for the collection *collection-name* if it\ndoes not already exist. The call expects an object containing the index\ndetails.\n\nIn a sparse index all documents will be excluded from the index that do not \ncontain at least one of the specified index attributes (i.e. *fields*) or that \nhave a value of *null* in any of the specified index attributes. Such documents \nwill not be indexed, and not be taken into account for uniqueness checks if\nthe *unique* flag is set.\n\nIn a non-sparse index, these documents will be indexed (for non-present\nindexed attributes, a value of *null* will be used) and will be taken into\naccount for uniqueness checks if the *unique* flag is set.\n\n**Note**: unique indexes on non-shard keys are not supported in a cluster.\n\n\n\n\n**Example:**\n Creating an unique constraint\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=products <<EOF\n
{ \n
\"type\" : \"hash\", \n
\"unique\" : true, \n
\"fields\" : [ \n
\"a\", \n
\"b\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"a\", \n
\"b\" \n
], \n
\"id\" : \"products/104844\", \n
\"isNewlyCreated\" : true, \n
\"selectivityEstimate\" : 1, \n
\"sparse\" : false, \n
\"type\" : \"hash\", \n
\"unique\" : true, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n Creating a non-unique hash index\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=products <<EOF\n
{ \n
\"type\" : \"hash\", \n
\"unique\" : false, \n
\"fields\" : [ \n
\"a\", \n
\"b\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"a\", \n
\"b\" \n
], \n
\"id\" : \"products/104788\", \n
\"isNewlyCreated\" : true, \n
\"selectivityEstimate\" : 1, \n
\"sparse\" : false, \n
\"type\" : \"hash\", \n
\"unique\" : false, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n Creating a sparse index\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=products <<EOF\n
{ \n
\"type\" : \"hash\", \n
\"unique\" : false, \n
\"sparse\" : true, \n
\"fields\" : [ \n
\"a\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"a\" \n
], \n
\"id\" : \"products/104858\", \n
\"isNewlyCreated\" : true, \n
\"selectivityEstimate\" : 1, \n
\"sparse\" : true, \n
\"type\" : \"hash\", \n
\"unique\" : false, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "The collection name.\n\n",
@@ -11907,7 +11907,7 @@
},
"/_api/index#persistent": {
"post": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **fields** (string): an array of attribute paths.\n - **unique**: if *true*, then create a unique index.\n - **type**: must be equal to *\"persistent\"*.\n - **sparse**: if *true*, then create a sparse index.\n\n\n\n\n\nCreates a persistent index for the collection *collection-name*, if\nit does not already exist. The call expects an object containing the index\ndetails.\n\nIn a sparse index all documents will be excluded from the index that do not \ncontain at least one of the specified index attributes (i.e. *fields*) or that \nhave a value of *null* in any of the specified index attributes. Such documents \nwill not be indexed, and not be taken into account for uniqueness checks if\nthe *unique* flag is set.\n\nIn a non-sparse index, these documents will be indexed (for non-present\nindexed attributes, a value of *null* will be used) and will be taken into\naccount for uniqueness checks if the *unique* flag is set.\n\n**Note**: unique indexes on non-shard keys are not supported in a cluster.\n\n\n\n\n**Example:**\n Creating a persistent index\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=products <<EOF\n
{ \n
\"type\" : \"persistent\", \n
\"unique\" : false, \n
\"fields\" : [ \n
\"a\", \n
\"b\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"a\", \n
\"b\" \n
], \n
\"id\" : \"products/104792\", \n
\"isNewlyCreated\" : true, \n
\"sparse\" : false, \n
\"type\" : \"persistent\", \n
\"unique\" : false, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n Creating a sparse persistent index\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=products <<EOF\n
{ \n
\"type\" : \"persistent\", \n
\"unique\" : false, \n
\"sparse\" : true, \n
\"fields\" : [ \n
\"a\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"a\" \n
], \n
\"id\" : \"products/104862\", \n
\"isNewlyCreated\" : true, \n
\"sparse\" : true, \n
\"type\" : \"persistent\", \n
\"unique\" : false, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **fields** (string): an array of attribute paths.\n - **unique**: if *true*, then create a unique index.\n - **type**: must be equal to *\"persistent\"*.\n - **sparse**: if *true*, then create a sparse index.\n\n\n\n\n\nCreates a persistent index for the collection *collection-name*, if\nit does not already exist. The call expects an object containing the index\ndetails.\n\nIn a sparse index all documents will be excluded from the index that do not \ncontain at least one of the specified index attributes (i.e. *fields*) or that \nhave a value of *null* in any of the specified index attributes. Such documents \nwill not be indexed, and not be taken into account for uniqueness checks if\nthe *unique* flag is set.\n\nIn a non-sparse index, these documents will be indexed (for non-present\nindexed attributes, a value of *null* will be used) and will be taken into\naccount for uniqueness checks if the *unique* flag is set.\n\n**Note**: unique indexes on non-shard keys are not supported in a cluster.\n\n\n\n\n**Example:**\n Creating a persistent index\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=products <<EOF\n
{ \n
\"type\" : \"persistent\", \n
\"unique\" : false, \n
\"fields\" : [ \n
\"a\", \n
\"b\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"a\", \n
\"b\" \n
], \n
\"id\" : \"products/104802\", \n
\"isNewlyCreated\" : true, \n
\"sparse\" : false, \n
\"type\" : \"persistent\", \n
\"unique\" : false, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n Creating a sparse persistent index\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=products <<EOF\n
{ \n
\"type\" : \"persistent\", \n
\"unique\" : false, \n
\"sparse\" : true, \n
\"fields\" : [ \n
\"a\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"a\" \n
], \n
\"id\" : \"products/104872\", \n
\"isNewlyCreated\" : true, \n
\"sparse\" : true, \n
\"type\" : \"persistent\", \n
\"unique\" : false, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "The collection name.\n\n",
@@ -11951,7 +11951,7 @@
},
"/_api/index#skiplist": {
"post": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **fields** (string): an array of attribute paths.\n - **unique**: if *true*, then create a unique index.\n - **type**: must be equal to *\"skiplist\"*.\n - **sparse**: if *true*, then create a sparse index.\n - **deduplicate**: if *false*, the deduplication of array values is turned off.\n\n\n\n\n\nCreates a skip-list index for the collection *collection-name*, if\nit does not already exist. The call expects an object containing the index\ndetails.\n\nIn a sparse index all documents will be excluded from the index that do not \ncontain at least one of the specified index attributes (i.e. *fields*) or that \nhave a value of *null* in any of the specified index attributes. Such documents \nwill not be indexed, and not be taken into account for uniqueness checks if\nthe *unique* flag is set.\n\nIn a non-sparse index, these documents will be indexed (for non-present\nindexed attributes, a value of *null* will be used) and will be taken into\naccount for uniqueness checks if the *unique* flag is set.\n\n**Note**: unique indexes on non-shard keys are not supported in a cluster.\n\n\n\n\n**Example:**\n Creating a skiplist index\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=products <<EOF\n
{ \n
\"type\" : \"skiplist\", \n
\"unique\" : false, \n
\"fields\" : [ \n
\"a\", \n
\"b\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"a\", \n
\"b\" \n
], \n
\"id\" : \"products/104806\", \n
\"isNewlyCreated\" : true, \n
\"sparse\" : false, \n
\"type\" : \"skiplist\", \n
\"unique\" : false, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n Creating a sparse skiplist index\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=products <<EOF\n
{ \n
\"type\" : \"skiplist\", \n
\"unique\" : false, \n
\"sparse\" : true, \n
\"fields\" : [ \n
\"a\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"a\" \n
], \n
\"id\" : \"products/104876\", \n
\"isNewlyCreated\" : true, \n
\"sparse\" : true, \n
\"type\" : \"skiplist\", \n
\"unique\" : false, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **fields** (string): an array of attribute paths.\n - **unique**: if *true*, then create a unique index.\n - **type**: must be equal to *\"skiplist\"*.\n - **sparse**: if *true*, then create a sparse index.\n - **deduplicate**: if *false*, the deduplication of array values is turned off.\n\n\n\n\n\nCreates a skip-list index for the collection *collection-name*, if\nit does not already exist. The call expects an object containing the index\ndetails.\n\nIn a sparse index all documents will be excluded from the index that do not \ncontain at least one of the specified index attributes (i.e. *fields*) or that \nhave a value of *null* in any of the specified index attributes. Such documents \nwill not be indexed, and not be taken into account for uniqueness checks if\nthe *unique* flag is set.\n\nIn a non-sparse index, these documents will be indexed (for non-present\nindexed attributes, a value of *null* will be used) and will be taken into\naccount for uniqueness checks if the *unique* flag is set.\n\n**Note**: unique indexes on non-shard keys are not supported in a cluster.\n\n\n\n\n**Example:**\n Creating a skiplist index\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=products <<EOF\n
{ \n
\"type\" : \"skiplist\", \n
\"unique\" : false, \n
\"fields\" : [ \n
\"a\", \n
\"b\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"a\", \n
\"b\" \n
], \n
\"id\" : \"products/104816\", \n
\"isNewlyCreated\" : true, \n
\"sparse\" : false, \n
\"type\" : \"skiplist\", \n
\"unique\" : false, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n Creating a sparse skiplist index\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=products <<EOF\n
{ \n
\"type\" : \"skiplist\", \n
\"unique\" : false, \n
\"sparse\" : true, \n
\"fields\" : [ \n
\"a\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"deduplicate\" : true, \n
\"fields\" : [ \n
\"a\" \n
], \n
\"id\" : \"products/104895\", \n
\"isNewlyCreated\" : true, \n
\"sparse\" : true, \n
\"type\" : \"skiplist\", \n
\"unique\" : false, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "The collection name.\n\n",
@@ -11995,7 +11995,7 @@
},
"/_api/index#ttl": {
"post": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **fields** (string): an array with exactly one attribute path.\n - **type**: must be equal to *\"ttl\"*.\n - **expireAfter**: The time (in seconds) after a document's creation after which the\n documents count as \"expired\".\n\n\n\n\n**NOTE** Swagger examples won't work due to the anchor.\n\nCreates a TTL index for the collection *collection-name* if it\ndoes not already exist. The call expects an object containing the index\ndetails.\n\n\n\n\n**Example:**\n Creating a TTL index\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=sessions <<EOF\n
{ \n
\"type\" : \"ttl\", \n
\"expireAfter\" : 3600, \n
\"fields\" : [ \n
\"createdAt\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"expireAfter\" : 3600, \n
\"fields\" : [ \n
\"createdAt\" \n
], \n
\"id\" : \"sessions/104820\", \n
\"isNewlyCreated\" : true, \n
\"sparse\" : true, \n
\"type\" : \"ttl\", \n
\"unique\" : false, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **fields** (string): an array with exactly one attribute path.\n - **type**: must be equal to *\"ttl\"*.\n - **expireAfter**: The time (in seconds) after a document's creation after which the\n documents count as \"expired\".\n\n\n\n\n**NOTE** Swagger examples won't work due to the anchor.\n\nCreates a TTL index for the collection *collection-name* if it\ndoes not already exist. The call expects an object containing the index\ndetails.\n\n\n\n\n**Example:**\n Creating a TTL index\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/index?collection=sessions <<EOF\n
{ \n
\"type\" : \"ttl\", \n
\"expireAfter\" : 3600, \n
\"fields\" : [ \n
\"createdAt\" \n
] \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"expireAfter\" : 3600, \n
\"fields\" : [ \n
\"createdAt\" \n
], \n
\"id\" : \"sessions/104830\", \n
\"isNewlyCreated\" : true, \n
\"sparse\" : true, \n
\"type\" : \"ttl\", \n
\"unique\" : false, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n\n",
"parameters": [
{
"description": "The collection name.\n\n",
@@ -12039,7 +12039,7 @@
},
"/_api/index/{index-handle}": {
"delete": {
- "description": "\n\nDeletes an index with *index-handle*.\n\n\n\n\n**Example:**\n \n\nshell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/index/products/104890\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"id\" : \"products/104890\", \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n",
+ "description": "\n\nDeletes an index with *index-handle*.\n\n\n\n\n**Example:**\n \n\nshell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/index/products/104909\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"id\" : \"products/104909\", \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "The index handle.\n\n",
@@ -12097,7 +12097,7 @@
},
"/_api/job/{job-id}": {
"get": {
- "description": "\n\nReturns the processing status of the specified job. The processing status\ncan be\ndetermined by peeking into the HTTP response code of the response.\n\n\n\n\n**Example:**\n Querying the status of a done job:\n\nshell> curl -X PUT --header 'x-arango-async: store' --header 'accept: application/json' --dump - http://localhost:8529/_api/version\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132271\n
x-content-type-options: nosniff\n
\n
shell> curl -X PUT --header 'accept: application/json' --dump - http://localhost:8529/_api/job/132271\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-arango-async-id: 132271\n
x-content-type-options: nosniff\n
\n
{ \n
\"server\" : \"arango\", \n
\"version\" : \"3.5.0-devel\", \n
\"license\" : \"enterprise\" \n
}\n
\n\n\n\n\n**Example:**\n Querying the status of a pending job:\n(therefore we create a long runnging job...)\n\nshell> curl -X POST --header 'x-arango-async: store' --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/transaction <<EOF\n
{ \n
\"collections\" : { \n
\"read\" : [ \n
\"_frontend\" \n
] \n
}, \n
\"action\" : \"function () {require('internal').sleep(15.0);}\" \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132273\n
x-content-type-options: nosniff\n
\n
shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/job/132273\n
\n
HTTP/1.1 No Content\n
content-type: text/plain; charset=utf-8\n
x-content-type-options: nosniff\n
\n
\n\n\n\n\n",
+ "description": "\n\nReturns the processing status of the specified job. The processing status\ncan be\ndetermined by peeking into the HTTP response code of the response.\n\n\n\n\n**Example:**\n Querying the status of a done job:\n\nshell> curl -X PUT --header 'x-arango-async: store' --header 'accept: application/json' --dump - http://localhost:8529/_api/version\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132291\n
x-content-type-options: nosniff\n
\n
shell> curl -X PUT --header 'accept: application/json' --dump - http://localhost:8529/_api/job/132291\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-arango-async-id: 132291\n
x-content-type-options: nosniff\n
\n
{ \n
\"server\" : \"arango\", \n
\"version\" : \"3.5.0-devel\", \n
\"license\" : \"enterprise\" \n
}\n
\n\n\n\n\n**Example:**\n Querying the status of a pending job:\n(therefore we create a long runnging job...)\n\nshell> curl -X POST --header 'x-arango-async: store' --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/transaction <<EOF\n
{ \n
\"collections\" : { \n
\"read\" : [ \n
\"_frontend\" \n
] \n
}, \n
\"action\" : \"function () {require('internal').sleep(15.0);}\" \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132293\n
x-content-type-options: nosniff\n
\n
shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/job/132293\n
\n
HTTP/1.1 No Content\n
content-type: text/plain; charset=utf-8\n
x-content-type-options: nosniff\n
\n
\n\n\n\n\n",
"parameters": [
{
"description": "The async job id.\n\n",
@@ -12128,7 +12128,7 @@
"x-hints": ""
},
"put": {
- "description": "\n\nReturns the result of an async job identified by job-id. If the async job\nresult is present on the server, the result will be removed from the list of\nresult. That means this method can be called for each job-id once.\nThe method will return the original job result's headers and body, plus the\nadditional HTTP header x-arango-async-job-id. If this header is present,\nthen\nthe job was found and the response contains the original job's result. If\nthe header is not present, the job was not found and the response contains\nstatus information from the job manager.\n\n\n\n\n**Example:**\n Not providing a job-id:\n\nshell> curl -X PUT --header 'accept: application/json' --dump - http://localhost:8529/_api/job\n
\n
HTTP/1.1 Bad Request\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"bad parameter\", \n
\"code\" : 400, \n
\"errorNum\" : 400 \n
}\n
\n\n\n\n\n**Example:**\n Providing a job-id for a non-existing job:\n\nshell> curl -X PUT --header 'accept: application/json' --dump - http://localhost:8529/_api/job/notthere\n
\n
HTTP/1.1 Not Found\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"not found\", \n
\"code\" : 404, \n
\"errorNum\" : 404 \n
}\n
\n\n\n\n\n**Example:**\n Fetching the result of an HTTP GET job:\n\nshell> curl -X PUT --header 'x-arango-async: store' --header 'accept: application/json' --dump - http://localhost:8529/_api/version\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132260\n
x-content-type-options: nosniff\n
\n
shell> curl -X PUT --header 'accept: application/json' --dump - http://localhost:8529/_api/job/132260\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-arango-async-id: 132260\n
x-content-type-options: nosniff\n
\n
{ \n
\"server\" : \"arango\", \n
\"version\" : \"3.5.0-devel\", \n
\"license\" : \"enterprise\" \n
}\n
\n\n\n\n\n**Example:**\n Fetching the result of an HTTP POST job that failed:\n\nshell> curl -X PUT --header 'x-arango-async: store' --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/collection <<EOF\n
{ \n
\"name\" : \" this name is invalid \" \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132262\n
x-content-type-options: nosniff\n
\n
shell> curl -X PUT --header 'accept: application/json' --dump - http://localhost:8529/_api/job/132262\n
\n
HTTP/1.1 Bad Request\n
content-type: application/json; charset=utf-8\n
x-arango-async-id: 132262\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"expected PUT /_api/collection/<collection-name>/<action>\", \n
\"code\" : 400, \n
\"errorNum\" : 400 \n
}\n
\n\n\n\n\n",
+ "description": "\n\nReturns the result of an async job identified by job-id. If the async job\nresult is present on the server, the result will be removed from the list of\nresult. That means this method can be called for each job-id once.\nThe method will return the original job result's headers and body, plus the\nadditional HTTP header x-arango-async-job-id. If this header is present,\nthen\nthe job was found and the response contains the original job's result. If\nthe header is not present, the job was not found and the response contains\nstatus information from the job manager.\n\n\n\n\n**Example:**\n Not providing a job-id:\n\nshell> curl -X PUT --header 'accept: application/json' --dump - http://localhost:8529/_api/job\n
\n
HTTP/1.1 Bad Request\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"bad parameter\", \n
\"code\" : 400, \n
\"errorNum\" : 400 \n
}\n
\n\n\n\n\n**Example:**\n Providing a job-id for a non-existing job:\n\nshell> curl -X PUT --header 'accept: application/json' --dump - http://localhost:8529/_api/job/notthere\n
\n
HTTP/1.1 Not Found\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"not found\", \n
\"code\" : 404, \n
\"errorNum\" : 404 \n
}\n
\n\n\n\n\n**Example:**\n Fetching the result of an HTTP GET job:\n\nshell> curl -X PUT --header 'x-arango-async: store' --header 'accept: application/json' --dump - http://localhost:8529/_api/version\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132280\n
x-content-type-options: nosniff\n
\n
shell> curl -X PUT --header 'accept: application/json' --dump - http://localhost:8529/_api/job/132280\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-arango-async-id: 132280\n
x-content-type-options: nosniff\n
\n
{ \n
\"server\" : \"arango\", \n
\"version\" : \"3.5.0-devel\", \n
\"license\" : \"enterprise\" \n
}\n
\n\n\n\n\n**Example:**\n Fetching the result of an HTTP POST job that failed:\n\nshell> curl -X PUT --header 'x-arango-async: store' --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/collection <<EOF\n
{ \n
\"name\" : \" this name is invalid \" \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132282\n
x-content-type-options: nosniff\n
\n
shell> curl -X PUT --header 'accept: application/json' --dump - http://localhost:8529/_api/job/132282\n
\n
HTTP/1.1 Bad Request\n
content-type: application/json; charset=utf-8\n
x-arango-async-id: 132282\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"expected PUT /_api/collection/<collection-name>/<action>\", \n
\"code\" : 400, \n
\"errorNum\" : 400 \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "The async job id.\n\n",
@@ -12161,7 +12161,7 @@
},
"/_api/job/{job-id}/cancel": {
"put": {
- "description": "\n\nCancels the currently running job identified by job-id. Note that it still\nmight take some time to actually cancel the running async job.\n\n\n\n\n**Example:**\n \n\nshell> curl -X POST --header 'x-arango-async: store' --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/cursor <<EOF\n
{ \n
\"query\" : \"FOR i IN 1..10 FOR j IN 1..10 LET x = sleep(1.0) FILTER i == 5 && j == 5 RETURN 42\" \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132248\n
x-content-type-options: nosniff\n
\n
shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/job/pending\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
[ \n
\"132248\" \n
]\n
shell> curl -X PUT --header 'accept: application/json' --dump - http://localhost:8529/_api/job/132248/cancel\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : true \n
}\n
shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/job/pending\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
[ \n
\"132248\" \n
]\n
\n\n\n\n\n",
+ "description": "\n\nCancels the currently running job identified by job-id. Note that it still\nmight take some time to actually cancel the running async job.\n\n\n\n\n**Example:**\n \n\nshell> curl -X POST --header 'x-arango-async: store' --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/cursor <<EOF\n
{ \n
\"query\" : \"FOR i IN 1..10 FOR j IN 1..10 LET x = sleep(1.0) FILTER i == 5 && j == 5 RETURN 42\" \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132268\n
x-content-type-options: nosniff\n
\n
shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/job/pending\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
[ \n
\"132268\" \n
]\n
shell> curl -X PUT --header 'accept: application/json' --dump - http://localhost:8529/_api/job/132268/cancel\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : true \n
}\n
shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/job/pending\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
[ \n
\"132268\" \n
]\n
\n\n\n\n\n",
"parameters": [
{
"description": "The async job id.\n\n",
@@ -12194,7 +12194,7 @@
},
"/_api/job/{type}": {
"delete": {
- "description": "\n\nDeletes either all job results, expired job results, or the result of a\nspecific job.\nClients can use this method to perform an eventual garbage collection of job\nresults.\n\n\n\n\n**Example:**\n Deleting all jobs:\n\nshell> curl -X PUT --header 'x-arango-async: store' --header 'accept: application/json' --dump - http://localhost:8529/_api/version\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132251\n
x-content-type-options: nosniff\n
\n
shell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/job/all\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : true \n
}\n
\n\n\n\n\n**Example:**\n Deleting expired jobs:\n\nshell> curl -X PUT --header 'x-arango-async: store' --header 'accept: application/json' --dump - http://localhost:8529/_api/version\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132253\n
x-content-type-options: nosniff\n
\n
shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_admin/time\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"time\" : 1550241794.3178062, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
shell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/job/expired?stamp=1550241794.3178062\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : true \n
}\n
shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/job/pending\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
[ ]\n
\n\n\n\n\n**Example:**\n Deleting the result of a specific job:\n\nshell> curl -X PUT --header 'x-arango-async: store' --header 'accept: application/json' --dump - http://localhost:8529/_api/version\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132255\n
x-content-type-options: nosniff\n
\n
shell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/job/132255\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : true \n
}\n
\n\n\n\n\n**Example:**\n Deleting the result of a non-existing job:\n\nshell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/job/AreYouThere\n
\n
HTTP/1.1 Not Found\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"not found\", \n
\"code\" : 404, \n
\"errorNum\" : 404 \n
}\n
\n\n\n\n\n",
+ "description": "\n\nDeletes either all job results, expired job results, or the result of a\nspecific job.\nClients can use this method to perform an eventual garbage collection of job\nresults.\n\n\n\n\n**Example:**\n Deleting all jobs:\n\nshell> curl -X PUT --header 'x-arango-async: store' --header 'accept: application/json' --dump - http://localhost:8529/_api/version\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132271\n
x-content-type-options: nosniff\n
\n
shell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/job/all\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : true \n
}\n
\n\n\n\n\n**Example:**\n Deleting expired jobs:\n\nshell> curl -X PUT --header 'x-arango-async: store' --header 'accept: application/json' --dump - http://localhost:8529/_api/version\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132273\n
x-content-type-options: nosniff\n
\n
shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_admin/time\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"time\" : 1550658808.1522949, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
shell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/job/expired?stamp=1550658808.1522949\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : true \n
}\n
shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/job/pending\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
[ ]\n
\n\n\n\n\n**Example:**\n Deleting the result of a specific job:\n\nshell> curl -X PUT --header 'x-arango-async: store' --header 'accept: application/json' --dump - http://localhost:8529/_api/version\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132275\n
x-content-type-options: nosniff\n
\n
shell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/job/132275\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : true \n
}\n
\n\n\n\n\n**Example:**\n Deleting the result of a non-existing job:\n\nshell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/job/AreYouThere\n
\n
HTTP/1.1 Not Found\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"not found\", \n
\"code\" : 404, \n
\"errorNum\" : 404 \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "The type of jobs to delete. type can be:\n* *all*: Deletes all jobs results. Currently executing or queued async \n jobs will not be stopped by this call.\n* *expired*: Deletes expired results. To determine the expiration status of a \n result, pass the stamp query parameter. stamp needs to be a UNIX timestamp, \n and all async job results created at a lower timestamp will be deleted.\n* *an actual job-id*: In this case, the call will remove the result of the\n specified async job. If the job is currently executing or queued, it will\n not be aborted.\n\n",
@@ -12232,7 +12232,7 @@
"x-hints": ""
},
"get": {
- "description": "\n\nReturns the list of ids of async jobs with a specific status (either done or\npending).\nThe list can be used by the client to get an overview of the job system\nstatus and\nto retrieve completed job results later.\n\n\n\n\n**Example:**\n Fetching the list of done jobs:\n\nshell> curl -X PUT --header 'x-arango-async: store' --header 'accept: application/json' --dump - http://localhost:8529/_api/version\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132264\n
x-content-type-options: nosniff\n
\n
shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/job/done\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
[ \n
\"132264\" \n
]\n
\n\n\n\n\n**Example:**\n Fetching the list of pending jobs:\n\nshell> curl -X PUT --header 'x-arango-async: store' --header 'accept: application/json' --dump - http://localhost:8529/_api/version\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132266\n
x-content-type-options: nosniff\n
\n
shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/job/pending\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
[ ]\n
\n\n\n\n\n**Example:**\n Querying the status of a pending job:\n(we create a sleep job therefore...)\n\nshell> curl -X POST --header 'x-arango-async: store' --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/transaction <<EOF\n
{ \n
\"collections\" : { \n
\"read\" : [ \n
\"_frontend\" \n
] \n
}, \n
\"action\" : \"function () {require('internal').sleep(15.0);}\" \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132268\n
x-content-type-options: nosniff\n
\n
shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/job/pending\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
[ \n
\"132268\" \n
]\n
shell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/job/132268\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : true \n
}\n
\n\n\n\n\n",
+ "description": "\n\nReturns the list of ids of async jobs with a specific status (either done or\npending).\nThe list can be used by the client to get an overview of the job system\nstatus and\nto retrieve completed job results later.\n\n\n\n\n**Example:**\n Fetching the list of done jobs:\n\nshell> curl -X PUT --header 'x-arango-async: store' --header 'accept: application/json' --dump - http://localhost:8529/_api/version\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132284\n
x-content-type-options: nosniff\n
\n
shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/job/done\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
[ \n
\"132284\" \n
]\n
\n\n\n\n\n**Example:**\n Fetching the list of pending jobs:\n\nshell> curl -X PUT --header 'x-arango-async: store' --header 'accept: application/json' --dump - http://localhost:8529/_api/version\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132286\n
x-content-type-options: nosniff\n
\n
shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/job/pending\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
[ ]\n
\n\n\n\n\n**Example:**\n Querying the status of a pending job:\n(we create a sleep job therefore...)\n\nshell> curl -X POST --header 'x-arango-async: store' --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/transaction <<EOF\n
{ \n
\"collections\" : { \n
\"read\" : [ \n
\"_frontend\" \n
] \n
}, \n
\"action\" : \"function () {require('internal').sleep(15.0);}\" \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: text/plain; charset=utf-8\n
x-arango-async-id: 132288\n
x-content-type-options: nosniff\n
\n
shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/job/pending\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
[ \n
\"132288\" \n
]\n
shell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/job/132288\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : true \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "The type of jobs to return. The type can be either done or pending. Setting\nthe type to done will make the method return the ids of already completed\nasync\njobs for which results can be fetched. Setting the type to pending will\nreturn\nthe ids of not yet finished async jobs.\n\n",
@@ -12595,7 +12595,7 @@
},
"/_api/replication/applier-start": {
"put": {
- "description": "\n\nStarts the replication applier. This will return immediately if the\nreplication applier is already running.\n\nIf the replication applier is not already running, the applier configuration\nwill be checked, and if it is complete, the applier will be started in a\nbackground thread. This means that even if the applier will encounter any\nerrors while running, they will not be reported in the response to this\nmethod.\n\nTo detect replication applier errors after the applier was started, use the\n*/_api/replication/applier-state* API instead.\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/applier-start\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"state\" : { \n
\"running\" : true, \n
\"phase\" : \"running\", \n
\"lastAppliedContinuousTick\" : null, \n
\"lastProcessedContinuousTick\" : null, \n
\"lastAvailableContinuousTick\" : null, \n
\"safeResumeTick\" : null, \n
\"ticksBehind\" : 0, \n
\"progress\" : { \n
\"time\" : \"2019-02-15T14:42:34Z\", \n
\"message\" : \"applier initially created for database '_system'\", \n
\"failedConnects\" : 0 \n
}, \n
\"totalRequests\" : 0, \n
\"totalFailedConnects\" : 0, \n
\"totalEvents\" : 0, \n
\"totalResyncs\" : 0, \n
\"totalOperationsExcluded\" : 0, \n
\"lastError\" : { \n
\"errorNum\" : 0 \n
}, \n
\"time\" : \"2019-02-15T14:42:53Z\" \n
}, \n
\"server\" : { \n
\"version\" : \"3.5.0-devel\", \n
\"serverId\" : \"70528077254784\" \n
}, \n
\"endpoint\" : \"tcp://127.0.0.1:8529\", \n
\"database\" : \"_system\" \n
}\n
\n\n\n\n\n",
+ "description": "\n\nStarts the replication applier. This will return immediately if the\nreplication applier is already running.\n\nIf the replication applier is not already running, the applier configuration\nwill be checked, and if it is complete, the applier will be started in a\nbackground thread. This means that even if the applier will encounter any\nerrors while running, they will not be reported in the response to this\nmethod.\n\nTo detect replication applier errors after the applier was started, use the\n*/_api/replication/applier-state* API instead.\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/applier-start\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"state\" : { \n
\"running\" : true, \n
\"phase\" : \"running\", \n
\"lastAppliedContinuousTick\" : null, \n
\"lastProcessedContinuousTick\" : null, \n
\"lastAvailableContinuousTick\" : null, \n
\"safeResumeTick\" : null, \n
\"ticksBehind\" : 0, \n
\"progress\" : { \n
\"time\" : \"2019-02-20T10:32:42Z\", \n
\"message\" : \"applier initially created for database '_system'\", \n
\"failedConnects\" : 0 \n
}, \n
\"totalRequests\" : 0, \n
\"totalFailedConnects\" : 0, \n
\"totalEvents\" : 0, \n
\"totalResyncs\" : 0, \n
\"totalOperationsExcluded\" : 0, \n
\"lastError\" : { \n
\"errorNum\" : 0 \n
}, \n
\"time\" : \"2019-02-20T10:33:03Z\" \n
}, \n
\"server\" : { \n
\"version\" : \"3.5.0-devel\", \n
\"serverId\" : \"153018529730512\" \n
}, \n
\"endpoint\" : \"tcp://127.0.0.1:8529\", \n
\"database\" : \"_system\" \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "The remote *lastLogTick* value from which to start applying. If not specified,\nthe last saved tick from the previous applier run is used. If there is no\nprevious applier state saved, the applier will start at the beginning of the\nlogger server's log.\n\n",
@@ -12630,7 +12630,7 @@
},
"/_api/replication/applier-state": {
"get": {
- "description": "\n\nReturns the state of the replication applier, regardless of whether the\napplier is currently running or not.\n\nThe response is a JSON object with the following attributes:\n\n- *state*: a JSON object with the following sub-attributes:\n\n - *running*: whether or not the applier is active and running\n\n - *lastAppliedContinuousTick*: the last tick value from the continuous\n replication log the applier has applied.\n\n - *lastProcessedContinuousTick*: the last tick value from the continuous\n replication log the applier has processed.\n\n Regularly, the last applied and last processed tick values should be\n identical. For transactional operations, the replication applier will first\n process incoming log events before applying them, so the processed tick\n value might be higher than the applied tick value. This will be the case\n until the applier encounters the *transaction commit* log event for the\n transaction.\n\n - *lastAvailableContinuousTick*: the last tick value the remote server can\n provide, for all databases.\n\n - *ticksBehind*: this attribute will be present only if the applier is currently\n running. It will provide the number of log ticks between what the applier\n has applied/seen and the last log tick value provided by the remote server.\n If this value is zero, then both servers are in sync. If this is non-zero,\n then the remote server has additional data that the applier has not yet\n fetched and processed, or the remote server may have more data that is not\n applicable to the applier.\n\n Client applications can use it to determine approximately how far the applier\n is behind the remote server, and can periodically check if the value is \n increasing (applier is falling behind) or decreasing (applier is catching up).\n \n Please note that as the remote server will only keep one last log tick value \n for all of its databases, but replication may be restricted to just certain \n databases on the applier, this value is more meaningful when the global applier \n is used.\n Additionally, the last log tick provided by the remote server may increase\n due to writes into system collections that are not replicated due to replication\n configuration. So the reported value may exaggerate the reality a bit for\n some scenarios. \n\n - *time*: the time on the applier server.\n\n - *totalRequests*: the total number of requests the applier has made to the\n endpoint.\n\n - *totalFailedConnects*: the total number of failed connection attempts the\n applier has made.\n\n - *totalEvents*: the total number of log events the applier has processed.\n\n - *totalOperationsExcluded*: the total number of log events excluded because\n of *restrictCollections*.\n\n - *progress*: a JSON object with details about the replication applier progress.\n It contains the following sub-attributes if there is progress to report:\n\n - *message*: a textual description of the progress\n\n - *time*: the date and time the progress was logged\n\n - *failedConnects*: the current number of failed connection attempts\n\n - *lastError*: a JSON object with details about the last error that happened on\n the applier. It contains the following sub-attributes if there was an error:\n\n - *errorNum*: a numerical error code\n\n - *errorMessage*: a textual error description\n\n - *time*: the date and time the error occurred\n\n In case no error has occurred, *lastError* will be empty.\n\n- *server*: a JSON object with the following sub-attributes:\n\n - *version*: the applier server's version\n\n - *serverId*: the applier server's id\n\n- *endpoint*: the endpoint the applier is connected to (if applier is\n active) or will connect to (if applier is currently inactive)\n\n- *database*: the name of the database the applier is connected to (if applier is\n active) or will connect to (if applier is currently inactive)\n\nPlease note that all \"tick\" values returned do not have a specific unit. Tick\nvalues are only meaningful when compared to each other. Higher tick values mean\n\"later in time\" than lower tick values.\n\n\n\n**Example:**\n Fetching the state of an inactive applier:\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/applier-state\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"state\" : { \n
\"running\" : false, \n
\"phase\" : \"inactive\", \n
\"lastAppliedContinuousTick\" : null, \n
\"lastProcessedContinuousTick\" : null, \n
\"lastAvailableContinuousTick\" : null, \n
\"safeResumeTick\" : null, \n
\"progress\" : { \n
\"time\" : \"2019-02-15T14:42:54Z\", \n
\"message\" : \"applier shut down\", \n
\"failedConnects\" : 1 \n
}, \n
\"totalRequests\" : 2, \n
\"totalFailedConnects\" : 1, \n
\"totalEvents\" : 0, \n
\"totalResyncs\" : 0, \n
\"totalOperationsExcluded\" : 0, \n
\"lastError\" : { \n
\"errorNum\" : 0 \n
}, \n
\"time\" : \"2019-02-15T14:42:54Z\" \n
}, \n
\"server\" : { \n
\"version\" : \"3.5.0-devel\", \n
\"serverId\" : \"70528077254784\" \n
}, \n
\"endpoint\" : \"tcp://127.0.0.1:8529\", \n
\"database\" : \"_system\" \n
}\n
\n\n\n\n\n**Example:**\n Fetching the state of an active applier:\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/applier-state\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"state\" : { \n
\"running\" : true, \n
\"phase\" : \"running\", \n
\"lastAppliedContinuousTick\" : null, \n
\"lastProcessedContinuousTick\" : null, \n
\"lastAvailableContinuousTick\" : null, \n
\"safeResumeTick\" : null, \n
\"ticksBehind\" : 0, \n
\"progress\" : { \n
\"time\" : \"2019-02-15T14:42:54Z\", \n
\"message\" : \"fetching master state information\", \n
\"failedConnects\" : 0 \n
}, \n
\"totalRequests\" : 2, \n
\"totalFailedConnects\" : 1, \n
\"totalEvents\" : 0, \n
\"totalResyncs\" : 0, \n
\"totalOperationsExcluded\" : 0, \n
\"lastError\" : { \n
\"errorNum\" : 0 \n
}, \n
\"time\" : \"2019-02-15T14:42:54Z\" \n
}, \n
\"server\" : { \n
\"version\" : \"3.5.0-devel\", \n
\"serverId\" : \"70528077254784\" \n
}, \n
\"endpoint\" : \"tcp://127.0.0.1:8529\", \n
\"database\" : \"_system\" \n
}\n
\n\n\n\n\n",
+ "description": "\n\nReturns the state of the replication applier, regardless of whether the\napplier is currently running or not.\n\nThe response is a JSON object with the following attributes:\n\n- *state*: a JSON object with the following sub-attributes:\n\n - *running*: whether or not the applier is active and running\n\n - *lastAppliedContinuousTick*: the last tick value from the continuous\n replication log the applier has applied.\n\n - *lastProcessedContinuousTick*: the last tick value from the continuous\n replication log the applier has processed.\n\n Regularly, the last applied and last processed tick values should be\n identical. For transactional operations, the replication applier will first\n process incoming log events before applying them, so the processed tick\n value might be higher than the applied tick value. This will be the case\n until the applier encounters the *transaction commit* log event for the\n transaction.\n\n - *lastAvailableContinuousTick*: the last tick value the remote server can\n provide, for all databases.\n\n - *ticksBehind*: this attribute will be present only if the applier is currently\n running. It will provide the number of log ticks between what the applier\n has applied/seen and the last log tick value provided by the remote server.\n If this value is zero, then both servers are in sync. If this is non-zero,\n then the remote server has additional data that the applier has not yet\n fetched and processed, or the remote server may have more data that is not\n applicable to the applier.\n\n Client applications can use it to determine approximately how far the applier\n is behind the remote server, and can periodically check if the value is \n increasing (applier is falling behind) or decreasing (applier is catching up).\n \n Please note that as the remote server will only keep one last log tick value \n for all of its databases, but replication may be restricted to just certain \n databases on the applier, this value is more meaningful when the global applier \n is used.\n Additionally, the last log tick provided by the remote server may increase\n due to writes into system collections that are not replicated due to replication\n configuration. So the reported value may exaggerate the reality a bit for\n some scenarios. \n\n - *time*: the time on the applier server.\n\n - *totalRequests*: the total number of requests the applier has made to the\n endpoint.\n\n - *totalFailedConnects*: the total number of failed connection attempts the\n applier has made.\n\n - *totalEvents*: the total number of log events the applier has processed.\n\n - *totalOperationsExcluded*: the total number of log events excluded because\n of *restrictCollections*.\n\n - *progress*: a JSON object with details about the replication applier progress.\n It contains the following sub-attributes if there is progress to report:\n\n - *message*: a textual description of the progress\n\n - *time*: the date and time the progress was logged\n\n - *failedConnects*: the current number of failed connection attempts\n\n - *lastError*: a JSON object with details about the last error that happened on\n the applier. It contains the following sub-attributes if there was an error:\n\n - *errorNum*: a numerical error code\n\n - *errorMessage*: a textual error description\n\n - *time*: the date and time the error occurred\n\n In case no error has occurred, *lastError* will be empty.\n\n- *server*: a JSON object with the following sub-attributes:\n\n - *version*: the applier server's version\n\n - *serverId*: the applier server's id\n\n- *endpoint*: the endpoint the applier is connected to (if applier is\n active) or will connect to (if applier is currently inactive)\n\n- *database*: the name of the database the applier is connected to (if applier is\n active) or will connect to (if applier is currently inactive)\n\nPlease note that all \"tick\" values returned do not have a specific unit. Tick\nvalues are only meaningful when compared to each other. Higher tick values mean\n\"later in time\" than lower tick values.\n\n\n\n**Example:**\n Fetching the state of an inactive applier:\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/applier-state\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"state\" : { \n
\"running\" : false, \n
\"phase\" : \"inactive\", \n
\"lastAppliedContinuousTick\" : null, \n
\"lastProcessedContinuousTick\" : null, \n
\"lastAvailableContinuousTick\" : null, \n
\"safeResumeTick\" : null, \n
\"progress\" : { \n
\"time\" : \"2019-02-20T10:33:03Z\", \n
\"message\" : \"applier shut down\", \n
\"failedConnects\" : 0 \n
}, \n
\"totalRequests\" : 1, \n
\"totalFailedConnects\" : 0, \n
\"totalEvents\" : 0, \n
\"totalResyncs\" : 0, \n
\"totalOperationsExcluded\" : 0, \n
\"lastError\" : { \n
\"errorNum\" : 0 \n
}, \n
\"time\" : \"2019-02-20T10:33:03Z\" \n
}, \n
\"server\" : { \n
\"version\" : \"3.5.0-devel\", \n
\"serverId\" : \"153018529730512\" \n
}, \n
\"endpoint\" : \"tcp://127.0.0.1:8529\", \n
\"database\" : \"_system\" \n
}\n
\n\n\n\n\n**Example:**\n Fetching the state of an active applier:\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/applier-state\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"state\" : { \n
\"running\" : true, \n
\"phase\" : \"running\", \n
\"lastAppliedContinuousTick\" : null, \n
\"lastProcessedContinuousTick\" : null, \n
\"lastAvailableContinuousTick\" : null, \n
\"safeResumeTick\" : null, \n
\"ticksBehind\" : 0, \n
\"progress\" : { \n
\"time\" : \"2019-02-20T10:33:03Z\", \n
\"message\" : \"fetching master state information\", \n
\"failedConnects\" : 0 \n
}, \n
\"totalRequests\" : 1, \n
\"totalFailedConnects\" : 0, \n
\"totalEvents\" : 0, \n
\"totalResyncs\" : 0, \n
\"totalOperationsExcluded\" : 0, \n
\"lastError\" : { \n
\"errorNum\" : 0 \n
}, \n
\"time\" : \"2019-02-20T10:33:03Z\" \n
}, \n
\"server\" : { \n
\"version\" : \"3.5.0-devel\", \n
\"serverId\" : \"153018529730512\" \n
}, \n
\"endpoint\" : \"tcp://127.0.0.1:8529\", \n
\"database\" : \"_system\" \n
}\n
\n\n\n\n\n",
"parameters": [],
"responses": {
"200": {
@@ -12654,7 +12654,7 @@
},
"/_api/replication/applier-stop": {
"put": {
- "description": "\n\nStops the replication applier. This will return immediately if the\nreplication applier is not running.\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/applier-stop\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"state\" : { \n
\"running\" : false, \n
\"phase\" : \"inactive\", \n
\"lastAppliedContinuousTick\" : null, \n
\"lastProcessedContinuousTick\" : null, \n
\"lastAvailableContinuousTick\" : null, \n
\"safeResumeTick\" : null, \n
\"progress\" : { \n
\"time\" : \"2019-02-15T14:42:55Z\", \n
\"message\" : \"applier shut down\", \n
\"failedConnects\" : 0 \n
}, \n
\"totalRequests\" : 6, \n
\"totalFailedConnects\" : 3, \n
\"totalEvents\" : 0, \n
\"totalResyncs\" : 0, \n
\"totalOperationsExcluded\" : 0, \n
\"lastError\" : { \n
\"errorNum\" : 0 \n
}, \n
\"time\" : \"2019-02-15T14:42:55Z\" \n
}, \n
\"server\" : { \n
\"version\" : \"3.5.0-devel\", \n
\"serverId\" : \"70528077254784\" \n
}, \n
\"endpoint\" : \"tcp://127.0.0.1:8529\", \n
\"database\" : \"_system\" \n
}\n
\n\n\n\n\n",
+ "description": "\n\nStops the replication applier. This will return immediately if the\nreplication applier is not running.\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/applier-stop\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"state\" : { \n
\"running\" : false, \n
\"phase\" : \"inactive\", \n
\"lastAppliedContinuousTick\" : null, \n
\"lastProcessedContinuousTick\" : null, \n
\"lastAvailableContinuousTick\" : null, \n
\"safeResumeTick\" : null, \n
\"progress\" : { \n
\"time\" : \"2019-02-20T10:33:03Z\", \n
\"message\" : \"applier shut down\", \n
\"failedConnects\" : 0 \n
}, \n
\"totalRequests\" : 3, \n
\"totalFailedConnects\" : 0, \n
\"totalEvents\" : 0, \n
\"totalResyncs\" : 0, \n
\"totalOperationsExcluded\" : 0, \n
\"lastError\" : { \n
\"errorNum\" : 0 \n
}, \n
\"time\" : \"2019-02-20T10:33:03Z\" \n
}, \n
\"server\" : { \n
\"version\" : \"3.5.0-devel\", \n
\"serverId\" : \"153018529730512\" \n
}, \n
\"endpoint\" : \"tcp://127.0.0.1:8529\", \n
\"database\" : \"_system\" \n
}\n
\n\n\n\n\n",
"parameters": [],
"responses": {
"200": {
@@ -12817,7 +12817,7 @@
},
"/_api/replication/dump": {
"get": {
- "description": "\n\nReturns the data from the collection for the requested range.\n\nWhen the *from* query parameter is not used, collection events are returned from\nthe beginning. When the *from* parameter is used, the result will only contain\ncollection entries which have higher tick values than the specified *from* value\n(note: the log entry with a tick value equal to *from* will be excluded).\n\nThe *to* query parameter can be used to optionally restrict the upper bound of\nthe result to a certain tick value. If used, the result will only contain\ncollection entries with tick values up to (including) *to*.\n\nThe *chunkSize* query parameter can be used to control the size of the result.\nIt must be specified in bytes. The *chunkSize* value will only be honored\napproximately. Otherwise a too low *chunkSize* value could cause the server\nto not be able to put just one entry into the result and return it.\nTherefore, the *chunkSize* value will only be consulted after an entry has\nbeen written into the result. If the result size is then bigger than\n*chunkSize*, the server will respond with as many entries as there are\nin the response already. If the result size is still smaller than *chunkSize*,\nthe server will try to return more data if there's more data left to return.\n\nIf *chunkSize* is not specified, some server-side default value will be used.\n\nThe *Content-Type* of the result is *application/x-arango-dump*. This is an\neasy-to-process format, with all entries going onto separate lines in the\nresponse body.\n\nEach line itself is a JSON object, with at least the following attributes:\n\n- *tick*: the operation's tick attribute\n\n- *key*: the key of the document/edge or the key used in the deletion operation\n\n- *rev*: the revision id of the document/edge or the deletion operation\n\n- *data*: the actual document/edge data for types 2300 and 2301. The full\n document/edge data will be returned even for updates.\n\n- *type*: the type of entry. Possible values for *type* are:\n\n - 2300: document insertion/update\n\n - 2301: edge insertion/update\n\n - 2302: document/edge deletion\n\n**Note**: there will be no distinction between inserts and updates when calling this method.\n\n\n\n\n**Example:**\n Empty collection:\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/dump?collection=testCollection\n
\n
HTTP/1.1 No Content\n
content-type: application/x-arango-dump; charset=utf-8\n
x-arango-replication-checkmore: false\n
x-arango-replication-lastincluded: 0\n
x-content-type-options: nosniff\n
\n
\n\n\n\n\n**Example:**\n Non-empty collection *(One JSON document per line)*:\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/dump?collection=testCollection\n
\n
HTTP/1.1 OK\n
content-type: application/x-arango-dump; charset=utf-8\n
x-arango-replication-checkmore: false\n
x-arango-replication-lastincluded: 104945\n
x-content-type-options: nosniff\n
\n
{ \n
\"tick\" : \"104939\", \n
\"type\" : 2300, \n
\"data\" : { \n
\"_key\" : \"123456\", \n
\"_id\" : \"testCollection/123456\", \n
\"_rev\" : \"_YNEaNxC--B\", \n
\"b\" : 1, \n
\"c\" : false, \n
\"d\" : \"additional value\" \n
} \n
}↩\n
{ \n
\"tick\" : \"104943\", \n
\"type\" : 2302, \n
\"data\" : { \n
\"_key\" : \"foobar\", \n
\"_rev\" : \"_YNEaNxG--_\" \n
} \n
}↩\n
{ \n
\"tick\" : \"104945\", \n
\"type\" : 2302, \n
\"data\" : { \n
\"_key\" : \"abcdef\", \n
\"_rev\" : \"_YNEaNxG--B\" \n
} \n
}↩\n
\n\n\n\n\n",
+ "description": "\n\nReturns the data from the collection for the requested range.\n\nWhen the *from* query parameter is not used, collection events are returned from\nthe beginning. When the *from* parameter is used, the result will only contain\ncollection entries which have higher tick values than the specified *from* value\n(note: the log entry with a tick value equal to *from* will be excluded).\n\nThe *to* query parameter can be used to optionally restrict the upper bound of\nthe result to a certain tick value. If used, the result will only contain\ncollection entries with tick values up to (including) *to*.\n\nThe *chunkSize* query parameter can be used to control the size of the result.\nIt must be specified in bytes. The *chunkSize* value will only be honored\napproximately. Otherwise a too low *chunkSize* value could cause the server\nto not be able to put just one entry into the result and return it.\nTherefore, the *chunkSize* value will only be consulted after an entry has\nbeen written into the result. If the result size is then bigger than\n*chunkSize*, the server will respond with as many entries as there are\nin the response already. If the result size is still smaller than *chunkSize*,\nthe server will try to return more data if there's more data left to return.\n\nIf *chunkSize* is not specified, some server-side default value will be used.\n\nThe *Content-Type* of the result is *application/x-arango-dump*. This is an\neasy-to-process format, with all entries going onto separate lines in the\nresponse body.\n\nEach line itself is a JSON object, with at least the following attributes:\n\n- *tick*: the operation's tick attribute\n\n- *key*: the key of the document/edge or the key used in the deletion operation\n\n- *rev*: the revision id of the document/edge or the deletion operation\n\n- *data*: the actual document/edge data for types 2300 and 2301. The full\n document/edge data will be returned even for updates.\n\n- *type*: the type of entry. Possible values for *type* are:\n\n - 2300: document insertion/update\n\n - 2301: edge insertion/update\n\n - 2302: document/edge deletion\n\n**Note**: there will be no distinction between inserts and updates when calling this method.\n\n\n\n\n**Example:**\n Empty collection:\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/dump?collection=testCollection\n
\n
HTTP/1.1 No Content\n
content-type: application/x-arango-dump; charset=utf-8\n
x-arango-replication-checkmore: false\n
x-arango-replication-lastincluded: 0\n
x-content-type-options: nosniff\n
\n
\n\n\n\n\n**Example:**\n Non-empty collection *(One JSON document per line)*:\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/dump?collection=testCollection\n
\n
HTTP/1.1 OK\n
content-type: application/x-arango-dump; charset=utf-8\n
x-arango-replication-checkmore: false\n
x-arango-replication-lastincluded: 104964\n
x-content-type-options: nosniff\n
\n
{ \n
\"tick\" : \"104958\", \n
\"type\" : 2300, \n
\"data\" : { \n
\"_key\" : \"123456\", \n
\"_id\" : \"testCollection/123456\", \n
\"_rev\" : \"_YOn1QmK--_\", \n
\"b\" : 1, \n
\"c\" : false, \n
\"d\" : \"additional value\" \n
} \n
}↩\n
{ \n
\"tick\" : \"104962\", \n
\"type\" : 2302, \n
\"data\" : { \n
\"_key\" : \"foobar\", \n
\"_rev\" : \"_YOn1QmK--D\" \n
} \n
}↩\n
{ \n
\"tick\" : \"104964\", \n
\"type\" : 2302, \n
\"data\" : { \n
\"_key\" : \"abcdef\", \n
\"_rev\" : \"_YOn1QmO--_\" \n
} \n
}↩\n
\n\n\n\n\n",
"parameters": [
{
"description": "The name or id of the collection to dump.\n\n",
@@ -12907,7 +12907,7 @@
},
"/_api/replication/inventory": {
"get": {
- "description": "\n\nReturns the array of collections and indexes available on the server. This\narray can be used by replication clients to initiate an initial sync with the\nserver.\n\nThe response will contain a JSON object with the *collection* and *state* and\n*tick* attributes.\n\n*collections* is an array of collections with the following sub-attributes:\n\n- *parameters*: the collection properties\n\n- *indexes*: an array of the indexes of a the collection. Primary indexes and edge indexes\n are not included in this array.\n\nThe *state* attribute contains the current state of the replication logger. It\ncontains the following sub-attributes:\n\n- *running*: whether or not the replication logger is currently active. Note:\n since ArangoDB 2.2, the value will always be *true*\n\n- *lastLogTick*: the value of the last tick the replication logger has written\n\n- *time*: the current time on the server\n\nReplication clients should note the *lastLogTick* value returned. They can then\nfetch collections' data using the dump method up to the value of lastLogTick, and\nquery the continuous replication log for log events after this tick value.\n\nTo create a full copy of the collections on the server, a replication client\ncan execute these steps:\n\n- call the */inventory* API method. This returns the *lastLogTick* value and the\n array of collections and indexes from the server.\n\n- for each collection returned by */inventory*, create the collection locally and\n call */dump* to stream the collection data to the client, up to the value of\n *lastLogTick*.\n After that, the client can create the indexes on the collections as they were\n reported by */inventory*.\n\nIf the clients wants to continuously stream replication log events from the logger\nserver, the following additional steps need to be carried out:\n\n- the client should call */logger-follow* initially to fetch the first batch of\n replication events that were logged after the client's call to */inventory*.\n\n The call to */logger-follow* should use a *from* parameter with the value of the\n *lastLogTick* as reported by */inventory*. The call to */logger-follow* will return the\n *x-arango-replication-lastincluded* which will contain the last tick value included\n in the response.\n\n- the client can then continuously call */logger-follow* to incrementally fetch new\n replication events that occurred after the last transfer.\n\n Calls should use a *from* parameter with the value of the *x-arango-replication-lastincluded*\n header of the previous response. If there are no more replication events, the\n response will be empty and clients can go to sleep for a while and try again\n later.\n\n**Note**: on a coordinator, this request must have the query parameter\n*DBserver* which must be an ID of a DBserver.\nThe very same request is forwarded synchronously to that DBserver.\nIt is an error if this attribute is not bound in the coordinator case.\n\n**Note:**: Using the `global` parameter the top-level object contains a key `databases`\nunder which each key represents a datbase name, and the value conforms to the above describtion.\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/inventory\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"collections\" : [ \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"32\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_appbundles\", \n
\"id\" : \"32\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 1048576, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"_appbundles\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"32\", \n
\"replicationFactor\" : 2, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ \n
{ \n
\"id\" : \"30\", \n
\"type\" : \"hash\", \n
\"fields\" : [ \n
\"mount\" \n
], \n
\"unique\" : true, \n
\"sparse\" : true, \n
\"deduplicate\" : true \n
} \n
], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"27\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_apps\", \n
\"id\" : \"27\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 1048576, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 41 \n
}, \n
\"name\" : \"_apps\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"27\", \n
\"replicationFactor\" : 2, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"13\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_aqlfunctions\", \n
\"id\" : \"13\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 1048576, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"_aqlfunctions\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"13\", \n
\"replicationFactor\" : 2, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"6\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_graphs\", \n
\"id\" : \"6\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 1048576, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"_graphs\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"6\", \n
\"replicationFactor\" : 2, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"2\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_iresearch_analyzers\", \n
\"id\" : \"2\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 33554432, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"_iresearch_analyzers\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"2\", \n
\"replicationFactor\" : 1, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ \n
{ \n
\"id\" : \"11\", \n
\"type\" : \"hash\", \n
\"fields\" : [ \n
\"user\" \n
], \n
\"unique\" : true, \n
\"sparse\" : true, \n
\"deduplicate\" : true \n
} \n
], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"8\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_users\", \n
\"id\" : \"8\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 1048576, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 104914 \n
}, \n
\"name\" : \"_users\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"8\", \n
\"replicationFactor\" : 2, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"96\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"h402518FDD080/96\", \n
\"id\" : \"96\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : false, \n
\"isVolatile\" : false, \n
\"journalSize\" : 33554432, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"animals\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"96\", \n
\"replicationFactor\" : 1, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"87\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"h402518FDD080/87\", \n
\"id\" : \"87\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : false, \n
\"isVolatile\" : false, \n
\"journalSize\" : 33554432, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"demo\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"87\", \n
\"replicationFactor\" : 1, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
} \n
], \n
\"views\" : [ \n
{ \n
\"globallyUniqueId\" : \"h402518FDD080/102\", \n
\"id\" : \"102\", \n
\"name\" : \"demoView\", \n
\"type\" : \"arangosearch\", \n
\"cleanupIntervalStep\" : 10, \n
\"commitIntervalMsec\" : 60000, \n
\"consolidationIntervalMsec\" : 60000, \n
\"consolidationPolicy\" : { \n
\"type\" : \"bytes_accum\", \n
\"threshold\" : 0.10000000149011612 \n
}, \n
\"writebufferActive\" : 0, \n
\"writebufferIdle\" : 64, \n
\"writebufferSizeMax\" : 33554432, \n
\"links\" : { \n
} \n
} \n
], \n
\"state\" : { \n
\"running\" : true, \n
\"lastLogTick\" : \"104972\", \n
\"lastUncommittedLogTick\" : \"104980\", \n
\"totalEvents\" : 35256, \n
\"time\" : \"2019-02-15T14:42:57Z\" \n
}, \n
\"tick\" : \"104981\" \n
}\n
\n\n\n\n\n**Example:**\n With some additional indexes:\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/inventory\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"collections\" : [ \n
{ \n
\"indexes\" : [ \n
{ \n
\"id\" : \"104991\", \n
\"type\" : \"hash\", \n
\"fields\" : [ \n
\"name\" \n
], \n
\"unique\" : false, \n
\"sparse\" : false, \n
\"deduplicate\" : true \n
}, \n
{ \n
\"id\" : \"104994\", \n
\"type\" : \"skiplist\", \n
\"fields\" : [ \n
\"a\", \n
\"b\" \n
], \n
\"unique\" : true, \n
\"sparse\" : false, \n
\"deduplicate\" : true \n
} \n
], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"104984\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"h402518FDD080/104984\", \n
\"id\" : \"104984\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : false, \n
\"isVolatile\" : false, \n
\"journalSize\" : 33554432, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"IndexedCollection1\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"104984\", \n
\"replicationFactor\" : 1, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ \n
{ \n
\"id\" : \"105003\", \n
\"type\" : \"fulltext\", \n
\"fields\" : [ \n
\"text\" \n
], \n
\"unique\" : false, \n
\"sparse\" : true, \n
\"minLength\" : 10 \n
}, \n
{ \n
\"id\" : \"105006\", \n
\"type\" : \"skiplist\", \n
\"fields\" : [ \n
\"a\" \n
], \n
\"unique\" : false, \n
\"sparse\" : false, \n
\"deduplicate\" : true \n
} \n
], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"104996\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"h402518FDD080/104996\", \n
\"id\" : \"104996\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : false, \n
\"isVolatile\" : false, \n
\"journalSize\" : 33554432, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"IndexedCollection2\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"104996\", \n
\"replicationFactor\" : 1, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"32\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_appbundles\", \n
\"id\" : \"32\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 1048576, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"_appbundles\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"32\", \n
\"replicationFactor\" : 2, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ \n
{ \n
\"id\" : \"30\", \n
\"type\" : \"hash\", \n
\"fields\" : [ \n
\"mount\" \n
], \n
\"unique\" : true, \n
\"sparse\" : true, \n
\"deduplicate\" : true \n
} \n
], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"27\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_apps\", \n
\"id\" : \"27\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 1048576, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 41 \n
}, \n
\"name\" : \"_apps\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"27\", \n
\"replicationFactor\" : 2, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"13\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_aqlfunctions\", \n
\"id\" : \"13\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 1048576, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"_aqlfunctions\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"13\", \n
\"replicationFactor\" : 2, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"6\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_graphs\", \n
\"id\" : \"6\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 1048576, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"_graphs\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"6\", \n
\"replicationFactor\" : 2, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"2\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_iresearch_analyzers\", \n
\"id\" : \"2\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 33554432, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"_iresearch_analyzers\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"2\", \n
\"replicationFactor\" : 1, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ \n
{ \n
\"id\" : \"11\", \n
\"type\" : \"hash\", \n
\"fields\" : [ \n
\"user\" \n
], \n
\"unique\" : true, \n
\"sparse\" : true, \n
\"deduplicate\" : true \n
} \n
], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"8\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_users\", \n
\"id\" : \"8\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 1048576, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 104914 \n
}, \n
\"name\" : \"_users\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"8\", \n
\"replicationFactor\" : 2, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"96\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"h402518FDD080/96\", \n
\"id\" : \"96\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : false, \n
\"isVolatile\" : false, \n
\"journalSize\" : 33554432, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"animals\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"96\", \n
\"replicationFactor\" : 1, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"87\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"h402518FDD080/87\", \n
\"id\" : \"87\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : false, \n
\"isVolatile\" : false, \n
\"journalSize\" : 33554432, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"demo\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"87\", \n
\"replicationFactor\" : 1, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
} \n
], \n
\"views\" : [ \n
{ \n
\"globallyUniqueId\" : \"h402518FDD080/102\", \n
\"id\" : \"102\", \n
\"name\" : \"demoView\", \n
\"type\" : \"arangosearch\", \n
\"cleanupIntervalStep\" : 10, \n
\"commitIntervalMsec\" : 60000, \n
\"consolidationIntervalMsec\" : 60000, \n
\"consolidationPolicy\" : { \n
\"type\" : \"bytes_accum\", \n
\"threshold\" : 0.10000000149011612 \n
}, \n
\"writebufferActive\" : 0, \n
\"writebufferIdle\" : 64, \n
\"writebufferSizeMax\" : 33554432, \n
\"links\" : { \n
} \n
} \n
], \n
\"state\" : { \n
\"running\" : true, \n
\"lastLogTick\" : \"104980\", \n
\"lastUncommittedLogTick\" : \"105007\", \n
\"totalEvents\" : 35264, \n
\"time\" : \"2019-02-15T14:42:57Z\" \n
}, \n
\"tick\" : \"105007\" \n
}\n
\n\n\n\n\n",
+ "description": "\n\nReturns the array of collections and indexes available on the server. This\narray can be used by replication clients to initiate an initial sync with the\nserver.\n\nThe response will contain a JSON object with the *collection* and *state* and\n*tick* attributes.\n\n*collections* is an array of collections with the following sub-attributes:\n\n- *parameters*: the collection properties\n\n- *indexes*: an array of the indexes of a the collection. Primary indexes and edge indexes\n are not included in this array.\n\nThe *state* attribute contains the current state of the replication logger. It\ncontains the following sub-attributes:\n\n- *running*: whether or not the replication logger is currently active. Note:\n since ArangoDB 2.2, the value will always be *true*\n\n- *lastLogTick*: the value of the last tick the replication logger has written\n\n- *time*: the current time on the server\n\nReplication clients should note the *lastLogTick* value returned. They can then\nfetch collections' data using the dump method up to the value of lastLogTick, and\nquery the continuous replication log for log events after this tick value.\n\nTo create a full copy of the collections on the server, a replication client\ncan execute these steps:\n\n- call the */inventory* API method. This returns the *lastLogTick* value and the\n array of collections and indexes from the server.\n\n- for each collection returned by */inventory*, create the collection locally and\n call */dump* to stream the collection data to the client, up to the value of\n *lastLogTick*.\n After that, the client can create the indexes on the collections as they were\n reported by */inventory*.\n\nIf the clients wants to continuously stream replication log events from the logger\nserver, the following additional steps need to be carried out:\n\n- the client should call */logger-follow* initially to fetch the first batch of\n replication events that were logged after the client's call to */inventory*.\n\n The call to */logger-follow* should use a *from* parameter with the value of the\n *lastLogTick* as reported by */inventory*. The call to */logger-follow* will return the\n *x-arango-replication-lastincluded* which will contain the last tick value included\n in the response.\n\n- the client can then continuously call */logger-follow* to incrementally fetch new\n replication events that occurred after the last transfer.\n\n Calls should use a *from* parameter with the value of the *x-arango-replication-lastincluded*\n header of the previous response. If there are no more replication events, the\n response will be empty and clients can go to sleep for a while and try again\n later.\n\n**Note**: on a coordinator, this request must have the query parameter\n*DBserver* which must be an ID of a DBserver.\nThe very same request is forwarded synchronously to that DBserver.\nIt is an error if this attribute is not bound in the coordinator case.\n\n**Note:**: Using the `global` parameter the top-level object contains a key `databases`\nunder which each key represents a datbase name, and the value conforms to the above describtion.\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/inventory\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"collections\" : [ \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"32\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_appbundles\", \n
\"id\" : \"32\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 1048576, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"_appbundles\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"32\", \n
\"replicationFactor\" : 2, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ \n
{ \n
\"id\" : \"30\", \n
\"type\" : \"hash\", \n
\"fields\" : [ \n
\"mount\" \n
], \n
\"unique\" : true, \n
\"sparse\" : true, \n
\"deduplicate\" : true \n
} \n
], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"27\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_apps\", \n
\"id\" : \"27\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 1048576, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 41 \n
}, \n
\"name\" : \"_apps\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"27\", \n
\"replicationFactor\" : 2, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"13\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_aqlfunctions\", \n
\"id\" : \"13\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 1048576, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"_aqlfunctions\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"13\", \n
\"replicationFactor\" : 2, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"6\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_graphs\", \n
\"id\" : \"6\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 1048576, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"_graphs\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"6\", \n
\"replicationFactor\" : 2, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"2\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_iresearch_analyzers\", \n
\"id\" : \"2\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 33554432, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"_iresearch_analyzers\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"2\", \n
\"replicationFactor\" : 1, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ \n
{ \n
\"id\" : \"11\", \n
\"type\" : \"hash\", \n
\"fields\" : [ \n
\"user\" \n
], \n
\"unique\" : true, \n
\"sparse\" : true, \n
\"deduplicate\" : true \n
} \n
], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"8\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_users\", \n
\"id\" : \"8\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 1048576, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 104933 \n
}, \n
\"name\" : \"_users\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"8\", \n
\"replicationFactor\" : 2, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"96\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/96\", \n
\"id\" : \"96\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : false, \n
\"isVolatile\" : false, \n
\"journalSize\" : 33554432, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"animals\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"96\", \n
\"replicationFactor\" : 1, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"87\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/87\", \n
\"id\" : \"87\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : false, \n
\"isVolatile\" : false, \n
\"journalSize\" : 33554432, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"demo\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"87\", \n
\"replicationFactor\" : 1, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
} \n
], \n
\"views\" : [ \n
{ \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/102\", \n
\"id\" : \"102\", \n
\"name\" : \"demoView\", \n
\"type\" : \"arangosearch\", \n
\"cleanupIntervalStep\" : 10, \n
\"commitIntervalMsec\" : 60000, \n
\"consolidationIntervalMsec\" : 60000, \n
\"consolidationPolicy\" : { \n
\"type\" : \"bytes_accum\", \n
\"threshold\" : 0.10000000149011612 \n
}, \n
\"writebufferActive\" : 0, \n
\"writebufferIdle\" : 64, \n
\"writebufferSizeMax\" : 33554432, \n
\"links\" : { \n
} \n
} \n
], \n
\"state\" : { \n
\"running\" : true, \n
\"lastLogTick\" : \"104983\", \n
\"lastUncommittedLogTick\" : \"104989\", \n
\"totalEvents\" : 35260, \n
\"time\" : \"2019-02-20T10:33:06Z\" \n
}, \n
\"tick\" : \"104990\" \n
}\n
\n\n\n\n\n**Example:**\n With some additional indexes:\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/inventory\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"collections\" : [ \n
{ \n
\"indexes\" : [ \n
{ \n
\"id\" : \"105000\", \n
\"type\" : \"hash\", \n
\"fields\" : [ \n
\"name\" \n
], \n
\"unique\" : false, \n
\"sparse\" : false, \n
\"deduplicate\" : true \n
}, \n
{ \n
\"id\" : \"105003\", \n
\"type\" : \"skiplist\", \n
\"fields\" : [ \n
\"a\", \n
\"b\" \n
], \n
\"unique\" : true, \n
\"sparse\" : false, \n
\"deduplicate\" : true \n
} \n
], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"104993\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/104993\", \n
\"id\" : \"104993\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : false, \n
\"isVolatile\" : false, \n
\"journalSize\" : 33554432, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"IndexedCollection1\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"104993\", \n
\"replicationFactor\" : 1, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ \n
{ \n
\"id\" : \"105012\", \n
\"type\" : \"fulltext\", \n
\"fields\" : [ \n
\"text\" \n
], \n
\"unique\" : false, \n
\"sparse\" : true, \n
\"minLength\" : 10 \n
}, \n
{ \n
\"id\" : \"105015\", \n
\"type\" : \"skiplist\", \n
\"fields\" : [ \n
\"a\" \n
], \n
\"unique\" : false, \n
\"sparse\" : false, \n
\"deduplicate\" : true \n
} \n
], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"105005\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/105005\", \n
\"id\" : \"105005\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : false, \n
\"isVolatile\" : false, \n
\"journalSize\" : 33554432, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"IndexedCollection2\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"105005\", \n
\"replicationFactor\" : 1, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"32\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_appbundles\", \n
\"id\" : \"32\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 1048576, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"_appbundles\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"32\", \n
\"replicationFactor\" : 2, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ \n
{ \n
\"id\" : \"30\", \n
\"type\" : \"hash\", \n
\"fields\" : [ \n
\"mount\" \n
], \n
\"unique\" : true, \n
\"sparse\" : true, \n
\"deduplicate\" : true \n
} \n
], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"27\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_apps\", \n
\"id\" : \"27\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 1048576, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 41 \n
}, \n
\"name\" : \"_apps\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"27\", \n
\"replicationFactor\" : 2, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"13\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_aqlfunctions\", \n
\"id\" : \"13\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 1048576, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"_aqlfunctions\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"13\", \n
\"replicationFactor\" : 2, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"6\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_graphs\", \n
\"id\" : \"6\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 1048576, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"_graphs\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"6\", \n
\"replicationFactor\" : 2, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"2\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_iresearch_analyzers\", \n
\"id\" : \"2\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 33554432, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"_iresearch_analyzers\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"2\", \n
\"replicationFactor\" : 1, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ \n
{ \n
\"id\" : \"11\", \n
\"type\" : \"hash\", \n
\"fields\" : [ \n
\"user\" \n
], \n
\"unique\" : true, \n
\"sparse\" : true, \n
\"deduplicate\" : true \n
} \n
], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"8\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"_users\", \n
\"id\" : \"8\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : true, \n
\"isVolatile\" : false, \n
\"journalSize\" : 1048576, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 104933 \n
}, \n
\"name\" : \"_users\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"8\", \n
\"replicationFactor\" : 2, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"96\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/96\", \n
\"id\" : \"96\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : false, \n
\"isVolatile\" : false, \n
\"journalSize\" : 33554432, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"animals\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"96\", \n
\"replicationFactor\" : 1, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}, \n
{ \n
\"indexes\" : [ ], \n
\"parameters\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"87\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/87\", \n
\"id\" : \"87\", \n
\"indexBuckets\" : 8, \n
\"isSmart\" : false, \n
\"isSystem\" : false, \n
\"isVolatile\" : false, \n
\"journalSize\" : 33554432, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"demo\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"87\", \n
\"replicationFactor\" : 1, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
} \n
], \n
\"views\" : [ \n
{ \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/102\", \n
\"id\" : \"102\", \n
\"name\" : \"demoView\", \n
\"type\" : \"arangosearch\", \n
\"cleanupIntervalStep\" : 10, \n
\"commitIntervalMsec\" : 60000, \n
\"consolidationIntervalMsec\" : 60000, \n
\"consolidationPolicy\" : { \n
\"type\" : \"bytes_accum\", \n
\"threshold\" : 0.10000000149011612 \n
}, \n
\"writebufferActive\" : 0, \n
\"writebufferIdle\" : 64, \n
\"writebufferSizeMax\" : 33554432, \n
\"links\" : { \n
} \n
} \n
], \n
\"state\" : { \n
\"running\" : true, \n
\"lastLogTick\" : \"104983\", \n
\"lastUncommittedLogTick\" : \"105016\", \n
\"totalEvents\" : 35268, \n
\"time\" : \"2019-02-20T10:33:06Z\" \n
}, \n
\"tick\" : \"105016\" \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "Include system collections in the result. The default value is *true*.\n\n",
@@ -12980,7 +12980,7 @@
},
"/_api/replication/logger-follow": {
"get": {
- "description": "\n\nReturns data from the server's replication log. This method can be called\nby replication clients after an initial synchronization of data. The method\nwill return all \"recent\" log entries from the logger server, and the clients\ncan replay and apply these entries locally so they get to the same data\nstate as the logger server.\n\nClients can call this method repeatedly to incrementally fetch all changes\nfrom the logger server. In this case, they should provide the *from* value so\nthey will only get returned the log events since their last fetch.\n\nWhen the *from* query parameter is not used, the logger server will return log\nentries starting at the beginning of its replication log. When the *from*\nparameter is used, the logger server will only return log entries which have\nhigher tick values than the specified *from* value (note: the log entry with a\ntick value equal to *from* will be excluded). Use the *from* value when\nincrementally fetching log data.\n\nThe *to* query parameter can be used to optionally restrict the upper bound of\nthe result to a certain tick value. If used, the result will contain only log events\nwith tick values up to (including) *to*. In incremental fetching, there is no\nneed to use the *to* parameter. It only makes sense in special situations,\nwhen only parts of the change log are required.\n\nThe *chunkSize* query parameter can be used to control the size of the result.\nIt must be specified in bytes. The *chunkSize* value will only be honored\napproximately. Otherwise a too low *chunkSize* value could cause the server\nto not be able to put just one log entry into the result and return it.\nTherefore, the *chunkSize* value will only be consulted after a log entry has\nbeen written into the result. If the result size is then bigger than\n*chunkSize*, the server will respond with as many log entries as there are\nin the response already. If the result size is still smaller than *chunkSize*,\nthe server will try to return more data if there's more data left to return.\n\nIf *chunkSize* is not specified, some server-side default value will be used.\n\nThe *Content-Type* of the result is *application/x-arango-dump*. This is an\neasy-to-process format, with all log events going onto separate lines in the\nresponse body. Each log event itself is a JSON object, with at least the\nfollowing attributes:\n\n- *tick*: the log event tick value\n\n- *type*: the log event type\n\nIndividual log events will also have additional attributes, depending on the\nevent type. A few common attributes which are used for multiple events types\nare:\n\n- *cid*: id of the collection the event was for\n\n- *tid*: id of the transaction the event was contained in\n\n- *key*: document key\n\n- *rev*: document revision id\n\n- *data*: the original document data\n\nA more detailed description of the individual replication event types and their\ndata structures can be found in [Operation Types](./WALAccess.md/#operation-types).\n\nThe response will also contain the following HTTP headers:\n\n- *x-arango-replication-active*: whether or not the logger is active. Clients\n can use this flag as an indication for their polling frequency. If the\n logger is not active and there are no more replication events available, it\n might be sensible for a client to abort, or to go to sleep for a long time\n and try again later to check whether the logger has been activated.\n\n- *x-arango-replication-lastincluded*: the tick value of the last included\n value in the result. In incremental log fetching, this value can be used\n as the *from* value for the following request. **Note** that if the result is\n empty, the value will be *0*. This value should not be used as *from* value\n by clients in the next request (otherwise the server would return the log\n events from the start of the log again).\n\n- *x-arango-replication-lasttick*: the last tick value the logger server has\n logged (not necessarily included in the result). By comparing the the last\n tick and last included tick values, clients have an approximate indication of\n how many events there are still left to fetch.\n\n- *x-arango-replication-checkmore*: whether or not there already exists more\n log data which the client could fetch immediately. If there is more log data\n available, the client could call *logger-follow* again with an adjusted *from*\n value to fetch remaining log entries until there are no more.\n\n If there isn't any more log data to fetch, the client might decide to go\n to sleep for a while before calling the logger again.\n\n**Note**: this method is not supported on a coordinator in a cluster.\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nIt is considered as deprecated from version 3.4.0 on.\n\n\n\n\n\n\n**Example:**\n No log events available\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/logger-follow?from=105037\n
\n
HTTP/1.1 No Content\n
content-type: application/x-arango-dump; charset=utf-8\n
x-arango-replication-active: true\n
x-arango-replication-checkmore: false\n
x-arango-replication-frompresent: true\n
x-arango-replication-lastincluded: 0\n
x-arango-replication-lastscanned: 105037\n
x-arango-replication-lasttick: 105037\n
x-content-type-options: nosniff\n
\n
\n\n\n\n\n**Example:**\n A few log events *(One JSON document per line)*\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/logger-follow?from=105037\n
\n
HTTP/1.1 OK\n
content-type: application/x-arango-dump; charset=utf-8\n
x-arango-replication-active: true\n
x-arango-replication-checkmore: false\n
x-arango-replication-frompresent: true\n
x-arango-replication-lastincluded: 105058\n
x-arango-replication-lastscanned: 105058\n
x-arango-replication-lasttick: 105058\n
x-content-type-options: nosniff\n
\n
{ \n
\"tick\" : \"105041\", \n
\"type\" : 2000, \n
\"database\" : \"1\", \n
\"cid\" : \"105040\", \n
\"cname\" : \"products\", \n
\"data\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"105040\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"h402518FDD080/105040\", \n
\"id\" : \"105040\", \n
\"indexBuckets\" : 8, \n
\"indexes\" : [ \n
{ \n
\"id\" : \"0\", \n
\"type\" : \"primary\", \n
\"fields\" : [ \n
\"_key\" \n
], \n
\"unique\" : true, \n
\"sparse\" : false \n
} \n
], \n
\"isSmart\" : false, \n
\"isSystem\" : false, \n
\"isVolatile\" : false, \n
\"journalSize\" : 33554432, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"products\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"105040\", \n
\"replicationFactor\" : 1, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}↩\n
{ \n
\"tick\" : \"105044\", \n
\"type\" : 2300, \n
\"tid\" : \"0\", \n
\"database\" : \"1\", \n
\"cid\" : \"8\", \n
\"cname\" : \"_users\", \n
\"data\" : { \n
\"_key\" : \"58\", \n
\"_id\" : \"_users/58\", \n
\"_rev\" : \"_YNEaQx6--_\", \n
\"user\" : \"root\", \n
\"source\" : \"LOCAL\", \n
\"authData\" : { \n
\"active\" : true, \n
\"simple\" : { \n
\"hash\" : \"60a0e3e3fb13484ace3c71fcca2b8a21647ab72cf81fe55bad49f2983b185888\", \n
\"salt\" : \"24a0094b\", \n
\"method\" : \"sha256\" \n
} \n
}, \n
\"databases\" : { \n
\"_system\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
}, \n
\"collections\" : { \n
\"demo\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
}, \n
\"animals\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
}, \n
\"products\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
}, \n
\"*\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
}, \n
\"products1\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
} \n
} \n
}, \n
\"*\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
}, \n
\"collections\" : { \n
\"*\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
} \n
} \n
} \n
} \n
} \n
}↩\n
{ \n
\"tick\" : \"105048\", \n
\"type\" : 2300, \n
\"tid\" : \"0\", \n
\"database\" : \"1\", \n
\"cid\" : \"105040\", \n
\"cname\" : \"products\", \n
\"data\" : { \n
\"_key\" : \"p1\", \n
\"_id\" : \"_unknown/p1\", \n
\"_rev\" : \"_YNEaQx6--B\", \n
\"name\" : \"flux compensator\" \n
} \n
}↩\n
{ \n
\"tick\" : \"105050\", \n
\"type\" : 2300, \n
\"tid\" : \"0\", \n
\"database\" : \"1\", \n
\"cid\" : \"105040\", \n
\"cname\" : \"products\", \n
\"data\" : { \n
\"_key\" : \"p2\", \n
\"_id\" : \"_unknown/p2\", \n
\"_rev\" : \"_YNEaQy---_\", \n
\"name\" : \"hybrid hovercraft\", \n
\"hp\" : 5100 \n
} \n
}↩\n
{ \n
\"tick\" : \"105052\", \n
\"type\" : 2302, \n
\"tid\" : \"0\", \n
\"database\" : \"1\", \n
\"cid\" : \"105040\", \n
\"cname\" : \"products\", \n
\"data\" : { \n
\"_key\" : \"p1\", \n
\"_rev\" : \"_YNEaQy---B\" \n
} \n
}↩\n
{ \n
\"tick\" : \"105054\", \n
\"type\" : 2300, \n
\"tid\" : \"0\", \n
\"database\" : \"1\", \n
\"cid\" : \"105040\", \n
\"cname\" : \"products\", \n
\"data\" : { \n
\"_key\" : \"p2\", \n
\"_id\" : \"_unknown/p2\", \n
\"_rev\" : \"_YNEaQy---D\", \n
\"name\" : \"broken hovercraft\", \n
\"hp\" : 5100 \n
} \n
}↩\n
{ \n
\"tick\" : \"105055\", \n
\"type\" : 2001, \n
\"database\" : \"1\", \n
\"cid\" : \"105040\", \n
\"cname\" : \"products\", \n
\"data\" : { \n
\"id\" : \"105040\", \n
\"name\" : \"products\", \n
\"cuid\" : \"h402518FDD080/105040\" \n
} \n
}↩\n
{ \n
\"tick\" : \"105058\", \n
\"type\" : 2300, \n
\"tid\" : \"0\", \n
\"database\" : \"1\", \n
\"cid\" : \"8\", \n
\"cname\" : \"_users\", \n
\"data\" : { \n
\"_key\" : \"58\", \n
\"_id\" : \"_users/58\", \n
\"_rev\" : \"_YNEaQya--_\", \n
\"user\" : \"root\", \n
\"source\" : \"LOCAL\", \n
\"authData\" : { \n
\"active\" : true, \n
\"simple\" : { \n
\"hash\" : \"60a0e3e3fb13484ace3c71fcca2b8a21647ab72cf81fe55bad49f2983b185888\", \n
\"salt\" : \"24a0094b\", \n
\"method\" : \"sha256\" \n
} \n
}, \n
\"databases\" : { \n
\"*\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
}, \n
\"collections\" : { \n
\"*\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
} \n
} \n
}, \n
\"_system\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
}, \n
\"collections\" : { \n
\"products1\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
}, \n
\"*\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
}, \n
\"demo\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
}, \n
\"animals\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
} \n
} \n
} \n
} \n
} \n
}↩\n
\n\n\n\n\n**Example:**\n More events than would fit into the response\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/logger-follow?from=105016&chunkSize=400\n
\n
HTTP/1.1 OK\n
content-type: application/x-arango-dump; charset=utf-8\n
x-arango-replication-active: true\n
x-arango-replication-checkmore: true\n
x-arango-replication-frompresent: true\n
x-arango-replication-lastincluded: 105020\n
x-arango-replication-lastscanned: 105020\n
x-arango-replication-lasttick: 105037\n
x-content-type-options: nosniff\n
\n
{ \n
\"tick\" : \"105020\", \n
\"type\" : 2000, \n
\"database\" : \"1\", \n
\"cid\" : \"105019\", \n
\"cname\" : \"products\", \n
\"data\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"105019\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"h402518FDD080/105019\", \n
\"id\" : \"105019\", \n
\"indexBuckets\" : 8, \n
\"indexes\" : [ \n
{ \n
\"id\" : \"0\", \n
\"type\" : \"primary\", \n
\"fields\" : [ \n
\"_key\" \n
], \n
\"unique\" : true, \n
\"sparse\" : false \n
} \n
], \n
\"isSmart\" : false, \n
\"isSystem\" : false, \n
\"isVolatile\" : false, \n
\"journalSize\" : 33554432, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"products\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"105019\", \n
\"replicationFactor\" : 1, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}\n
\n\n\n\n\n",
+ "description": "\n\nReturns data from the server's replication log. This method can be called\nby replication clients after an initial synchronization of data. The method\nwill return all \"recent\" log entries from the logger server, and the clients\ncan replay and apply these entries locally so they get to the same data\nstate as the logger server.\n\nClients can call this method repeatedly to incrementally fetch all changes\nfrom the logger server. In this case, they should provide the *from* value so\nthey will only get returned the log events since their last fetch.\n\nWhen the *from* query parameter is not used, the logger server will return log\nentries starting at the beginning of its replication log. When the *from*\nparameter is used, the logger server will only return log entries which have\nhigher tick values than the specified *from* value (note: the log entry with a\ntick value equal to *from* will be excluded). Use the *from* value when\nincrementally fetching log data.\n\nThe *to* query parameter can be used to optionally restrict the upper bound of\nthe result to a certain tick value. If used, the result will contain only log events\nwith tick values up to (including) *to*. In incremental fetching, there is no\nneed to use the *to* parameter. It only makes sense in special situations,\nwhen only parts of the change log are required.\n\nThe *chunkSize* query parameter can be used to control the size of the result.\nIt must be specified in bytes. The *chunkSize* value will only be honored\napproximately. Otherwise a too low *chunkSize* value could cause the server\nto not be able to put just one log entry into the result and return it.\nTherefore, the *chunkSize* value will only be consulted after a log entry has\nbeen written into the result. If the result size is then bigger than\n*chunkSize*, the server will respond with as many log entries as there are\nin the response already. If the result size is still smaller than *chunkSize*,\nthe server will try to return more data if there's more data left to return.\n\nIf *chunkSize* is not specified, some server-side default value will be used.\n\nThe *Content-Type* of the result is *application/x-arango-dump*. This is an\neasy-to-process format, with all log events going onto separate lines in the\nresponse body. Each log event itself is a JSON object, with at least the\nfollowing attributes:\n\n- *tick*: the log event tick value\n\n- *type*: the log event type\n\nIndividual log events will also have additional attributes, depending on the\nevent type. A few common attributes which are used for multiple events types\nare:\n\n- *cid*: id of the collection the event was for\n\n- *tid*: id of the transaction the event was contained in\n\n- *key*: document key\n\n- *rev*: document revision id\n\n- *data*: the original document data\n\nA more detailed description of the individual replication event types and their\ndata structures can be found in [Operation Types](./WALAccess.md/#operation-types).\n\nThe response will also contain the following HTTP headers:\n\n- *x-arango-replication-active*: whether or not the logger is active. Clients\n can use this flag as an indication for their polling frequency. If the\n logger is not active and there are no more replication events available, it\n might be sensible for a client to abort, or to go to sleep for a long time\n and try again later to check whether the logger has been activated.\n\n- *x-arango-replication-lastincluded*: the tick value of the last included\n value in the result. In incremental log fetching, this value can be used\n as the *from* value for the following request. **Note** that if the result is\n empty, the value will be *0*. This value should not be used as *from* value\n by clients in the next request (otherwise the server would return the log\n events from the start of the log again).\n\n- *x-arango-replication-lasttick*: the last tick value the logger server has\n logged (not necessarily included in the result). By comparing the the last\n tick and last included tick values, clients have an approximate indication of\n how many events there are still left to fetch.\n\n- *x-arango-replication-checkmore*: whether or not there already exists more\n log data which the client could fetch immediately. If there is more log data\n available, the client could call *logger-follow* again with an adjusted *from*\n value to fetch remaining log entries until there are no more.\n\n If there isn't any more log data to fetch, the client might decide to go\n to sleep for a while before calling the logger again.\n\n**Note**: this method is not supported on a coordinator in a cluster.\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nIt is considered as deprecated from version 3.4.0 on.\n\n\n\n\n\n\n**Example:**\n No log events available\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/logger-follow?from=105046\n
\n
HTTP/1.1 No Content\n
content-type: application/x-arango-dump; charset=utf-8\n
x-arango-replication-active: true\n
x-arango-replication-checkmore: false\n
x-arango-replication-frompresent: true\n
x-arango-replication-lastincluded: 0\n
x-arango-replication-lastscanned: 105046\n
x-arango-replication-lasttick: 105046\n
x-content-type-options: nosniff\n
\n
\n\n\n\n\n**Example:**\n A few log events *(One JSON document per line)*\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/logger-follow?from=105046\n
\n
HTTP/1.1 OK\n
content-type: application/x-arango-dump; charset=utf-8\n
x-arango-replication-active: true\n
x-arango-replication-checkmore: false\n
x-arango-replication-frompresent: true\n
x-arango-replication-lastincluded: 105067\n
x-arango-replication-lastscanned: 105067\n
x-arango-replication-lasttick: 105067\n
x-content-type-options: nosniff\n
\n
{ \n
\"tick\" : \"105050\", \n
\"type\" : 2000, \n
\"database\" : \"1\", \n
\"cid\" : \"105049\", \n
\"cname\" : \"products\", \n
\"data\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"105049\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/105049\", \n
\"id\" : \"105049\", \n
\"indexBuckets\" : 8, \n
\"indexes\" : [ \n
{ \n
\"id\" : \"0\", \n
\"type\" : \"primary\", \n
\"fields\" : [ \n
\"_key\" \n
], \n
\"unique\" : true, \n
\"sparse\" : false \n
} \n
], \n
\"isSmart\" : false, \n
\"isSystem\" : false, \n
\"isVolatile\" : false, \n
\"journalSize\" : 33554432, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"products\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"105049\", \n
\"replicationFactor\" : 1, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}↩\n
{ \n
\"tick\" : \"105053\", \n
\"type\" : 2300, \n
\"tid\" : \"0\", \n
\"database\" : \"1\", \n
\"cid\" : \"8\", \n
\"cname\" : \"_users\", \n
\"data\" : { \n
\"_key\" : \"58\", \n
\"_id\" : \"_users/58\", \n
\"_rev\" : \"_YOn1VSi--_\", \n
\"user\" : \"root\", \n
\"source\" : \"LOCAL\", \n
\"authData\" : { \n
\"active\" : true, \n
\"simple\" : { \n
\"hash\" : \"ba63424cac2432f605d770a3a2ca1c066f164ee2e022b3f6fa1c41bfa2391f6c\", \n
\"salt\" : \"93971d8d\", \n
\"method\" : \"sha256\" \n
} \n
}, \n
\"databases\" : { \n
\"_system\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
}, \n
\"collections\" : { \n
\"demo\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
}, \n
\"animals\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
}, \n
\"products\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
}, \n
\"*\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
}, \n
\"products1\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
} \n
} \n
}, \n
\"*\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
}, \n
\"collections\" : { \n
\"*\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
} \n
} \n
} \n
} \n
} \n
}↩\n
{ \n
\"tick\" : \"105057\", \n
\"type\" : 2300, \n
\"tid\" : \"0\", \n
\"database\" : \"1\", \n
\"cid\" : \"105049\", \n
\"cname\" : \"products\", \n
\"data\" : { \n
\"_key\" : \"p1\", \n
\"_id\" : \"_unknown/p1\", \n
\"_rev\" : \"_YOn1VSm--_\", \n
\"name\" : \"flux compensator\" \n
} \n
}↩\n
{ \n
\"tick\" : \"105059\", \n
\"type\" : 2300, \n
\"tid\" : \"0\", \n
\"database\" : \"1\", \n
\"cid\" : \"105049\", \n
\"cname\" : \"products\", \n
\"data\" : { \n
\"_key\" : \"p2\", \n
\"_id\" : \"_unknown/p2\", \n
\"_rev\" : \"_YOn1VSm--B\", \n
\"name\" : \"hybrid hovercraft\", \n
\"hp\" : 5100 \n
} \n
}↩\n
{ \n
\"tick\" : \"105061\", \n
\"type\" : 2302, \n
\"tid\" : \"0\", \n
\"database\" : \"1\", \n
\"cid\" : \"105049\", \n
\"cname\" : \"products\", \n
\"data\" : { \n
\"_key\" : \"p1\", \n
\"_rev\" : \"_YOn1VSm--D\" \n
} \n
}↩\n
{ \n
\"tick\" : \"105063\", \n
\"type\" : 2300, \n
\"tid\" : \"0\", \n
\"database\" : \"1\", \n
\"cid\" : \"105049\", \n
\"cname\" : \"products\", \n
\"data\" : { \n
\"_key\" : \"p2\", \n
\"_id\" : \"_unknown/p2\", \n
\"_rev\" : \"_YOn1VSq--_\", \n
\"name\" : \"broken hovercraft\", \n
\"hp\" : 5100 \n
} \n
}↩\n
{ \n
\"tick\" : \"105064\", \n
\"type\" : 2001, \n
\"database\" : \"1\", \n
\"cid\" : \"105049\", \n
\"cname\" : \"products\", \n
\"data\" : { \n
\"id\" : \"105049\", \n
\"name\" : \"products\", \n
\"cuid\" : \"h8B2B671BCFD0/105049\" \n
} \n
}↩\n
{ \n
\"tick\" : \"105067\", \n
\"type\" : 2300, \n
\"tid\" : \"0\", \n
\"database\" : \"1\", \n
\"cid\" : \"8\", \n
\"cname\" : \"_users\", \n
\"data\" : { \n
\"_key\" : \"58\", \n
\"_id\" : \"_users/58\", \n
\"_rev\" : \"_YOn1VTC--_\", \n
\"user\" : \"root\", \n
\"source\" : \"LOCAL\", \n
\"authData\" : { \n
\"active\" : true, \n
\"simple\" : { \n
\"hash\" : \"ba63424cac2432f605d770a3a2ca1c066f164ee2e022b3f6fa1c41bfa2391f6c\", \n
\"salt\" : \"93971d8d\", \n
\"method\" : \"sha256\" \n
} \n
}, \n
\"databases\" : { \n
\"*\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
}, \n
\"collections\" : { \n
\"*\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
} \n
} \n
}, \n
\"_system\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
}, \n
\"collections\" : { \n
\"products1\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
}, \n
\"*\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
}, \n
\"demo\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
}, \n
\"animals\" : { \n
\"permissions\" : { \n
\"read\" : true, \n
\"write\" : true \n
} \n
} \n
} \n
} \n
} \n
} \n
}↩\n
\n\n\n\n\n**Example:**\n More events than would fit into the response\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/logger-follow?from=105025&chunkSize=400\n
\n
HTTP/1.1 OK\n
content-type: application/x-arango-dump; charset=utf-8\n
x-arango-replication-active: true\n
x-arango-replication-checkmore: true\n
x-arango-replication-frompresent: true\n
x-arango-replication-lastincluded: 105029\n
x-arango-replication-lastscanned: 105029\n
x-arango-replication-lasttick: 105046\n
x-content-type-options: nosniff\n
\n
{ \n
\"tick\" : \"105029\", \n
\"type\" : 2000, \n
\"database\" : \"1\", \n
\"cid\" : \"105028\", \n
\"cname\" : \"products\", \n
\"data\" : { \n
\"allowUserKeys\" : true, \n
\"cid\" : \"105028\", \n
\"count\" : 0, \n
\"deleted\" : false, \n
\"doCompact\" : true, \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/105028\", \n
\"id\" : \"105028\", \n
\"indexBuckets\" : 8, \n
\"indexes\" : [ \n
{ \n
\"id\" : \"0\", \n
\"type\" : \"primary\", \n
\"fields\" : [ \n
\"_key\" \n
], \n
\"unique\" : true, \n
\"sparse\" : false \n
} \n
], \n
\"isSmart\" : false, \n
\"isSystem\" : false, \n
\"isVolatile\" : false, \n
\"journalSize\" : 33554432, \n
\"keyOptions\" : { \n
\"allowUserKeys\" : true, \n
\"type\" : \"traditional\", \n
\"lastValue\" : 0 \n
}, \n
\"name\" : \"products\", \n
\"numberOfShards\" : 1, \n
\"planId\" : \"105028\", \n
\"replicationFactor\" : 1, \n
\"shardKeys\" : [ \n
\"_key\" \n
], \n
\"shards\" : { \n
}, \n
\"status\" : 3, \n
\"type\" : 2, \n
\"version\" : 7, \n
\"waitForSync\" : false \n
} \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "Exclusive lower bound tick value for results.\n\n",
@@ -13042,7 +13042,7 @@
},
"/_api/replication/logger-state": {
"get": {
- "description": "\n\nReturns the current state of the server's replication logger. The state will\ninclude information about whether the logger is running and about the last\nlogged tick value. This tick value is important for incremental fetching of\ndata.\n\nThe body of the response contains a JSON object with the following\nattributes:\n\n- *state*: the current logger state as a JSON object with the following\n sub-attributes:\n\n - *running*: whether or not the logger is running\n\n - *lastLogTick*: the tick value of the latest tick the logger has logged.\n This value can be used for incremental fetching of log data.\n\n - *totalEvents*: total number of events logged since the server was started.\n The value is not reset between multiple stops and re-starts of the logger.\n\n - *time*: the current date and time on the logger server\n\n- *server*: a JSON object with the following sub-attributes:\n\n - *version*: the logger server's version\n\n - *serverId*: the logger server's id\n\n- *clients*: returns the last fetch status by replication clients connected to\n the logger. Each client is returned as a JSON object with the following attributes:\n\n - *serverId*: server id of client\n\n - *lastServedTick*: last tick value served to this client via the *logger-follow* API\n\n - *time*: date and time when this client last called the *logger-follow* API\n\n\n\n\n**Example:**\n Returns the state of the replication logger.\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/logger-state\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"state\" : { \n
\"running\" : true, \n
\"lastLogTick\" : \"105058\", \n
\"lastUncommittedLogTick\" : \"105058\", \n
\"totalEvents\" : 35284, \n
\"time\" : \"2019-02-15T14:42:59Z\" \n
}, \n
\"server\" : { \n
\"version\" : \"3.5.0-devel\", \n
\"serverId\" : \"70528077254784\", \n
\"engine\" : \"mmfiles\" \n
}, \n
\"clients\" : [ ] \n
}\n
\n\n\n\n\n",
+ "description": "\n\nReturns the current state of the server's replication logger. The state will\ninclude information about whether the logger is running and about the last\nlogged tick value. This tick value is important for incremental fetching of\ndata.\n\nThe body of the response contains a JSON object with the following\nattributes:\n\n- *state*: the current logger state as a JSON object with the following\n sub-attributes:\n\n - *running*: whether or not the logger is running\n\n - *lastLogTick*: the tick value of the latest tick the logger has logged.\n This value can be used for incremental fetching of log data.\n\n - *totalEvents*: total number of events logged since the server was started.\n The value is not reset between multiple stops and re-starts of the logger.\n\n - *time*: the current date and time on the logger server\n\n- *server*: a JSON object with the following sub-attributes:\n\n - *version*: the logger server's version\n\n - *serverId*: the logger server's id\n\n- *clients*: returns the last fetch status by replication clients connected to\n the logger. Each client is returned as a JSON object with the following attributes:\n\n - *serverId*: server id of client\n\n - *lastServedTick*: last tick value served to this client via the *logger-follow* API\n\n - *time*: date and time when this client last called the *logger-follow* API\n\n\n\n\n**Example:**\n Returns the state of the replication logger.\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/logger-state\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"state\" : { \n
\"running\" : true, \n
\"lastLogTick\" : \"105067\", \n
\"lastUncommittedLogTick\" : \"105067\", \n
\"totalEvents\" : 35288, \n
\"time\" : \"2019-02-20T10:33:10Z\" \n
}, \n
\"server\" : { \n
\"version\" : \"3.5.0-devel\", \n
\"serverId\" : \"153018529730512\", \n
\"engine\" : \"mmfiles\" \n
}, \n
\"clients\" : [ ] \n
}\n
\n\n\n\n\n",
"parameters": [],
"responses": {
"200": {
@@ -13066,7 +13066,7 @@
},
"/_api/replication/logger-tick-ranges": {
"get": {
- "description": "\n\nReturns the currently available ranges of tick values for all currently\navailable WAL logfiles. The tick values can be used to determine if certain\ndata (identified by tick value) are still available for replication.\n\nThe body of the response contains a JSON array. Each array member is an\nobject\nthat describes a single logfile. Each object has the following attributes:\n\n* *datafile*: name of the logfile\n\n* *status*: status of the datafile, in textual form (e.g. \"sealed\", \"open\")\n\n* *tickMin*: minimum tick value contained in logfile\n\n* *tickMax*: maximum tick value contained in logfile\n\n\n\n\n**Example:**\n Returns the available tick ranges.\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/logger-tick-ranges\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
[ \n
{ \n
\"datafile\" : \"/tmp/arangosh_q2Dy3I/tmp-13879-1274251971/data/journals/logfile-3.db\", \n
\"status\" : \"collected\", \n
\"tickMin\" : \"5\", \n
\"tickMax\" : \"103215\" \n
}, \n
{ \n
\"datafile\" : \"/tmp/arangosh_q2Dy3I/tmp-13879-1274251971/data/journals/logfile-85.db\", \n
\"status\" : \"collected\", \n
\"tickMin\" : \"103229\", \n
\"tickMax\" : \"103352\" \n
}, \n
{ \n
\"datafile\" : \"/tmp/arangosh_q2Dy3I/tmp-13879-1274251971/data/journals/logfile-2040.db\", \n
\"status\" : \"collected\", \n
\"tickMin\" : \"103359\", \n
\"tickMax\" : \"104945\" \n
}, \n
{ \n
\"datafile\" : \"/tmp/arangosh_q2Dy3I/tmp-13879-1274251971/data/journals/logfile-103218.db\", \n
\"status\" : \"collected\", \n
\"tickMin\" : \"104952\", \n
\"tickMax\" : \"104969\" \n
}, \n
{ \n
\"datafile\" : \"/tmp/arangosh_q2Dy3I/tmp-13879-1274251971/data/journals/logfile-103355.db\", \n
\"status\" : \"open\", \n
\"tickMin\" : \"104977\", \n
\"tickMax\" : \"105058\" \n
} \n
]\n
\n\n\n\n\n",
+ "description": "\n\nReturns the currently available ranges of tick values for all currently\navailable WAL logfiles. The tick values can be used to determine if certain\ndata (identified by tick value) are still available for replication.\n\nThe body of the response contains a JSON array. Each array member is an\nobject\nthat describes a single logfile. Each object has the following attributes:\n\n* *datafile*: name of the logfile\n\n* *status*: status of the datafile, in textual form (e.g. \"sealed\", \"open\")\n\n* *tickMin*: minimum tick value contained in logfile\n\n* *tickMax*: maximum tick value contained in logfile\n\n\n\n\n**Example:**\n Returns the available tick ranges.\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/logger-tick-ranges\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
[ \n
{ \n
\"datafile\" : \"/tmp/arangosh_uprJb4/tmp-27793-56941049/data/journals/logfile-3.db\", \n
\"status\" : \"collected\", \n
\"tickMin\" : \"5\", \n
\"tickMax\" : \"103215\" \n
}, \n
{ \n
\"datafile\" : \"/tmp/arangosh_uprJb4/tmp-27793-56941049/data/journals/logfile-85.db\", \n
\"status\" : \"collected\", \n
\"tickMin\" : \"103229\", \n
\"tickMax\" : \"103352\" \n
}, \n
{ \n
\"datafile\" : \"/tmp/arangosh_uprJb4/tmp-27793-56941049/data/journals/logfile-232.db\", \n
\"status\" : \"collected\", \n
\"tickMin\" : \"103360\", \n
\"tickMax\" : \"104964\" \n
}, \n
{ \n
\"datafile\" : \"/tmp/arangosh_uprJb4/tmp-27793-56941049/data/journals/logfile-103218.db\", \n
\"status\" : \"collected\", \n
\"tickMin\" : \"104968\", \n
\"tickMax\" : \"104980\" \n
}, \n
{ \n
\"datafile\" : \"/tmp/arangosh_uprJb4/tmp-27793-56941049/data/journals/logfile-103355.db\", \n
\"status\" : \"open\", \n
\"tickMin\" : \"104986\", \n
\"tickMax\" : \"105067\" \n
} \n
]\n
\n\n\n\n\n",
"parameters": [],
"responses": {
"200": {
@@ -13133,7 +13133,7 @@
},
"/_api/replication/server-id": {
"get": {
- "description": "\n\nReturns the servers id. The id is also returned by other replication API\nmethods, and this method is an easy means of determining a server's id.\n\nThe body of the response is a JSON object with the attribute *serverId*. The\nserver id is returned as a string.\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/server-id\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"serverId\" : \"70528077254784\" \n
}\n
\n\n\n\n\n",
+ "description": "\n\nReturns the servers id. The id is also returned by other replication API\nmethods, and this method is an easy means of determining a server's id.\n\nThe body of the response is a JSON object with the attribute *serverId*. The\nserver id is returned as a string.\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/server-id\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"serverId\" : \"153018529730512\" \n
}\n
\n\n\n\n\n",
"parameters": [],
"responses": {
"200": {
@@ -13197,7 +13197,7 @@
},
"/_api/simple/all": {
"put": {
- "description": "\n\nReturns all documents of a collections. Equivalent to the AQL query\n`FOR doc IN collection RETURN doc`. The call expects a JSON object\nas body with the following attributes:\n\n- *collection*: The name of the collection to query.\n\n- *skip*: The number of documents to skip in the query (optional).\n\n- *limit*: The maximal amount of documents to return. The *skip*\n is applied before the *limit* restriction (optional).\n\n- *batchSize*: The number of documents to return in one go. (optional)\n\n- *ttl*: The time-to-live for the cursor (in seconds, optional). \n\n- *stream*: Create this cursor as a stream query (optional). \n\n\nReturns a cursor containing the result, see [HTTP Cursor](../AqlQueryCursor/README.md) for details.\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n\n\n**Example:**\n Limit the amount of documents using *limit*\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/all <<EOF\n
{ \"collection\": \"products\", \"skip\": 2, \"limit\" : 2 }\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_key\" : \"105131\", \n
\"_id\" : \"products/105131\", \n
\"_rev\" : \"_YNEaR2G--D\", \n
\"Hello2\" : \"World2\" \n
}, \n
{ \n
\"_key\" : \"105137\", \n
\"_id\" : \"products/105137\", \n
\"_rev\" : \"_YNEaR2K--B\", \n
\"Hello4\" : \"World4\" \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 2, \n
\"cached\" : false, \n
\"extra\" : { \n
\"stats\" : { \n
\"writesExecuted\" : 0, \n
\"writesIgnored\" : 0, \n
\"scannedFull\" : 4, \n
\"scannedIndex\" : 0, \n
\"filtered\" : 0, \n
\"httpRequests\" : 0, \n
\"executionTime\" : 0.00015664100646972656, \n
\"peakMemoryUsage\" : 18328 \n
}, \n
\"warnings\" : [ ] \n
}, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n Using a *batchSize* value\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/all <<EOF\n
{ \"collection\": \"products\", \"batchSize\" : 3 }\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_key\" : \"105098\", \n
\"_id\" : \"products/105098\", \n
\"_rev\" : \"_YNEaR1G--_\", \n
\"Hello1\" : \"World1\" \n
}, \n
{ \n
\"_key\" : \"105102\", \n
\"_id\" : \"products/105102\", \n
\"_rev\" : \"_YNEaR1G--B\", \n
\"Hello2\" : \"World2\" \n
}, \n
{ \n
\"_key\" : \"105111\", \n
\"_id\" : \"products/105111\", \n
\"_rev\" : \"_YNEaR1G--H\", \n
\"Hello5\" : \"World5\" \n
} \n
], \n
\"hasMore\" : true, \n
\"id\" : \"105114\", \n
\"count\" : 5, \n
\"extra\" : { \n
\"stats\" : { \n
\"writesExecuted\" : 0, \n
\"writesIgnored\" : 0, \n
\"scannedFull\" : 5, \n
\"scannedIndex\" : 0, \n
\"filtered\" : 0, \n
\"httpRequests\" : 0, \n
\"executionTime\" : 0.00013375282287597656, \n
\"peakMemoryUsage\" : 17984 \n
}, \n
\"warnings\" : [ ] \n
}, \n
\"cached\" : false, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
+ "description": "\n\nReturns all documents of a collections. Equivalent to the AQL query\n`FOR doc IN collection RETURN doc`. The call expects a JSON object\nas body with the following attributes:\n\n- *collection*: The name of the collection to query.\n\n- *skip*: The number of documents to skip in the query (optional).\n\n- *limit*: The maximal amount of documents to return. The *skip*\n is applied before the *limit* restriction (optional).\n\n- *batchSize*: The number of documents to return in one go. (optional)\n\n- *ttl*: The time-to-live for the cursor (in seconds, optional). \n\n- *stream*: Create this cursor as a stream query (optional). \n\n\nReturns a cursor containing the result, see [HTTP Cursor](../AqlQueryCursor/README.md) for details.\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n\n\n**Example:**\n Limit the amount of documents using *limit*\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/all <<EOF\n
{ \"collection\": \"products\", \"skip\": 2, \"limit\" : 2 }\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_key\" : \"105136\", \n
\"_id\" : \"products/105136\", \n
\"_rev\" : \"_YOn1XT6--_\", \n
\"Hello1\" : \"World1\" \n
}, \n
{ \n
\"_key\" : \"105149\", \n
\"_id\" : \"products/105149\", \n
\"_rev\" : \"_YOn1XU---D\", \n
\"Hello5\" : \"World5\" \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 2, \n
\"cached\" : false, \n
\"extra\" : { \n
\"stats\" : { \n
\"writesExecuted\" : 0, \n
\"writesIgnored\" : 0, \n
\"scannedFull\" : 4, \n
\"scannedIndex\" : 0, \n
\"filtered\" : 0, \n
\"httpRequests\" : 0, \n
\"executionTime\" : 0.00012993812561035156, \n
\"peakMemoryUsage\" : 18328 \n
}, \n
\"warnings\" : [ ] \n
}, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n Using a *batchSize* value\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/all <<EOF\n
{ \"collection\": \"products\", \"batchSize\" : 3 }\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_key\" : \"105120\", \n
\"_id\" : \"products/105120\", \n
\"_rev\" : \"_YOn1XS6--H\", \n
\"Hello5\" : \"World5\" \n
}, \n
{ \n
\"_key\" : \"105117\", \n
\"_id\" : \"products/105117\", \n
\"_rev\" : \"_YOn1XS6--F\", \n
\"Hello4\" : \"World4\" \n
}, \n
{ \n
\"_key\" : \"105114\", \n
\"_id\" : \"products/105114\", \n
\"_rev\" : \"_YOn1XS6--D\", \n
\"Hello3\" : \"World3\" \n
} \n
], \n
\"hasMore\" : true, \n
\"id\" : \"105123\", \n
\"count\" : 5, \n
\"extra\" : { \n
\"stats\" : { \n
\"writesExecuted\" : 0, \n
\"writesIgnored\" : 0, \n
\"scannedFull\" : 5, \n
\"scannedIndex\" : 0, \n
\"filtered\" : 0, \n
\"httpRequests\" : 0, \n
\"executionTime\" : 0.00013184547424316406, \n
\"peakMemoryUsage\" : 17984 \n
}, \n
\"warnings\" : [ ] \n
}, \n
\"cached\" : false, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "Contains the query.\n\n",
@@ -13233,7 +13233,7 @@
},
"/_api/simple/all-keys": {
"put": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **type**: The type of the result. The following values are allowed:\n - *id*: returns an array of document ids (*_id* attributes)\n - *key*: returns an array of document keys (*_key* attributes)\n - *path*: returns an array of document URI paths. This is the default.\n - **collection**: The collection that should be queried\n\n\n\n\nReturns an array of all keys, ids, or URI paths for all documents in the\ncollection identified by *collection*. The type of the result array is\ndetermined by the *type* attribute.\n\nNote that the results have no defined order and thus the order should\nnot be relied on.\n\nNote: the *all-keys* simple query is **deprecated** as of ArangoDB 3.4.0.\nThis API may get removed in future versions of ArangoDB. You can use the\n`/_api/cursor` endpoint instead with one of the below AQL queries depending\non the desired result:\n\n- `FOR doc IN @@collection RETURN doc._id` to mimic *type: id*\n- `FOR doc IN @@collection RETURN doc._key` to mimic *type: key*\n- `FOR doc IN @@collection RETURN CONCAT(\"/_db/\", CURRENT_DATABASE(), \"/_api/document/\", doc._id)`\n to mimic *type: path*\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n\n\n**Example:**\n Return all document paths\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/all-keys <<EOF\n
{ \n
\"collection\" : \"products\" \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
\"/_db/_system/_api/document/products/103987\", \n
\"/_db/_system/_api/document/products/103980\", \n
\"/_db/_system/_api/document/products/103984\" \n
], \n
\"hasMore\" : false, \n
\"cached\" : false, \n
\"extra\" : { \n
\"stats\" : { \n
\"writesExecuted\" : 0, \n
\"writesIgnored\" : 0, \n
\"scannedFull\" : 3, \n
\"scannedIndex\" : 0, \n
\"filtered\" : 0, \n
\"httpRequests\" : 0, \n
\"executionTime\" : 0.00017881393432617188, \n
\"peakMemoryUsage\" : 34208 \n
}, \n
\"warnings\" : [ ] \n
}, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n Return all document keys\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/all-keys <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"type\" : \"id\" \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
\"products/103958\", \n
\"products/103965\", \n
\"products/103962\" \n
], \n
\"hasMore\" : false, \n
\"cached\" : false, \n
\"extra\" : { \n
\"stats\" : { \n
\"writesExecuted\" : 0, \n
\"writesIgnored\" : 0, \n
\"scannedFull\" : 3, \n
\"scannedIndex\" : 0, \n
\"filtered\" : 0, \n
\"httpRequests\" : 0, \n
\"executionTime\" : 0.00019621849060058594, \n
\"peakMemoryUsage\" : 34040 \n
}, \n
\"warnings\" : [ ] \n
}, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n Collection does not exist\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/document/doesnotexist\n
\n
HTTP/1.1 Not Found\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"expecting GET /_api/document/<document-handle>\", \n
\"code\" : 404, \n
\"errorNum\" : 1203 \n
}\n
\n\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **type**: The type of the result. The following values are allowed:\n - *id*: returns an array of document ids (*_id* attributes)\n - *key*: returns an array of document keys (*_key* attributes)\n - *path*: returns an array of document URI paths. This is the default.\n - **collection**: The collection that should be queried\n\n\n\n\nReturns an array of all keys, ids, or URI paths for all documents in the\ncollection identified by *collection*. The type of the result array is\ndetermined by the *type* attribute.\n\nNote that the results have no defined order and thus the order should\nnot be relied on.\n\nNote: the *all-keys* simple query is **deprecated** as of ArangoDB 3.4.0.\nThis API may get removed in future versions of ArangoDB. You can use the\n`/_api/cursor` endpoint instead with one of the below AQL queries depending\non the desired result:\n\n- `FOR doc IN @@collection RETURN doc._id` to mimic *type: id*\n- `FOR doc IN @@collection RETURN doc._key` to mimic *type: key*\n- `FOR doc IN @@collection RETURN CONCAT(\"/_db/\", CURRENT_DATABASE(), \"/_api/document/\", doc._id)`\n to mimic *type: path*\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n\n\n**Example:**\n Return all document paths\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/all-keys <<EOF\n
{ \n
\"collection\" : \"products\" \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
\"/_db/_system/_api/document/products/103997\", \n
\"/_db/_system/_api/document/products/103994\", \n
\"/_db/_system/_api/document/products/103990\" \n
], \n
\"hasMore\" : false, \n
\"cached\" : false, \n
\"extra\" : { \n
\"stats\" : { \n
\"writesExecuted\" : 0, \n
\"writesIgnored\" : 0, \n
\"scannedFull\" : 3, \n
\"scannedIndex\" : 0, \n
\"filtered\" : 0, \n
\"httpRequests\" : 0, \n
\"executionTime\" : 0.00018358230590820312, \n
\"peakMemoryUsage\" : 34208 \n
}, \n
\"warnings\" : [ ] \n
}, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n Return all document keys\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/all-keys <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"type\" : \"id\" \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
\"products/103975\", \n
\"products/103972\", \n
\"products/103968\" \n
], \n
\"hasMore\" : false, \n
\"cached\" : false, \n
\"extra\" : { \n
\"stats\" : { \n
\"writesExecuted\" : 0, \n
\"writesIgnored\" : 0, \n
\"scannedFull\" : 3, \n
\"scannedIndex\" : 0, \n
\"filtered\" : 0, \n
\"httpRequests\" : 0, \n
\"executionTime\" : 0.0001857280731201172, \n
\"peakMemoryUsage\" : 34040 \n
}, \n
\"warnings\" : [ ] \n
}, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n Collection does not exist\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/document/doesnotexist\n
\n
HTTP/1.1 Not Found\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"expecting GET /_api/document/<document-handle>\", \n
\"code\" : 404, \n
\"errorNum\" : 1203 \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "The name of the collection.\n**This parameter is only for an easier migration path from old versions.**\nIn ArangoDB versions < 3.0, the URL path was `/_api/document` and\nthis was passed in via the query parameter \"collection\".\nThis combination was removed. The collection name can be passed to\n`/_api/simple/all-keys` as body parameter (preferred) or as query parameter.\n\n",
@@ -13271,7 +13271,7 @@
},
"/_api/simple/any": {
"put": {
- "description": "\n\nReturns a random document from a collection. The call expects a JSON object\nas body with the following attributes:\n\n\n**A JSON object with these properties is required:**\n\n - **collection**: The identifier or name of the collection to query.\n Returns a JSON object with the document stored in the attribute\n *document* if the collection contains at least one document. If\n the collection is empty, the *document* attribute contains null.\n\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/any <<EOF\n
{ \n
\"collection\" : \"products\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"document\" : { \n
\"_key\" : \"105159\", \n
\"_id\" : \"products/105159\", \n
\"_rev\" : \"_YNEaR3K--_\", \n
\"Hello2\" : \"World2\" \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n",
+ "description": "\n\nReturns a random document from a collection. The call expects a JSON object\nas body with the following attributes:\n\n\n**A JSON object with these properties is required:**\n\n - **collection**: The identifier or name of the collection to query.\n Returns a JSON object with the document stored in the attribute\n *document* if the collection contains at least one document. If\n the collection is empty, the *document* attribute contains null.\n\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/any <<EOF\n
{ \n
\"collection\" : \"products\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"document\" : { \n
\"_key\" : \"105168\", \n
\"_id\" : \"products/105168\", \n
\"_rev\" : \"_YOn1XU6--D\", \n
\"Hello2\" : \"World2\" \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n",
"parameters": [
{
"in": "body",
@@ -13305,7 +13305,7 @@
},
"/_api/simple/by-example": {
"put": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **skip**: The number of documents to skip in the query (optional).\n - **batchSize**: maximum number of result documents to be transferred from\n the server to the client in one roundtrip. If this attribute is\n not set, a server-controlled default value will be used. A *batchSize* value of\n *0* is disallowed.\n - **limit**: The maximal amount of documents to return. The *skip*\n is applied before the *limit* restriction. (optional)\n - **example**: The example document.\n - **collection**: The name of the collection to query.\n\n\n\n\n\nThis will find all documents matching a given example.\n\nReturns a cursor containing the result, see [HTTP Cursor](../AqlQueryCursor/README.md) for details.\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n**Warning:** \nTill ArangoDB versions 3.2.13 and 3.3.7 this API is quite expensive.\nA more lightweight alternative is to use the [HTTP Cursor API](../AqlQueryCursor/README.md).\nStarting from versions 3.2.14 and 3.3.8 this performance impact is not\nan issue anymore, as the internal implementation of the API has changed.\n\n\n\n\n\n\n**Example:**\n Matching an attribute\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/by-example <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"example\" : { \n
\"i\" : 1 \n
} \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_key\" : \"105187\", \n
\"_id\" : \"products/105187\", \n
\"_rev\" : \"_YNEaR4O--_\", \n
\"a\" : { \n
\"j\" : 1 \n
}, \n
\"i\" : 1 \n
}, \n
{ \n
\"_key\" : \"105193\", \n
\"_id\" : \"products/105193\", \n
\"_rev\" : \"_YNEaR4O--D\", \n
\"a\" : { \n
\"k\" : 2, \n
\"j\" : 2 \n
}, \n
\"i\" : 1 \n
}, \n
{ \n
\"_key\" : \"105183\", \n
\"_id\" : \"products/105183\", \n
\"_rev\" : \"_YNEaR4K--B\", \n
\"a\" : { \n
\"k\" : 1, \n
\"j\" : 1 \n
}, \n
\"i\" : 1 \n
}, \n
{ \n
\"_key\" : \"105190\", \n
\"_id\" : \"products/105190\", \n
\"_rev\" : \"_YNEaR4O--B\", \n
\"i\" : 1 \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 4, \n
\"cached\" : false, \n
\"extra\" : { \n
\"stats\" : { \n
\"writesExecuted\" : 0, \n
\"writesIgnored\" : 0, \n
\"scannedFull\" : 4, \n
\"scannedIndex\" : 0, \n
\"filtered\" : 0, \n
\"httpRequests\" : 0, \n
\"executionTime\" : 0.0002338886260986328, \n
\"peakMemoryUsage\" : 68336 \n
}, \n
\"warnings\" : [ ] \n
}, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n Matching an attribute which is a sub-document\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/by-example <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"example\" : { \n
\"a.j\" : 1 \n
} \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_key\" : \"105208\", \n
\"_id\" : \"products/105208\", \n
\"_rev\" : \"_YNEaR5O--B\", \n
\"a\" : { \n
\"k\" : 1, \n
\"j\" : 1 \n
}, \n
\"i\" : 1 \n
}, \n
{ \n
\"_key\" : \"105212\", \n
\"_id\" : \"products/105212\", \n
\"_rev\" : \"_YNEaR5S--_\", \n
\"a\" : { \n
\"j\" : 1 \n
}, \n
\"i\" : 1 \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 2, \n
\"cached\" : false, \n
\"extra\" : { \n
\"stats\" : { \n
\"writesExecuted\" : 0, \n
\"writesIgnored\" : 0, \n
\"scannedFull\" : 4, \n
\"scannedIndex\" : 0, \n
\"filtered\" : 2, \n
\"httpRequests\" : 0, \n
\"executionTime\" : 0.00022029876708984375, \n
\"peakMemoryUsage\" : 68616 \n
}, \n
\"warnings\" : [ ] \n
}, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n Matching an attribute within a sub-document\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/by-example <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"example\" : { \n
\"a\" : { \n
\"j\" : 1 \n
} \n
} \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_key\" : \"105237\", \n
\"_id\" : \"products/105237\", \n
\"_rev\" : \"_YNEaR6W--B\", \n
\"a\" : { \n
\"j\" : 1 \n
}, \n
\"i\" : 1 \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 1, \n
\"cached\" : false, \n
\"extra\" : { \n
\"stats\" : { \n
\"writesExecuted\" : 0, \n
\"writesIgnored\" : 0, \n
\"scannedFull\" : 4, \n
\"scannedIndex\" : 0, \n
\"filtered\" : 3, \n
\"httpRequests\" : 0, \n
\"executionTime\" : 0.00020432472229003906, \n
\"peakMemoryUsage\" : 68896 \n
}, \n
\"warnings\" : [ ] \n
}, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **skip**: The number of documents to skip in the query (optional).\n - **batchSize**: maximum number of result documents to be transferred from\n the server to the client in one roundtrip. If this attribute is\n not set, a server-controlled default value will be used. A *batchSize* value of\n *0* is disallowed.\n - **limit**: The maximal amount of documents to return. The *skip*\n is applied before the *limit* restriction. (optional)\n - **example**: The example document.\n - **collection**: The name of the collection to query.\n\n\n\n\n\nThis will find all documents matching a given example.\n\nReturns a cursor containing the result, see [HTTP Cursor](../AqlQueryCursor/README.md) for details.\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n**Warning:** \nTill ArangoDB versions 3.2.13 and 3.3.7 this API is quite expensive.\nA more lightweight alternative is to use the [HTTP Cursor API](../AqlQueryCursor/README.md).\nStarting from versions 3.2.14 and 3.3.8 this performance impact is not\nan issue anymore, as the internal implementation of the API has changed.\n\n\n\n\n\n\n**Example:**\n Matching an attribute\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/by-example <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"example\" : { \n
\"i\" : 1 \n
} \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_key\" : \"105192\", \n
\"_id\" : \"products/105192\", \n
\"_rev\" : \"_YOn1XW---_\", \n
\"a\" : { \n
\"k\" : 1, \n
\"j\" : 1 \n
}, \n
\"i\" : 1 \n
}, \n
{ \n
\"_key\" : \"105202\", \n
\"_id\" : \"products/105202\", \n
\"_rev\" : \"_YOn1XW---F\", \n
\"a\" : { \n
\"k\" : 2, \n
\"j\" : 2 \n
}, \n
\"i\" : 1 \n
}, \n
{ \n
\"_key\" : \"105196\", \n
\"_id\" : \"products/105196\", \n
\"_rev\" : \"_YOn1XW---B\", \n
\"a\" : { \n
\"j\" : 1 \n
}, \n
\"i\" : 1 \n
}, \n
{ \n
\"_key\" : \"105199\", \n
\"_id\" : \"products/105199\", \n
\"_rev\" : \"_YOn1XW---D\", \n
\"i\" : 1 \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 4, \n
\"cached\" : false, \n
\"extra\" : { \n
\"stats\" : { \n
\"writesExecuted\" : 0, \n
\"writesIgnored\" : 0, \n
\"scannedFull\" : 4, \n
\"scannedIndex\" : 0, \n
\"filtered\" : 0, \n
\"httpRequests\" : 0, \n
\"executionTime\" : 0.0002498626708984375, \n
\"peakMemoryUsage\" : 68336 \n
}, \n
\"warnings\" : [ ] \n
}, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n Matching an attribute which is a sub-document\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/by-example <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"example\" : { \n
\"a.j\" : 1 \n
} \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_key\" : \"105217\", \n
\"_id\" : \"products/105217\", \n
\"_rev\" : \"_YOn1XXC--_\", \n
\"a\" : { \n
\"k\" : 1, \n
\"j\" : 1 \n
}, \n
\"i\" : 1 \n
}, \n
{ \n
\"_key\" : \"105221\", \n
\"_id\" : \"products/105221\", \n
\"_rev\" : \"_YOn1XXC--B\", \n
\"a\" : { \n
\"j\" : 1 \n
}, \n
\"i\" : 1 \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 2, \n
\"cached\" : false, \n
\"extra\" : { \n
\"stats\" : { \n
\"writesExecuted\" : 0, \n
\"writesIgnored\" : 0, \n
\"scannedFull\" : 4, \n
\"scannedIndex\" : 0, \n
\"filtered\" : 2, \n
\"httpRequests\" : 0, \n
\"executionTime\" : 0.0002300739288330078, \n
\"peakMemoryUsage\" : 68616 \n
}, \n
\"warnings\" : [ ] \n
}, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n Matching an attribute within a sub-document\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/by-example <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"example\" : { \n
\"a\" : { \n
\"j\" : 1 \n
} \n
} \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_key\" : \"105246\", \n
\"_id\" : \"products/105246\", \n
\"_rev\" : \"_YOn1XYC--D\", \n
\"a\" : { \n
\"j\" : 1 \n
}, \n
\"i\" : 1 \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 1, \n
\"cached\" : false, \n
\"extra\" : { \n
\"stats\" : { \n
\"writesExecuted\" : 0, \n
\"writesIgnored\" : 0, \n
\"scannedFull\" : 4, \n
\"scannedIndex\" : 0, \n
\"filtered\" : 3, \n
\"httpRequests\" : 0, \n
\"executionTime\" : 0.00022554397583007812, \n
\"peakMemoryUsage\" : 68896 \n
}, \n
\"warnings\" : [ ] \n
}, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
"parameters": [
{
"in": "body",
@@ -13339,7 +13339,7 @@
},
"/_api/simple/first-example": {
"put": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **example**: The example document.\n - **collection**: The name of the collection to query.\n\n\n\n\n\nThis will return the first document matching a given example.\n\nReturns a result containing the document or *HTTP 404* if no\ndocument matched the example.\n\nIf more than one document in the collection matches the specified example, only\none of these documents will be returned, and it is undefined which of the matching\ndocuments is returned.\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n**Warning:** \nTill ArangoDB versions 3.2.13 and 3.3.7 this API is quite expensive.\nA more lightweight alternative is to use the [HTTP Cursor API](../AqlQueryCursor/README.md).\nStarting from versions 3.2.14 and 3.3.8 this performance impact is not\nan issue anymore, as the internal implementation of the API has changed.\n\n\n\n\n\n\n**Example:**\n If a matching document was found\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/first-example <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"example\" : { \n
\"i\" : 1 \n
} \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"document\" : { \n
\"_key\" : \"105268\", \n
\"_id\" : \"products/105268\", \n
\"_rev\" : \"_YNEaR7i--_\", \n
\"a\" : { \n
\"k\" : 2, \n
\"j\" : 2 \n
}, \n
\"i\" : 1 \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n If no document was found\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/first-example <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"example\" : { \n
\"l\" : 1 \n
} \n
}\n
EOF\n
\n
HTTP/1.1 Not Found\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"code\" : 404, \n
\"errorNum\" : 404, \n
\"errorMessage\" : \"no match\" \n
}\n
\n\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **example**: The example document.\n - **collection**: The name of the collection to query.\n\n\n\n\n\nThis will return the first document matching a given example.\n\nReturns a result containing the document or *HTTP 404* if no\ndocument matched the example.\n\nIf more than one document in the collection matches the specified example, only\none of these documents will be returned, and it is undefined which of the matching\ndocuments is returned.\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n**Warning:** \nTill ArangoDB versions 3.2.13 and 3.3.7 this API is quite expensive.\nA more lightweight alternative is to use the [HTTP Cursor API](../AqlQueryCursor/README.md).\nStarting from versions 3.2.14 and 3.3.8 this performance impact is not\nan issue anymore, as the internal implementation of the API has changed.\n\n\n\n\n\n\n**Example:**\n If a matching document was found\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/first-example <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"example\" : { \n
\"i\" : 1 \n
} \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"document\" : { \n
\"_key\" : \"105277\", \n
\"_id\" : \"products/105277\", \n
\"_rev\" : \"_YOn1XZG--D\", \n
\"a\" : { \n
\"k\" : 2, \n
\"j\" : 2 \n
}, \n
\"i\" : 1 \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n If no document was found\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/first-example <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"example\" : { \n
\"l\" : 1 \n
} \n
}\n
EOF\n
\n
HTTP/1.1 Not Found\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"code\" : 404, \n
\"errorNum\" : 404, \n
\"errorMessage\" : \"no match\" \n
}\n
\n\n\n\n\n",
"parameters": [
{
"in": "body",
@@ -13373,7 +13373,7 @@
},
"/_api/simple/fulltext": {
"put": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **index**: The identifier of the fulltext-index to use.\n - **attribute**: The attribute that contains the texts.\n - **collection**: The name of the collection to query.\n - **limit**: The maximal amount of documents to return. The *skip*\n is applied before the *limit* restriction. (optional)\n - **skip**: The number of documents to skip in the query (optional).\n - **query**: The fulltext query. Please refer to [Fulltext queries](../../Manual/Appendix/Deprecated/SimpleQueries/FulltextQueries.html)\n for details.\n\n\n\n\n\nThis will find all documents from the collection that match the fulltext\nquery specified in *query*.\n\nIn order to use the *fulltext* operator, a fulltext index must be defined\nfor the collection and the specified attribute.\n\nReturns a cursor containing the result, see [HTTP Cursor](../AqlQueryCursor/README.md) for details.\n\nNote: the *fulltext* simple query is **deprecated** as of ArangoDB 2.6. \nThis API may be removed in future versions of ArangoDB. The preferred\nway for retrieving documents from a collection using the near operator is\nto issue an AQL query using the *FULLTEXT* [AQL function](../../AQL/Functions/Fulltext.html) \nas follows:\n\n FOR doc IN FULLTEXT(@@collection, @attributeName, @queryString, @limit) \n RETURN doc\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/fulltext <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"attribute\" : \"text\", \n
\"query\" : \"word\" \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_key\" : \"105308\", \n
\"_id\" : \"products/105308\", \n
\"_rev\" : \"_YNEaR92--B\", \n
\"text\" : \"this text contains word\" \n
}, \n
{ \n
\"_key\" : \"105312\", \n
\"_id\" : \"products/105312\", \n
\"_rev\" : \"_YNEaR92--D\", \n
\"text\" : \"this text also has a word\" \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 2, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **index**: The identifier of the fulltext-index to use.\n - **attribute**: The attribute that contains the texts.\n - **collection**: The name of the collection to query.\n - **limit**: The maximal amount of documents to return. The *skip*\n is applied before the *limit* restriction. (optional)\n - **skip**: The number of documents to skip in the query (optional).\n - **query**: The fulltext query. Please refer to [Fulltext queries](../../Manual/Appendix/Deprecated/SimpleQueries/FulltextQueries.html)\n for details.\n\n\n\n\n\nThis will find all documents from the collection that match the fulltext\nquery specified in *query*.\n\nIn order to use the *fulltext* operator, a fulltext index must be defined\nfor the collection and the specified attribute.\n\nReturns a cursor containing the result, see [HTTP Cursor](../AqlQueryCursor/README.md) for details.\n\nNote: the *fulltext* simple query is **deprecated** as of ArangoDB 2.6. \nThis API may be removed in future versions of ArangoDB. The preferred\nway for retrieving documents from a collection using the near operator is\nto issue an AQL query using the *FULLTEXT* [AQL function](../../AQL/Functions/Fulltext.html) \nas follows:\n\n FOR doc IN FULLTEXT(@@collection, @attributeName, @queryString, @limit) \n RETURN doc\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/fulltext <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"attribute\" : \"text\", \n
\"query\" : \"word\" \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_key\" : \"105317\", \n
\"_id\" : \"products/105317\", \n
\"_rev\" : \"_YOn1XbK--_\", \n
\"text\" : \"this text contains word\" \n
}, \n
{ \n
\"_key\" : \"105321\", \n
\"_id\" : \"products/105321\", \n
\"_rev\" : \"_YOn1XbK--B\", \n
\"text\" : \"this text also has a word\" \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 2, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
"parameters": [
{
"in": "body",
@@ -13407,7 +13407,7 @@
},
"/_api/simple/lookup-by-keys": {
"put": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **keys** (string): array with the _keys of documents to remove.\n - **collection**: The name of the collection to look in for the documents\n\n\n\n\nLooks up the documents in the specified collection\nusing the array of keys provided. All documents for which a matching\nkey was specified in the *keys* array and that exist in the collection\nwill be returned. Keys for which no document can be found in the\nunderlying collection are ignored, and no exception will be thrown for\nthem.\n\nEquivalent AQL query:\n\n FOR doc IN @@collection FILTER doc._key IN @keys RETURN doc\n\nThe body of the response contains a JSON object with a *documents*\nattribute. The *documents* attribute is an array containing the\nmatching documents. The order in which matching documents are present\nin the result array is unspecified.\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n\n\n**Example:**\n Looking up existing documents\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/lookup-by-keys <<EOF\n
{ \n
\"keys\" : [ \n
\"test0\", \n
\"test1\", \n
\"test2\", \n
\"test3\", \n
\"test4\", \n
\"test5\", \n
\"test6\", \n
\"test7\", \n
\"test8\", \n
\"test9\" \n
], \n
\"collection\" : \"test\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"documents\" : [ \n
{ \n
\"_key\" : \"test0\", \n
\"_id\" : \"test/test0\", \n
\"_rev\" : \"_YNEaSAG--B\", \n
\"value\" : 0 \n
}, \n
{ \n
\"_key\" : \"test1\", \n
\"_id\" : \"test/test1\", \n
\"_rev\" : \"_YNEaSAK--_\", \n
\"value\" : 1 \n
}, \n
{ \n
\"_key\" : \"test2\", \n
\"_id\" : \"test/test2\", \n
\"_rev\" : \"_YNEaSAK--B\", \n
\"value\" : 2 \n
}, \n
{ \n
\"_key\" : \"test3\", \n
\"_id\" : \"test/test3\", \n
\"_rev\" : \"_YNEaSAK--D\", \n
\"value\" : 3 \n
}, \n
{ \n
\"_key\" : \"test4\", \n
\"_id\" : \"test/test4\", \n
\"_rev\" : \"_YNEaSAK--F\", \n
\"value\" : 4 \n
}, \n
{ \n
\"_key\" : \"test5\", \n
\"_id\" : \"test/test5\", \n
\"_rev\" : \"_YNEaSAK--H\", \n
\"value\" : 5 \n
}, \n
{ \n
\"_key\" : \"test6\", \n
\"_id\" : \"test/test6\", \n
\"_rev\" : \"_YNEaSAK--J\", \n
\"value\" : 6 \n
}, \n
{ \n
\"_key\" : \"test7\", \n
\"_id\" : \"test/test7\", \n
\"_rev\" : \"_YNEaSAK--L\", \n
\"value\" : 7 \n
}, \n
{ \n
\"_key\" : \"test8\", \n
\"_id\" : \"test/test8\", \n
\"_rev\" : \"_YNEaSAO--_\", \n
\"value\" : 8 \n
}, \n
{ \n
\"_key\" : \"test9\", \n
\"_id\" : \"test/test9\", \n
\"_rev\" : \"_YNEaSAO--B\", \n
\"value\" : 9 \n
} \n
], \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Looking up non-existing documents\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/lookup-by-keys <<EOF\n
{ \n
\"keys\" : [ \n
\"foo\", \n
\"bar\", \n
\"baz\" \n
], \n
\"collection\" : \"test\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"documents\" : [ ], \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **keys** (string): array with the _keys of documents to remove.\n - **collection**: The name of the collection to look in for the documents\n\n\n\n\nLooks up the documents in the specified collection\nusing the array of keys provided. All documents for which a matching\nkey was specified in the *keys* array and that exist in the collection\nwill be returned. Keys for which no document can be found in the\nunderlying collection are ignored, and no exception will be thrown for\nthem.\n\nEquivalent AQL query:\n\n FOR doc IN @@collection FILTER doc._key IN @keys RETURN doc\n\nThe body of the response contains a JSON object with a *documents*\nattribute. The *documents* attribute is an array containing the\nmatching documents. The order in which matching documents are present\nin the result array is unspecified.\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n\n\n**Example:**\n Looking up existing documents\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/lookup-by-keys <<EOF\n
{ \n
\"keys\" : [ \n
\"test0\", \n
\"test1\", \n
\"test2\", \n
\"test3\", \n
\"test4\", \n
\"test5\", \n
\"test6\", \n
\"test7\", \n
\"test8\", \n
\"test9\" \n
], \n
\"collection\" : \"test\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"documents\" : [ \n
{ \n
\"_key\" : \"test0\", \n
\"_id\" : \"test/test0\", \n
\"_rev\" : \"_YOn1XdO--B\", \n
\"value\" : 0 \n
}, \n
{ \n
\"_key\" : \"test1\", \n
\"_id\" : \"test/test1\", \n
\"_rev\" : \"_YOn1XdS--_\", \n
\"value\" : 1 \n
}, \n
{ \n
\"_key\" : \"test2\", \n
\"_id\" : \"test/test2\", \n
\"_rev\" : \"_YOn1XdS--B\", \n
\"value\" : 2 \n
}, \n
{ \n
\"_key\" : \"test3\", \n
\"_id\" : \"test/test3\", \n
\"_rev\" : \"_YOn1XdS--D\", \n
\"value\" : 3 \n
}, \n
{ \n
\"_key\" : \"test4\", \n
\"_id\" : \"test/test4\", \n
\"_rev\" : \"_YOn1XdS--F\", \n
\"value\" : 4 \n
}, \n
{ \n
\"_key\" : \"test5\", \n
\"_id\" : \"test/test5\", \n
\"_rev\" : \"_YOn1XdW--_\", \n
\"value\" : 5 \n
}, \n
{ \n
\"_key\" : \"test6\", \n
\"_id\" : \"test/test6\", \n
\"_rev\" : \"_YOn1XdW--B\", \n
\"value\" : 6 \n
}, \n
{ \n
\"_key\" : \"test7\", \n
\"_id\" : \"test/test7\", \n
\"_rev\" : \"_YOn1XdW--D\", \n
\"value\" : 7 \n
}, \n
{ \n
\"_key\" : \"test8\", \n
\"_id\" : \"test/test8\", \n
\"_rev\" : \"_YOn1XdW--F\", \n
\"value\" : 8 \n
}, \n
{ \n
\"_key\" : \"test9\", \n
\"_id\" : \"test/test9\", \n
\"_rev\" : \"_YOn1XdW--H\", \n
\"value\" : 9 \n
} \n
], \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Looking up non-existing documents\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/lookup-by-keys <<EOF\n
{ \n
\"keys\" : [ \n
\"foo\", \n
\"bar\", \n
\"baz\" \n
], \n
\"collection\" : \"test\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"documents\" : [ ], \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n\n",
"parameters": [
{
"in": "body",
@@ -13441,7 +13441,7 @@
},
"/_api/simple/near": {
"put": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **distance**: If given, the attribute key used to return the distance to\n the given coordinate. (optional). If specified, distances are returned in meters.\n - **skip**: The number of documents to skip in the query. (optional)\n - **longitude**: The longitude of the coordinate.\n - **limit**: The maximal amount of documents to return. The *skip* is\n applied before the *limit* restriction. The default is 100. (optional)\n - **collection**: The name of the collection to query.\n - **latitude**: The latitude of the coordinate.\n - **geo**: If given, the identifier of the geo-index to use. (optional)\n\n\n\n\n\nThe default will find at most 100 documents near the given coordinate. The\nreturned array is sorted according to the distance, with the nearest document\nbeing first in the return array. If there are near documents of equal distance, documents\nare chosen randomly from this set until the limit is reached.\n\nIn order to use the *near* operator, a geo index must be defined for the\ncollection. This index also defines which attribute holds the coordinates\nfor the document. If you have more than one geo-spatial index, you can use\nthe *geo* field to select a particular index.\n\n\nReturns a cursor containing the result, see [HTTP Cursor](../AqlQueryCursor/README.md) for details.\n\nNote: the *near* simple query is **deprecated** as of ArangoDB 2.6. \nThis API may be removed in future versions of ArangoDB. The preferred\nway for retrieving documents from a collection using the near operator is\nto issue an [AQL query](../../AQL/Functions/Geo.html) using the *NEAR* function as follows: \n\n FOR doc IN NEAR(@@collection, @latitude, @longitude, @limit)\n RETURN doc`\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n\n\n**Example:**\n Without distance\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/near <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"latitude\" : 0, \n
\"longitude\" : 0, \n
\"skip\" : 1, \n
\"limit\" : 2 \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_key\" : \"105417\", \n
\"_id\" : \"products/105417\", \n
\"_rev\" : \"_YNEaSDS--D\", \n
\"name\" : \"Name/-0.002/\", \n
\"loc\" : [ \n
-0.002, \n
0 \n
] \n
}, \n
{ \n
\"_key\" : \"105423\", \n
\"_id\" : \"products/105423\", \n
\"_rev\" : \"_YNEaSDW--_\", \n
\"name\" : \"Name/0.002/\", \n
\"loc\" : [ \n
0.002, \n
0 \n
] \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 2, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n With distance\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/near <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"latitude\" : 0, \n
\"longitude\" : 0, \n
\"skip\" : 1, \n
\"limit\" : 3, \n
\"distance\" : \"distance\" \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_id\" : \"products/105468\", \n
\"_key\" : \"105468\", \n
\"_rev\" : \"_YNEaSFW--D\", \n
\"loc\" : [ \n
-0.002, \n
0 \n
], \n
\"name\" : \"Name/-0.002/\", \n
\"distance\" : 222.3898532891175 \n
}, \n
{ \n
\"_id\" : \"products/105474\", \n
\"_key\" : \"105474\", \n
\"_rev\" : \"_YNEaSFW--H\", \n
\"loc\" : [ \n
0.002, \n
0 \n
], \n
\"name\" : \"Name/0.002/\", \n
\"distance\" : 222.3898532891175 \n
}, \n
{ \n
\"_id\" : \"products/105477\", \n
\"_key\" : \"105477\", \n
\"_rev\" : \"_YNEaSFa--_\", \n
\"loc\" : [ \n
0.004, \n
0 \n
], \n
\"name\" : \"Name/0.004/\", \n
\"distance\" : 444.779706578235 \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 3, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **distance**: If given, the attribute key used to return the distance to\n the given coordinate. (optional). If specified, distances are returned in meters.\n - **skip**: The number of documents to skip in the query. (optional)\n - **longitude**: The longitude of the coordinate.\n - **limit**: The maximal amount of documents to return. The *skip* is\n applied before the *limit* restriction. The default is 100. (optional)\n - **collection**: The name of the collection to query.\n - **latitude**: The latitude of the coordinate.\n - **geo**: If given, the identifier of the geo-index to use. (optional)\n\n\n\n\n\nThe default will find at most 100 documents near the given coordinate. The\nreturned array is sorted according to the distance, with the nearest document\nbeing first in the return array. If there are near documents of equal distance, documents\nare chosen randomly from this set until the limit is reached.\n\nIn order to use the *near* operator, a geo index must be defined for the\ncollection. This index also defines which attribute holds the coordinates\nfor the document. If you have more than one geo-spatial index, you can use\nthe *geo* field to select a particular index.\n\n\nReturns a cursor containing the result, see [HTTP Cursor](../AqlQueryCursor/README.md) for details.\n\nNote: the *near* simple query is **deprecated** as of ArangoDB 2.6. \nThis API may be removed in future versions of ArangoDB. The preferred\nway for retrieving documents from a collection using the near operator is\nto issue an [AQL query](../../AQL/Functions/Geo.html) using the *NEAR* function as follows: \n\n FOR doc IN NEAR(@@collection, @latitude, @longitude, @limit)\n RETURN doc`\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n\n\n**Example:**\n Without distance\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/near <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"latitude\" : 0, \n
\"longitude\" : 0, \n
\"skip\" : 1, \n
\"limit\" : 2 \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_key\" : \"105426\", \n
\"_id\" : \"products/105426\", \n
\"_rev\" : \"_YOn1XgW--D\", \n
\"name\" : \"Name/-0.002/\", \n
\"loc\" : [ \n
-0.002, \n
0 \n
] \n
}, \n
{ \n
\"_key\" : \"105432\", \n
\"_id\" : \"products/105432\", \n
\"_rev\" : \"_YOn1XgW--H\", \n
\"name\" : \"Name/0.002/\", \n
\"loc\" : [ \n
0.002, \n
0 \n
] \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 2, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n With distance\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/near <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"latitude\" : 0, \n
\"longitude\" : 0, \n
\"skip\" : 1, \n
\"limit\" : 3, \n
\"distance\" : \"distance\" \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_id\" : \"products/105477\", \n
\"_key\" : \"105477\", \n
\"_rev\" : \"_YOn1Xie--_\", \n
\"loc\" : [ \n
-0.002, \n
0 \n
], \n
\"name\" : \"Name/-0.002/\", \n
\"distance\" : 222.3898532891175 \n
}, \n
{ \n
\"_id\" : \"products/105483\", \n
\"_key\" : \"105483\", \n
\"_rev\" : \"_YOn1Xie--D\", \n
\"loc\" : [ \n
0.002, \n
0 \n
], \n
\"name\" : \"Name/0.002/\", \n
\"distance\" : 222.3898532891175 \n
}, \n
{ \n
\"_id\" : \"products/105486\", \n
\"_key\" : \"105486\", \n
\"_rev\" : \"_YOn1Xie--F\", \n
\"loc\" : [ \n
0.004, \n
0 \n
], \n
\"name\" : \"Name/0.004/\", \n
\"distance\" : 444.779706578235 \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 3, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
"parameters": [
{
"in": "body",
@@ -13475,7 +13475,7 @@
},
"/_api/simple/range": {
"put": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **right**: The upper bound.\n - **attribute**: The attribute path to check.\n - **collection**: The name of the collection to query.\n - **limit**: The maximal amount of documents to return. The *skip*\n is applied before the *limit* restriction. (optional)\n - **closed**: If *true*, use interval including *left* and *right*,\n otherwise exclude *right*, but include *left*.\n - **skip**: The number of documents to skip in the query (optional).\n - **left**: The lower bound.\n\n\n\n\n\nThis will find all documents within a given range. In order to execute a\nrange query, a skip-list index on the queried attribute must be present.\n\nReturns a cursor containing the result, see [HTTP Cursor](../AqlQueryCursor/README.md) for details.\n\nNote: the *range* simple query is **deprecated** as of ArangoDB 2.6. \nThe function may be removed in future versions of ArangoDB. The preferred\nway for retrieving documents from a collection within a specific range\nis to use an AQL query as follows: \n\n FOR doc IN @@collection \n FILTER doc.value >= @left && doc.value < @right \n LIMIT @skip, @limit \n RETURN doc`\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/range <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"attribute\" : \"i\", \n
\"left\" : 2, \n
\"right\" : 4 \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_key\" : \"105510\", \n
\"_id\" : \"products/105510\", \n
\"_rev\" : \"_YNEaSHa--_\", \n
\"i\" : 2 \n
}, \n
{ \n
\"_key\" : \"105513\", \n
\"_id\" : \"products/105513\", \n
\"_rev\" : \"_YNEaSHa--B\", \n
\"i\" : 3 \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 2, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **right**: The upper bound.\n - **attribute**: The attribute path to check.\n - **collection**: The name of the collection to query.\n - **limit**: The maximal amount of documents to return. The *skip*\n is applied before the *limit* restriction. (optional)\n - **closed**: If *true*, use interval including *left* and *right*,\n otherwise exclude *right*, but include *left*.\n - **skip**: The number of documents to skip in the query (optional).\n - **left**: The lower bound.\n\n\n\n\n\nThis will find all documents within a given range. In order to execute a\nrange query, a skip-list index on the queried attribute must be present.\n\nReturns a cursor containing the result, see [HTTP Cursor](../AqlQueryCursor/README.md) for details.\n\nNote: the *range* simple query is **deprecated** as of ArangoDB 2.6. \nThe function may be removed in future versions of ArangoDB. The preferred\nway for retrieving documents from a collection within a specific range\nis to use an AQL query as follows: \n\n FOR doc IN @@collection \n FILTER doc.value >= @left && doc.value < @right \n LIMIT @skip, @limit \n RETURN doc`\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/range <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"attribute\" : \"i\", \n
\"left\" : 2, \n
\"right\" : 4 \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_key\" : \"105519\", \n
\"_id\" : \"products/105519\", \n
\"_rev\" : \"_YOn1Xke--B\", \n
\"i\" : 2 \n
}, \n
{ \n
\"_key\" : \"105522\", \n
\"_id\" : \"products/105522\", \n
\"_rev\" : \"_YOn1Xke--D\", \n
\"i\" : 3 \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 2, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
"parameters": [
{
"in": "body",
@@ -13645,7 +13645,7 @@
},
"/_api/simple/within": {
"put": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **distance**: If given, the attribute key used to return the distance to\n the given coordinate. (optional). If specified, distances are returned in meters.\n - **skip**: The number of documents to skip in the query. (optional)\n - **longitude**: The longitude of the coordinate.\n - **radius**: The maximal radius (in meters).\n - **collection**: The name of the collection to query.\n - **latitude**: The latitude of the coordinate.\n - **limit**: The maximal amount of documents to return. The *skip* is\n applied before the *limit* restriction. The default is 100. (optional)\n - **geo**: If given, the identifier of the geo-index to use. (optional)\n\n\n\n\n\nThis will find all documents within a given radius around the coordinate\n(*latitude*, *longitude*). The returned list is sorted by distance.\n\nIn order to use the *within* operator, a geo index must be defined for\nthe collection. This index also defines which attribute holds the\ncoordinates for the document. If you have more than one geo-spatial index,\nyou can use the *geo* field to select a particular index.\n\n\nReturns a cursor containing the result, see [HTTP Cursor](../AqlQueryCursor/README.md) for details.\n\nNote: the *within* simple query is **deprecated** as of ArangoDB 2.6. \nThis API may be removed in future versions of ArangoDB. The preferred\nway for retrieving documents from a collection using the near operator is\nto issue an [AQL query](../../AQL/Functions/Geo.html) using the *WITHIN* function as follows: \n\n FOR doc IN WITHIN(@@collection, @latitude, @longitude, @radius, @distanceAttributeName)\n RETURN doc\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n\n\n**Example:**\n Without distance\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/near <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"latitude\" : 0, \n
\"longitude\" : 0, \n
\"skip\" : 1, \n
\"limit\" : 2, \n
\"radius\" : 500 \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_key\" : \"105830\", \n
\"_id\" : \"products/105830\", \n
\"_rev\" : \"_YNEaSW---D\", \n
\"name\" : \"Name/-0.002/\", \n
\"loc\" : [ \n
-0.002, \n
0 \n
] \n
}, \n
{ \n
\"_key\" : \"105836\", \n
\"_id\" : \"products/105836\", \n
\"_rev\" : \"_YNEaSW---H\", \n
\"name\" : \"Name/0.002/\", \n
\"loc\" : [ \n
0.002, \n
0 \n
] \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 2, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n With distance\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/near <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"latitude\" : 0, \n
\"longitude\" : 0, \n
\"skip\" : 1, \n
\"limit\" : 3, \n
\"distance\" : \"distance\", \n
\"radius\" : 300 \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_id\" : \"products/105881\", \n
\"_key\" : \"105881\", \n
\"_rev\" : \"_YNEaSYG--B\", \n
\"loc\" : [ \n
-0.002, \n
0 \n
], \n
\"name\" : \"Name/-0.002/\", \n
\"distance\" : 222.3898532891175 \n
}, \n
{ \n
\"_id\" : \"products/105887\", \n
\"_key\" : \"105887\", \n
\"_rev\" : \"_YNEaSYG--F\", \n
\"loc\" : [ \n
0.002, \n
0 \n
], \n
\"name\" : \"Name/0.002/\", \n
\"distance\" : 222.3898532891175 \n
}, \n
{ \n
\"_id\" : \"products/105890\", \n
\"_key\" : \"105890\", \n
\"_rev\" : \"_YNEaSYG--H\", \n
\"loc\" : [ \n
0.004, \n
0 \n
], \n
\"name\" : \"Name/0.004/\", \n
\"distance\" : 444.779706578235 \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 3, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **distance**: If given, the attribute key used to return the distance to\n the given coordinate. (optional). If specified, distances are returned in meters.\n - **skip**: The number of documents to skip in the query. (optional)\n - **longitude**: The longitude of the coordinate.\n - **radius**: The maximal radius (in meters).\n - **collection**: The name of the collection to query.\n - **latitude**: The latitude of the coordinate.\n - **limit**: The maximal amount of documents to return. The *skip* is\n applied before the *limit* restriction. The default is 100. (optional)\n - **geo**: If given, the identifier of the geo-index to use. (optional)\n\n\n\n\n\nThis will find all documents within a given radius around the coordinate\n(*latitude*, *longitude*). The returned list is sorted by distance.\n\nIn order to use the *within* operator, a geo index must be defined for\nthe collection. This index also defines which attribute holds the\ncoordinates for the document. If you have more than one geo-spatial index,\nyou can use the *geo* field to select a particular index.\n\n\nReturns a cursor containing the result, see [HTTP Cursor](../AqlQueryCursor/README.md) for details.\n\nNote: the *within* simple query is **deprecated** as of ArangoDB 2.6. \nThis API may be removed in future versions of ArangoDB. The preferred\nway for retrieving documents from a collection using the near operator is\nto issue an [AQL query](../../AQL/Functions/Geo.html) using the *WITHIN* function as follows: \n\n FOR doc IN WITHIN(@@collection, @latitude, @longitude, @radius, @distanceAttributeName)\n RETURN doc\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n\n\n**Example:**\n Without distance\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/near <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"latitude\" : 0, \n
\"longitude\" : 0, \n
\"skip\" : 1, \n
\"limit\" : 2, \n
\"radius\" : 500 \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_key\" : \"105839\", \n
\"_id\" : \"products/105839\", \n
\"_rev\" : \"_YOn1Xx6--D\", \n
\"name\" : \"Name/-0.002/\", \n
\"loc\" : [ \n
-0.002, \n
0 \n
] \n
}, \n
{ \n
\"_key\" : \"105845\", \n
\"_id\" : \"products/105845\", \n
\"_rev\" : \"_YOn1Xy---_\", \n
\"name\" : \"Name/0.002/\", \n
\"loc\" : [ \n
0.002, \n
0 \n
] \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 2, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n**Example:**\n With distance\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/near <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"latitude\" : 0, \n
\"longitude\" : 0, \n
\"skip\" : 1, \n
\"limit\" : 3, \n
\"distance\" : \"distance\", \n
\"radius\" : 300 \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_id\" : \"products/105890\", \n
\"_key\" : \"105890\", \n
\"_rev\" : \"_YOn1X1G--H\", \n
\"loc\" : [ \n
-0.002, \n
0 \n
], \n
\"name\" : \"Name/-0.002/\", \n
\"distance\" : 222.3898532891175 \n
}, \n
{ \n
\"_id\" : \"products/105896\", \n
\"_key\" : \"105896\", \n
\"_rev\" : \"_YOn1X1K--B\", \n
\"loc\" : [ \n
0.002, \n
0 \n
], \n
\"name\" : \"Name/0.002/\", \n
\"distance\" : 222.3898532891175 \n
}, \n
{ \n
\"_id\" : \"products/105899\", \n
\"_key\" : \"105899\", \n
\"_rev\" : \"_YOn1X1K--D\", \n
\"loc\" : [ \n
0.004, \n
0 \n
], \n
\"name\" : \"Name/0.004/\", \n
\"distance\" : 444.779706578235 \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 3, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
"parameters": [
{
"in": "body",
@@ -13679,7 +13679,7 @@
},
"/_api/simple/within-rectangle": {
"put": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **latitude1**: The latitude of the first rectangle coordinate.\n - **skip**: The number of documents to skip in the query. (optional)\n - **latitude2**: The latitude of the second rectangle coordinate.\n - **longitude2**: The longitude of the second rectangle coordinate.\n - **longitude1**: The longitude of the first rectangle coordinate.\n - **limit**: The maximal amount of documents to return. The *skip* is\n applied before the *limit* restriction. The default is 100. (optional)\n - **collection**: The name of the collection to query.\n - **geo**: If given, the identifier of the geo-index to use. (optional)\n\n\n\n\n\nThis will find all documents within the specified rectangle (determined by\nthe given coordinates (*latitude1*, *longitude1*, *latitude2*, *longitude2*). \n\nIn order to use the *within-rectangle* query, a geo index must be defined for\nthe collection. This index also defines which attribute holds the\ncoordinates for the document. If you have more than one geo-spatial index,\nyou can use the *geo* field to select a particular index.\n\nReturns a cursor containing the result, see [HTTP Cursor](../AqlQueryCursor/README.md) for details.\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/within-rectangle <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"latitude1\" : 0, \n
\"longitude1\" : 0, \n
\"latitude2\" : 0.2, \n
\"longitude2\" : 0.2, \n
\"skip\" : 1, \n
\"limit\" : 2 \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_key\" : \"105947\", \n
\"_id\" : \"products/105947\", \n
\"_rev\" : \"_YNEaSaK--J\", \n
\"name\" : \"Name/0.008/\", \n
\"loc\" : [ \n
0.008, \n
0 \n
] \n
}, \n
{ \n
\"_key\" : \"105944\", \n
\"_id\" : \"products/105944\", \n
\"_rev\" : \"_YNEaSaK--H\", \n
\"name\" : \"Name/0.006/\", \n
\"loc\" : [ \n
0.006, \n
0 \n
] \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 2, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **latitude1**: The latitude of the first rectangle coordinate.\n - **skip**: The number of documents to skip in the query. (optional)\n - **latitude2**: The latitude of the second rectangle coordinate.\n - **longitude2**: The longitude of the second rectangle coordinate.\n - **longitude1**: The longitude of the first rectangle coordinate.\n - **limit**: The maximal amount of documents to return. The *skip* is\n applied before the *limit* restriction. The default is 100. (optional)\n - **collection**: The name of the collection to query.\n - **geo**: If given, the identifier of the geo-index to use. (optional)\n\n\n\n\n\nThis will find all documents within the specified rectangle (determined by\nthe given coordinates (*latitude1*, *longitude1*, *latitude2*, *longitude2*). \n\nIn order to use the *within-rectangle* query, a geo index must be defined for\nthe collection. This index also defines which attribute holds the\ncoordinates for the document. If you have more than one geo-spatial index,\nyou can use the *geo* field to select a particular index.\n\nReturns a cursor containing the result, see [HTTP Cursor](../AqlQueryCursor/README.md) for details.\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nAll endpoints for Simple Queries are deprecated from version 3.4.0 on.\nThey are superseded by AQL queries.\n\n\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/within-rectangle <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"latitude1\" : 0, \n
\"longitude1\" : 0, \n
\"latitude2\" : 0.2, \n
\"longitude2\" : 0.2, \n
\"skip\" : 1, \n
\"limit\" : 2 \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : [ \n
{ \n
\"_key\" : \"105956\", \n
\"_id\" : \"products/105956\", \n
\"_rev\" : \"_YOn1X3O--J\", \n
\"name\" : \"Name/0.008/\", \n
\"loc\" : [ \n
0.008, \n
0 \n
] \n
}, \n
{ \n
\"_key\" : \"105953\", \n
\"_id\" : \"products/105953\", \n
\"_rev\" : \"_YOn1X3O--H\", \n
\"name\" : \"Name/0.006/\", \n
\"loc\" : [ \n
0.006, \n
0 \n
] \n
} \n
], \n
\"hasMore\" : false, \n
\"count\" : 2, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n",
"parameters": [
{
"in": "body",
@@ -13713,7 +13713,7 @@
},
"/_api/tasks": {
"post": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **params**: The parameters to be passed into command\n - **offset**: Number of seconds initial delay \n - **command**: The JavaScript code to be executed\n - **name**: The name of the task\n - **period**: number of seconds between the executions\n\n\n\n\ncreates a new task with a generated id\n\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nThe task was registered\n\n- **code**: The status code, 200 in this case.\n- **created**: The timestamp when this task was created\n- **database**: the database this task belongs to\n- **period**: this task should run each `period` seconds\n- **command**: the javascript function for this task\n- **error**: *false* in this case\n- **offset**: time offset in seconds from the created timestamp\n- **type**: What type of task is this [ `periodic`, `timed`]\n - periodic are tasks that repeat periodically\n - timed are tasks that execute once at a specific time\n- **id**: A string identifying the task\n\n\n\n\n**Example:**\n \n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/tasks/ <<EOF\n
{ \n
\"name\" : \"SampleTask\", \n
\"command\" : \"(function(params) { require('@arangodb').print(params); })(params)\", \n
\"params\" : { \n
\"foo\" : \"bar\", \n
\"bar\" : \"foo\" \n
}, \n
\"period\" : 2 \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"id\" : \"105960\", \n
\"name\" : \"SampleTask\", \n
\"created\" : 1550241780.1720579, \n
\"type\" : \"periodic\", \n
\"period\" : 2, \n
\"offset\" : 0, \n
\"command\" : \"(function (params) { (function(params) { require('@arangodb').print(params); })(params) } )(params);\", \n
\"database\" : \"_system\" \n
}\n
shell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/tasks/105960\n
\n
\n\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **params**: The parameters to be passed into command\n - **offset**: Number of seconds initial delay \n - **command**: The JavaScript code to be executed\n - **name**: The name of the task\n - **period**: number of seconds between the executions\n\n\n\n\ncreates a new task with a generated id\n\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nThe task was registered\n\n- **code**: The status code, 200 in this case.\n- **created**: The timestamp when this task was created\n- **database**: the database this task belongs to\n- **period**: this task should run each `period` seconds\n- **command**: the javascript function for this task\n- **error**: *false* in this case\n- **offset**: time offset in seconds from the created timestamp\n- **type**: What type of task is this [ `periodic`, `timed`]\n - periodic are tasks that repeat periodically\n - timed are tasks that execute once at a specific time\n- **id**: A string identifying the task\n\n\n\n\n**Example:**\n \n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/tasks/ <<EOF\n
{ \n
\"name\" : \"SampleTask\", \n
\"command\" : \"(function(params) { require('@arangodb').print(params); })(params)\", \n
\"params\" : { \n
\"foo\" : \"bar\", \n
\"bar\" : \"foo\" \n
}, \n
\"period\" : 2 \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"id\" : \"105969\", \n
\"name\" : \"SampleTask\", \n
\"created\" : 1550658791.3249488, \n
\"type\" : \"periodic\", \n
\"period\" : 2, \n
\"offset\" : 0, \n
\"command\" : \"(function (params) { (function(params) { require('@arangodb').print(params); })(params) } )(params);\", \n
\"database\" : \"_system\" \n
}\n
shell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/tasks/105969\n
\n
\n\n\n\n\n",
"parameters": [
{
"in": "body",
@@ -13751,7 +13751,7 @@
},
"/_api/tasks/": {
"get": {
- "description": "\n\nfetches all existing tasks on the server\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nThe list of tasks\n\n[\n - **name**: The fully qualified name of the user function\n - **created**: The timestamp when this task was created\n - **database**: the database this task belongs to\n - **period**: this task should run each `period` seconds\n - **command**: the javascript function for this task\n - **offset**: time offset in seconds from the created timestamp\n - **type**: What type of task is this [ `periodic`, `timed`]\n - periodic are tasks that repeat periodically\n - timed are tasks that execute once at a specific time\n - **id**: A string identifying the task\n]\n\n\n\n\n**Example:**\n Fetching all tasks\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/tasks\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
[ \n
{ \n
\"id\" : \"55\", \n
\"name\" : \"user-defined task\", \n
\"created\" : 1550241755.3885667, \n
\"type\" : \"periodic\", \n
\"period\" : 1, \n
\"offset\" : 0.000001, \n
\"command\" : \"(function (params) { (function () {\\n require('@arangodb/foxx/queues/manager').manage();\\n })(params) } )(params);\", \n
\"database\" : \"_system\" \n
} \n
]\n
\n\n\n\n\n",
+ "description": "\n\nfetches all existing tasks on the server\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nThe list of tasks\n\n[\n - **name**: The fully qualified name of the user function\n - **created**: The timestamp when this task was created\n - **database**: the database this task belongs to\n - **period**: this task should run each `period` seconds\n - **command**: the javascript function for this task\n - **offset**: time offset in seconds from the created timestamp\n - **type**: What type of task is this [ `periodic`, `timed`]\n - periodic are tasks that repeat periodically\n - timed are tasks that execute once at a specific time\n - **id**: A string identifying the task\n]\n\n\n\n\n**Example:**\n Fetching all tasks\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/tasks\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
[ \n
{ \n
\"id\" : \"55\", \n
\"name\" : \"user-defined task\", \n
\"created\" : 1550658763.4988394, \n
\"type\" : \"periodic\", \n
\"period\" : 1, \n
\"offset\" : 0.000001, \n
\"command\" : \"(function (params) { (function () {\\n require('@arangodb/foxx/queues/manager').manage();\\n })(params) } )(params);\", \n
\"database\" : \"_system\" \n
} \n
]\n
\n\n\n\n\n",
"parameters": [],
"produces": [
"application/json"
@@ -13815,7 +13815,7 @@
"x-hints": ""
},
"get": {
- "description": "\n\nfetches one existing task on the server specified by *id*\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nThe requested task\n\n- **name**: The fully qualified name of the user function\n- **created**: The timestamp when this task was created\n- **database**: the database this task belongs to\n- **period**: this task should run each `period` seconds\n- **command**: the javascript function for this task\n- **offset**: time offset in seconds from the created timestamp\n- **type**: What type of task is this [ `periodic`, `timed`]\n - periodic are tasks that repeat periodically\n - timed are tasks that execute once at a specific time\n- **id**: A string identifying the task\n\n\n\n\n**Example:**\n Fetching a single task by its id\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/tasks <<EOF\n
{\"id\":\"testTask\",\"command\":\"console.log('Hello from task!');\",\"offset\":10000}\n
EOF\n
\n
shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/tasks/testTask\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"id\" : \"testTask\", \n
\"name\" : \"user-defined task\", \n
\"created\" : 1550241780.1837342, \n
\"type\" : \"timed\", \n
\"offset\" : 10000, \n
\"command\" : \"(function (params) { console.log('Hello from task!'); } )(params);\", \n
\"database\" : \"_system\" \n
}\n
\n\n\n\n\n**Example:**\n Trying to fetch a non-existing task\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/tasks/non-existing-task\n
\n
HTTP/1.1 Not Found\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"task not found\", \n
\"code\" : 404, \n
\"errorNum\" : 1852 \n
}\n
\n\n\n\n\n",
+ "description": "\n\nfetches one existing task on the server specified by *id*\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nThe requested task\n\n- **name**: The fully qualified name of the user function\n- **created**: The timestamp when this task was created\n- **database**: the database this task belongs to\n- **period**: this task should run each `period` seconds\n- **command**: the javascript function for this task\n- **offset**: time offset in seconds from the created timestamp\n- **type**: What type of task is this [ `periodic`, `timed`]\n - periodic are tasks that repeat periodically\n - timed are tasks that execute once at a specific time\n- **id**: A string identifying the task\n\n\n\n\n**Example:**\n Fetching a single task by its id\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/tasks <<EOF\n
{\"id\":\"testTask\",\"command\":\"console.log('Hello from task!');\",\"offset\":10000}\n
EOF\n
\n
shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/tasks/testTask\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"id\" : \"testTask\", \n
\"name\" : \"user-defined task\", \n
\"created\" : 1550658791.3349102, \n
\"type\" : \"timed\", \n
\"offset\" : 10000, \n
\"command\" : \"(function (params) { console.log('Hello from task!'); } )(params);\", \n
\"database\" : \"_system\" \n
}\n
\n\n\n\n\n**Example:**\n Trying to fetch a non-existing task\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/tasks/non-existing-task\n
\n
HTTP/1.1 Not Found\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"task not found\", \n
\"code\" : 404, \n
\"errorNum\" : 1852 \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "The id of the task to fetch.\n\n",
@@ -13847,7 +13847,7 @@
"x-hints": ""
},
"put": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **params**: The parameters to be passed into command\n - **offset**: Number of seconds initial delay\n - **command**: The JavaScript code to be executed\n - **name**: The name of the task\n - **period**: number of seconds between the executions\n\n\n\n\nregisters a new task with the specified id\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/tasks/sampleTask <<EOF\n
{ \n
\"id\" : \"SampleTask\", \n
\"name\" : \"SampleTask\", \n
\"command\" : \"(function(params) { require('@arangodb').print(params); })(params)\", \n
\"params\" : { \n
\"foo\" : \"bar\", \n
\"bar\" : \"foo\" \n
}, \n
\"period\" : 2 \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"id\" : \"sampleTask\", \n
\"name\" : \"SampleTask\", \n
\"created\" : 1550241780.1868074, \n
\"type\" : \"periodic\", \n
\"period\" : 2, \n
\"offset\" : 0, \n
\"command\" : \"(function (params) { (function(params) { require('@arangodb').print(params); })(params) } )(params);\", \n
\"database\" : \"_system\" \n
}\n
\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **params**: The parameters to be passed into command\n - **offset**: Number of seconds initial delay\n - **command**: The JavaScript code to be executed\n - **name**: The name of the task\n - **period**: number of seconds between the executions\n\n\n\n\nregisters a new task with the specified id\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/tasks/sampleTask <<EOF\n
{ \n
\"id\" : \"SampleTask\", \n
\"name\" : \"SampleTask\", \n
\"command\" : \"(function(params) { require('@arangodb').print(params); })(params)\", \n
\"params\" : { \n
\"foo\" : \"bar\", \n
\"bar\" : \"foo\" \n
}, \n
\"period\" : 2 \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"id\" : \"sampleTask\", \n
\"name\" : \"SampleTask\", \n
\"created\" : 1550658791.336974, \n
\"type\" : \"periodic\", \n
\"period\" : 2, \n
\"offset\" : 0, \n
\"command\" : \"(function (params) { (function(params) { require('@arangodb').print(params); })(params) } )(params);\", \n
\"database\" : \"_system\" \n
}\n
\n\n\n\n",
"parameters": [
{
"description": "The id of the task to create\n\n",
@@ -13883,7 +13883,7 @@
},
"/_api/transaction": {
"post": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **maxTransactionSize**: Transaction size limit in bytes. Honored by the RocksDB storage engine only.\n - **lockTimeout**: an optional numeric value that can be used to set a\n timeout for waiting on collection locks. If not specified, a default\n value will be used. Setting *lockTimeout* to *0* will make ArangoDB\n not time out waiting for a lock.\n - **waitForSync**: an optional boolean flag that, if set, will force the\n transaction to write all data to disk before returning.\n - **params**: optional arguments passed to *action*.\n - **action**: the actual transaction operations to be executed, in the\n form of stringified JavaScript code. The code will be executed on server\n side, with late binding. It is thus critical that the code specified in\n *action* properly sets up all the variables it needs.\n If the code specified in *action* ends with a return statement, the\n value returned will also be returned by the REST API in the *result*\n attribute if the transaction committed successfully.\n - **collections**: *collections* must be a JSON object that can have one or all sub-attributes\n *read*, *write* or *exclusive*, each being an array of collection names or a\n single collection name as string. Collections that will be written to in the\n transaction must be declared with the *write* or *exclusive* attribute or it\n will fail, whereas non-declared collections from which is solely read will be\n added lazily. The optional sub-attribute *allowImplicit* can be set to *false*\n to let transactions fail in case of undeclared collections for reading.\n Collections for reading should be fully declared if possible, to avoid\n deadlocks.\n See [locking and isolation](../../Manual/Transactions/LockingAndIsolation.html)\n for more information.\n\n\n\n\nThe transaction description must be passed in the body of the POST request.\n\nIf the transaction is fully executed and committed on the server,\n*HTTP 200* will be returned. Additionally, the return value of the\ncode defined in *action* will be returned in the *result* attribute.\n\nFor successfully committed transactions, the returned JSON object has the\nfollowing properties:\n\n- *error*: boolean flag to indicate if an error occurred (*false*\n in this case)\n\n- *code*: the HTTP status code\n\n- *result*: the return value of the transaction\n\nIf the transaction specification is either missing or malformed, the server\nwill respond with *HTTP 400*.\n\nThe body of the response will then contain a JSON object with additional error\ndetails. The object has the following attributes:\n\n- *error*: boolean flag to indicate that an error occurred (*true* in this case)\n\n- *code*: the HTTP status code\n\n- *errorNum*: the server error number\n\n- *errorMessage*: a descriptive error message\n\nIf a transaction fails to commit, either by an exception thrown in the\n*action* code, or by an internal error, the server will respond with\nan error.\nAny other errors will be returned with any of the return codes\n*HTTP 400*, *HTTP 409*, or *HTTP 500*.\n\n\n\n\n**Example:**\n Executing a transaction on a single collection\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/transaction <<EOF\n
{ \n
\"collections\" : { \n
\"write\" : \"products\" \n
}, \n
\"action\" : \"function () { var db = require('@arangodb').db; db.products.save({}); return db.products.count(); }\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"result\" : 1 \n
}\n
\n\n\n\n\n**Example:**\n Executing a transaction using multiple collections\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/transaction <<EOF\n
{ \n
\"collections\" : { \n
\"write\" : [ \n
\"products\", \n
\"materials\" \n
] \n
}, \n
\"action\" : \"function () {var db = require('@arangodb').db;db.products.save({});db.materials.save({});return 'worked!';}\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"result\" : \"worked!\" \n
}\n
\n\n\n\n\n**Example:**\n Aborting a transaction due to an internal error\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/transaction <<EOF\n
{ \n
\"collections\" : { \n
\"write\" : \"products\" \n
}, \n
\"action\" : \"function () {var db = require('@arangodb').db;db.products.save({ _key: 'abc'});db.products.save({ _key: 'abc'});}\" \n
}\n
EOF\n
\n
HTTP/1.1 Conflict\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"unique constraint violated - in index 0 of type primary over '_key'; conflicting key: abc\", \n
\"code\" : 409, \n
\"errorNum\" : 1210 \n
}\n
\n\n\n\n\n**Example:**\n Aborting a transaction by explicitly throwing an exception\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/transaction <<EOF\n
{ \n
\"collections\" : { \n
\"read\" : \"products\" \n
}, \n
\"action\" : \"function () { throw 'doh!'; }\" \n
}\n
EOF\n
\n
HTTP/1.1 Internal Server Error\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"doh!\", \n
\"code\" : 500, \n
\"errorNum\" : 1650 \n
}\n
\n\n\n\n\n**Example:**\n Referring to a non-existing collection\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/transaction <<EOF\n
{ \n
\"collections\" : { \n
\"read\" : \"products\" \n
}, \n
\"action\" : \"function () { return true; }\" \n
}\n
EOF\n
\n
HTTP/1.1 Not Found\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"collection or view not found: products\", \n
\"code\" : 404, \n
\"errorNum\" : 1203 \n
}\n
\n\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **maxTransactionSize**: Transaction size limit in bytes. Honored by the RocksDB storage engine only.\n - **lockTimeout**: an optional numeric value that can be used to set a\n timeout for waiting on collection locks. If not specified, a default\n value will be used. Setting *lockTimeout* to *0* will make ArangoDB\n not time out waiting for a lock.\n - **waitForSync**: an optional boolean flag that, if set, will force the\n transaction to write all data to disk before returning.\n - **params**: optional arguments passed to *action*.\n - **action**: the actual transaction operations to be executed, in the\n form of stringified JavaScript code. The code will be executed on server\n side, with late binding. It is thus critical that the code specified in\n *action* properly sets up all the variables it needs.\n If the code specified in *action* ends with a return statement, the\n value returned will also be returned by the REST API in the *result*\n attribute if the transaction committed successfully.\n - **collections**: *collections* must be a JSON object that can have one or all sub-attributes\n *read*, *write* or *exclusive*, each being an array of collection names or a\n single collection name as string. Collections that will be written to in the\n transaction must be declared with the *write* or *exclusive* attribute or it\n will fail, whereas non-declared collections from which is solely read will be\n added lazily. The optional sub-attribute *allowImplicit* can be set to *false*\n to let transactions fail in case of undeclared collections for reading.\n Collections for reading should be fully declared if possible, to avoid\n deadlocks.\n See [locking and isolation](../../Manual/Transactions/LockingAndIsolation.html)\n for more information.\n\n\n\n\nThe transaction description must be passed in the body of the POST request.\n\nIf the transaction is fully executed and committed on the server,\n*HTTP 200* will be returned. Additionally, the return value of the\ncode defined in *action* will be returned in the *result* attribute.\n\nFor successfully committed transactions, the returned JSON object has the\nfollowing properties:\n\n- *error*: boolean flag to indicate if an error occurred (*false*\n in this case)\n\n- *code*: the HTTP status code\n\n- *result*: the return value of the transaction\n\nIf the transaction specification is either missing or malformed, the server\nwill respond with *HTTP 400*.\n\nThe body of the response will then contain a JSON object with additional error\ndetails. The object has the following attributes:\n\n- *error*: boolean flag to indicate that an error occurred (*true* in this case)\n\n- *code*: the HTTP status code\n\n- *errorNum*: the server error number\n\n- *errorMessage*: a descriptive error message\n\nIf a transaction fails to commit, either by an exception thrown in the\n*action* code, or by an internal error, the server will respond with\nan error.\nAny other errors will be returned with any of the return codes\n*HTTP 400*, *HTTP 409*, or *HTTP 500*.\n\n\n\n\n**Example:**\n Executing a transaction on a single collection\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/transaction <<EOF\n
{ \n
\"collections\" : { \n
\"write\" : \"products\" \n
}, \n
\"action\" : \"function () { var db = require('@arangodb').db; db.products.save({}); return db.products.count(); }\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"result\" : 1 \n
}\n
\n\n\n\n\n**Example:**\n Executing a transaction using multiple collections\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/transaction <<EOF\n
{ \n
\"collections\" : { \n
\"write\" : [ \n
\"products\", \n
\"materials\" \n
] \n
}, \n
\"action\" : \"function () {var db = require('@arangodb').db;db.products.save({});db.materials.save({});return 'worked!';}\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"result\" : \"worked!\" \n
}\n
\n\n\n\n\n**Example:**\n Aborting a transaction due to an internal error\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/transaction <<EOF\n
{ \n
\"collections\" : { \n
\"write\" : \"products\" \n
}, \n
\"action\" : \"function () {var db = require('@arangodb').db;db.products.save({ _key: 'abc'});db.products.save({ _key: 'abc'});}\" \n
}\n
EOF\n
\n
HTTP/1.1 Conflict\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \" - in index 0 of type primary over '_key'; conflicting key: abc\", \n
\"code\" : 409, \n
\"errorNum\" : 1210 \n
}\n
\n\n\n\n\n**Example:**\n Aborting a transaction by explicitly throwing an exception\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/transaction <<EOF\n
{ \n
\"collections\" : { \n
\"read\" : \"products\" \n
}, \n
\"action\" : \"function () { throw 'doh!'; }\" \n
}\n
EOF\n
\n
HTTP/1.1 Internal Server Error\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"doh!\", \n
\"code\" : 500, \n
\"errorNum\" : 1650 \n
}\n
\n\n\n\n\n**Example:**\n Referring to a non-existing collection\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/transaction <<EOF\n
{ \n
\"collections\" : { \n
\"read\" : \"products\" \n
}, \n
\"action\" : \"function () { return true; }\" \n
}\n
EOF\n
\n
HTTP/1.1 Not Found\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"errorMessage\" : \"collection or view not found: products\", \n
\"code\" : 404, \n
\"errorNum\" : 1203 \n
}\n
\n\n\n\n\n",
"parameters": [
{
"in": "body",
@@ -13920,7 +13920,7 @@
},
"/_api/traversal": {
"post": {
- "description": "\n\nStarts a traversal starting from a given vertex and following.\nedges contained in a given edgeCollection. The request must\ncontain the following attributes.\n\n\n**A JSON object with these properties is required:**\n\n - **sort**: body (JavaScript) code of a custom comparison function\n for the edges. The signature of this function is\n *(l, r) -> integer* (where l and r are edges) and must\n return -1 if l is smaller than, +1 if l is greater than,\n and 0 if l and r are equal. The reason for this is the\n following: The order of edges returned for a certain\n vertex is undefined. This is because there is no natural\n order of edges for a vertex with multiple connected edges.\n To explicitly define the order in which edges on the\n vertex are followed, you can specify an edge comparator\n function with this attribute. Note that the value here has\n to be a string to conform to the JSON standard, which in\n turn is parsed as function body on the server side. Furthermore\n note that this attribute is only used for the standard\n expanders. If you use your custom expander you have to\n do the sorting yourself within the expander code.\n - **direction**: direction for traversal\n - *if set*, must be either *\"outbound\"*, *\"inbound\"*, or *\"any\"*\n - *if not set*, the *expander* attribute must be specified\n - **minDepth**: ANDed with any existing filters):\n visits only nodes in at least the given depth\n - **startVertex**: id of the startVertex, e.g. *\"users/foo\"*.\n - **visitor**: body (JavaScript) code of custom visitor function\n function signature: *(config, result, vertex, path, connected) -> void*\n The visitor function can do anything, but its return value is ignored. To\n populate a result, use the *result* variable by reference. Note that the\n *connected* argument is only populated when the *order* attribute is set\n to *\"preorder-expander\"*.\n - **itemOrder**: item iteration order can be *\"forward\"* or *\"backward\"*\n - **strategy**: traversal strategy can be *\"depthfirst\"* or *\"breadthfirst\"*\n - **filter**: default is to include all nodes:\n body (JavaScript code) of custom filter function\n function signature: *(config, vertex, path) -> mixed*\n can return four different string values:\n - *\"exclude\"* -> this vertex will not be visited.\n - *\"prune\"* -> the edges of this vertex will not be followed.\n - *\"\"* or *undefined* -> visit the vertex and follow its edges.\n - *Array* -> containing any combination of the above.\n If there is at least one *\"exclude\"* or *\"prune\"* respectively\n is contained, it's effect will occur.\n - **init**: body (JavaScript) code of custom result initialization function\n function signature: *(config, result) -> void*\n initialize any values in result with what is required\n - **maxIterations**: Maximum number of iterations in each traversal. This number can be\n set to prevent endless loops in traversal of cyclic graphs. When a traversal performs\n as many iterations as the *maxIterations* value, the traversal will abort with an\n error. If *maxIterations* is not set, a server-defined value may be used.\n - **maxDepth**: ANDed with any existing filters visits only nodes in at most the given depth\n - **uniqueness**: specifies uniqueness for vertices and edges visited.\n If set, must be an object like this:\n `\"uniqueness\": {\"vertices\": \"none\"|\"global\"|\"path\", \"edges\": \"none\"|\"global\"|\"path\"}`\n - **order**: traversal order can be *\"preorder\"*, *\"postorder\"* or *\"preorder-expander\"*\n - **graphName**: name of the graph that contains the edges.\n Either *edgeCollection* or *graphName* has to be given.\n In case both values are set the *graphName* is preferred.\n - **expander**: body (JavaScript) code of custom expander function\n *must* be set if *direction* attribute is **not** set\n function signature: *(config, vertex, path) -> array*\n expander must return an array of the connections for *vertex*\n each connection is an object with the attributes *edge* and *vertex*\n - **edgeCollection**: name of the collection that contains the edges.\n\n\n\n\n\nIf the Traversal is successfully executed *HTTP 200* will be returned.\nAdditionally the *result* object will be returned by the traversal.\n\nFor successful traversals, the returned JSON object has the\nfollowing properties:\n\n- *error*: boolean flag to indicate if an error occurred (*false*\n in this case)\n\n- *code*: the HTTP status code\n\n- *result*: the return value of the traversal\n\nIf the traversal specification is either missing or malformed, the server\nwill respond with *HTTP 400*.\n\nThe body of the response will then contain a JSON object with additional error\ndetails. The object has the following attributes:\n\n- *error*: boolean flag to indicate that an error occurred (*true* in this case)\n\n- *code*: the HTTP status code\n\n- *errorNum*: the server error number\n\n- *errorMessage*: a descriptive error message\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nIt is considered as deprecated from version 3.4.0 on.\nIt is superseded by AQL graph traversal.\n\n\n\n\n\n\n**Example:**\n In the following examples the underlying graph will contain five persons\n*Alice*, *Bob*, *Charlie*, *Dave* and *Eve*.\nWe will have the following directed relations:\n\n- *Alice* knows *Bob*\n- *Bob* knows *Charlie*\n- *Bob* knows *Dave*\n- *Eve* knows *Alice*\n- *Eve* knows *Bob*\n\nThe starting vertex will always be Alice.\n\nFollow only outbound edges\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"outbound\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS62--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS66--_\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaS66--B\", \n
\"name\" : \"Charlie\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaS66--D\", \n
\"name\" : \"Dave\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS62--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106906\", \n
\"_id\" : \"knows/106906\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS66--H\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS62--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS66--_\", \n
\"name\" : \"Bob\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106906\", \n
\"_id\" : \"knows/106906\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS66--H\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106910\", \n
\"_id\" : \"knows/106910\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaS7---_\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS62--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS66--_\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaS66--B\", \n
\"name\" : \"Charlie\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106906\", \n
\"_id\" : \"knows/106906\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS66--H\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106913\", \n
\"_id\" : \"knows/106913\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaS7---B\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS62--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS66--_\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaS66--D\", \n
\"name\" : \"Dave\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Follow only inbound edges\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"inbound\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSyG--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSyK--F\", \n
\"name\" : \"Eve\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSyG--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106604\", \n
\"_id\" : \"knows/106604\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSyO--B\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSyG--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSyK--F\", \n
\"name\" : \"Eve\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Follow any direction of edges\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"any\", \n
\"uniqueness\" : { \n
\"vertices\" : \"none\", \n
\"edges\" : \"global\" \n
} \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSim--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSim--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaSim--D\", \n
\"name\" : \"Charlie\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaSim--F\", \n
\"name\" : \"Dave\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSim--H\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSim--_\", \n
\"name\" : \"Alice\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSim--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106087\", \n
\"_id\" : \"knows/106087\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSiq--_\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSim--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSim--B\", \n
\"name\" : \"Bob\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106087\", \n
\"_id\" : \"knows/106087\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSiq--_\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106091\", \n
\"_id\" : \"knows/106091\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaSiq--B\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSim--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSim--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaSim--D\", \n
\"name\" : \"Charlie\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106087\", \n
\"_id\" : \"knows/106087\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSiq--_\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106094\", \n
\"_id\" : \"knows/106094\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaSiq--D\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSim--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSim--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaSim--F\", \n
\"name\" : \"Dave\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106087\", \n
\"_id\" : \"knows/106087\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSiq--_\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106100\", \n
\"_id\" : \"knows/106100\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSiq--H\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSim--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSim--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSim--H\", \n
\"name\" : \"Eve\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106087\", \n
\"_id\" : \"knows/106087\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSiq--_\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106100\", \n
\"_id\" : \"knows/106100\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSiq--H\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106097\", \n
\"_id\" : \"knows/106097\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSiq--F\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSim--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSim--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSim--H\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSim--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Excluding *Charlie* and *Bob*\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"outbound\", \n
\"filter\" : \"if (vertex.name === \\\"Bob\\\" || vertex.name === \\\"Charlie\\\") { return \\\"exclude\\\";}return;\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaStu--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaStu--F\", \n
\"name\" : \"Dave\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaStu--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106453\", \n
\"_id\" : \"knows/106453\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSty--_\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106460\", \n
\"_id\" : \"knows/106460\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaSty--D\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaStu--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaStu--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaStu--F\", \n
\"name\" : \"Dave\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Do not follow edges from *Bob*\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"outbound\", \n
\"filter\" : \"if (vertex.name === \\\"Bob\\\") {return \\\"prune\\\";}return;\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSv6--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSv6--B\", \n
\"name\" : \"Bob\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSv6--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106526\", \n
\"_id\" : \"knows/106526\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSw---_\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSv6--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSv6--B\", \n
\"name\" : \"Bob\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Visit only nodes in a depth of at least 2\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"outbound\", \n
\"minDepth\" : 2 \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaS4m--D\", \n
\"name\" : \"Charlie\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaS4m--F\", \n
\"name\" : \"Dave\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106833\", \n
\"_id\" : \"knows/106833\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS4q--B\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106837\", \n
\"_id\" : \"knows/106837\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaS4q--D\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS4m--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS4m--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaS4m--D\", \n
\"name\" : \"Charlie\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106833\", \n
\"_id\" : \"knows/106833\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS4q--B\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106840\", \n
\"_id\" : \"knows/106840\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaS4q--F\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS4m--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS4m--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaS4m--F\", \n
\"name\" : \"Dave\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Visit only nodes in a depth of at most 1\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"outbound\", \n
\"maxDepth\" : 1 \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS0S--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS0S--B\", \n
\"name\" : \"Bob\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS0S--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106663\", \n
\"_id\" : \"knows/106663\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS0W--F\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS0S--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS0S--B\", \n
\"name\" : \"Bob\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Using a visitor function to return vertex ids only\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"outbound\", \n
\"visitor\" : \"result.visited.vertices.push(vertex._id);\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
\"persons/alice\", \n
\"persons/bob\", \n
\"persons/charlie\", \n
\"persons/dave\" \n
], \n
\"paths\" : [ ] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Count all visited nodes and return a list of nodes only\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"outbound\", \n
\"init\" : \"result.visited = 0; result.myVertices = [ ];\", \n
\"visitor\" : \"result.visited++; result.myVertices.push(vertex);\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : 4, \n
\"myVertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaTAC--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaTAG--_\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaTAG--B\", \n
\"name\" : \"Charlie\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaTAG--D\", \n
\"name\" : \"Dave\" \n
} \n
] \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Expand only inbound edges of *Alice* and outbound edges of *Eve*\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"expander\" : \"var connections = [ ];if (vertex.name === \\\"Alice\\\") {config.datasource.getInEdges(vertex).forEach(function (e) {connections.push({ vertex: require(\\\"internal\\\").db._document(e._from), edge: e});});}if (vertex.name === \\\"Eve\\\") {config.datasource.getOutEdges(vertex).forEach(function (e) {connections.push({vertex: require(\\\"internal\\\").db._document(e._to), edge: e});});}return connections;\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaTCK--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaTCO--F\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaTCO--_\", \n
\"name\" : \"Bob\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaTCK--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"107161\", \n
\"_id\" : \"knows/107161\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaTCS--D\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaTCK--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaTCO--F\", \n
\"name\" : \"Eve\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"107161\", \n
\"_id\" : \"knows/107161\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaTCS--D\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"107164\", \n
\"_id\" : \"knows/107164\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaTCS--F\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaTCK--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaTCO--F\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaTCO--_\", \n
\"name\" : \"Bob\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Follow the *depthfirst* strategy\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"any\", \n
\"strategy\" : \"depthfirst\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoS--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoS--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaSoW--_\", \n
\"name\" : \"Charlie\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaSoW--B\", \n
\"name\" : \"Dave\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSoW--D\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoS--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSoW--D\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoS--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaSoW--_\", \n
\"name\" : \"Charlie\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaSoW--B\", \n
\"name\" : \"Dave\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoS--_\", \n
\"name\" : \"Alice\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoS--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106270\", \n
\"_id\" : \"knows/106270\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoW--F\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoS--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoS--B\", \n
\"name\" : \"Bob\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106270\", \n
\"_id\" : \"knows/106270\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoW--F\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106274\", \n
\"_id\" : \"knows/106274\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaSoW--H\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoS--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoS--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaSoW--_\", \n
\"name\" : \"Charlie\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106270\", \n
\"_id\" : \"knows/106270\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoW--F\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106277\", \n
\"_id\" : \"knows/106277\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaSoW--J\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoS--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoS--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaSoW--B\", \n
\"name\" : \"Dave\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106270\", \n
\"_id\" : \"knows/106270\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoW--F\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106283\", \n
\"_id\" : \"knows/106283\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoa--_\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoS--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoS--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSoW--D\", \n
\"name\" : \"Eve\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106270\", \n
\"_id\" : \"knows/106270\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoW--F\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106283\", \n
\"_id\" : \"knows/106283\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoa--_\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106280\", \n
\"_id\" : \"knows/106280\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoW--L\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoS--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoS--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSoW--D\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoS--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106280\", \n
\"_id\" : \"knows/106280\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoW--L\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoS--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSoW--D\", \n
\"name\" : \"Eve\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106280\", \n
\"_id\" : \"knows/106280\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoW--L\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106283\", \n
\"_id\" : \"knows/106283\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoa--_\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoS--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSoW--D\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoS--B\", \n
\"name\" : \"Bob\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106280\", \n
\"_id\" : \"knows/106280\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoW--L\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106283\", \n
\"_id\" : \"knows/106283\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoa--_\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106274\", \n
\"_id\" : \"knows/106274\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaSoW--H\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoS--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSoW--D\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoS--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaSoW--_\", \n
\"name\" : \"Charlie\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106280\", \n
\"_id\" : \"knows/106280\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoW--L\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106283\", \n
\"_id\" : \"knows/106283\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoa--_\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106277\", \n
\"_id\" : \"knows/106277\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaSoW--J\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoS--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSoW--D\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoS--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaSoW--B\", \n
\"name\" : \"Dave\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106280\", \n
\"_id\" : \"knows/106280\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoW--L\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106283\", \n
\"_id\" : \"knows/106283\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoa--_\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106270\", \n
\"_id\" : \"knows/106270\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoW--F\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoS--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSoW--D\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSoS--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSoS--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Using *postorder* ordering\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"any\", \n
\"order\" : \"postorder\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaS9G--D\", \n
\"name\" : \"Charlie\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaS9G--F\", \n
\"name\" : \"Dave\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9G--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaS9K--_\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9G--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaS9G--D\", \n
\"name\" : \"Charlie\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaS9G--F\", \n
\"name\" : \"Dave\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9G--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9G--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaS9K--_\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9G--_\", \n
\"name\" : \"Alice\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106979\", \n
\"_id\" : \"knows/106979\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9K--B\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106983\", \n
\"_id\" : \"knows/106983\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaS9K--D\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9G--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9G--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaS9G--D\", \n
\"name\" : \"Charlie\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106979\", \n
\"_id\" : \"knows/106979\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9K--B\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106986\", \n
\"_id\" : \"knows/106986\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaS9K--F\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9G--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9G--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaS9G--F\", \n
\"name\" : \"Dave\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106979\", \n
\"_id\" : \"knows/106979\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9K--B\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106992\", \n
\"_id\" : \"knows/106992\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9O--_\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106989\", \n
\"_id\" : \"knows/106989\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9K--H\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9G--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9G--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaS9K--_\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9G--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106979\", \n
\"_id\" : \"knows/106979\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9K--B\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106992\", \n
\"_id\" : \"knows/106992\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9O--_\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9G--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9G--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaS9K--_\", \n
\"name\" : \"Eve\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106979\", \n
\"_id\" : \"knows/106979\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9K--B\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9G--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9G--B\", \n
\"name\" : \"Bob\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106989\", \n
\"_id\" : \"knows/106989\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9K--H\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106992\", \n
\"_id\" : \"knows/106992\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9O--_\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106983\", \n
\"_id\" : \"knows/106983\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaS9K--D\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9G--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaS9K--_\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9G--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaS9G--D\", \n
\"name\" : \"Charlie\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106989\", \n
\"_id\" : \"knows/106989\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9K--H\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106992\", \n
\"_id\" : \"knows/106992\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9O--_\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106986\", \n
\"_id\" : \"knows/106986\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaS9K--F\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9G--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaS9K--_\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9G--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaS9G--F\", \n
\"name\" : \"Dave\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106989\", \n
\"_id\" : \"knows/106989\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9K--H\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106992\", \n
\"_id\" : \"knows/106992\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9O--_\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106979\", \n
\"_id\" : \"knows/106979\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9K--B\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9G--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaS9K--_\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9G--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9G--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106989\", \n
\"_id\" : \"knows/106989\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9K--H\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106992\", \n
\"_id\" : \"knows/106992\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9O--_\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9G--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaS9K--_\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaS9G--B\", \n
\"name\" : \"Bob\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106989\", \n
\"_id\" : \"knows/106989\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9K--H\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9G--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaS9K--_\", \n
\"name\" : \"Eve\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaS9G--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Using *backward* item-ordering:\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"any\", \n
\"itemOrder\" : \"backward\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSlW--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSla--B\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSlW--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSlW--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaSla--_\", \n
\"name\" : \"Dave\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaSlW--D\", \n
\"name\" : \"Charlie\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSlW--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSla--B\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSlW--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaSla--_\", \n
\"name\" : \"Dave\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaSlW--D\", \n
\"name\" : \"Charlie\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSlW--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106181\", \n
\"_id\" : \"knows/106181\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSla--J\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSlW--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSla--B\", \n
\"name\" : \"Eve\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106181\", \n
\"_id\" : \"knows/106181\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSla--J\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106184\", \n
\"_id\" : \"knows/106184\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSla--L\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSlW--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSla--B\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSlW--B\", \n
\"name\" : \"Bob\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106181\", \n
\"_id\" : \"knows/106181\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSla--J\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106184\", \n
\"_id\" : \"knows/106184\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSla--L\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106171\", \n
\"_id\" : \"knows/106171\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSla--D\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSlW--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSla--B\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSlW--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSlW--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106181\", \n
\"_id\" : \"knows/106181\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSla--J\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106184\", \n
\"_id\" : \"knows/106184\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSla--L\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106178\", \n
\"_id\" : \"knows/106178\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaSla--H\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSlW--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSla--B\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSlW--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaSla--_\", \n
\"name\" : \"Dave\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106181\", \n
\"_id\" : \"knows/106181\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSla--J\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106184\", \n
\"_id\" : \"knows/106184\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSla--L\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106175\", \n
\"_id\" : \"knows/106175\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaSla--F\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSlW--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSla--B\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSlW--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaSlW--D\", \n
\"name\" : \"Charlie\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106171\", \n
\"_id\" : \"knows/106171\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSla--D\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSlW--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSlW--B\", \n
\"name\" : \"Bob\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106171\", \n
\"_id\" : \"knows/106171\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSla--D\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106184\", \n
\"_id\" : \"knows/106184\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSla--L\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSlW--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSlW--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSla--B\", \n
\"name\" : \"Eve\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106171\", \n
\"_id\" : \"knows/106171\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSla--D\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106184\", \n
\"_id\" : \"knows/106184\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSla--L\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106181\", \n
\"_id\" : \"knows/106181\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSla--J\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSlW--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSlW--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSla--B\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSlW--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106171\", \n
\"_id\" : \"knows/106171\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSla--D\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106178\", \n
\"_id\" : \"knows/106178\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaSla--H\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSlW--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSlW--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaSla--_\", \n
\"name\" : \"Dave\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106171\", \n
\"_id\" : \"knows/106171\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSla--D\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106175\", \n
\"_id\" : \"knows/106175\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaSla--F\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSlW--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSlW--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaSlW--D\", \n
\"name\" : \"Charlie\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Edges should only be included once globally,\nbut nodes are included every time they are visited\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"any\", \n
\"uniqueness\" : { \n
\"vertices\" : \"none\", \n
\"edges\" : \"global\" \n
} \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSrK--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSrO--_\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaSrO--B\", \n
\"name\" : \"Charlie\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaSrO--D\", \n
\"name\" : \"Dave\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSrO--F\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSrK--_\", \n
\"name\" : \"Alice\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSrK--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106369\", \n
\"_id\" : \"knows/106369\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSrO--H\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSrK--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSrO--_\", \n
\"name\" : \"Bob\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106369\", \n
\"_id\" : \"knows/106369\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSrO--H\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106373\", \n
\"_id\" : \"knows/106373\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaSrO--J\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSrK--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSrO--_\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YNEaSrO--B\", \n
\"name\" : \"Charlie\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106369\", \n
\"_id\" : \"knows/106369\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSrO--H\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106376\", \n
\"_id\" : \"knows/106376\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaSrO--L\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSrK--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSrO--_\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YNEaSrO--D\", \n
\"name\" : \"Dave\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106369\", \n
\"_id\" : \"knows/106369\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSrO--H\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106382\", \n
\"_id\" : \"knows/106382\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSrS--B\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSrK--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSrO--_\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSrO--F\", \n
\"name\" : \"Eve\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106369\", \n
\"_id\" : \"knows/106369\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSrO--H\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106382\", \n
\"_id\" : \"knows/106382\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSrS--B\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106379\", \n
\"_id\" : \"knows/106379\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSrS--_\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSrK--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YNEaSrO--_\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YNEaSrO--F\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YNEaSrK--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n If the underlying graph is cyclic, *maxIterations* should be set\n\nThe underlying graph has two vertices *Alice* and *Bob*.\nWith the directed edges:\n\n- *Alice* knows *Bob*\n- *Bob* knows *Alice*\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"any\", \n
\"uniqueness\" : { \n
\"vertices\" : \"none\", \n
\"edges\" : \"none\" \n
}, \n
\"maxIterations\" : 5 \n
}\n
EOF\n
\n
HTTP/1.1 Internal Server Error\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"code\" : 500, \n
\"errorNum\" : 1909, \n
\"errorMessage\" : \"too many iterations - try increasing the value of 'maxIterations'\" \n
}\n
\n\n\n\n\n\n",
+ "description": "\n\nStarts a traversal starting from a given vertex and following.\nedges contained in a given edgeCollection. The request must\ncontain the following attributes.\n\n\n**A JSON object with these properties is required:**\n\n - **sort**: body (JavaScript) code of a custom comparison function\n for the edges. The signature of this function is\n *(l, r) -> integer* (where l and r are edges) and must\n return -1 if l is smaller than, +1 if l is greater than,\n and 0 if l and r are equal. The reason for this is the\n following: The order of edges returned for a certain\n vertex is undefined. This is because there is no natural\n order of edges for a vertex with multiple connected edges.\n To explicitly define the order in which edges on the\n vertex are followed, you can specify an edge comparator\n function with this attribute. Note that the value here has\n to be a string to conform to the JSON standard, which in\n turn is parsed as function body on the server side. Furthermore\n note that this attribute is only used for the standard\n expanders. If you use your custom expander you have to\n do the sorting yourself within the expander code.\n - **direction**: direction for traversal\n - *if set*, must be either *\"outbound\"*, *\"inbound\"*, or *\"any\"*\n - *if not set*, the *expander* attribute must be specified\n - **minDepth**: ANDed with any existing filters):\n visits only nodes in at least the given depth\n - **startVertex**: id of the startVertex, e.g. *\"users/foo\"*.\n - **visitor**: body (JavaScript) code of custom visitor function\n function signature: *(config, result, vertex, path, connected) -> void*\n The visitor function can do anything, but its return value is ignored. To\n populate a result, use the *result* variable by reference. Note that the\n *connected* argument is only populated when the *order* attribute is set\n to *\"preorder-expander\"*.\n - **itemOrder**: item iteration order can be *\"forward\"* or *\"backward\"*\n - **strategy**: traversal strategy can be *\"depthfirst\"* or *\"breadthfirst\"*\n - **filter**: default is to include all nodes:\n body (JavaScript code) of custom filter function\n function signature: *(config, vertex, path) -> mixed*\n can return four different string values:\n - *\"exclude\"* -> this vertex will not be visited.\n - *\"prune\"* -> the edges of this vertex will not be followed.\n - *\"\"* or *undefined* -> visit the vertex and follow its edges.\n - *Array* -> containing any combination of the above.\n If there is at least one *\"exclude\"* or *\"prune\"* respectively\n is contained, it's effect will occur.\n - **init**: body (JavaScript) code of custom result initialization function\n function signature: *(config, result) -> void*\n initialize any values in result with what is required\n - **maxIterations**: Maximum number of iterations in each traversal. This number can be\n set to prevent endless loops in traversal of cyclic graphs. When a traversal performs\n as many iterations as the *maxIterations* value, the traversal will abort with an\n error. If *maxIterations* is not set, a server-defined value may be used.\n - **maxDepth**: ANDed with any existing filters visits only nodes in at most the given depth\n - **uniqueness**: specifies uniqueness for vertices and edges visited.\n If set, must be an object like this:\n `\"uniqueness\": {\"vertices\": \"none\"|\"global\"|\"path\", \"edges\": \"none\"|\"global\"|\"path\"}`\n - **order**: traversal order can be *\"preorder\"*, *\"postorder\"* or *\"preorder-expander\"*\n - **graphName**: name of the graph that contains the edges.\n Either *edgeCollection* or *graphName* has to be given.\n In case both values are set the *graphName* is preferred.\n - **expander**: body (JavaScript) code of custom expander function\n *must* be set if *direction* attribute is **not** set\n function signature: *(config, vertex, path) -> array*\n expander must return an array of the connections for *vertex*\n each connection is an object with the attributes *edge* and *vertex*\n - **edgeCollection**: name of the collection that contains the edges.\n\n\n\n\n\nIf the Traversal is successfully executed *HTTP 200* will be returned.\nAdditionally the *result* object will be returned by the traversal.\n\nFor successful traversals, the returned JSON object has the\nfollowing properties:\n\n- *error*: boolean flag to indicate if an error occurred (*false*\n in this case)\n\n- *code*: the HTTP status code\n\n- *result*: the return value of the traversal\n\nIf the traversal specification is either missing or malformed, the server\nwill respond with *HTTP 400*.\n\nThe body of the response will then contain a JSON object with additional error\ndetails. The object has the following attributes:\n\n- *error*: boolean flag to indicate that an error occurred (*true* in this case)\n\n- *code*: the HTTP status code\n\n- *errorNum*: the server error number\n\n- *errorMessage*: a descriptive error message\n\n\n\n\n**Warning:** \nThis route should no longer be used.\nIt is considered as deprecated from version 3.4.0 on.\nIt is superseded by AQL graph traversal.\n\n\n\n\n\n\n**Example:**\n In the following examples the underlying graph will contain five persons\n*Alice*, *Bob*, *Charlie*, *Dave* and *Eve*.\nWe will have the following directed relations:\n\n- *Alice* knows *Bob*\n- *Bob* knows *Charlie*\n- *Bob* knows *Dave*\n- *Eve* knows *Alice*\n- *Eve* knows *Bob*\n\nThe starting vertex will always be Alice.\n\nFollow only outbound edges\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"outbound\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YXy--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YXy--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YXy--D\", \n
\"name\" : \"Charlie\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YXy--F\", \n
\"name\" : \"Dave\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YXy--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106915\", \n
\"_id\" : \"knows/106915\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YX2--B\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YXy--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YXy--B\", \n
\"name\" : \"Bob\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106915\", \n
\"_id\" : \"knows/106915\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YX2--B\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106919\", \n
\"_id\" : \"knows/106919\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YX2--D\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YXy--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YXy--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YXy--D\", \n
\"name\" : \"Charlie\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106915\", \n
\"_id\" : \"knows/106915\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YX2--B\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106922\", \n
\"_id\" : \"knows/106922\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YX2--F\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YXy--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YXy--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YXy--F\", \n
\"name\" : \"Dave\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Follow only inbound edges\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"inbound\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YN2--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YN6--D\", \n
\"name\" : \"Eve\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YN2--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106613\", \n
\"_id\" : \"knows/106613\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YN6--L\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YN2--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YN6--D\", \n
\"name\" : \"Eve\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Follow any direction of edges\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"any\", \n
\"uniqueness\" : { \n
\"vertices\" : \"none\", \n
\"edges\" : \"global\" \n
} \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Y_G--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Y_G--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1Y_G--D\", \n
\"name\" : \"Charlie\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1Y_G--F\", \n
\"name\" : \"Dave\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1Y_G--H\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Y_G--_\", \n
\"name\" : \"Alice\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Y_G--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106096\", \n
\"_id\" : \"knows/106096\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Y_K--_\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Y_G--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Y_G--B\", \n
\"name\" : \"Bob\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106096\", \n
\"_id\" : \"knows/106096\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Y_K--_\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106100\", \n
\"_id\" : \"knows/106100\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1Y_K--B\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Y_G--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Y_G--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1Y_G--D\", \n
\"name\" : \"Charlie\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106096\", \n
\"_id\" : \"knows/106096\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Y_K--_\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106103\", \n
\"_id\" : \"knows/106103\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1Y_K--D\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Y_G--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Y_G--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1Y_G--F\", \n
\"name\" : \"Dave\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106096\", \n
\"_id\" : \"knows/106096\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Y_K--_\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106109\", \n
\"_id\" : \"knows/106109\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Y_K--H\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Y_G--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Y_G--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1Y_G--H\", \n
\"name\" : \"Eve\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106096\", \n
\"_id\" : \"knows/106096\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Y_K--_\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106109\", \n
\"_id\" : \"knows/106109\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Y_K--H\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106106\", \n
\"_id\" : \"knows/106106\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Y_K--F\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Y_G--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Y_G--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1Y_G--H\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Y_G--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Excluding *Charlie* and *Bob*\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"outbound\", \n
\"filter\" : \"if (vertex.name === \\\"Bob\\\" || vertex.name === \\\"Charlie\\\") { return \\\"exclude\\\";}return;\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YJi--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YJm--B\", \n
\"name\" : \"Dave\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YJi--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106462\", \n
\"_id\" : \"knows/106462\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YJm--F\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106469\", \n
\"_id\" : \"knows/106469\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YJm--J\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YJi--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YJi--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YJm--B\", \n
\"name\" : \"Dave\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Do not follow edges from *Bob*\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"outbound\", \n
\"filter\" : \"if (vertex.name === \\\"Bob\\\") {return \\\"prune\\\";}return;\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YLu--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YLu--B\", \n
\"name\" : \"Bob\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YLu--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106535\", \n
\"_id\" : \"knows/106535\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YLy--B\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YLu--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YLu--B\", \n
\"name\" : \"Bob\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Visit only nodes in a depth of at least 2\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"outbound\", \n
\"minDepth\" : 2 \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YUO--D\", \n
\"name\" : \"Charlie\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YUO--F\", \n
\"name\" : \"Dave\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106842\", \n
\"_id\" : \"knows/106842\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YUS--B\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106846\", \n
\"_id\" : \"knows/106846\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YUS--D\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YUO--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YUO--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YUO--D\", \n
\"name\" : \"Charlie\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106842\", \n
\"_id\" : \"knows/106842\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YUS--B\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106849\", \n
\"_id\" : \"knows/106849\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YUS--F\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YUO--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YUO--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YUO--F\", \n
\"name\" : \"Dave\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Visit only nodes in a depth of at most 1\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"outbound\", \n
\"maxDepth\" : 1 \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YQ---_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YQ---B\", \n
\"name\" : \"Bob\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YQ---_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106672\", \n
\"_id\" : \"knows/106672\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YQC--_\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YQ---_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YQ---B\", \n
\"name\" : \"Bob\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Using a visitor function to return vertex ids only\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"outbound\", \n
\"visitor\" : \"result.visited.vertices.push(vertex._id);\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
\"persons/alice\", \n
\"persons/bob\", \n
\"persons/charlie\", \n
\"persons/dave\" \n
], \n
\"paths\" : [ ] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Count all visited nodes and return a list of nodes only\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"outbound\", \n
\"init\" : \"result.visited = 0; result.myVertices = [ ];\", \n
\"visitor\" : \"result.visited++; result.myVertices.push(vertex);\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : 4, \n
\"myVertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Yci--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Ycm--_\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1Ycm--B\", \n
\"name\" : \"Charlie\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1Ycm--D\", \n
\"name\" : \"Dave\" \n
} \n
] \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Expand only inbound edges of *Alice* and outbound edges of *Eve*\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"expander\" : \"var connections = [ ];if (vertex.name === \\\"Alice\\\") {config.datasource.getInEdges(vertex).forEach(function (e) {connections.push({ vertex: require(\\\"internal\\\").db._document(e._from), edge: e});});}if (vertex.name === \\\"Eve\\\") {config.datasource.getOutEdges(vertex).forEach(function (e) {connections.push({vertex: require(\\\"internal\\\").db._document(e._to), edge: e});});}return connections;\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Yeq--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1Yeu--B\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Yeq--B\", \n
\"name\" : \"Bob\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Yeq--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"107170\", \n
\"_id\" : \"knows/107170\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Yeu--J\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Yeq--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1Yeu--B\", \n
\"name\" : \"Eve\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"107170\", \n
\"_id\" : \"knows/107170\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Yeu--J\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"107173\", \n
\"_id\" : \"knows/107173\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Yey--_\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Yeq--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1Yeu--B\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Yeq--B\", \n
\"name\" : \"Bob\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Follow the *depthfirst* strategy\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"any\", \n
\"strategy\" : \"depthfirst\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEe--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEe--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YEe--D\", \n
\"name\" : \"Charlie\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YEe--F\", \n
\"name\" : \"Dave\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YEi--_\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEe--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YEi--_\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEe--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YEe--D\", \n
\"name\" : \"Charlie\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YEe--F\", \n
\"name\" : \"Dave\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEe--_\", \n
\"name\" : \"Alice\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEe--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106279\", \n
\"_id\" : \"knows/106279\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEi--B\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEe--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEe--B\", \n
\"name\" : \"Bob\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106279\", \n
\"_id\" : \"knows/106279\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEi--B\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106283\", \n
\"_id\" : \"knows/106283\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YEi--D\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEe--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEe--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YEe--D\", \n
\"name\" : \"Charlie\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106279\", \n
\"_id\" : \"knows/106279\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEi--B\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106286\", \n
\"_id\" : \"knows/106286\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YEi--F\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEe--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEe--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YEe--F\", \n
\"name\" : \"Dave\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106279\", \n
\"_id\" : \"knows/106279\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEi--B\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106292\", \n
\"_id\" : \"knows/106292\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEi--J\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEe--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEe--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YEi--_\", \n
\"name\" : \"Eve\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106279\", \n
\"_id\" : \"knows/106279\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEi--B\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106292\", \n
\"_id\" : \"knows/106292\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEi--J\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106289\", \n
\"_id\" : \"knows/106289\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEi--H\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEe--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEe--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YEi--_\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEe--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106289\", \n
\"_id\" : \"knows/106289\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEi--H\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEe--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YEi--_\", \n
\"name\" : \"Eve\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106289\", \n
\"_id\" : \"knows/106289\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEi--H\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106292\", \n
\"_id\" : \"knows/106292\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEi--J\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEe--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YEi--_\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEe--B\", \n
\"name\" : \"Bob\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106289\", \n
\"_id\" : \"knows/106289\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEi--H\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106292\", \n
\"_id\" : \"knows/106292\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEi--J\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106283\", \n
\"_id\" : \"knows/106283\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YEi--D\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEe--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YEi--_\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEe--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YEe--D\", \n
\"name\" : \"Charlie\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106289\", \n
\"_id\" : \"knows/106289\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEi--H\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106292\", \n
\"_id\" : \"knows/106292\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEi--J\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106286\", \n
\"_id\" : \"knows/106286\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YEi--F\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEe--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YEi--_\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEe--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YEe--F\", \n
\"name\" : \"Dave\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106289\", \n
\"_id\" : \"knows/106289\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEi--H\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106292\", \n
\"_id\" : \"knows/106292\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEi--J\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106279\", \n
\"_id\" : \"knows/106279\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEi--B\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEe--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YEi--_\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YEe--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YEe--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Using *postorder* ordering\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"any\", \n
\"order\" : \"postorder\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YaC--_\", \n
\"name\" : \"Charlie\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YaC--B\", \n
\"name\" : \"Dave\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Ya---_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YaC--D\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Ya---B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YaC--_\", \n
\"name\" : \"Charlie\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YaC--B\", \n
\"name\" : \"Dave\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Ya---_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Ya---B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YaC--D\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Ya---_\", \n
\"name\" : \"Alice\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106988\", \n
\"_id\" : \"knows/106988\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YaC--F\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106992\", \n
\"_id\" : \"knows/106992\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YaC--H\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Ya---_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Ya---B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YaC--_\", \n
\"name\" : \"Charlie\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106988\", \n
\"_id\" : \"knows/106988\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YaC--F\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106995\", \n
\"_id\" : \"knows/106995\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YaC--J\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Ya---_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Ya---B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YaC--B\", \n
\"name\" : \"Dave\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106988\", \n
\"_id\" : \"knows/106988\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YaC--F\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"107001\", \n
\"_id\" : \"knows/107001\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YaG--B\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106998\", \n
\"_id\" : \"knows/106998\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YaG--_\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Ya---_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Ya---B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YaC--D\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Ya---_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106988\", \n
\"_id\" : \"knows/106988\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YaC--F\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"107001\", \n
\"_id\" : \"knows/107001\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YaG--B\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Ya---_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Ya---B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YaC--D\", \n
\"name\" : \"Eve\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106988\", \n
\"_id\" : \"knows/106988\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YaC--F\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Ya---_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Ya---B\", \n
\"name\" : \"Bob\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106998\", \n
\"_id\" : \"knows/106998\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YaG--_\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"107001\", \n
\"_id\" : \"knows/107001\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YaG--B\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106992\", \n
\"_id\" : \"knows/106992\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YaC--H\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Ya---_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YaC--D\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Ya---B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YaC--_\", \n
\"name\" : \"Charlie\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106998\", \n
\"_id\" : \"knows/106998\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YaG--_\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"107001\", \n
\"_id\" : \"knows/107001\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YaG--B\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106995\", \n
\"_id\" : \"knows/106995\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YaC--J\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Ya---_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YaC--D\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Ya---B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YaC--B\", \n
\"name\" : \"Dave\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106998\", \n
\"_id\" : \"knows/106998\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YaG--_\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"107001\", \n
\"_id\" : \"knows/107001\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YaG--B\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106988\", \n
\"_id\" : \"knows/106988\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YaC--F\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Ya---_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YaC--D\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Ya---B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Ya---_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106998\", \n
\"_id\" : \"knows/106998\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YaG--_\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"107001\", \n
\"_id\" : \"knows/107001\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YaG--B\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Ya---_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YaC--D\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1Ya---B\", \n
\"name\" : \"Bob\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106998\", \n
\"_id\" : \"knows/106998\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YaG--_\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Ya---_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YaC--D\", \n
\"name\" : \"Eve\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1Ya---_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Using *backward* item-ordering:\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"any\", \n
\"itemOrder\" : \"backward\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBq--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YBu--C\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBq--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBq--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YBu--A\", \n
\"name\" : \"Dave\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YBu---\", \n
\"name\" : \"Charlie\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBq--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YBu--C\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBq--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YBu--A\", \n
\"name\" : \"Dave\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YBu---\", \n
\"name\" : \"Charlie\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBq--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106190\", \n
\"_id\" : \"knows/106190\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBy--B\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBq--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YBu--C\", \n
\"name\" : \"Eve\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106190\", \n
\"_id\" : \"knows/106190\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBy--B\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106193\", \n
\"_id\" : \"knows/106193\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBy--D\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBq--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YBu--C\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBq--B\", \n
\"name\" : \"Bob\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106190\", \n
\"_id\" : \"knows/106190\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBy--B\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106193\", \n
\"_id\" : \"knows/106193\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBy--D\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106180\", \n
\"_id\" : \"knows/106180\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBu--E\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBq--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YBu--C\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBq--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBq--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106190\", \n
\"_id\" : \"knows/106190\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBy--B\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106193\", \n
\"_id\" : \"knows/106193\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBy--D\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106187\", \n
\"_id\" : \"knows/106187\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YBy--_\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBq--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YBu--C\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBq--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YBu--A\", \n
\"name\" : \"Dave\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106190\", \n
\"_id\" : \"knows/106190\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBy--B\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106193\", \n
\"_id\" : \"knows/106193\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBy--D\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106184\", \n
\"_id\" : \"knows/106184\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YBu--G\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBq--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YBu--C\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBq--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YBu---\", \n
\"name\" : \"Charlie\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106180\", \n
\"_id\" : \"knows/106180\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBu--E\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBq--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBq--B\", \n
\"name\" : \"Bob\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106180\", \n
\"_id\" : \"knows/106180\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBu--E\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106193\", \n
\"_id\" : \"knows/106193\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBy--D\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBq--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBq--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YBu--C\", \n
\"name\" : \"Eve\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106180\", \n
\"_id\" : \"knows/106180\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBu--E\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106193\", \n
\"_id\" : \"knows/106193\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBy--D\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106190\", \n
\"_id\" : \"knows/106190\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBy--B\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBq--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBq--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YBu--C\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBq--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106180\", \n
\"_id\" : \"knows/106180\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBu--E\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106187\", \n
\"_id\" : \"knows/106187\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YBy--_\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBq--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBq--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YBu--A\", \n
\"name\" : \"Dave\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106180\", \n
\"_id\" : \"knows/106180\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBu--E\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106184\", \n
\"_id\" : \"knows/106184\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YBu--G\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YBq--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YBq--B\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YBu---\", \n
\"name\" : \"Charlie\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Edges should only be included once globally,\nbut nodes are included every time they are visited\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"any\", \n
\"uniqueness\" : { \n
\"vertices\" : \"none\", \n
\"edges\" : \"global\" \n
} \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"result\" : { \n
\"visited\" : { \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YHG--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YHK--_\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YHK--B\", \n
\"name\" : \"Charlie\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YHK--D\", \n
\"name\" : \"Dave\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YHK--F\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YHG--_\", \n
\"name\" : \"Alice\" \n
} \n
], \n
\"paths\" : [ \n
{ \n
\"edges\" : [ ], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YHG--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106378\", \n
\"_id\" : \"knows/106378\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YHO--_\", \n
\"vertex\" : \"alice\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YHG--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YHK--_\", \n
\"name\" : \"Bob\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106378\", \n
\"_id\" : \"knows/106378\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YHO--_\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106382\", \n
\"_id\" : \"knows/106382\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YHO--B\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YHG--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YHK--_\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"charlie\", \n
\"_id\" : \"persons/charlie\", \n
\"_rev\" : \"_YOn1YHK--B\", \n
\"name\" : \"Charlie\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106378\", \n
\"_id\" : \"knows/106378\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YHO--_\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106385\", \n
\"_id\" : \"knows/106385\", \n
\"_from\" : \"persons/bob\", \n
\"_to\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YHO--D\", \n
\"vertex\" : \"bob\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YHG--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YHK--_\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"dave\", \n
\"_id\" : \"persons/dave\", \n
\"_rev\" : \"_YOn1YHK--D\", \n
\"name\" : \"Dave\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106378\", \n
\"_id\" : \"knows/106378\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YHO--_\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106391\", \n
\"_id\" : \"knows/106391\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YHO--H\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YHG--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YHK--_\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YHK--F\", \n
\"name\" : \"Eve\" \n
} \n
] \n
}, \n
{ \n
\"edges\" : [ \n
{ \n
\"_key\" : \"106378\", \n
\"_id\" : \"knows/106378\", \n
\"_from\" : \"persons/alice\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YHO--_\", \n
\"vertex\" : \"alice\" \n
}, \n
{ \n
\"_key\" : \"106391\", \n
\"_id\" : \"knows/106391\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YHO--H\", \n
\"vertex\" : \"eve\" \n
}, \n
{ \n
\"_key\" : \"106388\", \n
\"_id\" : \"knows/106388\", \n
\"_from\" : \"persons/eve\", \n
\"_to\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YHO--F\", \n
\"vertex\" : \"eve\" \n
} \n
], \n
\"vertices\" : [ \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YHG--_\", \n
\"name\" : \"Alice\" \n
}, \n
{ \n
\"_key\" : \"bob\", \n
\"_id\" : \"persons/bob\", \n
\"_rev\" : \"_YOn1YHK--_\", \n
\"name\" : \"Bob\" \n
}, \n
{ \n
\"_key\" : \"eve\", \n
\"_id\" : \"persons/eve\", \n
\"_rev\" : \"_YOn1YHK--F\", \n
\"name\" : \"Eve\" \n
}, \n
{ \n
\"_key\" : \"alice\", \n
\"_id\" : \"persons/alice\", \n
\"_rev\" : \"_YOn1YHG--_\", \n
\"name\" : \"Alice\" \n
} \n
] \n
} \n
] \n
} \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n If the underlying graph is cyclic, *maxIterations* should be set\n\nThe underlying graph has two vertices *Alice* and *Bob*.\nWith the directed edges:\n\n- *Alice* knows *Bob*\n- *Bob* knows *Alice*\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/traversal <<EOF\n
{ \n
\"startVertex\" : \"persons/alice\", \n
\"graphName\" : \"knows_graph\", \n
\"direction\" : \"any\", \n
\"uniqueness\" : { \n
\"vertices\" : \"none\", \n
\"edges\" : \"none\" \n
}, \n
\"maxIterations\" : 5 \n
}\n
EOF\n
\n
HTTP/1.1 Internal Server Error\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : true, \n
\"code\" : 500, \n
\"errorNum\" : 1909, \n
\"errorMessage\" : \"too many iterations - try increasing the value of 'maxIterations'\" \n
}\n
\n\n\n\n\n\n",
"parameters": [
{
"in": "body",
@@ -13997,7 +13997,7 @@
},
"/_api/user/": {
"get": {
- "description": "\n\nFetches data about all users. You need the *Administrate* server access level\nin order to execute this REST call. Otherwise, you will only get information\nabout yourself.\n\nThe call will return a JSON object with at least the following\nattributes on success:\n\n- *user*: The name of the user as a string.\n- *active*: An optional flag that specifies whether the user is active.\n- *extra*: An optional JSON object with arbitrary extra data about the user.\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/user\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"result\" : [ \n
{ \n
\"user\" : \"admin\", \n
\"active\" : true, \n
\"extra\" : { \n
} \n
}, \n
{ \n
\"user\" : \"root\", \n
\"active\" : true, \n
\"extra\" : { \n
} \n
}, \n
{ \n
\"user\" : \"tester\", \n
\"active\" : false, \n
\"extra\" : { \n
} \n
} \n
] \n
}\n
\n\n\n\n\n",
+ "description": "\n\nFetches data about all users. You need the *Administrate* server access level\nin order to execute this REST call. Otherwise, you will only get information\nabout yourself.\n\nThe call will return a JSON object with at least the following\nattributes on success:\n\n- *user*: The name of the user as a string.\n- *active*: An optional flag that specifies whether the user is active.\n- *extra*: An optional JSON object with arbitrary extra data about the user.\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/user\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"result\" : [ \n
{ \n
\"user\" : \"tester\", \n
\"active\" : false, \n
\"extra\" : { \n
} \n
}, \n
{ \n
\"user\" : \"admin\", \n
\"active\" : true, \n
\"extra\" : { \n
} \n
}, \n
{ \n
\"user\" : \"root\", \n
\"active\" : true, \n
\"extra\" : { \n
} \n
} \n
] \n
}\n
\n\n\n\n\n",
"parameters": [],
"responses": {
"200": {
@@ -14516,7 +14516,7 @@
},
"/_api/version": {
"get": {
- "description": "\n\nReturns the server name and version number. The response is a JSON object\nwith the following attributes:\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nis returned in all cases.\n\n- **version**: the server version string. The string has the format\n\"*major*.*minor*.*sub*\". *major* and *minor* will be numeric, and *sub*\nmay contain a number or a textual version.\n- **details**:\n - **failure-tests**: *false* for production binaries (the facility to invoke fatal errors is disabled)\n - **boost-version**: which boost version do we bind\n - **zlib-version**: the version of the bundled zlib\n - **sse42**: do we have a SSE 4.2 enabled cpu?\n - **assertions**: do we have assertions compiled in (=> developer version)\n - **jemalloc**: *true* if we use jemalloc\n - **arm**: *false* - this is not running on an ARM cpu\n - **rocksdb-version**: the rocksdb version this release bundles\n - **cplusplus**: C++ standards version\n - **sizeof int**: number of bytes for *integers*\n - **openssl-version**: which openssl version do we link?\n - **platform**: the host os - *linux*, *windows* or *darwin*\n - **endianness**: currently only *little* is supported\n - **vpack-version**: the version of the used velocypack implementation\n - **icu-version**: Which version of ICU do we bundle\n - **mode**: the mode we're runnig as - one of [*server*, *console*, *script*]\n - **unaligned-access**: does this system support unaligned memory access?\n - **build-repository**: reference to the git-ID this was compiled from\n - **asm-crc32**: do we have assembler implemented CRC functions?\n - **host**: the host ID\n - **fd-setsize**: if not *poll* the fd setsize is valid for the maximum number of filedescriptors\n - **maintainer-mode**: *false* if this is a production binary\n - **sizeof void***: number of bytes for *void pointers*\n - **asan**: has this been compiled with the asan address sanitizer turned on? (should be false)\n - **build-date**: the date when this binary was created\n - **compiler**: which compiler did we use\n - **server-version**: the ArangoDB release version\n - **fd-client-event-handler**: which method do we use to handle fd-sets, *poll* should be here on linux.\n - **reactor-type**: *epoll* TODO \n - **architecture**: The CPU architecture, i.e. *64bit*\n - **debug**: *false* for production binaries\n - **full-version-string**: The full version string\n - **v8-version**: the bundled V8 javascript engine version\n- **server**: will always contain *arango*\n\n\n\n\n**Example:**\n Return the version information\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/version\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"server\" : \"arango\", \n
\"version\" : \"3.5.0-devel\", \n
\"license\" : \"enterprise\" \n
}\n
\n\n\n\n\n**Example:**\n Return the version information with details\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/version?details=true\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"server\" : \"arango\", \n
\"version\" : \"3.5.0-devel\", \n
\"license\" : \"enterprise\", \n
\"details\" : { \n
\"architecture\" : \"64bit\", \n
\"arm\" : \"false\", \n
\"asan\" : \"false\", \n
\"asm-crc32\" : \"true\", \n
\"assertions\" : \"true\", \n
\"avx2\" : \"true\", \n
\"boost-version\" : \"1.69.0\", \n
\"build-date\" : \"2019-02-15 10:01:13\", \n
\"build-repository\" : \"heads/feature/ttl-index-0-g5d46b69bbd-dirty\", \n
\"compiler\" : \"gcc [8.2.0]\", \n
\"cplusplus\" : \"201402\", \n
\"curl-version\" : \"libcurl/7.63.0 OpenSSL/1.1.0g\", \n
\"debug\" : \"false\", \n
\"endianness\" : \"little\", \n
\"enterprise-version\" : \"enterprise\", \n
\"failure-tests\" : \"true\", \n
\"fd-client-event-handler\" : \"poll\", \n
\"fd-setsize\" : \"1024\", \n
\"full-version-string\" : \"ArangoDB 3.5.0-devel enterprise [linux] 64bit maintainer mode, using jemalloc, build heads/feature/ttl-index-0-g5d46b69bbd-dirty, VPack 0.1.33, RocksDB 5.18.0, ICU 58.1, V8 5.7.492.77, OpenSSL 1.1.0g 2 Nov 2017\", \n
\"icu-version\" : \"58.1\", \n
\"iresearch-version\" : \"1.0.0.0\", \n
\"jemalloc\" : \"true\", \n
\"license\" : \"enterprise\", \n
\"maintainer-mode\" : \"true\", \n
\"ndebug\" : \"true\", \n
\"openssl-version-compile-time\" : \"OpenSSL 1.1.0g 2 Nov 2017\", \n
\"openssl-version-run-time\" : \"OpenSSL 1.1.0g 2 Nov 2017\", \n
\"optimization-flags\" : \"-march=haswell -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -mfma -mbmi2 -mavx2 -mno-sse4a -mno-xop -mno-fma4 -mno-avx512f -mno-avx512vl -mno-avx512pf -mno-avx512er -mno-avx512cd -mno-avx512dq -mno-avx512bw -mno-avx512ifma -mno-avx512vbmi\", \n
\"platform\" : \"linux\", \n
\"reactor-type\" : \"epoll\", \n
\"rocksdb-version\" : \"5.18.0\", \n
\"server-version\" : \"3.5.0-devel\", \n
\"sizeof int\" : \"4\", \n
\"sizeof long\" : \"8\", \n
\"sizeof void*\" : \"8\", \n
\"sse42\" : \"true\", \n
\"unaligned-access\" : \"true\", \n
\"v8-version\" : \"5.7.492.77\", \n
\"vpack-version\" : \"0.1.33\", \n
\"zlib-version\" : \"1.2.11\", \n
\"mode\" : \"server\", \n
\"host\" : \"c54ebb83e5eb4257b9e0f7201ba87ded\" \n
} \n
}\n
\n\n\n\n\n",
+ "description": "\n\nReturns the server name and version number. The response is a JSON object\nwith the following attributes:\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nis returned in all cases.\n\n- **version**: the server version string. The string has the format\n\"*major*.*minor*.*sub*\". *major* and *minor* will be numeric, and *sub*\nmay contain a number or a textual version.\n- **details**:\n - **failure-tests**: *false* for production binaries (the facility to invoke fatal errors is disabled)\n - **boost-version**: which boost version do we bind\n - **zlib-version**: the version of the bundled zlib\n - **sse42**: do we have a SSE 4.2 enabled cpu?\n - **assertions**: do we have assertions compiled in (=> developer version)\n - **jemalloc**: *true* if we use jemalloc\n - **arm**: *false* - this is not running on an ARM cpu\n - **rocksdb-version**: the rocksdb version this release bundles\n - **cplusplus**: C++ standards version\n - **sizeof int**: number of bytes for *integers*\n - **openssl-version**: which openssl version do we link?\n - **platform**: the host os - *linux*, *windows* or *darwin*\n - **endianness**: currently only *little* is supported\n - **vpack-version**: the version of the used velocypack implementation\n - **icu-version**: Which version of ICU do we bundle\n - **mode**: the mode we're runnig as - one of [*server*, *console*, *script*]\n - **unaligned-access**: does this system support unaligned memory access?\n - **build-repository**: reference to the git-ID this was compiled from\n - **asm-crc32**: do we have assembler implemented CRC functions?\n - **host**: the host ID\n - **fd-setsize**: if not *poll* the fd setsize is valid for the maximum number of filedescriptors\n - **maintainer-mode**: *false* if this is a production binary\n - **sizeof void***: number of bytes for *void pointers*\n - **asan**: has this been compiled with the asan address sanitizer turned on? (should be false)\n - **build-date**: the date when this binary was created\n - **compiler**: which compiler did we use\n - **server-version**: the ArangoDB release version\n - **fd-client-event-handler**: which method do we use to handle fd-sets, *poll* should be here on linux.\n - **reactor-type**: *epoll* TODO \n - **architecture**: The CPU architecture, i.e. *64bit*\n - **debug**: *false* for production binaries\n - **full-version-string**: The full version string\n - **v8-version**: the bundled V8 javascript engine version\n- **server**: will always contain *arango*\n\n\n\n\n**Example:**\n Return the version information\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/version\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"server\" : \"arango\", \n
\"version\" : \"3.5.0-devel\", \n
\"license\" : \"enterprise\" \n
}\n
\n\n\n\n\n**Example:**\n Return the version information with details\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/version?details=true\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"server\" : \"arango\", \n
\"version\" : \"3.5.0-devel\", \n
\"license\" : \"enterprise\", \n
\"details\" : { \n
\"architecture\" : \"64bit\", \n
\"arm\" : \"false\", \n
\"asan\" : \"false\", \n
\"asm-crc32\" : \"true\", \n
\"assertions\" : \"true\", \n
\"avx2\" : \"true\", \n
\"boost-version\" : \"1.69.0\", \n
\"build-date\" : \"2019-02-20 08:48:55\", \n
\"build-repository\" : \"heads/bug-fix/fix-query-cache-shutdown-0-gd977f1786a\", \n
\"compiler\" : \"gcc [8.2.0]\", \n
\"cplusplus\" : \"201402\", \n
\"curl-version\" : \"libcurl/7.63.0 OpenSSL/1.1.0g\", \n
\"debug\" : \"false\", \n
\"endianness\" : \"little\", \n
\"enterprise-version\" : \"enterprise\", \n
\"failure-tests\" : \"true\", \n
\"fd-client-event-handler\" : \"poll\", \n
\"fd-setsize\" : \"1024\", \n
\"full-version-string\" : \"ArangoDB 3.5.0-devel enterprise [linux] 64bit maintainer mode, using jemalloc, build heads/bug-fix/fix-query-cache-shutdown-0-gd977f1786a, VPack 0.1.33, RocksDB 5.18.0, ICU 58.1, V8 7.1.302.28, OpenSSL 1.1.0g 2 Nov 2017\", \n
\"icu-version\" : \"58.1\", \n
\"iresearch-version\" : \"1.0.0.0\", \n
\"jemalloc\" : \"true\", \n
\"license\" : \"enterprise\", \n
\"maintainer-mode\" : \"true\", \n
\"ndebug\" : \"true\", \n
\"openssl-version-compile-time\" : \"OpenSSL 1.1.0g 2 Nov 2017\", \n
\"openssl-version-run-time\" : \"OpenSSL 1.1.0g 2 Nov 2017\", \n
\"optimization-flags\" : \"-march=haswell -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -mfma -mbmi2 -mavx2 -mno-sse4a -mno-xop -mno-fma4 -mno-avx512f -mno-avx512vl -mno-avx512pf -mno-avx512er -mno-avx512cd -mno-avx512dq -mno-avx512bw -mno-avx512ifma -mno-avx512vbmi\", \n
\"platform\" : \"linux\", \n
\"reactor-type\" : \"epoll\", \n
\"rocksdb-version\" : \"5.18.0\", \n
\"server-version\" : \"3.5.0-devel\", \n
\"sizeof int\" : \"4\", \n
\"sizeof long\" : \"8\", \n
\"sizeof void*\" : \"8\", \n
\"sse42\" : \"true\", \n
\"unaligned-access\" : \"true\", \n
\"v8-version\" : \"7.1.302.28\", \n
\"vpack-version\" : \"0.1.33\", \n
\"zlib-version\" : \"1.2.11\", \n
\"mode\" : \"server\", \n
\"host\" : \"c54ebb83e5eb4257b9e0f7201ba87ded\" \n
} \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "If set to *true*, the response will contain a *details* attribute with\nadditional information about included components and their versions. The\nattribute names and internals of the *details* object may vary depending on\nplatform and ArangoDB version.\n\n",
@@ -14549,7 +14549,7 @@
},
"/_api/view": {
"get": {
- "description": "\n\nReturns an object containing an array of all view descriptions.\n\n\n\n\n**Example:**\n Return information about all views:\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"result\" : [ \n
{ \n
\"globallyUniqueId\" : \"h402518FDD080/102\", \n
\"id\" : \"102\", \n
\"name\" : \"demoView\", \n
\"type\" : \"arangosearch\" \n
} \n
] \n
}\n
\n\n\n\n",
+ "description": "\n\nReturns an object containing an array of all view descriptions.\n\n\n\n\n**Example:**\n Return information about all views:\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"result\" : [ \n
{ \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/102\", \n
\"id\" : \"102\", \n
\"name\" : \"demoView\", \n
\"type\" : \"arangosearch\" \n
} \n
] \n
}\n
\n\n\n\n",
"parameters": [],
"responses": {
"200": {
@@ -14567,7 +14567,7 @@
},
"/_api/view#ArangoSearch": {
"post": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **type**: The type of the view. must be equal to *\"arangosearch\"*\n - **name**: The name of the view.\n - **properties**:\n - **commitIntervalMsec**: Wait at least this many milliseconds between committing view data store\n changes and making documents visible to queries (default: 60000, to disable\n use: 0).\n For the case where there are a lot of inserts/updates, a lower value, until\n commit, will cause the index not to account for them and memory usage would\n continue to grow.\n For the case where there are a few inserts/updates, a higher value will impact\n performance and waste disk space for each commit call without any added\n benefits.\n Background:\n For data retrieval ArangoSearch views follow the concept of\n \"eventually-consistent\", i.e. eventually all the data in ArangoDB will be\n matched by corresponding query expressions.\n The concept of ArangoSearch view \"commit\" operation is introduced to\n control the upper-bound on the time until document addition/removals are\n actually reflected by corresponding query expressions.\n Once a \"commit\" operation is complete all documents added/removed prior to\n the start of the \"commit\" operation will be reflected by queries invoked in\n subsequent ArangoDB transactions, in-progress ArangoDB transactions will\n still continue to return a repeatable-read state.\n - **links**:\n - **[collection-name]**:\n - **analyzers** (string): The list of analyzers to be used for indexing of string values\n (default: [\"identity\"]).\n - **fields**:\n - **field-name** (object): This is a recursive structure for the specific attribute path, potentially\n containing any of the following attributes:\n *analyzers*, *includeAllFields*, *trackListPositions*, *storeValues*\n Any attributes not specified are inherited from the parent.\n - **includeAllFields**: The flag determines whether or not to index all fields on a particular level of\n depth (default: false).\n - **trackListPositions**: The flag determines whether or not values in a lists should be treated separate\n (default: false).\n - **storeValues**: How should the view track the attribute values, this setting allows for\n additional value retrieval optimizations, one of:\n - *none*: Do not store values by the view\n - *id*: Store only information about value presence, to allow use of the EXISTS() function\n (default \"none\").\n - **consolidationIntervalMsec**: Wait at least this many milliseconds between applying 'consolidationPolicy' to\n consolidate view data store and possibly release space on the filesystem\n (default: 60000, to disable use: 0).\n For the case where there are a lot of data modification operations, a higher\n value could potentially have the data store consume more space and file handles.\n For the case where there are a few data modification operations, a lower value\n will impact performance due to no segment candidates available for\n consolidation.\n Background:\n For data modification ArangoSearch views follow the concept of a\n \"versioned data store\". Thus old versions of data may be removed once there\n are no longer any users of the old data. The frequency of the cleanup and\n compaction operations are governed by 'consolidationIntervalMsec' and the\n candidates for compaction are selected via 'consolidationPolicy'.\n - **cleanupIntervalStep**: Wait at least this many commits between removing unused files in the\n ArangoSearch data directory (default: 10, to disable use: 0).\n For the case where the consolidation policies merge segments often (i.e. a lot\n of commit+consolidate), a lower value will cause a lot of disk space to be\n wasted.\n For the case where the consolidation policies rarely merge segments (i.e. few\n inserts/deletes), a higher value will impact performance without any added\n benefits.\n Background:\n With every \"commit\" or \"consolidate\" operation a new state of the view\n internal data-structures is created on disk.\n Old states/snapshots are released once there are no longer any users\n remaining.\n However, the files for the released states/snapshots are left on disk, and\n only removed by \"cleanup\" operation.\n - **consolidationPolicy**:\n\n\n\n\nCreates a new view with a given name and properties if it does not\nalready exist.\n\n**Note**: view can't be created with the links. Please use PUT/PATCH for links\nmanagement.\n\n\n\n\n**Example:**\n \n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/view <<EOF\n
{ \n
\"name\" : \"testViewBasics\", \n
\"type\" : \"arangosearch\" \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"globallyUniqueId\" : \"h402518FDD080/107322\", \n
\"id\" : \"107322\", \n
\"name\" : \"testViewBasics\", \n
\"type\" : \"arangosearch\", \n
\"cleanupIntervalStep\" : 10, \n
\"commitIntervalMsec\" : 60000, \n
\"consolidationIntervalMsec\" : 60000, \n
\"consolidationPolicy\" : { \n
\"type\" : \"bytes_accum\", \n
\"threshold\" : 0.10000000149011612 \n
}, \n
\"writebufferActive\" : 0, \n
\"writebufferIdle\" : 64, \n
\"writebufferSizeMax\" : 33554432, \n
\"links\" : { \n
} \n
}\n
\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **type**: The type of the view. must be equal to *\"arangosearch\"*\n - **name**: The name of the view.\n - **properties**:\n - **commitIntervalMsec**: Wait at least this many milliseconds between committing view data store\n changes and making documents visible to queries (default: 60000, to disable\n use: 0).\n For the case where there are a lot of inserts/updates, a lower value, until\n commit, will cause the index not to account for them and memory usage would\n continue to grow.\n For the case where there are a few inserts/updates, a higher value will impact\n performance and waste disk space for each commit call without any added\n benefits.\n Background:\n For data retrieval ArangoSearch views follow the concept of\n \"eventually-consistent\", i.e. eventually all the data in ArangoDB will be\n matched by corresponding query expressions.\n The concept of ArangoSearch view \"commit\" operation is introduced to\n control the upper-bound on the time until document addition/removals are\n actually reflected by corresponding query expressions.\n Once a \"commit\" operation is complete all documents added/removed prior to\n the start of the \"commit\" operation will be reflected by queries invoked in\n subsequent ArangoDB transactions, in-progress ArangoDB transactions will\n still continue to return a repeatable-read state.\n - **links**:\n - **[collection-name]**:\n - **analyzers** (string): The list of analyzers to be used for indexing of string values\n (default: [\"identity\"]).\n - **fields**:\n - **field-name** (object): This is a recursive structure for the specific attribute path, potentially\n containing any of the following attributes:\n *analyzers*, *includeAllFields*, *trackListPositions*, *storeValues*\n Any attributes not specified are inherited from the parent.\n - **includeAllFields**: The flag determines whether or not to index all fields on a particular level of\n depth (default: false).\n - **trackListPositions**: The flag determines whether or not values in a lists should be treated separate\n (default: false).\n - **storeValues**: How should the view track the attribute values, this setting allows for\n additional value retrieval optimizations, one of:\n - *none*: Do not store values by the view\n - *id*: Store only information about value presence, to allow use of the EXISTS() function\n (default \"none\").\n - **consolidationIntervalMsec**: Wait at least this many milliseconds between applying 'consolidationPolicy' to\n consolidate view data store and possibly release space on the filesystem\n (default: 60000, to disable use: 0).\n For the case where there are a lot of data modification operations, a higher\n value could potentially have the data store consume more space and file handles.\n For the case where there are a few data modification operations, a lower value\n will impact performance due to no segment candidates available for\n consolidation.\n Background:\n For data modification ArangoSearch views follow the concept of a\n \"versioned data store\". Thus old versions of data may be removed once there\n are no longer any users of the old data. The frequency of the cleanup and\n compaction operations are governed by 'consolidationIntervalMsec' and the\n candidates for compaction are selected via 'consolidationPolicy'.\n - **cleanupIntervalStep**: Wait at least this many commits between removing unused files in the\n ArangoSearch data directory (default: 10, to disable use: 0).\n For the case where the consolidation policies merge segments often (i.e. a lot\n of commit+consolidate), a lower value will cause a lot of disk space to be\n wasted.\n For the case where the consolidation policies rarely merge segments (i.e. few\n inserts/deletes), a higher value will impact performance without any added\n benefits.\n Background:\n With every \"commit\" or \"consolidate\" operation a new state of the view\n internal data-structures is created on disk.\n Old states/snapshots are released once there are no longer any users\n remaining.\n However, the files for the released states/snapshots are left on disk, and\n only removed by \"cleanup\" operation.\n - **consolidationPolicy**:\n\n\n\n\nCreates a new view with a given name and properties if it does not\nalready exist.\n\n**Note**: view can't be created with the links. Please use PUT/PATCH for links\nmanagement.\n\n\n\n\n**Example:**\n \n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/view <<EOF\n
{ \n
\"name\" : \"testViewBasics\", \n
\"type\" : \"arangosearch\" \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/107331\", \n
\"id\" : \"107331\", \n
\"name\" : \"testViewBasics\", \n
\"type\" : \"arangosearch\", \n
\"cleanupIntervalStep\" : 10, \n
\"commitIntervalMsec\" : 60000, \n
\"consolidationIntervalMsec\" : 60000, \n
\"consolidationPolicy\" : { \n
\"type\" : \"bytes_accum\", \n
\"threshold\" : 0.10000000149011612 \n
}, \n
\"writebufferActive\" : 0, \n
\"writebufferIdle\" : 64, \n
\"writebufferSizeMax\" : 33554432, \n
\"links\" : { \n
} \n
}\n
\n\n\n\n",
"parameters": [
{
"in": "body",
@@ -14598,7 +14598,7 @@
},
"/_api/view#arangosearch": {
"post": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **type**: The type of the view. must be equal to one of the supported ArangoDB view\n types.\n - **name**: The name of the view.\n - **properties**:\n - **commitIntervalMsec**: Wait at least this many milliseconds between committing view data store\n changes and making documents visible to queries (default: 60000, to disable\n use: 0).\n For the case where there are a lot of inserts/updates, a lower value, until\n commit, will cause the index not to account for them and memory usage would\n continue to grow.\n For the case where there are a few inserts/updates, a higher value will impact\n performance and waste disk space for each commit call without any added\n benefits.\n Background:\n For data retrieval ArangoSearch views follow the concept of\n \"eventually-consistent\", i.e. eventually all the data in ArangoDB will be\n matched by corresponding query expressions.\n The concept of ArangoSearch view \"commit\" operation is introduced to\n control the upper-bound on the time until document addition/removals are\n actually reflected by corresponding query expressions.\n Once a \"commit\" operation is complete all documents added/removed prior to\n the start of the \"commit\" operation will be reflected by queries invoked in\n subsequent ArangoDB transactions, in-progress ArangoDB transactions will\n still continue to return a repeatable-read state.\n - **links**:\n - **[collection-name]**:\n - **analyzers** (string): The list of analyzers to be used for indexing of string values\n (default: [\"identity\"]).\n - **fields**:\n - **field-name** (object): This is a recursive structure for the specific attribute path, potentially\n containing any of the following attributes:\n *analyzers*, *includeAllFields*, *trackListPositions*, *storeValues*\n Any attributes not specified are inherited from the parent.\n - **includeAllFields**: The flag determines whether or not to index all fields on a particular level of\n depth (default: false).\n - **trackListPositions**: The flag determines whether or not values in a lists should be treated separate\n (default: false).\n - **storeValues**: How should the view track the attribute values, this setting allows for\n additional value retrieval optimizations, one of:\n - *none*: Do not store values by the view\n - *id*: Store only information about value presence, to allow use of the EXISTS() function\n (default \"none\").\n - **consolidationIntervalMsec**: Wait at least this many milliseconds between applying 'consolidationPolicy' to\n consolidate view data store and possibly release space on the filesystem\n (default: 60000, to disable use: 0).\n For the case where there are a lot of data modification operations, a higher\n value could potentially have the data store consume more space and file handles.\n For the case where there are a few data modification operations, a lower value\n will impact performance due to no segment candidates available for\n consolidation.\n Background:\n For data modification ArangoSearch views follow the concept of a\n \"versioned data store\". Thus old versions of data may be removed once there\n are no longer any users of the old data. The frequency of the cleanup and\n compaction operations are governed by 'consolidationIntervalMsec' and the\n candidates for compaction are selected via 'consolidationPolicy'.\n - **cleanupIntervalStep**: Wait at least this many commits between removing unused files in the\n ArangoSearch data directory (default: 10, to disable use: 0).\n For the case where the consolidation policies merge segments often (i.e. a lot\n of commit+consolidate), a lower value will cause a lot of disk space to be\n wasted.\n For the case where the consolidation policies rarely merge segments (i.e. few\n inserts/deletes), a higher value will impact performance without any added\n benefits.\n Background:\n With every \"commit\" or \"consolidate\" operation a new state of the view\n internal data-structures is created on disk.\n Old states/snapshots are released once there are no longer any users\n remaining.\n However, the files for the released states/snapshots are left on disk, and\n only removed by \"cleanup\" operation.\n - **consolidationPolicy**:\n\n\n\n\nCreates a new view with a given name and properties if it does not already\nexist.\n\n**Note**: view can't be created with the links. Please use PUT/PATCH\nfor links management.\n\n\n\n\n**Example:**\n \n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/view <<EOF\n
{ \n
\"name\" : \"testViewBasics\", \n
\"type\" : \"arangosearch\" \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"globallyUniqueId\" : \"h402518FDD080/104450\", \n
\"id\" : \"104450\", \n
\"name\" : \"testViewBasics\", \n
\"type\" : \"arangosearch\", \n
\"cleanupIntervalStep\" : 10, \n
\"commitIntervalMsec\" : 60000, \n
\"consolidationIntervalMsec\" : 60000, \n
\"consolidationPolicy\" : { \n
\"type\" : \"bytes_accum\", \n
\"threshold\" : 0.10000000149011612 \n
}, \n
\"writebufferActive\" : 0, \n
\"writebufferIdle\" : 64, \n
\"writebufferSizeMax\" : 33554432, \n
\"links\" : { \n
} \n
}\n
\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **type**: The type of the view. must be equal to one of the supported ArangoDB view\n types.\n - **name**: The name of the view.\n - **properties**:\n - **commitIntervalMsec**: Wait at least this many milliseconds between committing view data store\n changes and making documents visible to queries (default: 60000, to disable\n use: 0).\n For the case where there are a lot of inserts/updates, a lower value, until\n commit, will cause the index not to account for them and memory usage would\n continue to grow.\n For the case where there are a few inserts/updates, a higher value will impact\n performance and waste disk space for each commit call without any added\n benefits.\n Background:\n For data retrieval ArangoSearch views follow the concept of\n \"eventually-consistent\", i.e. eventually all the data in ArangoDB will be\n matched by corresponding query expressions.\n The concept of ArangoSearch view \"commit\" operation is introduced to\n control the upper-bound on the time until document addition/removals are\n actually reflected by corresponding query expressions.\n Once a \"commit\" operation is complete all documents added/removed prior to\n the start of the \"commit\" operation will be reflected by queries invoked in\n subsequent ArangoDB transactions, in-progress ArangoDB transactions will\n still continue to return a repeatable-read state.\n - **links**:\n - **[collection-name]**:\n - **analyzers** (string): The list of analyzers to be used for indexing of string values\n (default: [\"identity\"]).\n - **fields**:\n - **field-name** (object): This is a recursive structure for the specific attribute path, potentially\n containing any of the following attributes:\n *analyzers*, *includeAllFields*, *trackListPositions*, *storeValues*\n Any attributes not specified are inherited from the parent.\n - **includeAllFields**: The flag determines whether or not to index all fields on a particular level of\n depth (default: false).\n - **trackListPositions**: The flag determines whether or not values in a lists should be treated separate\n (default: false).\n - **storeValues**: How should the view track the attribute values, this setting allows for\n additional value retrieval optimizations, one of:\n - *none*: Do not store values by the view\n - *id*: Store only information about value presence, to allow use of the EXISTS() function\n (default \"none\").\n - **consolidationIntervalMsec**: Wait at least this many milliseconds between applying 'consolidationPolicy' to\n consolidate view data store and possibly release space on the filesystem\n (default: 60000, to disable use: 0).\n For the case where there are a lot of data modification operations, a higher\n value could potentially have the data store consume more space and file handles.\n For the case where there are a few data modification operations, a lower value\n will impact performance due to no segment candidates available for\n consolidation.\n Background:\n For data modification ArangoSearch views follow the concept of a\n \"versioned data store\". Thus old versions of data may be removed once there\n are no longer any users of the old data. The frequency of the cleanup and\n compaction operations are governed by 'consolidationIntervalMsec' and the\n candidates for compaction are selected via 'consolidationPolicy'.\n - **cleanupIntervalStep**: Wait at least this many commits between removing unused files in the\n ArangoSearch data directory (default: 10, to disable use: 0).\n For the case where the consolidation policies merge segments often (i.e. a lot\n of commit+consolidate), a lower value will cause a lot of disk space to be\n wasted.\n For the case where the consolidation policies rarely merge segments (i.e. few\n inserts/deletes), a higher value will impact performance without any added\n benefits.\n Background:\n With every \"commit\" or \"consolidate\" operation a new state of the view\n internal data-structures is created on disk.\n Old states/snapshots are released once there are no longer any users\n remaining.\n However, the files for the released states/snapshots are left on disk, and\n only removed by \"cleanup\" operation.\n - **consolidationPolicy**:\n\n\n\n\nCreates a new view with a given name and properties if it does not already\nexist.\n\n**Note**: view can't be created with the links. Please use PUT/PATCH\nfor links management.\n\n\n\n\n**Example:**\n \n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/view <<EOF\n
{ \n
\"name\" : \"testViewBasics\", \n
\"type\" : \"arangosearch\" \n
}\n
EOF\n
\n
HTTP/1.1 Created\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/104460\", \n
\"id\" : \"104460\", \n
\"name\" : \"testViewBasics\", \n
\"type\" : \"arangosearch\", \n
\"cleanupIntervalStep\" : 10, \n
\"commitIntervalMsec\" : 60000, \n
\"consolidationIntervalMsec\" : 60000, \n
\"consolidationPolicy\" : { \n
\"type\" : \"bytes_accum\", \n
\"threshold\" : 0.10000000149011612 \n
}, \n
\"writebufferActive\" : 0, \n
\"writebufferIdle\" : 64, \n
\"writebufferSizeMax\" : 33554432, \n
\"links\" : { \n
} \n
}\n
\n\n\n\n",
"parameters": [
{
"in": "body",
@@ -14629,7 +14629,7 @@
},
"/_api/view/{view-name}": {
"delete": {
- "description": "\n\nDrops the view identified by *view-name*.\n\nIf the view was successfully dropped, an object is returned with\nthe following attributes:\n- *error*: *false*\n- *id*: The identifier of the dropped view\n\n\n\n\n**Example:**\n Using an identifier:\n\nshell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/view/107276\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"result\" : true \n
}\n
\n\n\n\n\n**Example:**\n Using a name:\n\nshell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/view/testView\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"result\" : true \n
}\n
\n\n\n\n",
+ "description": "\n\nDrops the view identified by *view-name*.\n\nIf the view was successfully dropped, an object is returned with\nthe following attributes:\n- *error*: *false*\n- *id*: The identifier of the dropped view\n\n\n\n\n**Example:**\n Using an identifier:\n\nshell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/view/107285\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"result\" : true \n
}\n
\n\n\n\n\n**Example:**\n Using a name:\n\nshell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/view/testView\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"result\" : true \n
}\n
\n\n\n\n",
"parameters": [
{
"description": "The name of the view to drop.\n\n",
@@ -14657,7 +14657,7 @@
"x-hints": ""
},
"get": {
- "description": "\n\nThe result is an object describing the view with the following attributes:\n- *id*: The identifier of the view\n- *name*: The name of the view\n- *type*: The type of the view as string\n\n\n\n\n**Example:**\n Using an identifier:\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view/107288\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"type\" : \"arangosearch\", \n
\"name\" : \"testView\", \n
\"globallyUniqueId\" : \"h402518FDD080/107288\", \n
\"id\" : \"107288\" \n
}\n
\n\n\n\n\n**Example:**\n Using a name:\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view/testView\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"type\" : \"arangosearch\", \n
\"name\" : \"testView\", \n
\"globallyUniqueId\" : \"h402518FDD080/107294\", \n
\"id\" : \"107294\" \n
}\n
\n\n\n\n",
+ "description": "\n\nThe result is an object describing the view with the following attributes:\n- *id*: The identifier of the view\n- *name*: The name of the view\n- *type*: The type of the view as string\n\n\n\n\n**Example:**\n Using an identifier:\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view/107297\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"type\" : \"arangosearch\", \n
\"name\" : \"testView\", \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/107297\", \n
\"id\" : \"107297\" \n
}\n
\n\n\n\n\n**Example:**\n Using a name:\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view/testView\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"type\" : \"arangosearch\", \n
\"name\" : \"testView\", \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/107303\", \n
\"id\" : \"107303\" \n
}\n
\n\n\n\n",
"parameters": [
{
"description": "The name of the view.\n\n",
@@ -14684,7 +14684,7 @@
},
"/_api/view/{view-name}/properties": {
"get": {
- "description": "\n\nReturns an object containing the definition of the view identified by *view-name*.\n\n\n\nThe result is an object describing the view with the following attributes:\n- *id*: The identifier of the view\n- *name*: The name of the view\n- *type*: The type of the view as string\n- any additional view implementation specific properties\n\n\n\n\n**Example:**\n Using an identifier:\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view/107300/properties\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"writebufferIdle\" : 64, \n
\"writebufferActive\" : 0, \n
\"type\" : \"arangosearch\", \n
\"writebufferSizeMax\" : 33554432, \n
\"name\" : \"products\", \n
\"commitIntervalMsec\" : 60000, \n
\"consolidationPolicy\" : { \n
\"type\" : \"bytes_accum\", \n
\"threshold\" : 0.10000000149011612 \n
}, \n
\"globallyUniqueId\" : \"h402518FDD080/107300\", \n
\"cleanupIntervalStep\" : 10, \n
\"id\" : \"107300\", \n
\"links\" : { \n
}, \n
\"consolidationIntervalMsec\" : 60000 \n
}\n
\n\n\n\n\n**Example:**\n Using a name:\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view/products/properties\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"writebufferIdle\" : 64, \n
\"writebufferActive\" : 0, \n
\"type\" : \"arangosearch\", \n
\"writebufferSizeMax\" : 33554432, \n
\"name\" : \"products\", \n
\"commitIntervalMsec\" : 60000, \n
\"consolidationPolicy\" : { \n
\"type\" : \"bytes_accum\", \n
\"threshold\" : 0.10000000149011612 \n
}, \n
\"globallyUniqueId\" : \"h402518FDD080/107307\", \n
\"cleanupIntervalStep\" : 10, \n
\"id\" : \"107307\", \n
\"links\" : { \n
}, \n
\"consolidationIntervalMsec\" : 60000 \n
}\n
\n\n\n\n",
+ "description": "\n\nReturns an object containing the definition of the view identified by *view-name*.\n\n\n\nThe result is an object describing the view with the following attributes:\n- *id*: The identifier of the view\n- *name*: The name of the view\n- *type*: The type of the view as string\n- any additional view implementation specific properties\n\n\n\n\n**Example:**\n Using an identifier:\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view/107309/properties\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"writebufferIdle\" : 64, \n
\"writebufferActive\" : 0, \n
\"type\" : \"arangosearch\", \n
\"writebufferSizeMax\" : 33554432, \n
\"name\" : \"products\", \n
\"commitIntervalMsec\" : 60000, \n
\"consolidationPolicy\" : { \n
\"type\" : \"bytes_accum\", \n
\"threshold\" : 0.10000000149011612 \n
}, \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/107309\", \n
\"cleanupIntervalStep\" : 10, \n
\"id\" : \"107309\", \n
\"links\" : { \n
}, \n
\"consolidationIntervalMsec\" : 60000 \n
}\n
\n\n\n\n\n**Example:**\n Using a name:\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/view/products/properties\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"writebufferIdle\" : 64, \n
\"writebufferActive\" : 0, \n
\"type\" : \"arangosearch\", \n
\"writebufferSizeMax\" : 33554432, \n
\"name\" : \"products\", \n
\"commitIntervalMsec\" : 60000, \n
\"consolidationPolicy\" : { \n
\"type\" : \"bytes_accum\", \n
\"threshold\" : 0.10000000149011612 \n
}, \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/107316\", \n
\"cleanupIntervalStep\" : 10, \n
\"id\" : \"107316\", \n
\"links\" : { \n
}, \n
\"consolidationIntervalMsec\" : 60000 \n
}\n
\n\n\n\n",
"parameters": [
{
"description": "The name of the view.\n\n",
@@ -14714,7 +14714,7 @@
},
"/_api/view/{view-name}/properties#ArangoSearch": {
"patch": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **properties**:\n - **commitIntervalMsec**: Wait at least this many milliseconds between committing view data store\n changes and making documents visible to queries (default: 60000, to disable\n use: 0).\n For the case where there are a lot of inserts/updates, a lower value, until\n commit, will cause the index not to account for them and memory usage would\n continue to grow.\n For the case where there are a few inserts/updates, a higher value will impact\n performance and waste disk space for each commit call without any added\n benefits.\n Background:\n For data retrieval ArangoSearch views follow the concept of\n \"eventually-consistent\", i.e. eventually all the data in ArangoDB will be\n matched by corresponding query expressions.\n The concept of ArangoSearch view \"commit\" operation is introduced to\n control the upper-bound on the time until document addition/removals are\n actually reflected by corresponding query expressions.\n Once a \"commit\" operation is complete all documents added/removed prior to\n the start of the \"commit\" operation will be reflected by queries invoked in\n subsequent ArangoDB transactions, in-progress ArangoDB transactions will\n still continue to return a repeatable-read state.\n - **links**:\n - **[collection-name]**:\n - **analyzers** (string): The list of analyzers to be used for indexing of string values\n (default: [\"identity\"]).\n - **fields**:\n - **field-name** (object): This is a recursive structure for the specific attribute path, potentially\n containing any of the following attributes:\n *analyzers*, *includeAllFields*, *trackListPositions*, *storeValues*\n Any attributes not specified are inherited from the parent.\n - **includeAllFields**: The flag determines whether or not to index all fields on a particular level of\n depth (default: false).\n - **trackListPositions**: The flag determines whether or not values in a lists should be treated separate\n (default: false).\n - **storeValues**: How should the view track the attribute values, this setting allows for\n additional value retrieval optimizations, one of:\n - *none*: Do not store values by the view\n - *id*: Store only information about value presence, to allow use of the EXISTS() function\n (default \"none\").\n - **consolidationIntervalMsec**: Wait at least this many milliseconds between applying 'consolidationPolicy' to\n consolidate view data store and possibly release space on the filesystem\n (default: 60000, to disable use: 0).\n For the case where there are a lot of data modification operations, a higher\n value could potentially have the data store consume more space and file handles.\n For the case where there are a few data modification operations, a lower value\n will impact performance due to no segment candidates available for\n consolidation.\n Background:\n For data modification ArangoSearch views follow the concept of a\n \"versioned data store\". Thus old versions of data may be removed once there\n are no longer any users of the old data. The frequency of the cleanup and\n compaction operations are governed by 'consolidationIntervalMsec' and the\n candidates for compaction are selected via 'consolidationPolicy'.\n - **cleanupIntervalStep**: Wait at least this many commits between removing unused files in the\n ArangoSearch data directory (default: 10, to disable use: 0).\n For the case where the consolidation policies merge segments often (i.e. a lot\n of commit+consolidate), a lower value will cause a lot of disk space to be\n wasted.\n For the case where the consolidation policies rarely merge segments (i.e. few\n inserts/deletes), a higher value will impact performance without any added\n benefits.\n Background:\n With every \"commit\" or \"consolidate\" operation a new state of the view\n internal data-structures is created on disk.\n Old states/snapshots are released once there are no longer any users\n remaining.\n However, the files for the released states/snapshots are left on disk, and\n only removed by \"cleanup\" operation.\n - **consolidationPolicy**:\n\n\n\n\nChanges the properties of a view.\n\nOn success an object with the following attributes is returned:\n- *id*: The identifier of the view\n- *name*: The name of the view\n- *type*: The view type\n- all additional arangosearch view implementation specific properties\n\n\n\n\n**Example:**\n \n\nshell> curl -X PATCH --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/view/products/properties <<EOF\n
{ \n
\"locale\" : \"en\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"globallyUniqueId\" : \"h402518FDD080/104442\", \n
\"id\" : \"104442\", \n
\"name\" : \"products\", \n
\"type\" : \"arangosearch\", \n
\"cleanupIntervalStep\" : 10, \n
\"commitIntervalMsec\" : 60000, \n
\"consolidationIntervalMsec\" : 60000, \n
\"consolidationPolicy\" : { \n
\"type\" : \"bytes_accum\", \n
\"threshold\" : 0.10000000149011612 \n
}, \n
\"writebufferActive\" : 0, \n
\"writebufferIdle\" : 64, \n
\"writebufferSizeMax\" : 33554432, \n
\"links\" : { \n
} \n
}\n
\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **properties**:\n - **commitIntervalMsec**: Wait at least this many milliseconds between committing view data store\n changes and making documents visible to queries (default: 60000, to disable\n use: 0).\n For the case where there are a lot of inserts/updates, a lower value, until\n commit, will cause the index not to account for them and memory usage would\n continue to grow.\n For the case where there are a few inserts/updates, a higher value will impact\n performance and waste disk space for each commit call without any added\n benefits.\n Background:\n For data retrieval ArangoSearch views follow the concept of\n \"eventually-consistent\", i.e. eventually all the data in ArangoDB will be\n matched by corresponding query expressions.\n The concept of ArangoSearch view \"commit\" operation is introduced to\n control the upper-bound on the time until document addition/removals are\n actually reflected by corresponding query expressions.\n Once a \"commit\" operation is complete all documents added/removed prior to\n the start of the \"commit\" operation will be reflected by queries invoked in\n subsequent ArangoDB transactions, in-progress ArangoDB transactions will\n still continue to return a repeatable-read state.\n - **links**:\n - **[collection-name]**:\n - **analyzers** (string): The list of analyzers to be used for indexing of string values\n (default: [\"identity\"]).\n - **fields**:\n - **field-name** (object): This is a recursive structure for the specific attribute path, potentially\n containing any of the following attributes:\n *analyzers*, *includeAllFields*, *trackListPositions*, *storeValues*\n Any attributes not specified are inherited from the parent.\n - **includeAllFields**: The flag determines whether or not to index all fields on a particular level of\n depth (default: false).\n - **trackListPositions**: The flag determines whether or not values in a lists should be treated separate\n (default: false).\n - **storeValues**: How should the view track the attribute values, this setting allows for\n additional value retrieval optimizations, one of:\n - *none*: Do not store values by the view\n - *id*: Store only information about value presence, to allow use of the EXISTS() function\n (default \"none\").\n - **consolidationIntervalMsec**: Wait at least this many milliseconds between applying 'consolidationPolicy' to\n consolidate view data store and possibly release space on the filesystem\n (default: 60000, to disable use: 0).\n For the case where there are a lot of data modification operations, a higher\n value could potentially have the data store consume more space and file handles.\n For the case where there are a few data modification operations, a lower value\n will impact performance due to no segment candidates available for\n consolidation.\n Background:\n For data modification ArangoSearch views follow the concept of a\n \"versioned data store\". Thus old versions of data may be removed once there\n are no longer any users of the old data. The frequency of the cleanup and\n compaction operations are governed by 'consolidationIntervalMsec' and the\n candidates for compaction are selected via 'consolidationPolicy'.\n - **cleanupIntervalStep**: Wait at least this many commits between removing unused files in the\n ArangoSearch data directory (default: 10, to disable use: 0).\n For the case where the consolidation policies merge segments often (i.e. a lot\n of commit+consolidate), a lower value will cause a lot of disk space to be\n wasted.\n For the case where the consolidation policies rarely merge segments (i.e. few\n inserts/deletes), a higher value will impact performance without any added\n benefits.\n Background:\n With every \"commit\" or \"consolidate\" operation a new state of the view\n internal data-structures is created on disk.\n Old states/snapshots are released once there are no longer any users\n remaining.\n However, the files for the released states/snapshots are left on disk, and\n only removed by \"cleanup\" operation.\n - **consolidationPolicy**:\n\n\n\n\nChanges the properties of a view.\n\nOn success an object with the following attributes is returned:\n- *id*: The identifier of the view\n- *name*: The name of the view\n- *type*: The view type\n- all additional arangosearch view implementation specific properties\n\n\n\n\n**Example:**\n \n\nshell> curl -X PATCH --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/view/products/properties <<EOF\n
{ \n
\"locale\" : \"en\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/104452\", \n
\"id\" : \"104452\", \n
\"name\" : \"products\", \n
\"type\" : \"arangosearch\", \n
\"cleanupIntervalStep\" : 10, \n
\"commitIntervalMsec\" : 60000, \n
\"consolidationIntervalMsec\" : 60000, \n
\"consolidationPolicy\" : { \n
\"type\" : \"bytes_accum\", \n
\"threshold\" : 0.10000000149011612 \n
}, \n
\"writebufferActive\" : 0, \n
\"writebufferIdle\" : 64, \n
\"writebufferSizeMax\" : 33554432, \n
\"links\" : { \n
} \n
}\n
\n\n\n\n",
"parameters": [
{
"description": "The name of the view.\n\n",
@@ -14751,7 +14751,7 @@
"x-hints": ""
},
"put": {
- "description": "\n**A JSON object with these properties is required:**\n\n - **properties**:\n - **commitIntervalMsec**: Wait at least this many milliseconds between committing view data store\n changes and making documents visible to queries (default: 60000, to disable\n use: 0).\n For the case where there are a lot of inserts/updates, a lower value, until\n commit, will cause the index not to account for them and memory usage would\n continue to grow.\n For the case where there are a few inserts/updates, a higher value will impact\n performance and waste disk space for each commit call without any added\n benefits.\n Background:\n For data retrieval ArangoSearch views follow the concept of\n \"eventually-consistent\", i.e. eventually all the data in ArangoDB will be\n matched by corresponding query expressions.\n The concept of ArangoSearch view \"commit\" operation is introduced to\n control the upper-bound on the time until document addition/removals are\n actually reflected by corresponding query expressions.\n Once a \"commit\" operation is complete all documents added/removed prior to\n the start of the \"commit\" operation will be reflected by queries invoked in\n subsequent ArangoDB transactions, in-progress ArangoDB transactions will\n still continue to return a repeatable-read state.\n - **links**:\n - **[collection-name]**:\n - **analyzers** (string): The list of analyzers to be used for indexing of string values\n (default: [\"identity\"]).\n - **fields**:\n - **field-name** (object): This is a recursive structure for the specific attribute path, potentially\n containing any of the following attributes:\n *analyzers*, *includeAllFields*, *trackListPositions*, *storeValues*\n Any attributes not specified are inherited from the parent.\n - **includeAllFields**: The flag determines whether or not to index all fields on a particular level of\n depth (default: false).\n - **trackListPositions**: The flag determines whether or not values in a lists should be treated separate\n (default: false).\n - **storeValues**: How should the view track the attribute values, this setting allows for\n additional value retrieval optimizations, one of:\n - *none*: Do not store values by the view\n - *id*: Store only information about value presence, to allow use of the EXISTS() function\n (default \"none\").\n - **consolidationIntervalMsec**: Wait at least this many milliseconds between applying 'consolidationPolicy' to\n consolidate view data store and possibly release space on the filesystem\n (default: 60000, to disable use: 0).\n For the case where there are a lot of data modification operations, a higher\n value could potentially have the data store consume more space and file handles.\n For the case where there are a few data modification operations, a lower value\n will impact performance due to no segment candidates available for\n consolidation.\n Background:\n For data modification ArangoSearch views follow the concept of a\n \"versioned data store\". Thus old versions of data may be removed once there\n are no longer any users of the old data. The frequency of the cleanup and\n compaction operations are governed by 'consolidationIntervalMsec' and the\n candidates for compaction are selected via 'consolidationPolicy'.\n - **cleanupIntervalStep**: Wait at least this many commits between removing unused files in the\n ArangoSearch data directory (default: 10, to disable use: 0).\n For the case where the consolidation policies merge segments often (i.e. a lot\n of commit+consolidate), a lower value will cause a lot of disk space to be\n wasted.\n For the case where the consolidation policies rarely merge segments (i.e. few\n inserts/deletes), a higher value will impact performance without any added\n benefits.\n Background:\n With every \"commit\" or \"consolidate\" operation a new state of the view\n internal data-structures is created on disk.\n Old states/snapshots are released once there are no longer any users\n remaining.\n However, the files for the released states/snapshots are left on disk, and\n only removed by \"cleanup\" operation.\n - **consolidationPolicy**:\n\n\n\n\nChanges the properties of a view.\n\nOn success an object with the following attributes is returned:\n- *id*: The identifier of the view\n- *name*: The name of the view\n- *type*: The view type\n- all additional arangosearch view implementation specific properties\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/view/products/properties <<EOF\n
{ \n
\"locale\" : \"en\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"globallyUniqueId\" : \"h402518FDD080/104456\", \n
\"id\" : \"104456\", \n
\"name\" : \"products\", \n
\"type\" : \"arangosearch\", \n
\"cleanupIntervalStep\" : 10, \n
\"commitIntervalMsec\" : 60000, \n
\"consolidationIntervalMsec\" : 60000, \n
\"consolidationPolicy\" : { \n
\"type\" : \"bytes_accum\", \n
\"threshold\" : 0.10000000149011612 \n
}, \n
\"writebufferActive\" : 0, \n
\"writebufferIdle\" : 64, \n
\"writebufferSizeMax\" : 33554432, \n
\"links\" : { \n
} \n
}\n
\n\n\n\n",
+ "description": "\n**A JSON object with these properties is required:**\n\n - **properties**:\n - **commitIntervalMsec**: Wait at least this many milliseconds between committing view data store\n changes and making documents visible to queries (default: 60000, to disable\n use: 0).\n For the case where there are a lot of inserts/updates, a lower value, until\n commit, will cause the index not to account for them and memory usage would\n continue to grow.\n For the case where there are a few inserts/updates, a higher value will impact\n performance and waste disk space for each commit call without any added\n benefits.\n Background:\n For data retrieval ArangoSearch views follow the concept of\n \"eventually-consistent\", i.e. eventually all the data in ArangoDB will be\n matched by corresponding query expressions.\n The concept of ArangoSearch view \"commit\" operation is introduced to\n control the upper-bound on the time until document addition/removals are\n actually reflected by corresponding query expressions.\n Once a \"commit\" operation is complete all documents added/removed prior to\n the start of the \"commit\" operation will be reflected by queries invoked in\n subsequent ArangoDB transactions, in-progress ArangoDB transactions will\n still continue to return a repeatable-read state.\n - **links**:\n - **[collection-name]**:\n - **analyzers** (string): The list of analyzers to be used for indexing of string values\n (default: [\"identity\"]).\n - **fields**:\n - **field-name** (object): This is a recursive structure for the specific attribute path, potentially\n containing any of the following attributes:\n *analyzers*, *includeAllFields*, *trackListPositions*, *storeValues*\n Any attributes not specified are inherited from the parent.\n - **includeAllFields**: The flag determines whether or not to index all fields on a particular level of\n depth (default: false).\n - **trackListPositions**: The flag determines whether or not values in a lists should be treated separate\n (default: false).\n - **storeValues**: How should the view track the attribute values, this setting allows for\n additional value retrieval optimizations, one of:\n - *none*: Do not store values by the view\n - *id*: Store only information about value presence, to allow use of the EXISTS() function\n (default \"none\").\n - **consolidationIntervalMsec**: Wait at least this many milliseconds between applying 'consolidationPolicy' to\n consolidate view data store and possibly release space on the filesystem\n (default: 60000, to disable use: 0).\n For the case where there are a lot of data modification operations, a higher\n value could potentially have the data store consume more space and file handles.\n For the case where there are a few data modification operations, a lower value\n will impact performance due to no segment candidates available for\n consolidation.\n Background:\n For data modification ArangoSearch views follow the concept of a\n \"versioned data store\". Thus old versions of data may be removed once there\n are no longer any users of the old data. The frequency of the cleanup and\n compaction operations are governed by 'consolidationIntervalMsec' and the\n candidates for compaction are selected via 'consolidationPolicy'.\n - **cleanupIntervalStep**: Wait at least this many commits between removing unused files in the\n ArangoSearch data directory (default: 10, to disable use: 0).\n For the case where the consolidation policies merge segments often (i.e. a lot\n of commit+consolidate), a lower value will cause a lot of disk space to be\n wasted.\n For the case where the consolidation policies rarely merge segments (i.e. few\n inserts/deletes), a higher value will impact performance without any added\n benefits.\n Background:\n With every \"commit\" or \"consolidate\" operation a new state of the view\n internal data-structures is created on disk.\n Old states/snapshots are released once there are no longer any users\n remaining.\n However, the files for the released states/snapshots are left on disk, and\n only removed by \"cleanup\" operation.\n - **consolidationPolicy**:\n\n\n\n\nChanges the properties of a view.\n\nOn success an object with the following attributes is returned:\n- *id*: The identifier of the view\n- *name*: The name of the view\n- *type*: The view type\n- all additional arangosearch view implementation specific properties\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/view/products/properties <<EOF\n
{ \n
\"locale\" : \"en\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/104466\", \n
\"id\" : \"104466\", \n
\"name\" : \"products\", \n
\"type\" : \"arangosearch\", \n
\"cleanupIntervalStep\" : 10, \n
\"commitIntervalMsec\" : 60000, \n
\"consolidationIntervalMsec\" : 60000, \n
\"consolidationPolicy\" : { \n
\"type\" : \"bytes_accum\", \n
\"threshold\" : 0.10000000149011612 \n
}, \n
\"writebufferActive\" : 0, \n
\"writebufferIdle\" : 64, \n
\"writebufferSizeMax\" : 33554432, \n
\"links\" : { \n
} \n
}\n
\n\n\n\n",
"parameters": [
{
"description": "The name of the view.\n\n",
@@ -14790,7 +14790,7 @@
},
"/_api/view/{view-name}/properties#arangosearch": {
"patch": {
- "description": "\n\nChanges the properties of a view.\n\nOn success an object with the following attributes is returned:\n- *id*: The identifier of the view\n- *name*: The name of the view\n- *type*: The view type\n- any additional view implementation specific properties\n\n\n\n\n**Example:**\n \n\nshell> curl -X PATCH --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/view/products/properties <<EOF\n
{ \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"globallyUniqueId\" : \"h402518FDD080/107314\", \n
\"id\" : \"107314\", \n
\"name\" : \"products\", \n
\"type\" : \"arangosearch\", \n
\"cleanupIntervalStep\" : 10, \n
\"commitIntervalMsec\" : 60000, \n
\"consolidationIntervalMsec\" : 60000, \n
\"consolidationPolicy\" : { \n
\"type\" : \"bytes_accum\", \n
\"threshold\" : 0.10000000149011612 \n
}, \n
\"writebufferActive\" : 0, \n
\"writebufferIdle\" : 64, \n
\"writebufferSizeMax\" : 33554432, \n
\"links\" : { \n
} \n
}\n
\n\n\n\n\n",
+ "description": "\n\nChanges the properties of a view.\n\nOn success an object with the following attributes is returned:\n- *id*: The identifier of the view\n- *name*: The name of the view\n- *type*: The view type\n- any additional view implementation specific properties\n\n\n\n\n**Example:**\n \n\nshell> curl -X PATCH --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/view/products/properties <<EOF\n
{ \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/107323\", \n
\"id\" : \"107323\", \n
\"name\" : \"products\", \n
\"type\" : \"arangosearch\", \n
\"cleanupIntervalStep\" : 10, \n
\"commitIntervalMsec\" : 60000, \n
\"consolidationIntervalMsec\" : 60000, \n
\"consolidationPolicy\" : { \n
\"type\" : \"bytes_accum\", \n
\"threshold\" : 0.10000000149011612 \n
}, \n
\"writebufferActive\" : 0, \n
\"writebufferIdle\" : 64, \n
\"writebufferSizeMax\" : 33554432, \n
\"links\" : { \n
} \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "The name of the view.\n\n",
@@ -14818,7 +14818,7 @@
"x-hints": ""
},
"put": {
- "description": "\n\nChanges the properties of a view.\n\nOn success an object with the following attributes is returned:\n- *id*: The identifier of the view\n- *name*: The name of the view\n- *type*: The view type\n- any additional view implementation specific properties\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/view/products/properties <<EOF\n
{ \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"globallyUniqueId\" : \"h402518FDD080/107328\", \n
\"id\" : \"107328\", \n
\"name\" : \"products\", \n
\"type\" : \"arangosearch\", \n
\"cleanupIntervalStep\" : 10, \n
\"commitIntervalMsec\" : 60000, \n
\"consolidationIntervalMsec\" : 60000, \n
\"consolidationPolicy\" : { \n
\"type\" : \"bytes_accum\", \n
\"threshold\" : 0.10000000149011612 \n
}, \n
\"writebufferActive\" : 0, \n
\"writebufferIdle\" : 64, \n
\"writebufferSizeMax\" : 33554432, \n
\"links\" : { \n
} \n
}\n
\n\n\n\n",
+ "description": "\n\nChanges the properties of a view.\n\nOn success an object with the following attributes is returned:\n- *id*: The identifier of the view\n- *name*: The name of the view\n- *type*: The view type\n- any additional view implementation specific properties\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/view/products/properties <<EOF\n
{ \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/107337\", \n
\"id\" : \"107337\", \n
\"name\" : \"products\", \n
\"type\" : \"arangosearch\", \n
\"cleanupIntervalStep\" : 10, \n
\"commitIntervalMsec\" : 60000, \n
\"consolidationIntervalMsec\" : 60000, \n
\"consolidationPolicy\" : { \n
\"type\" : \"bytes_accum\", \n
\"threshold\" : 0.10000000149011612 \n
}, \n
\"writebufferActive\" : 0, \n
\"writebufferIdle\" : 64, \n
\"writebufferSizeMax\" : 33554432, \n
\"links\" : { \n
} \n
}\n
\n\n\n\n",
"parameters": [
{
"description": "The name of the view.\n\n",
@@ -14848,7 +14848,7 @@
},
"/_api/view/{view-name}/rename": {
"put": {
- "description": "\n\nRenames a view. Expects an object with the attribute(s)\n- *name*: The new name\n\nIt returns an object with the attributes\n- *id*: The identifier of the view.\n- *name*: The new name of the view.\n- *type*: The view type.\n\n**Note**: this method is not available in a cluster.\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/view/products1/rename <<EOF\n
{ \n
\"name\" : \"viewNewName\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"type\" : \"arangosearch\", \n
\"name\" : \"viewNewName\", \n
\"globallyUniqueId\" : \"h402518FDD080/107336\", \n
\"id\" : \"107336\" \n
}\n
\n\n\n\n",
+ "description": "\n\nRenames a view. Expects an object with the attribute(s)\n- *name*: The new name\n\nIt returns an object with the attributes\n- *id*: The identifier of the view.\n- *name*: The new name of the view.\n- *type*: The view type.\n\n**Note**: this method is not available in a cluster.\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/view/products1/rename <<EOF\n
{ \n
\"name\" : \"viewNewName\" \n
}\n
EOF\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 200, \n
\"type\" : \"arangosearch\", \n
\"name\" : \"viewNewName\", \n
\"globallyUniqueId\" : \"h8B2B671BCFD0/107345\", \n
\"id\" : \"107345\" \n
}\n
\n\n\n\n",
"parameters": [
{
"description": "The name of the view to rename.\n\n",
@@ -14878,7 +14878,7 @@
},
"/_api/wal/lastTick": {
"get": {
- "description": "\n\nReturns the last available tick value that can be served from the server's\nreplication log. This corresponds to the tick of the latest successfull operation.\n\nThe result is a JSON object containing the attributes *tick*, *time* and *server*. \n* *tick*: contains the last available tick, *time* \n* *time*: the server time as string in format \"YYYY-MM-DDTHH:MM:SSZ\"\n* *server*: An object with fields *version* and *serverId*\n\n**Note**: this method is not supported on a coordinator in a cluster.\n\n\n\n\n**Example:**\n Returning the first available tick\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/wal/lastTick\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"time\" : \"2019-02-15T14:43:01Z\", \n
\"tick\" : \"107343\", \n
\"server\" : { \n
\"version\" : \"3.5.0-devel\", \n
\"serverId\" : \"70528077254784\" \n
} \n
}\n
\n\n\n\n\n",
+ "description": "\n\nReturns the last available tick value that can be served from the server's\nreplication log. This corresponds to the tick of the latest successfull operation.\n\nThe result is a JSON object containing the attributes *tick*, *time* and *server*. \n* *tick*: contains the last available tick, *time* \n* *time*: the server time as string in format \"YYYY-MM-DDTHH:MM:SSZ\"\n* *server*: An object with fields *version* and *serverId*\n\n**Note**: this method is not supported on a coordinator in a cluster.\n\n\n\n\n**Example:**\n Returning the first available tick\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/wal/lastTick\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"time\" : \"2019-02-20T10:33:12Z\", \n
\"tick\" : \"107352\", \n
\"server\" : { \n
\"version\" : \"3.5.0-devel\", \n
\"serverId\" : \"153018529730512\" \n
} \n
}\n
\n\n\n\n\n",
"parameters": [],
"responses": {
"200": {
@@ -14905,7 +14905,7 @@
},
"/_api/wal/range": {
"get": {
- "description": "\n\nReturns the currently available ranges of tick values for all WAL files.\nThe tick values can be used to determine if certain\ndata (identified by tick value) are still available for replication.\n\nThe body of the response contains a JSON object. \n* *tickMin*: minimum tick available\n* *tickMax: maximum tick available\n* *time*: the server time as string in format \"YYYY-MM-DDTHH:MM:SSZ\"\n* *server*: An object with fields *version* and *serverId*\n\n\n\n\n**Example:**\n Returns the available tick ranges.\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/wal/range\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"time\" : \"2019-02-15T14:43:03Z\", \n
\"tickMin\" : \"5\", \n
\"tickMax\" : \"107385\", \n
\"server\" : { \n
\"version\" : \"3.5.0-devel\", \n
\"serverId\" : \"70528077254784\" \n
} \n
}\n
\n\n\n\n\n",
+ "description": "\n\nReturns the currently available ranges of tick values for all WAL files.\nThe tick values can be used to determine if certain\ndata (identified by tick value) are still available for replication.\n\nThe body of the response contains a JSON object. \n* *tickMin*: minimum tick available\n* *tickMax: maximum tick available\n* *time*: the server time as string in format \"YYYY-MM-DDTHH:MM:SSZ\"\n* *server*: An object with fields *version* and *serverId*\n\n\n\n\n**Example:**\n Returns the available tick ranges.\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/wal/range\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"time\" : \"2019-02-20T10:33:16Z\", \n
\"tickMin\" : \"5\", \n
\"tickMax\" : \"107403\", \n
\"server\" : { \n
\"version\" : \"3.5.0-devel\", \n
\"serverId\" : \"153018529730512\" \n
} \n
}\n
\n\n\n\n\n",
"parameters": [],
"responses": {
"200": {
@@ -14932,7 +14932,7 @@
},
"/_api/wal/tail": {
"get": {
- "description": "\n\nReturns data from the server's write-ahead log (also named replication log). This method can be called\nby replication clients after an initial synchronization of data. The method\nwill return all \"recent\" logged operations from the server. Clients\ncan replay and apply these operations locally so they get to the same data\nstate as the server.\n\nClients can call this method repeatedly to incrementally fetch all changes\nfrom the server. In this case, they should provide the *from* value so\nthey will only get returned the log events since their last fetch.\n\nWhen the *from* query parameter is not used, the server will return log\nentries starting at the beginning of its replication log. When the *from*\nparameter is used, the server will only return log entries which have\nhigher tick values than the specified *from* value (note: the log entry with a\ntick value equal to *from* will be excluded). Use the *from* value when\nincrementally fetching log data.\n\nThe *to* query parameter can be used to optionally restrict the upper bound of\nthe result to a certain tick value. If used, the result will contain only log events\nwith tick values up to (including) *to*. In incremental fetching, there is no\nneed to use the *to* parameter. It only makes sense in special situations,\nwhen only parts of the change log are required.\n\nThe *chunkSize* query parameter can be used to control the size of the result.\nIt must be specified in bytes. The *chunkSize* value will only be honored\napproximately. Otherwise a too low *chunkSize* value could cause the server\nto not be able to put just one log entry into the result and return it.\nTherefore, the *chunkSize* value will only be consulted after a log entry has\nbeen written into the result. If the result size is then bigger than\n*chunkSize*, the server will respond with as many log entries as there are\nin the response already. If the result size is still smaller than *chunkSize*,\nthe server will try to return more data if there's more data left to return.\n\nIf *chunkSize* is not specified, some server-side default value will be used.\n\nThe *Content-Type* of the result is *application/x-arango-dump*. This is an\neasy-to-process format, with all log events going onto separate lines in the\nresponse body. Each log event itself is a JSON object, with at least the\nfollowing attributes:\n\n- *tick*: the log event tick value\n\n- *type*: the log event type\n\nIndividual log events will also have additional attributes, depending on the\nevent type. A few common attributes which are used for multiple events types\nare:\n\n- *cuid*: globally unique id of the view or collection the event was for\n\n- *db*: the database name the event was for\n\n- *tid*: id of the transaction the event was contained in\n\n- *data*: the original document data\n\nA more detailed description of the individual replication event types and their\ndata structures can be found in [Operation Types](#operation-types).\n\nThe response will also contain the following HTTP headers:\n\n- *x-arango-replication-active*: whether or not the logger is active. Clients\n can use this flag as an indication for their polling frequency. If the\n logger is not active and there are no more replication events available, it\n might be sensible for a client to abort, or to go to sleep for a long time\n and try again later to check whether the logger has been activated.\n\n- *x-arango-replication-lastincluded*: the tick value of the last included\n value in the result. In incremental log fetching, this value can be used\n as the *from* value for the following request. **Note** that if the result is\n empty, the value will be *0*. This value should not be used as *from* value\n by clients in the next request (otherwise the server would return the log\n events from the start of the log again).\n\n- *x-arango-replication-lastscanned*: the last tick the server scanned while\n computing the operation log. This might include operations the server did not\n returned to you due to various reasons (i.e. the value was filtered or skipped).\n You may use this value in the *lastScanned* header to allow the rocksdb engine\n to break up requests over multiple responses.\n\n- *x-arango-replication-lasttick*: the last tick value the server has\n logged in its write ahead log (not necessarily included in the result). By comparing the the last\n tick and last included tick values, clients have an approximate indication of\n how many events there are still left to fetch.\n\n- *x-arango-replication-frompresent*: is set to _true_ if server returned\n all tick values starting from the specified tick in the _from_ parameter.\n Should this be set to false the server did not have these operations anymore\n and the client might have missed operations.\n\n- *x-arango-replication-checkmore*: whether or not there already exists more\n log data which the client could fetch immediately. If there is more log data\n available, the client could call *logger-follow* again with an adjusted *from*\n value to fetch remaining log entries until there are no more.\n\n If there isn't any more log data to fetch, the client might decide to go\n to sleep for a while before calling the logger again.\n\n**Note**: this method is not supported on a coordinator in a cluster.\n\n\n\n\n**Example:**\n No log events available\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/wal/tail?from=107364\n
\n
HTTP/1.1 No Content\n
content-type: application/x-arango-dump; charset=utf-8\n
x-arango-replication-checkmore: false\n
x-arango-replication-frompresent: true\n
x-arango-replication-lastincluded: 0\n
x-arango-replication-lastscanned: 107364\n
x-arango-replication-lasttick: 107364\n
x-content-type-options: nosniff\n
\n
\n\n\n\n\n**Example:**\n A few log events *(One JSON document per line)*\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/wal/tail?from=107364\n
\n
HTTP/1.1 OK\n
content-type: application/x-arango-dump; charset=utf-8\n
x-arango-replication-checkmore: true\n
x-arango-replication-frompresent: true\n
x-arango-replication-lastincluded: 107382\n
x-arango-replication-lastscanned: 107385\n
x-arango-replication-lasttick: 107385\n
x-content-type-options: nosniff\n
\n
{ \n
\"tick\" : \"107382\", \n
\"type\" : 2001, \n
\"db\" : \"_system\", \n
\"cuid\" : \"h402518FDD080/107367\" \n
}↩\n
\n\n\n\n\n**Example:**\n More events than would fit into the response\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/wal/tail?from=107343&chunkSize=400\n
\n
HTTP/1.1 OK\n
content-type: application/x-arango-dump; charset=utf-8\n
x-arango-replication-checkmore: true\n
x-arango-replication-frompresent: true\n
x-arango-replication-lastincluded: 107361\n
x-arango-replication-lastscanned: 107364\n
x-arango-replication-lasttick: 107364\n
x-content-type-options: nosniff\n
\n
{ \n
\"tick\" : \"107361\", \n
\"type\" : 2001, \n
\"db\" : \"_system\", \n
\"cuid\" : \"h402518FDD080/107346\" \n
}\n
\n\n\n\n\n",
+ "description": "\n\nReturns data from the server's write-ahead log (also named replication log). This method can be called\nby replication clients after an initial synchronization of data. The method\nwill return all \"recent\" logged operations from the server. Clients\ncan replay and apply these operations locally so they get to the same data\nstate as the server.\n\nClients can call this method repeatedly to incrementally fetch all changes\nfrom the server. In this case, they should provide the *from* value so\nthey will only get returned the log events since their last fetch.\n\nWhen the *from* query parameter is not used, the server will return log\nentries starting at the beginning of its replication log. When the *from*\nparameter is used, the server will only return log entries which have\nhigher tick values than the specified *from* value (note: the log entry with a\ntick value equal to *from* will be excluded). Use the *from* value when\nincrementally fetching log data.\n\nThe *to* query parameter can be used to optionally restrict the upper bound of\nthe result to a certain tick value. If used, the result will contain only log events\nwith tick values up to (including) *to*. In incremental fetching, there is no\nneed to use the *to* parameter. It only makes sense in special situations,\nwhen only parts of the change log are required.\n\nThe *chunkSize* query parameter can be used to control the size of the result.\nIt must be specified in bytes. The *chunkSize* value will only be honored\napproximately. Otherwise a too low *chunkSize* value could cause the server\nto not be able to put just one log entry into the result and return it.\nTherefore, the *chunkSize* value will only be consulted after a log entry has\nbeen written into the result. If the result size is then bigger than\n*chunkSize*, the server will respond with as many log entries as there are\nin the response already. If the result size is still smaller than *chunkSize*,\nthe server will try to return more data if there's more data left to return.\n\nIf *chunkSize* is not specified, some server-side default value will be used.\n\nThe *Content-Type* of the result is *application/x-arango-dump*. This is an\neasy-to-process format, with all log events going onto separate lines in the\nresponse body. Each log event itself is a JSON object, with at least the\nfollowing attributes:\n\n- *tick*: the log event tick value\n\n- *type*: the log event type\n\nIndividual log events will also have additional attributes, depending on the\nevent type. A few common attributes which are used for multiple events types\nare:\n\n- *cuid*: globally unique id of the view or collection the event was for\n\n- *db*: the database name the event was for\n\n- *tid*: id of the transaction the event was contained in\n\n- *data*: the original document data\n\nA more detailed description of the individual replication event types and their\ndata structures can be found in [Operation Types](#operation-types).\n\nThe response will also contain the following HTTP headers:\n\n- *x-arango-replication-active*: whether or not the logger is active. Clients\n can use this flag as an indication for their polling frequency. If the\n logger is not active and there are no more replication events available, it\n might be sensible for a client to abort, or to go to sleep for a long time\n and try again later to check whether the logger has been activated.\n\n- *x-arango-replication-lastincluded*: the tick value of the last included\n value in the result. In incremental log fetching, this value can be used\n as the *from* value for the following request. **Note** that if the result is\n empty, the value will be *0*. This value should not be used as *from* value\n by clients in the next request (otherwise the server would return the log\n events from the start of the log again).\n\n- *x-arango-replication-lastscanned*: the last tick the server scanned while\n computing the operation log. This might include operations the server did not\n returned to you due to various reasons (i.e. the value was filtered or skipped).\n You may use this value in the *lastScanned* header to allow the rocksdb engine\n to break up requests over multiple responses.\n\n- *x-arango-replication-lasttick*: the last tick value the server has\n logged in its write ahead log (not necessarily included in the result). By comparing the the last\n tick and last included tick values, clients have an approximate indication of\n how many events there are still left to fetch.\n\n- *x-arango-replication-frompresent*: is set to _true_ if server returned\n all tick values starting from the specified tick in the _from_ parameter.\n Should this be set to false the server did not have these operations anymore\n and the client might have missed operations.\n\n- *x-arango-replication-checkmore*: whether or not there already exists more\n log data which the client could fetch immediately. If there is more log data\n available, the client could call *logger-follow* again with an adjusted *from*\n value to fetch remaining log entries until there are no more.\n\n If there isn't any more log data to fetch, the client might decide to go\n to sleep for a while before calling the logger again.\n\n**Note**: this method is not supported on a coordinator in a cluster.\n\n\n\n\n**Example:**\n No log events available\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/wal/tail?from=107382\n
\n
HTTP/1.1 No Content\n
content-type: application/x-arango-dump; charset=utf-8\n
x-arango-replication-checkmore: false\n
x-arango-replication-frompresent: true\n
x-arango-replication-lastincluded: 0\n
x-arango-replication-lastscanned: 107382\n
x-arango-replication-lasttick: 107382\n
x-content-type-options: nosniff\n
\n
\n\n\n\n\n**Example:**\n A few log events *(One JSON document per line)*\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/wal/tail?from=107382\n
\n
HTTP/1.1 OK\n
content-type: application/x-arango-dump; charset=utf-8\n
x-arango-replication-checkmore: true\n
x-arango-replication-frompresent: true\n
x-arango-replication-lastincluded: 107400\n
x-arango-replication-lastscanned: 107403\n
x-arango-replication-lasttick: 107403\n
x-content-type-options: nosniff\n
\n
{ \n
\"tick\" : \"107400\", \n
\"type\" : 2001, \n
\"db\" : \"_system\", \n
\"cuid\" : \"h8B2B671BCFD0/107385\" \n
}↩\n
\n\n\n\n\n**Example:**\n More events than would fit into the response\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/wal/tail?from=107352&chunkSize=400\n
\n
HTTP/1.1 OK\n
content-type: application/x-arango-dump; charset=utf-8\n
x-arango-replication-checkmore: true\n
x-arango-replication-frompresent: true\n
x-arango-replication-lastincluded: 107370\n
x-arango-replication-lastscanned: 107382\n
x-arango-replication-lasttick: 107382\n
x-content-type-options: nosniff\n
\n
{ \n
\"tick\" : \"107370\", \n
\"type\" : 2001, \n
\"db\" : \"_system\", \n
\"cuid\" : \"h8B2B671BCFD0/107355\" \n
}\n
\n\n\n\n\n",
"parameters": [
{
"description": "Exclusive lower bound tick value for results. On successive calls\nto this API you should set this to the value returned\nwith the *x-arango-replication-lastincluded* header (Unless that header\ncontains 0).\n\n",
diff --git a/tests/js/common/shell/shell-ttl.js b/tests/js/common/shell/shell-ttl.js
index aab9a506ca..0344eec142 100644
--- a/tests/js/common/shell/shell-ttl.js
+++ b/tests/js/common/shell/shell-ttl.js
@@ -284,7 +284,7 @@ function TtlSuite () {
assertEqual(1000, db._collection(cn).count());
},
- testRemovalsAll : function () {
+ testRemovalsAllNumeric : function () {
internal.ttlProperties({ active: false });
let c = db._create(cn, { numberOfShards: 2 });
@@ -312,7 +312,67 @@ function TtlSuite () {
assertEqual(0, db._collection(cn).count());
},
- testRemovalsAllButOne : function () {
+ testRemovalsAllDate : function () {
+ internal.ttlProperties({ active: false });
+
+ let c = db._create(cn, { numberOfShards: 2 });
+ c.ensureIndex({ type: "ttl", fields: ["dateCreated"], expireAfter: 1 });
+
+ // dt is one minute in the past
+ const dt = new Date((new Date()).getTime() - 1000 * 60).toISOString();
+ assertTrue(dt >= "2019-01-");
+
+ for (let i = 0; i < 1000; ++i) {
+ c.insert({ dateCreated: dt, value: i });
+ }
+
+ const oldStats = internal.ttlStatistics();
+
+ // reenable
+ internal.ttlProperties({ active: true, frequency: 1000, maxTotalRemoves: 100000, maxCollectionRemoves: 100000 });
+
+ let stats = waitForNextRun(c, oldStats, 10);
+
+ // both number of runs and deletions must have changed
+ assertNotEqual(stats.runs, oldStats.runs);
+ assertEqual(stats.documentsRemoved, oldStats.documentsRemoved + 1000);
+
+ assertEqual(0, db._collection(cn).count());
+ },
+
+ testRemovalsAllMixed : function () {
+ internal.ttlProperties({ active: false });
+
+ let c = db._create(cn, { numberOfShards: 2 });
+ c.ensureIndex({ type: "ttl", fields: ["dateCreated"], expireAfter: 1 });
+
+ // dt is one minute in the past
+ let dt = new Date((new Date()).getTime() - 1000 * 60).toISOString();
+ assertTrue(dt >= "2019-01-");
+
+ for (let i = 0; i < 1000; ++i) {
+ c.insert({ dateCreated: dt, value: i });
+ }
+ dt = new Date((new Date()).getTime() - 1000 * 60).getTime();
+ for (let i = 0; i < 1000; ++i) {
+ c.insert({ dateCreated: dt / 1000, value: i });
+ }
+
+ const oldStats = internal.ttlStatistics();
+
+ // reenable
+ internal.ttlProperties({ active: true, frequency: 1000, maxTotalRemoves: 100000, maxCollectionRemoves: 100000 });
+
+ let stats = waitForNextRun(c, oldStats, 10);
+
+ // both number of runs and deletions must have changed
+ assertNotEqual(stats.runs, oldStats.runs);
+ assertEqual(stats.documentsRemoved, oldStats.documentsRemoved + 2000);
+
+ assertEqual(0, db._collection(cn).count());
+ },
+
+ testRemovalsAllButOneNumeric : function () {
internal.ttlProperties({ active: false });
let c = db._create(cn, { numberOfShards: 2 });
@@ -342,7 +402,39 @@ function TtlSuite () {
assertEqual(dt, db._collection(cn).any().dateCreated);
},
- testRemovalsAllBigger : function () {
+ testRemovalsAllButOneDate : function () {
+ internal.ttlProperties({ active: false });
+
+ let c = db._create(cn, { numberOfShards: 2 });
+ c.ensureIndex({ type: "ttl", fields: ["dateCreated"], expireAfter: 1 });
+
+ // dt is one minute in the past
+ const dt = new Date((new Date()).getTime() - 1000 * 60).toISOString();
+ assertTrue(dt >= "2019-01-");
+
+ for (let i = 0; i < 1000; ++i) {
+ c.insert({ dateCreated: dt, value: i });
+ }
+ // insert a date in the futue
+ const dt2 = new Date((new Date()).getTime() + 1000 * 60).toISOString();
+ c.insert({ dateCreated: dt2 });
+
+ const oldStats = internal.ttlStatistics();
+
+ // reenable
+ internal.ttlProperties({ active: true, frequency: 1000, maxTotalRemoves: 100000, maxCollectionRemoves: 100000 });
+
+ let stats = waitForNextRun(c, oldStats, 10);
+
+ // both number of runs and deletions must have changed
+ assertNotEqual(stats.runs, oldStats.runs);
+ assertEqual(stats.documentsRemoved, oldStats.documentsRemoved + 1000);
+
+ assertEqual(1, db._collection(cn).count());
+ assertEqual(dt2, db._collection(cn).any().dateCreated);
+ },
+
+ testRemovalsAllBiggerNumeric : function () {
internal.ttlProperties({ active: false });
let c = db._create(cn, { numberOfShards: 2 });
@@ -370,7 +462,35 @@ function TtlSuite () {
assertEqual(0, db._collection(cn).count());
},
- testRemovalsExpireAfterInTheFuture : function () {
+ testRemovalsAllBiggerDate : function () {
+ internal.ttlProperties({ active: false });
+
+ let c = db._create(cn, { numberOfShards: 2 });
+ c.ensureIndex({ type: "ttl", fields: ["dateCreated"], expireAfter: 1 });
+
+ // dt is one minute in the past
+ const dt = new Date((new Date()).getTime() - 1000 * 60).toISOString();
+ assertTrue(dt >= "2019-01-");
+
+ for (let i = 0; i < 10000; ++i) {
+ c.insert({ dateCreated: dt, value: i });
+ }
+
+ const oldStats = internal.ttlStatistics();
+
+ // reenable
+ internal.ttlProperties({ active: true, frequency: 1000, maxTotalRemoves: 100000, maxCollectionRemoves: 100000 });
+
+ let stats = waitForNextRun(c, oldStats, 10);
+
+ // both number of runs and deletions must have changed
+ assertNotEqual(stats.runs, oldStats.runs);
+ assertEqual(stats.documentsRemoved, oldStats.documentsRemoved + 10000);
+
+ assertEqual(0, db._collection(cn).count());
+ },
+
+ testRemovalsExpireAfterInTheFutureNumeric : function () {
internal.ttlProperties({ active: false });
let c = db._create(cn, { numberOfShards: 2 });
@@ -398,7 +518,35 @@ function TtlSuite () {
assertEqual(1000, db._collection(cn).count());
},
- testRemovalsExpireAfterSomeInTheFuture : function () {
+ testRemovalsExpireAfterInTheFutureDate : function () {
+ internal.ttlProperties({ active: false });
+
+ let c = db._create(cn, { numberOfShards: 2 });
+ c.ensureIndex({ type: "ttl", fields: ["dateCreated"], expireAfter: 1 });
+
+ // dt is one day in the future
+ const dt = new Date((new Date()).getTime() + 1000 * 86400).toISOString();
+ assertTrue(dt >= "2019-01-");
+
+ for (let i = 0; i < 1000; ++i) {
+ c.insert({ dateCreated: dt, value: i });
+ }
+
+ const oldStats = internal.ttlStatistics();
+
+ // reenable
+ internal.ttlProperties({ active: true, frequency: 1000, maxTotalRemoves: 100000, maxCollectionRemoves: 100000 });
+
+ let stats = waitForNextRun(c, oldStats, 10);
+
+ // number of runs must have changed, number of deletions must not
+ assertNotEqual(stats.runs, oldStats.runs);
+ assertEqual(stats.documentsRemoved, oldStats.documentsRemoved);
+
+ assertEqual(1000, db._collection(cn).count());
+ },
+
+ testRemovalsExpireAfterSomeInTheFutureNumeric : function () {
internal.ttlProperties({ active: false });
let c = db._create(cn, { numberOfShards: 2 });
@@ -440,7 +588,49 @@ function TtlSuite () {
assertEqual(1000, db._collection(cn).count());
},
- testRemovalsLimitsHitGlobal : function () {
+ testRemovalsExpireAfterSomeInTheFutureDate : function () {
+ internal.ttlProperties({ active: false });
+
+ let c = db._create(cn, { numberOfShards: 2 });
+ c.ensureIndex({ type: "ttl", fields: ["dateCreated"], expireAfter: 1 });
+
+ // dt is one day in the future
+ let dt = new Date((new Date()).getTime() + 1000 * 86400).toISOString();
+ assertTrue(dt >= "2019-01-");
+
+ for (let i = 0; i < 1000; ++i) {
+ c.insert({ dateCreated: dt, value: i });
+ }
+
+ // dt is a minute in the past
+ dt = new Date((new Date()).getTime() - 1000 * 60).toISOString();
+ assertTrue(dt >= "2019-01-");
+
+ for (let i = 0; i < 1000; ++i) {
+ c.insert({ dateCreated: dt, value: i });
+ }
+
+ assertEqual(2000, db._collection(cn).count());
+
+ const oldStats = internal.ttlStatistics();
+
+ // reenable
+ let props = internal.ttlProperties({ active: true, frequency: 1000, maxTotalRemoves: 100000, maxCollectionRemoves: 100000 });
+ assertTrue(props.active);
+ assertEqual(1000, props.frequency);
+ assertEqual(100000, props.maxTotalRemoves);
+ assertEqual(100000, props.maxCollectionRemoves);
+
+ let stats = waitForNextRun(c, oldStats, 10);
+
+ // both number of runs and deletions must have changed
+ assertNotEqual(stats.runs, oldStats.runs);
+ assertEqual(stats.documentsRemoved, oldStats.documentsRemoved + 1000);
+
+ assertEqual(1000, db._collection(cn).count());
+ },
+
+ testRemovalsLimitsHitGlobalNumeric : function () {
internal.ttlProperties({ active: false });
let c = db._create(cn, { numberOfShards: 2 });
@@ -479,7 +669,46 @@ function TtlSuite () {
assertTrue(db._collection(cn).count() < oldCount);
},
- testRemovalsLimitsHitCollection : function () {
+ testRemovalsLimitsHitGlobalDate : function () {
+ internal.ttlProperties({ active: false });
+
+ let c = db._create(cn, { numberOfShards: 2 });
+ c.ensureIndex({ type: "ttl", fields: ["dateCreated"], expireAfter: 1 });
+
+ // dt is one minute in the past
+ const dt = new Date((new Date()).getTime() - 1000 * 60).toISOString();
+ assertTrue(dt >= "2019-01-");
+
+ for (let i = 0; i < 10000; ++i) {
+ c.insert({ dateCreated: dt, value: i });
+ }
+
+ let oldStats = internal.ttlStatistics();
+ let oldCount = 10000;
+
+ // reenable
+ internal.ttlProperties({ active: true, frequency: 1000, maxTotalRemoves: 10, maxCollectionRemoves: 100000 });
+
+ let stats = waitForNextRun(c, oldStats, 10);
+
+ // number of runs, deletions and limitReached must have changed
+ assertNotEqual(stats.runs, oldStats.runs);
+ assertTrue(stats.limitReached > oldStats.limitReached);
+ assertTrue(stats.documentsRemoved > oldStats.documentsRemoved);
+ assertTrue(db._collection(cn).count() < oldCount);
+ oldCount = db._collection(cn).count();
+
+ // wait again for next removal
+ oldStats = stats;
+ stats = waitForNextRun(c, oldStats, 10);
+
+ assertNotEqual(stats.runs, oldStats.runs);
+ assertTrue(stats.limitReached > oldStats.limitReached);
+ assertTrue(stats.documentsRemoved > oldStats.documentsRemoved);
+ assertTrue(db._collection(cn).count() < oldCount);
+ },
+
+ testRemovalsLimitsHitCollectionNumeric : function () {
internal.ttlProperties({ active: false });
let c = db._create(cn, { numberOfShards: 2 });
@@ -517,6 +746,45 @@ function TtlSuite () {
assertTrue(stats.documentsRemoved > oldStats.documentsRemoved);
assertTrue(db._collection(cn).count() < oldCount);
},
+
+ testRemovalsLimitsHitCollectionDate : function () {
+ internal.ttlProperties({ active: false });
+
+ let c = db._create(cn, { numberOfShards: 2 });
+ c.ensureIndex({ type: "ttl", fields: ["dateCreated"], expireAfter: 1 });
+
+ // dt is one minute in the past
+ const dt = new Date((new Date()).getTime() - 1000 * 60).toISOString();
+ assertTrue(dt >= "2019-01-");
+
+ for (let i = 0; i < 10000; ++i) {
+ c.insert({ dateCreated: dt, value: i });
+ }
+
+ let oldStats = internal.ttlStatistics();
+ let oldCount = 10000;
+
+ // reenable
+ internal.ttlProperties({ active: true, frequency: 1000, maxTotalRemoves: 1000, maxCollectionRemoves: 2000 });
+
+ let stats = waitForNextRun(c, oldStats, 10);
+
+ // number of runs, deletions and limitReached must have changed
+ assertNotEqual(stats.runs, oldStats.runs);
+ assertTrue(stats.limitReached > oldStats.limitReached);
+ assertTrue(stats.documentsRemoved > oldStats.documentsRemoved);
+ assertTrue(db._collection(cn).count() < oldCount);
+ oldCount = db._collection(cn).count();
+
+ // wait again for next removal
+ oldStats = stats;
+ stats = waitForNextRun(c, oldStats, 10);
+
+ assertNotEqual(stats.runs, oldStats.runs);
+ assertTrue(stats.limitReached > oldStats.limitReached);
+ assertTrue(stats.documentsRemoved > oldStats.documentsRemoved);
+ assertTrue(db._collection(cn).count() < oldCount);
+ },
};
}