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",
"operationId": "replaceDocument",
"parameters": [
{
"description": "A JSON representation of a single document.\n\n",
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"additionalProperties": {},
"type": "object"
},
"x-description-offset": 0
},
{
"description": "This URL parameter must be a document handle.\n\n",
"format": "string",
"in": "path",
"name": "document-handle",
"required": true,
"type": "string"
},
{
"description": "Wait until document has been synced to disk.\n\n",
"in": "query",
"name": "waitForSync",
"required": false,
"type": "boolean"
},
{
"description": "By default, or if this is set to *true*, the *_rev* attributes in \nthe given document is ignored. If this is set to *false*, then\nthe *_rev* attribute given in the body document is taken as a\nprecondition. The document is only replaced if the current revision\nis the one specified.\n\n",
"in": "query",
"name": "ignoreRevs",
"required": false,
"type": "boolean"
},
{
"description": "Return additionally the complete previous revision of the changed \ndocument under the attribute *old* in the result.\n\n",
"in": "query",
"name": "returnOld",
"required": false,
"type": "boolean"
},
{
"description": "Return additionally the complete new document under the attribute *new*\nin the result.\n\n",
"in": "query",
"name": "returnNew",
"required": false,
"type": "boolean"
},
{
"description": "If set to *true*, an empty object will be returned as response. No meta-data \nwill be returned for the replaced document. This option can be used to\nsave some network traffic.\n\n",
"in": "query",
"name": "silent",
"required": false,
"type": "boolean"
},
{
"description": "You can conditionally replace a document based on a target revision id by\nusing the *if-match* HTTP header.\n\n",
"in": "header",
"name": "If-Match",
"type": "string"
}
],
"responses": {
"201": {
"description": "is returned if the document was replaced successfully and\n*waitForSync* was *true*.\n\n"
},
"202": {
"description": "is returned if the document was replaced successfully and\n*waitForSync* was *false*.\n\n"
},
"400": {
"description": "is returned if the body does not contain a valid JSON representation\nof a document. The response body contains\nan error document in this case.\n\n"
},
"404": {
"description": "is returned if the collection or the document was not found.\n\n"
},
"412": {
"description": "is returned if the precondition was violated. The response will\nalso contain the found documents' current revisions in the *_rev*\nattributes. Additionally, the attributes *_id* and *_key* will be\nreturned.\n\n"
}
},
"summary": "Replace document",
"tags": [
"Documents"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Documents/put_replace_document.md",
"x-hints": ""
}
},
"/_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\" : \"_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",
"operationId": "ReadIn-OrOutboundEdges",
"parameters": [
{
"description": "The id of the collection.\n\n",
"format": "string",
"in": "path",
"name": "collection-id",
"required": true,
"type": "string"
},
{
"description": "The id of the start vertex.\n\n",
"in": "query",
"name": "vertex",
"required": true,
"type": "string"
},
{
"description": "Selects *in* or *out* direction for edges. If not set, any edges are\nreturned.\n\n",
"in": "query",
"name": "direction",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "is returned if the edge collection was found and edges were retrieved.\n\n"
},
"400": {
"description": "is returned if the request contains invalid parameters.\n\n"
},
"404": {
"description": "is returned if the edge collection was not found.\n\n"
}
},
"summary": "Read in- or outbound edges",
"tags": [
"Graph Edges"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph Edges/get_read_in_out_edges.md",
"x-hints": ""
}
},
"/_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:18836\" \n
} \n
]\n
\n\n\n\n\n",
"operationId": "retrieveEndpoints",
"parameters": [],
"responses": {
"200": {
"description": "is returned when the array of endpoints can be determined successfully.\n\n"
},
"400": {
"description": "is returned if the action is not carried out in the system database.\n\n"
},
"405": {
"description": "The server will respond with *HTTP 405* if an unsupported HTTP method is used.\n\n"
}
},
"summary": "Return list of all endpoints",
"tags": [
"Administration"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Administration/get_api_endpoint.md",
"x-hints": "{% hint 'warning' %}\nThis route should no longer be used.\nIt is considered as deprecated from version 3.4.0 on.\n{% endhint %}\n\n"
}
},
"/_api/engine": {
"get": {
"description": "\n\nReturns the storage engine the server is configured to use.\nThe response is a JSON object with 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- **name**: will be *mmfiles* or *rocksdb*\n\n\n\n\n**Example:**\n Return the active storage engine\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/engine\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"name\" : \"mmfiles\", \n
\"supports\" : { \n
\"dfdb\" : true, \n
\"indexes\" : [ \n
\"primary\", \n
\"edge\", \n
\"hash\", \n
\"skiplist\", \n
\"ttl\", \n
\"persistent\", \n
\"geo\", \n
\"fulltext\" \n
], \n
\"aliases\" : { \n
\"indexes\" : { \n
} \n
} \n
} \n
}\n
\n\n\n\n\n",
"operationId": "RestEngineHandler",
"parameters": [],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "is returned in all cases.\n\n",
"schema": {
"$ref": "#/definitions/get_engine_rc_200"
},
"x-description-offset": 191
}
},
"summary": "Return server database engine type",
"tags": [
"Administration"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Administration/get_engine.md",
"x-hints": ""
}
},
"/_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\" : \"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",
"operationId": "explainQuery",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/post_api_explain"
},
"x-description-offset": 54
}
],
"responses": {
"200": {
"description": "If the query is valid, the server will respond with *HTTP 200* and\nreturn the optimal execution plan in the *plan* attribute of the response.\nIf option *allPlans* was set in the request, an array of plans will be returned\nin the *allPlans* attribute instead.\n\n"
},
"400": {
"description": "The server will respond with *HTTP 400* in case of a malformed request,\nor if the query contains a parse error. The body of the response will\ncontain the error details embedded in a JSON object.\nOmitting bind variables if the query references any will also result\nin an *HTTP 400* error.\n\n"
},
"404": {
"description": "The server will respond with *HTTP 404* in case a non-existing collection is\naccessed in the query.\n\n"
}
},
"summary": "Explain an AQL query",
"tags": [
"AQL"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/AQL/post_api_explain.md",
"x-hints": ""
}
},
"/_api/export": {
"post": {
"description": "\n**A JSON object with these properties is required:**\n\n - **count**: boolean flag that indicates whether the number of documents\n in the result set should be returned in the \"count\" attribute of the result\n (optional).\n Calculating the \"count\" attribute might in the future have a performance\n impact so this option is turned off by default, and \"count\" is only returned\n when requested.\n - **restrict**:\n - **fields** (string): Contains an array of attribute names to *include* or *exclude*. Matching of attribute names\n for *inclusion* or *exclusion* will be done on the top level only.\n Specifying names of nested attributes is not supported at the moment.\n - **type**: has to be be set to either *include* or *exclude* depending on which you want to use\n - **batchSize**: maximum number of result documents to be transferred from\n the server to the client in one roundtrip (optional). If this attribute is\n not set, a server-controlled default value will be used.\n - **flush**: if set to *true*, a WAL flush operation will be executed prior to the\n export. The flush operation will start copying documents from the WAL to the\n collection's datafiles. There will be an additional wait time of up\n to *flushWait* seconds after the flush to allow the WAL collector to change\n the adjusted document meta-data to point into the datafiles, too.\n The default value is *false* (i.e. no flush) so most recently inserted or\n updated\n documents from the collection might be missing in the export.\n - **flushWait**: maximum wait time in seconds after a flush operation. The default\n value is 10. This option only has an effect when *flush* is set to *true*.\n - **limit**: an optional limit value, determining the maximum number of documents to\n be included in the cursor. Omitting the *limit* attribute or setting it to 0 will\n lead to no limit being used. If a limit is used, it is undefined which documents\n from the collection will be included in the export and which will be excluded. \n This is because there is no natural order of documents in a collection.\n - **ttl**: an optional time-to-live for the cursor (in seconds). The cursor will be\n removed on the server automatically after the specified amount of time. This\n is useful to ensure garbage collection of cursors that are not fully fetched\n by clients. If not set, a server-defined value will be used.\n\n\n\n\nA call to this method creates a cursor containing all documents in the \nspecified collection. In contrast to other data-producing APIs, the internal\ndata structures produced by the export API are more lightweight, so it is\nthe preferred way to retrieve all documents from a collection.\n\nDocuments are returned in a similar manner as in the `/_api/cursor` REST API. \nIf all documents of the collection fit into the first batch, then no cursor\nwill be created, and the result object's *hasMore* attribute will be set to\n*false*. If not all documents fit into the first batch, then the result \nobject's *hasMore* attribute will be set to *true*, and the *id* attribute\nof the result will contain a cursor id.\n\nThe order in which the documents are returned is not specified.\n\nBy default, only those documents from the collection will be returned that are\nstored in the collection's datafiles. Documents that are present in the write-ahead\nlog (WAL) at the time the export is run will not be exported.\n\nTo export these documents as well, the caller can issue a WAL flush request\nbefore calling the export API or set the *flush* attribute. Setting the *flush*\noption will trigger a WAL flush before the export so documents get copied from \nthe WAL to the collection datafiles.\n\nIf the result set can be created by the server, the server will respond with\n*HTTP 201*. The body of the response will contain a JSON object with the\nresult set.\n\nThe returned JSON object has the following properties:\n\n- *error*: boolean flag to indicate that an error occurred (*false*\n in this case)\n\n- *code*: the HTTP status code\n\n- *result*: an array of result documents (might be empty if the collection was empty)\n\n- *hasMore*: a boolean indicator whether there are more results\n available for the cursor on the server\n\n- *count*: the total number of result documents available (only\n available if the query was executed with the *count* attribute set)\n\n- *id*: id of temporary cursor created on the server (optional, see above)\n\nIf the JSON representation is malformed or the query specification is\nmissing from the request, the server will respond with *HTTP 400*.\n\nThe body of the response will 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\nClients should always delete an export cursor result as early as possible because a\nlingering export cursor will prevent the underlying collection from being\ncompacted or unloaded. By default, unused cursors will be deleted automatically \nafter a server-defined idle time, and clients can adjust this idle time by setting\nthe *ttl* value.\n\nNote: this API is currently not supported on cluster coordinators.\n\n",
"operationId": "createCursorExport",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/post_api_export"
},
"x-description-offset": 54
},
{
"description": "The name of the collection to export.\n\n",
"in": "query",
"name": "collection",
"required": true,
"type": "string"
}
],
"responses": {
"201": {
"description": "is returned if the result set can be created by the server.\n\n"
},
"400": {
"description": "is returned if the JSON representation is malformed or the query specification is\nmissing from the request.\n\n"
},
"404": {
"description": "The server will respond with *HTTP 404* in case a non-existing collection is\naccessed in the query.\n\n"
},
"405": {
"description": "The server will respond with *HTTP 405* if an unsupported HTTP method is used.\n\n"
},
"501": {
"description": "The server will respond with *HTTP 501* if this API is called on a cluster\ncoordinator.\n\n\n\n"
}
},
"summary": "Create export cursor",
"tags": [
"Bulk"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Bulk/post_api_export.md",
"x-hints": ""
}
},
"/_api/foxx": {
"get": {
"description": "\n\nFetches a list of services installed in the current database.\n\nReturns a list of objects with the following attributes:\n\n- *mount*: the mount path of the service\n- *development*: *true* if the service is running in development mode\n- *legacy*: *true* if the service is running in 2.8 legacy compatibility mode\n- *provides*: the service manifest's *provides* value or an empty object\n\nAdditionally the object may contain the following attributes if they have been set on the manifest:\n\n- *name*: a string identifying the service type\n- *version*: a semver-compatible version string\n\n",
"operationId": "ListInstalledServices",
"parameters": [
{
"description": "Whether or not system services should be excluded from the result.\n\n",
"in": "query",
"name": "excludeSystem",
"required": false,
"type": "boolean"
}
],
"responses": {
"200": {
"description": "Returned if the request was successful.\n\n\n"
}
},
"summary": "List installed services",
"tags": [
"Foxx"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Foxx/api_foxx_service_list.md",
"x-hints": ""
},
"post": {
"description": "\n\nInstalls the given new service at the given mount path.\n\nThe request body can be any of the following formats:\n\n- `application/zip`: a raw zip bundle containing a service\n- `application/javascript`: a standalone JavaScript file\n- `application/json`: a service definition as JSON\n- `multipart/form-data`: a service definition as a multipart form\n\nA service definition is an object or form with the following properties or fields:\n\n- *configuration*: a JSON object describing configuration values\n- *dependencies*: a JSON object describing dependency settings\n- *source*: a fully qualified URL or an absolute path on the server's file system\n\nWhen using multipart data, the *source* field can also alternatively be a file field\ncontaining either a zip bundle or a standalone JavaScript file.\n\nWhen using a standalone JavaScript file the given file will be executed\nto define our service's HTTP endpoints. It is the same which would be defined\nin the field `main` of the service manifest.\n\nIf *source* is a URL, the URL must be reachable from the server.\nIf *source* is a file system path, the path will be resolved on the server.\nIn either case the path or URL is expected to resolve to a zip bundle,\nJavaScript file or (in case of a file system path) directory.\n\nNote that when using file system paths in a cluster with multiple coordinators\nthe file system path must resolve to equivalent files on every coordinator.\n\n",
"operationId": "InstallNewService",
"parameters": [
{
"description": "Mount path the service should be installed at.\n\n",
"in": "query",
"name": "mount",
"required": true,
"type": "string"
},
{
"description": "Set to `true` to enable development mode.\n\n",
"in": "query",
"name": "development",
"required": false,
"type": "boolean"
},
{
"description": "Set to `false` to not run the service's setup script.\n\n",
"in": "query",
"name": "setup",
"required": false,
"type": "boolean"
},
{
"description": "Set to `true` to install the service in 2.8 legacy compatibility mode.\n\n",
"in": "query",
"name": "legacy",
"required": false,
"type": "boolean"
}
],
"responses": {
"201": {
"description": "Returned if the request was successful.\n\n\n"
}
},
"summary": "Install new service",
"tags": [
"Foxx"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Foxx/api_foxx_service_install.md",
"x-hints": ""
}
},
"/_api/foxx/commit": {
"post": {
"description": "\n\nCommits the local service state of the coordinator to the database.\n\nThis can be used to resolve service conflicts between coordinators that can not be fixed automatically due to missing data.\n\n",
"operationId": "CommitLocalServiceState",
"parameters": [
{
"description": "Overwrite existing service files in database even if they already exist.\n\n",
"in": "query",
"name": "replace",
"required": false,
"type": "boolean"
}
],
"responses": {
"204": {
"description": "Returned if the request was successful.\n\n\n"
}
},
"summary": "Commit local service state",
"tags": [
"Foxx"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Foxx/api_foxx_commit.md",
"x-hints": ""
}
},
"/_api/foxx/configuration": {
"get": {
"description": "\n\nFetches the current configuration for the service at the given mount path.\n\nReturns an object mapping the configuration option names to their definitions\nincluding a human-friendly *title* and the *current* value (if any).\n\n",
"operationId": "GetConfigurationOptions",
"parameters": [
{
"description": "Mount path of the installed service.\n\n",
"in": "query",
"name": "mount",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Returned if the request was successful.\n\n\n"
}
},
"summary": "Get configuration options",
"tags": [
"Foxx"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Foxx/api_foxx_configuration_get.md",
"x-hints": ""
},
"patch": {
"description": "\n\nReplaces the given service's configuration.\n\nReturns an object mapping all configuration option names to their new values.\n\n",
"operationId": "UpdateConfigurationOptions",
"parameters": [
{
"description": "A JSON object mapping configuration option names to their new values.\nAny omitted options will be ignored.\n\n",
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"additionalProperties": {},
"type": "object"
},
"x-description-offset": 126
},
{
"description": "Mount path of the installed service.\n\n",
"in": "query",
"name": "mount",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Returned if the request was successful.\n\n\n"
}
},
"summary": "Update configuration options",
"tags": [
"Foxx"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Foxx/api_foxx_configuration_update.md",
"x-hints": ""
},
"put": {
"description": "\n\nReplaces the given service's configuration completely.\n\nReturns an object mapping all configuration option names to their new values.\n\n",
"operationId": "ReplaceConfigurationOptions",
"parameters": [
{
"description": "A JSON object mapping configuration option names to their new values.\nAny omitted options will be reset to their default values or marked as unconfigured.\n\n",
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"additionalProperties": {},
"type": "object"
},
"x-description-offset": 137
},
{
"description": "Mount path of the installed service.\n\n",
"in": "query",
"name": "mount",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Returned if the request was successful.\n\n\n"
}
},
"summary": "Replace configuration options",
"tags": [
"Foxx"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Foxx/api_foxx_configuration_replace.md",
"x-hints": ""
}
},
"/_api/foxx/dependencies": {
"get": {
"description": "\n\nFetches the current dependencies for service at the given mount path.\n\nReturns an object mapping the dependency names to their definitions\nincluding a human-friendly *title* and the *current* mount path (if any).\n\n",
"operationId": "GetDependencyOptions",
"parameters": [
{
"description": "Mount path of the installed service.\n\n",
"in": "query",
"name": "mount",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Returned if the request was successful.\n\n\n"
}
},
"summary": "Get dependency options",
"tags": [
"Foxx"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Foxx/api_foxx_dependencies_get.md",
"x-hints": ""
},
"patch": {
"description": "\n\nReplaces the given service's dependencies.\n\nReturns an object mapping all dependency names to their new mount paths.\n\n",
"operationId": "UpdateDependenciesOptions",
"parameters": [
{
"description": "A JSON object mapping dependency names to their new mount paths.\nAny omitted dependencies will be ignored.\n\n",
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"additionalProperties": {},
"type": "object"
},
"x-description-offset": 120
},
{
"description": "Mount path of the installed service.\n\n",
"in": "query",
"name": "mount",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Returned if the request was successful.\n\n\n"
}
},
"summary": "Update dependencies options",
"tags": [
"Foxx"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Foxx/api_foxx_dependencies_update.md",
"x-hints": ""
},
"put": {
"description": "\n\nReplaces the given service's dependencies completely.\n\nReturns an object mapping all dependency names to their new mount paths.\n\n",
"operationId": "ReplaceDependenciesOptions",
"parameters": [
{
"description": "A JSON object mapping dependency names to their new mount paths.\nAny omitted dependencies will be disabled.\n\n",
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"additionalProperties": {},
"type": "object"
},
"x-description-offset": 131
},
{
"description": "Mount path of the installed service.\n\n",
"in": "query",
"name": "mount",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Returned if the request was successful.\n\n\n"
}
},
"summary": "Replace dependencies options",
"tags": [
"Foxx"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Foxx/api_foxx_dependencies_replace.md",
"x-hints": ""
}
},
"/_api/foxx/development": {
"delete": {
"description": "\n\nPuts the service at the given mount path into production mode.\n\nWhen running ArangoDB in a cluster with multiple coordinators this will\nreplace the service on all other coordinators with the version on this\ncoordinator.\n\n",
"operationId": "DisableDevelopmentMode",
"parameters": [
{
"description": "Mount path of the installed service.\n\n",
"in": "query",
"name": "mount",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Returned if the request was successful.\n\n\n"
}
},
"summary": "Disable development mode",
"tags": [
"Foxx"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Foxx/api_foxx_development_disable.md",
"x-hints": ""
},
"post": {
"description": "\n\nPuts the service into development mode.\n\nWhile the service is running in development mode the service will be reloaded\nfrom the filesystem and its setup script (if any) will be re-executed every\ntime the service handles a request.\n\nWhen running ArangoDB in a cluster with multiple coordinators note that changes\nto the filesystem on one coordinator will not be reflected across the other\ncoordinators. This means you should treat your coordinators as inconsistent\nas long as any service is running in development mode.\n\n",
"operationId": "EnableDevelopmentMode",
"parameters": [
{
"description": "Mount path of the installed service.\n\n",
"in": "query",
"name": "mount",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Returned if the request was successful.\n\n\n"
}
},
"summary": "Enable development mode",
"tags": [
"Foxx"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Foxx/api_foxx_development_enable.md",
"x-hints": ""
}
},
"/_api/foxx/download": {
"post": {
"description": "\n\nDownloads a zip bundle of the service directory.\n\nWhen development mode is enabled, this always creates a new bundle.\n\nOtherwise the bundle will represent the version of a service that\nis installed on that ArangoDB instance.\n\n",
"operationId": "DownloadServiceBundle",
"parameters": [
{
"description": "Mount path of the installed service.\n\n",
"in": "query",
"name": "mount",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Returned if the request was successful.\n\n"
},
"400": {
"description": "Returned if the mount path is unknown.\n\n\n"
}
},
"summary": "Download service bundle",
"tags": [
"Foxx"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Foxx/api_foxx_bundle.md",
"x-hints": ""
}
},
"/_api/foxx/readme": {
"get": {
"description": "\n\nFetches the service's README or README.md file's contents if any.\n\n",
"operationId": "ServiceReadme",
"parameters": [
{
"description": "Mount path of the installed service.\n\n",
"in": "query",
"name": "mount",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Returned if the request was successful.\n\n"
},
"204": {
"description": "Returned if no README file was found.\n\n\n"
}
},
"summary": "Service README",
"tags": [
"Foxx"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Foxx/api_foxx_readme.md",
"x-hints": ""
}
},
"/_api/foxx/scripts": {
"get": {
"description": "\n\nFetches a list of the scripts defined by the service.\n\nReturns an object mapping the raw script names to human-friendly names.\n\n",
"operationId": "ListServiceScripts",
"parameters": [
{
"description": "Mount path of the installed service.\n\n",
"in": "query",
"name": "mount",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Returned if the request was successful.\n\n\n"
}
},
"summary": "List service scripts",
"tags": [
"Foxx"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Foxx/api_foxx_scripts_list.md",
"x-hints": ""
}
},
"/_api/foxx/scripts/{name}": {
"post": {
"description": "\n\nRuns the given script for the service at the given mount path.\n\nReturns the exports of the script, if any.\n\n",
"operationId": "RunServiceScript",
"parameters": [
{
"description": "An arbitrary JSON value that will be parsed and passed to the\nscript as its first argument.\n\n",
"in": "body",
"name": "Json Request Body",
"required": false,
"schema": {
"additionalProperties": {},
"type": "object"
},
"x-description-offset": 0
},
{
"description": "Name of the script to run.\n\n",
"format": "string",
"in": "path",
"name": "name",
"required": true,
"type": "string"
},
{
"description": "Mount path of the installed service.\n\n",
"in": "query",
"name": "mount",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Returned if the request was successful.\n\n\n"
}
},
"summary": "Run service script",
"tags": [
"Foxx"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Foxx/api_foxx_scripts_run.md",
"x-hints": ""
}
},
"/_api/foxx/service": {
"delete": {
"description": "\n\nRemoves the service at the given mount path from the database and file system.\n\nReturns an empty response on success.\n\n",
"operationId": "UninstallService",
"parameters": [
{
"description": "Mount path of the installed service.\n\n",
"in": "query",
"name": "mount",
"required": true,
"type": "string"
},
{
"description": "Set to `false` to not run the service's teardown script.\n\n",
"in": "query",
"name": "teardown",
"required": false,
"type": "boolean"
}
],
"responses": {
"204": {
"description": "Returned if the request was successful.\n\n\n"
}
},
"summary": "Uninstall service",
"tags": [
"Foxx"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Foxx/api_foxx_service_uninstall.md",
"x-hints": ""
},
"get": {
"description": "\n\nFetches detailed information for the service at the given mount path.\n\nReturns an object with the following attributes:\n\n- *mount*: the mount path of the service\n- *path*: the local file system path of the service\n- *development*: *true* if the service is running in development mode\n- *legacy*: *true* if the service is running in 2.8 legacy compatibility mode\n- *manifest*: the normalized JSON manifest of the service\n\nAdditionally the object may contain the following attributes if they have been set on the manifest:\n\n- *name*: a string identifying the service type\n- *version*: a semver-compatible version string\n\n",
"operationId": "ServiceDescription",
"parameters": [
{
"description": "Mount path of the installed service.\n\n",
"in": "query",
"name": "mount",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Returned if the request was successful.\n\n"
},
"400": {
"description": "Returned if the mount path is unknown.\n\n\n"
}
},
"summary": "Service description",
"tags": [
"Foxx"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Foxx/api_foxx_service_details.md",
"x-hints": ""
},
"patch": {
"description": "\n\nInstalls the given new service on top of the service currently installed at the given mount path.\nThis is only recommended for switching between different versions of the same service.\n\nUnlike replacing a service, upgrading a service retains the old service's configuration\nand dependencies (if any) and should therefore only be used to migrate an existing service\nto a newer or equivalent service.\n\nThe request body can be any of the following formats:\n\n- `application/zip`: a raw zip bundle containing a service\n- `application/javascript`: a standalone JavaScript file\n- `application/json`: a service definition as JSON\n- `multipart/form-data`: a service definition as a multipart form\n\nA service definition is an object or form with the following properties or fields:\n\n- *configuration*: a JSON object describing configuration values\n- *dependencies*: a JSON object describing dependency settings\n- *source*: a fully qualified URL or an absolute path on the server's file system\n\nWhen using multipart data, the *source* field can also alternatively be a file field\ncontaining either a zip bundle or a standalone JavaScript file.\n\nWhen using a standalone JavaScript file the given file will be executed\nto define our service's HTTP endpoints. It is the same which would be defined\nin the field `main` of the service manifest.\n\nIf *source* is a URL, the URL must be reachable from the server.\nIf *source* is a file system path, the path will be resolved on the server.\nIn either case the path or URL is expected to resolve to a zip bundle,\nJavaScript file or (in case of a file system path) directory.\n\nNote that when using file system paths in a cluster with multiple coordinators\nthe file system path must resolve to equivalent files on every coordinator.\n\n",
"operationId": "UpgradeService",
"parameters": [
{
"description": "Mount path of the installed service.\n\n",
"in": "query",
"name": "mount",
"required": true,
"type": "string"
},
{
"description": "Set to `true` to run the old service's teardown script.\n\n",
"in": "query",
"name": "teardown",
"required": false,
"type": "boolean"
},
{
"description": "Set to `false` to not run the new service's setup script.\n\n",
"in": "query",
"name": "setup",
"required": false,
"type": "boolean"
},
{
"description": "Set to `true` to install the new service in 2.8 legacy compatibility mode.\n\n",
"in": "query",
"name": "legacy",
"required": false,
"type": "boolean"
},
{
"description": "Set to `true` to force service install even if no service is installed under given mount.\n\n",
"in": "query",
"name": "force",
"required": false,
"type": "boolean"
}
],
"responses": {
"200": {
"description": "Returned if the request was successful.\n\n\n"
}
},
"summary": "Upgrade service",
"tags": [
"Foxx"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Foxx/api_foxx_service_upgrade.md",
"x-hints": ""
},
"put": {
"description": "\n\nRemoves the service at the given mount path from the database and file system.\nThen installs the given new service at the same mount path.\n\nThis is a slightly safer equivalent to performing an uninstall of the old service\nfollowed by installing the new service. The new service's main and script files\n(if any) will be checked for basic syntax errors before the old service is removed.\n\nThe request body can be any of the following formats:\n\n- `application/zip`: a raw zip bundle containing a service\n- `application/javascript`: a standalone JavaScript file\n- `application/json`: a service definition as JSON\n- `multipart/form-data`: a service definition as a multipart form\n\nA service definition is an object or form with the following properties or fields:\n\n- *configuration*: a JSON object describing configuration values\n- *dependencies*: a JSON object describing dependency settings\n- *source*: a fully qualified URL or an absolute path on the server's file system\n\nWhen using multipart data, the *source* field can also alternatively be a file field\ncontaining either a zip bundle or a standalone JavaScript file.\n\nWhen using a standalone JavaScript file the given file will be executed\nto define our service's HTTP endpoints. It is the same which would be defined\nin the field `main` of the service manifest.\n\nIf *source* is a URL, the URL must be reachable from the server.\nIf *source* is a file system path, the path will be resolved on the server.\nIn either case the path or URL is expected to resolve to a zip bundle,\nJavaScript file or (in case of a file system path) directory.\n\nNote that when using file system paths in a cluster with multiple coordinators\nthe file system path must resolve to equivalent files on every coordinator.\n\n",
"operationId": "ReplaceService",
"parameters": [
{
"description": "Mount path of the installed service.\n\n",
"in": "query",
"name": "mount",
"required": true,
"type": "string"
},
{
"description": "Set to `false` to not run the old service's teardown script.\n\n",
"in": "query",
"name": "teardown",
"required": false,
"type": "boolean"
},
{
"description": "Set to `false` to not run the new service's setup script.\n\n",
"in": "query",
"name": "setup",
"required": false,
"type": "boolean"
},
{
"description": "Set to `true` to install the new service in 2.8 legacy compatibility mode.\n\n",
"in": "query",
"name": "legacy",
"required": false,
"type": "boolean"
},
{
"description": "Set to `true` to force service install even if no service is installed under given mount.\n\n",
"in": "query",
"name": "force",
"required": false,
"type": "boolean"
}
],
"responses": {
"200": {
"description": "Returned if the request was successful.\n\n\n"
}
},
"summary": "Replace service",
"tags": [
"Foxx"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Foxx/api_foxx_service_replace.md",
"x-hints": ""
}
},
"/_api/foxx/swagger": {
"get": {
"description": "\n\nFetches the Swagger API description for the service at the given mount path.\n\nThe response body will be an OpenAPI 2.0 compatible JSON description of the service API.\n\n",
"operationId": "SwaggerDescription",
"parameters": [
{
"description": "Mount path of the installed service.\n\n",
"in": "query",
"name": "mount",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Returned if the request was successful.\n\n\n"
}
},
"summary": "Swagger description",
"tags": [
"Foxx"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Foxx/api_foxx_swagger.md",
"x-hints": ""
}
},
"/_api/foxx/tests": {
"post": {
"description": "\n\nRuns the tests for the service at the given mount path and returns the results.\n\nSupported test reporters are:\n\n- *default*: a simple list of test cases\n- *suite*: an object of test cases nested in suites\n- *stream*: a raw stream of test results\n- *xunit*: an XUnit/JUnit compatible structure\n- *tap*: a raw TAP compatible stream\n\nThe *Accept* request header can be used to further control the response format:\n\nWhen using the *stream* reporter `application/x-ldjson` will result\nin the response body being formatted as a newline-delimited JSON stream.\n\nWhen using the *tap* reporter `text/plain` or `text/*` will result\nin the response body being formatted as a plain text TAP report.\n\nWhen using the *xunit* reporter `application/xml` or `text/xml` will result\nin the response body being formatted as XML instead of JSONML.\n\nOtherwise the response body will be formatted as non-prettyprinted JSON.\n\n",
"operationId": "RunServiceTests",
"parameters": [
{
"description": "Mount path of the installed service.\n\n",
"in": "query",
"name": "mount",
"required": true,
"type": "string"
},
{
"description": "Test reporter to use.\n\n",
"in": "query",
"name": "reporter",
"required": false,
"type": "string"
},
{
"description": "Use the matching format for the reporter, regardless of the *Accept* header.\n\n",
"in": "query",
"name": "idiomatic",
"required": false,
"type": "boolean"
},
{
"description": "Only run tests where the full name (including full test suites and test case)\nmatches this string.\n\n",
"in": "query",
"name": "filter",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "Returned if the request was successful.\n\n\n"
}
},
"summary": "Run service tests",
"tags": [
"Foxx"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Foxx/api_foxx_tests_run.md",
"x-hints": ""
}
},
"/_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 Edition 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 Edition 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",
"operationId": "ListAllGraphs",
"parameters": [],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Is returned if the module is available and the graphs could be listed.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_list_http_examples_rc_200"
},
"x-description-offset": 112
}
},
"summary": "List all graphs",
"tags": [
"Graph"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph/general_graph_list_http_examples.md",
"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 Edition 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 Edition 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 Edition 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 Edition 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",
"operationId": "CreateAGraph",
"parameters": [
{
"description": "define if the request should wait until everything is synced to disc.\nWill change the success response code.\n\n",
"in": "query",
"name": "waitForSync",
"required": false,
"type": "boolean"
},
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/general_graph_create_http_examples"
},
"x-description-offset": 240
}
],
"produces": [
"application/json"
],
"responses": {
"201": {
"description": "Is 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",
"schema": {
"$ref": "#/definitions/general_graph_create_http_examples_rc_201"
},
"x-description-offset": 307
},
"202": {
"description": "Is 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",
"schema": {
"$ref": "#/definitions/general_graph_create_http_examples_rc_202"
},
"x-description-offset": 374
},
"400": {
"description": "Returned if the request is in a wrong format.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_create_http_examples_rc_400"
},
"x-description-offset": 441
},
"403": {
"description": "Returned if your user has insufficient rights.\nIn order to create a graph you at least need to have the following privileges:\n\n 1. `Administrate` access on the Database.\n 2. `Read Only` access on every collection used within this graph.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_create_http_examples_rc_403"
},
"x-description-offset": 508
},
"409": {
"description": "Returned 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",
"schema": {
"$ref": "#/definitions/general_graph_create_http_examples_rc_409"
},
"x-description-offset": 575
}
},
"summary": "Create a graph",
"tags": [
"Graph"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph/general_graph_create_http_examples.md",
"x-hints": ""
}
},
"/_api/gharial/{graph}": {
"delete": {
"description": "\n\nDrops an existing graph object by name.\nOptionally all collections not used by other graphs\ncan be dropped as well.\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 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 DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/social?dropCollections=true\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"removed\" : true \n
}\n
\n\n\n\n",
"operationId": "DropAGraph",
"parameters": [
{
"description": "The name of the graph.\n\n",
"format": "string",
"in": "path",
"name": "graph",
"required": true,
"type": "string"
},
{
"description": "Drop collections of this graph as well. Collections will only be\ndropped if they are not used in other graphs.\n\n",
"in": "query",
"name": "dropCollections",
"required": false,
"type": "boolean"
}
],
"produces": [
"application/json"
],
"responses": {
"201": {
"description": "Is returned if the graph could be dropped and waitForSync is enabled\nfor the `_graphs` collection, or given in the request.\n\n"
},
"202": {
"description": "Is returned if the graph could be dropped and waitForSync is disabled\nfor the `_graphs` collection and not given in the request.\n\n"
},
"403": {
"description": "Returned if your user has insufficient rights.\nIn order to drop a graph you at least need to have the following privileges:\n 1. `Administrate` access on the Database.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_drop_http_examples_rc_403"
},
"x-description-offset": 186
},
"404": {
"description": "Returned if no graph with this name could be found.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_drop_http_examples_rc_404"
},
"x-description-offset": 253
}
},
"summary": "Drop a graph",
"tags": [
"Graph"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph/general_graph_drop_http_examples.md",
"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 Edition 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 Edition 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",
"operationId": "GetAGraph",
"parameters": [
{
"description": "The name of the graph.\n\n",
"format": "string",
"in": "path",
"name": "graph",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Returns the graph if it could be found.\nThe result will have the following format:\n\n",
"schema": {
"$ref": "#/definitions/general_graph_get_http_examples_rc_200"
},
"x-description-offset": 223
},
"404": {
"description": "Returned if no graph with this name could be found.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_get_http_examples_rc_404"
},
"x-description-offset": 290
}
},
"summary": "Get a graph",
"tags": [
"Graph"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph/general_graph_get_http_examples.md",
"x-hints": ""
}
},
"/_api/gharial/{graph}/edge": {
"get": {
"description": "\n\nLists all edge collections within this graph.\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nIs returned if the edge definitions could be listed.\n\n- **code**: The response code.\n- **collections** (string): The list of all vertex collections within this graph.\nIncludes collections in edgeDefinitions as well as orphans.\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/social/edge\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
\"collections\" : [ \n
\"relation\" \n
] \n
}\n
\n\n\n\n\n",
"operationId": "ListEdgeDefinitions",
"parameters": [
{
"description": "The name of the graph.\n\n",
"format": "string",
"in": "path",
"name": "graph",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Is returned if the edge definitions could be listed.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_list_edge_http_examples_rc_200"
},
"x-description-offset": 116
},
"404": {
"description": "Returned if no graph with this name could be found.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_list_edge_http_examples_rc_404"
},
"x-description-offset": 183
}
},
"summary": "List edge definitions",
"tags": [
"Graph"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph/general_graph_list_edge_http_examples.md",
"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 Edition 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 Edition 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 Edition 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 Edition 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",
"operationId": "AddEdgeDefinition",
"parameters": [
{
"description": "The name of the graph.\n\n",
"format": "string",
"in": "path",
"name": "graph",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/general_graph_edge_definition_add_http_examples"
},
"x-description-offset": 486
}
],
"produces": [
"application/json"
],
"responses": {
"201": {
"description": "Returned 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",
"schema": {
"$ref": "#/definitions/general_graph_edge_definition_add_http_examples_rc_201"
},
"x-description-offset": 553
},
"202": {
"description": "Returned 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",
"schema": {
"$ref": "#/definitions/general_graph_edge_definition_add_http_examples_rc_202"
},
"x-description-offset": 620
},
"400": {
"description": "Returned 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",
"schema": {
"$ref": "#/definitions/general_graph_edge_definition_add_http_examples_rc_400"
},
"x-description-offset": 687
},
"403": {
"description": "Returned if your user has insufficient rights.\nIn order to modify a graph you at least need to have the following privileges:\n\n 1. `Administrate` access on the Database.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_definition_add_http_examples_rc_403"
},
"x-description-offset": 754
},
"404": {
"description": "Returned if no graph with this name could be found.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_definition_add_http_examples_rc_404"
},
"x-description-offset": 821
}
},
"summary": "Add edge definition",
"tags": [
"Graph"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph/general_graph_edge_definition_add_http_examples.md",
"x-hints": ""
}
},
"/_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: _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",
"operationId": "CreateAnEdge",
"parameters": [
{
"description": "The name of the graph.\n\n",
"format": "string",
"in": "path",
"name": "graph",
"required": true,
"type": "string"
},
{
"description": "The name of the edge collection the edge belongs to.\n\n",
"format": "string",
"in": "path",
"name": "collection",
"required": true,
"type": "string"
},
{
"description": "Define if the request should wait until synced to disk.\n\n",
"in": "query",
"name": "waitForSync",
"required": false,
"type": "boolean"
},
{
"description": "Define if the response should contain the complete\nnew version of the document.\n\n",
"in": "query",
"name": "returnNew",
"required": false,
"type": "boolean"
},
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/general_graph_edge_create_http_examples"
},
"x-description-offset": 345
}
],
"produces": [
"application/json"
],
"responses": {
"201": {
"description": "Returned if the edge could be created and waitForSync is true.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_create_http_examples_rc_201"
},
"x-description-offset": 412
},
"202": {
"description": "Returned if the request was successful but waitForSync is false.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_create_http_examples_rc_202"
},
"x-description-offset": 479
},
"400": {
"description": "Returned if the input document is invalid.\nThis can for instance be the case if `_from` or `_to` is mising.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_create_http_examples_rc_400"
},
"x-description-offset": 546
},
"403": {
"description": "Returned if your user has insufficient rights.\nIn order to insert edges into the graph you at least need to have the following privileges:\n\n 1. `Read Only` access on the Database.\n 2. `Write` access on the given collection.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_create_http_examples_rc_403"
},
"x-description-offset": 613
},
"404": {
"description": "Returned 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",
"schema": {
"$ref": "#/definitions/general_graph_edge_create_http_examples_rc_404"
},
"x-description-offset": 680
}
},
"summary": "Create an edge",
"tags": [
"Graph"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph/general_graph_edge_create_http_examples.md",
"x-hints": ""
}
},
"/_api/gharial/{graph}/edge/{collection}/{edge}": {
"delete": {
"description": "\n\nRemoves an edge from the collection.\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nReturned if the edge could be removed.\n\n- **removed**: Is set to true if the remove was successful.\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- **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- **removed**: Is set to true if the remove was successful.\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- **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 delete 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 edge to remove 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 DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/social/edge/relation/101350\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"removed\" : true \n
}\n
\n\n\n\n",
"operationId": "RemoveAnEdge",
"parameters": [
{
"description": "The name of the graph.\n\n",
"format": "string",
"in": "path",
"name": "graph",
"required": true,
"type": "string"
},
{
"description": "The name of the edge collection the edge belongs to.\n\n",
"format": "string",
"in": "path",
"name": "collection",
"required": true,
"type": "string"
},
{
"description": "The *_key* attribute of the edge.\n\n",
"format": "string",
"in": "path",
"name": "edge",
"required": true,
"type": "string"
},
{
"description": "Define if the request should wait until synced to disk.\n\n",
"in": "query",
"name": "waitForSync",
"required": false,
"type": "boolean"
},
{
"description": "Define if a presentation of the deleted document should\nbe returned within the response object.\n\n",
"in": "query",
"name": "returnOld",
"required": false,
"type": "boolean"
},
{
"description": "If the \"If-Match\" header is given, then it must contain exactly one Etag. The document is updated,\nif it has the same revision as the given Etag. Otherwise a HTTP 412 is returned. As an alternative\nyou can supply the Etag in an attribute rev in the URL.\n\n",
"in": "header",
"name": "if-match",
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Returned if the edge could be removed.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_delete_http_examples_rc_200"
},
"x-description-offset": 107
},
"202": {
"description": "Returned if the request was successful but waitForSync is false.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_delete_http_examples_rc_202"
},
"x-description-offset": 174
},
"403": {
"description": "Returned if your user has insufficient rights.\nIn order to delete vertices in the graph you at least need to have the following privileges:\n\n 1. `Read Only` access on the Database.\n 2. `Write` access on the given collection.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_delete_http_examples_rc_403"
},
"x-description-offset": 241
},
"404": {
"description": "Returned 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 remove does not exist.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_delete_http_examples_rc_404"
},
"x-description-offset": 308
},
"412": {
"description": "Returned if if-match header is given, but the stored documents revision is different.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_delete_http_examples_rc_412"
},
"x-description-offset": 375
}
},
"summary": "Remove an edge",
"tags": [
"Graph"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph/general_graph_edge_delete_http_examples.md",
"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/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",
"operationId": "GetAnEdge",
"parameters": [
{
"description": "The name of the graph.\n\n",
"format": "string",
"in": "path",
"name": "graph",
"required": true,
"type": "string"
},
{
"description": "The name of the edge collection the edge belongs to.\n\n",
"format": "string",
"in": "path",
"name": "collection",
"required": true,
"type": "string"
},
{
"description": "The *_key* attribute of the edge.\n\n",
"format": "string",
"in": "path",
"name": "edge",
"required": true,
"type": "string"
},
{
"description": "Must contain a revision.\nIf this is set a document is only returned if\nit has exactly this revision.\nAlso see if-match header as an alternative to this.\n\n",
"in": "query",
"name": "rev",
"required": false,
"type": "string"
},
{
"description": "If the \"If-Match\" header is given, then it must contain exactly one Etag. The document is returned,\nif it has the same revision as the given Etag. Otherwise a HTTP 412 is returned. As an alternative\nyou can supply the Etag in an attribute rev in the URL.\n\n",
"in": "header",
"name": "if-match",
"type": "string"
},
{
"description": "If the \"If-None-Match\" header is given, then it must contain exactly one Etag. The document is returned,\nonly if it has a different revision as the given Etag. Otherwise a HTTP 304 is returned. \n\n",
"in": "header",
"name": "if-none-match",
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Returned if the edge could be found.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_get_http_examples_rc_200"
},
"x-description-offset": 110
},
"304": {
"description": "Returned 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",
"schema": {
"$ref": "#/definitions/general_graph_edge_get_http_examples_rc_304"
},
"x-description-offset": 177
},
"403": {
"description": "Returned if your user has insufficient rights.\nIn order to update vertices in the graph you at least need to have the following privileges:\n\n 1. `Read Only` access on the Database.\n 2. `Read Only` access on the given collection.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_get_http_examples_rc_403"
},
"x-description-offset": 244
},
"404": {
"description": "Returned 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",
"schema": {
"$ref": "#/definitions/general_graph_edge_get_http_examples_rc_404"
},
"x-description-offset": 311
},
"412": {
"description": "Returned if if-match header is given, but the stored documents revision is different.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_get_http_examples_rc_412"
},
"x-description-offset": 378
}
},
"summary": "Get an edge",
"tags": [
"Graph"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph/general_graph_edge_get_http_examples.md",
"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/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",
"operationId": "ModifyAnEdge",
"parameters": [
{
"description": "The name of the graph.\n\n",
"format": "string",
"in": "path",
"name": "graph",
"required": true,
"type": "string"
},
{
"description": "The name of the edge collection the edge belongs to.\n\n",
"format": "string",
"in": "path",
"name": "collection",
"required": true,
"type": "string"
},
{
"description": "The *_key* attribute of the vertex.\n\n",
"format": "string",
"in": "path",
"name": "edge",
"required": true,
"type": "string"
},
{
"description": "Define if the request should wait until synced to disk.\n\n",
"in": "query",
"name": "waitForSync",
"required": false,
"type": "boolean"
},
{
"description": "Define if values set to null should be stored.\nBy default (true) the given documents attribute(s) will be set to null.\nIf this parameter is false the attribute(s) will instead be deleted from the\ndocument.\n\n",
"in": "query",
"name": "keepNull",
"required": false,
"type": "boolean"
},
{
"description": "Define if a presentation of the deleted document should\nbe returned within the response object.\n\n",
"in": "query",
"name": "returnOld",
"required": false,
"type": "boolean"
},
{
"description": "Define if a presentation of the new document should\nbe returned within the response object.\n\n",
"in": "query",
"name": "returnNew",
"required": false,
"type": "boolean"
},
{
"description": "If the \"If-Match\" header is given, then it must contain exactly one Etag. The document is updated,\nif it has the same revision as the given Etag. Otherwise a HTTP 412 is returned. As an alternative\nyou can supply the Etag in an attribute rev in the URL.\n\n",
"in": "header",
"name": "if-match",
"type": "string"
},
{
"description": "The body has to contain a JSON object containing exactly the attributes that should be overwritten, all other attributes remain unchanged.\n\n",
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"additionalProperties": {},
"type": "object"
},
"x-description-offset": 60
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Returned if the edge could be updated, and waitForSync is false.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_modify_http_examples_rc_200"
},
"x-description-offset": 127
},
"202": {
"description": "Returned if the request was successful but waitForSync is false.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_modify_http_examples_rc_202"
},
"x-description-offset": 194
},
"403": {
"description": "Returned if your user has insufficient rights.\nIn order to update edges in the graph you at least need to have the following privileges:\n\n 1. `Read Only` access on the Database.\n 2. `Write` access on the given collection.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_modify_http_examples_rc_403"
},
"x-description-offset": 261
},
"404": {
"description": "Returned 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",
"schema": {
"$ref": "#/definitions/general_graph_edge_modify_http_examples_rc_404"
},
"x-description-offset": 328
},
"412": {
"description": "Returned if if-match header is given, but the stored documents revision is different.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_modify_http_examples_rc_412"
},
"x-description-offset": 395
}
},
"summary": "Modify an edge",
"tags": [
"Graph"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph/general_graph_edge_modify_http_examples.md",
"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/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",
"operationId": "ReplaceAnEdge",
"parameters": [
{
"description": "The name of the graph.\n\n",
"format": "string",
"in": "path",
"name": "graph",
"required": true,
"type": "string"
},
{
"description": "The name of the edge collection the edge belongs to.\n\n",
"format": "string",
"in": "path",
"name": "collection",
"required": true,
"type": "string"
},
{
"description": "The *_key* attribute of the vertex.\n\n",
"format": "string",
"in": "path",
"name": "edge",
"required": true,
"type": "string"
},
{
"description": "Define if the request should wait until synced to disk.\n\n",
"in": "query",
"name": "waitForSync",
"required": false,
"type": "boolean"
},
{
"description": "Define if values set to null should be stored. By default the key is not removed from the document.\n\n",
"in": "query",
"name": "keepNull",
"required": false,
"type": "boolean"
},
{
"description": "Define if a presentation of the deleted document should\nbe returned within the response object.\n\n",
"in": "query",
"name": "returnOld",
"required": false,
"type": "boolean"
},
{
"description": "Define if a presentation of the new document should\nbe returned within the response object.\n\n",
"in": "query",
"name": "returnNew",
"required": false,
"type": "boolean"
},
{
"description": "If the \"If-Match\" header is given, then it must contain exactly one Etag. The document is updated,\nif it has the same revision as the given Etag. Otherwise a HTTP 412 is returned. As an alternative\nyou can supply the Etag in an attribute rev in the URL.\n\n",
"in": "header",
"name": "if-match",
"type": "string"
},
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/general_graph_edge_replace_http_examples"
},
"x-description-offset": 105
}
],
"produces": [
"application/json"
],
"responses": {
"201": {
"description": "Returned if the request was successful but waitForSync is true.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_replace_http_examples_rc_201"
},
"x-description-offset": 172
},
"202": {
"description": "Returned if the request was successful but waitForSync is false.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_replace_http_examples_rc_202"
},
"x-description-offset": 239
},
"403": {
"description": "Returned if your user has insufficient rights.\nIn order to replace edges in the graph you at least need to have the following privileges:\n\n 1. `Read Only` access on the Database.\n 2. `Write` access on the given collection.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_replace_http_examples_rc_403"
},
"x-description-offset": 306
},
"404": {
"description": "Returned 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",
"schema": {
"$ref": "#/definitions/general_graph_edge_replace_http_examples_rc_404"
},
"x-description-offset": 373
},
"412": {
"description": "Returned if if-match header is given, but the stored documents revision is different.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_replace_http_examples_rc_412"
},
"x-description-offset": 440
}
},
"summary": "Replace an edge",
"tags": [
"Graph"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph/general_graph_edge_replace_http_examples.md",
"x-hints": ""
}
},
"/_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 Edition 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 Edition 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 Edition 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 Edition 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",
"operationId": "RemoveAnEdgeDefinitionFromTheGraph",
"parameters": [
{
"description": "The name of the graph.\n\n",
"format": "string",
"in": "path",
"name": "graph",
"required": true,
"type": "string"
},
{
"description": "The name of the edge collection used in the definition.\n\n",
"format": "string",
"in": "path",
"name": "definition",
"required": true,
"type": "string"
},
{
"description": "Define if the request should wait until synced to disk.\n\n",
"in": "query",
"name": "waitForSync",
"required": false,
"type": "boolean"
},
{
"description": "Drop the collection as well.\nCollection will only be dropped if it is not used in other graphs.\n\n",
"in": "query",
"name": "dropCollections",
"required": false,
"type": "boolean"
}
],
"produces": [
"application/json"
],
"responses": {
"201": {
"description": "Returned if the edge definition could be removed from the graph \nand waitForSync is true.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_definition_remove_http_examples_rc_201"
},
"x-description-offset": 236
},
"202": {
"description": "Returned if the edge definition could be removed from the graph and\nwaitForSync is false.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_definition_remove_http_examples_rc_202"
},
"x-description-offset": 303
},
"403": {
"description": "Returned 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",
"schema": {
"$ref": "#/definitions/general_graph_edge_definition_remove_http_examples_rc_403"
},
"x-description-offset": 370
},
"404": {
"description": "Returned if no graph with this name could be found,\nor if no edge definition with this name is found in the graph.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_definition_remove_http_examples_rc_404"
},
"x-description-offset": 437
}
},
"summary": "Remove an edge definition from the graph",
"tags": [
"Graph"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph/general_graph_edge_definition_remove_http_examples.md",
"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 Edition 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 Edition 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 Edition 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 Edition 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",
"operationId": "ReplaceAnEdgeDefinition",
"parameters": [
{
"description": "The name of the graph.\n\n",
"format": "string",
"in": "path",
"name": "graph",
"required": true,
"type": "string"
},
{
"description": "The name of the edge collection used in the definition.\n\n",
"format": "string",
"in": "path",
"name": "definition",
"required": true,
"type": "string"
},
{
"description": "Define if the request should wait until synced to disk.\n\n",
"in": "query",
"name": "waitForSync",
"required": false,
"type": "boolean"
},
{
"description": "Drop the collection as well.\nCollection will only be dropped if it is not used in other graphs.\n\n",
"in": "query",
"name": "dropCollections",
"required": false,
"type": "boolean"
},
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/general_graph_edge_definition_modify_http_examples"
},
"x-description-offset": 184
}
],
"produces": [
"application/json"
],
"responses": {
"201": {
"description": "Returned if the request was successful and waitForSync is true.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_definition_modify_http_examples_rc_201"
},
"x-description-offset": 251
},
"202": {
"description": "Returned if the request was successful but waitForSync is false.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_definition_modify_http_examples_rc_202"
},
"x-description-offset": 318
},
"400": {
"description": "Returned 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",
"schema": {
"$ref": "#/definitions/general_graph_edge_definition_modify_http_examples_rc_400"
},
"x-description-offset": 385
},
"403": {
"description": "Returned 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",
"schema": {
"$ref": "#/definitions/general_graph_edge_definition_modify_http_examples_rc_403"
},
"x-description-offset": 452
},
"404": {
"description": "Returned if no graph with this name could be found.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_edge_definition_modify_http_examples_rc_404"
},
"x-description-offset": 519
}
},
"summary": "Replace an edge definition",
"tags": [
"Graph"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph/general_graph_edge_definition_modify_http_examples.md",
"x-hints": ""
}
},
"/_api/gharial/{graph}/vertex": {
"get": {
"description": "\n\nLists all vertex collections within this graph.\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nIs returned if the collections could be listed.\n\n- **code**: The response code.\n- **collections** (string): The list of all vertex collections within this graph.\nIncludes collections in edgeDefinitions as well as orphans.\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/social/vertex\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
\"collections\" : [ \n
\"female\", \n
\"male\" \n
] \n
}\n
\n\n\n\n",
"operationId": "ListVertexCollections",
"parameters": [
{
"description": "The name of the graph.\n\n",
"format": "string",
"in": "path",
"name": "graph",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Is returned if the collections could be listed.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_list_vertex_http_examples_rc_200"
},
"x-description-offset": 118
},
"404": {
"description": "Returned if no graph with this name could be found.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_list_vertex_http_examples_rc_404"
},
"x-description-offset": 185
}
},
"summary": "List vertex collections",
"tags": [
"Graph"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph/general_graph_list_vertex_http_examples.md",
"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 Edition 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 Edition 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 Edition 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 Edition 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",
"operationId": "AddVertexCollection",
"parameters": [
{
"description": "The name of the graph.\n\n",
"format": "string",
"in": "path",
"name": "graph",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"201": {
"description": "Is 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",
"schema": {
"$ref": "#/definitions/general_graph_vertex_collection_add_http_examples_rc_201"
},
"x-description-offset": 196
},
"202": {
"description": "Is 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",
"schema": {
"$ref": "#/definitions/general_graph_vertex_collection_add_http_examples_rc_202"
},
"x-description-offset": 263
},
"400": {
"description": "Returned if the request is in an invalid format.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_collection_add_http_examples_rc_400"
},
"x-description-offset": 330
},
"403": {
"description": "Returned if your user has insufficient rights.\nIn order to modify a graph you at least need to have the following privileges:\n\n 1. `Administrate` access on the Database.\n 2. `Read Only` access on every collection used within this graph.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_collection_add_http_examples_rc_403"
},
"x-description-offset": 397
},
"404": {
"description": "Returned if no graph with this name could be found.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_collection_add_http_examples_rc_404"
},
"x-description-offset": 464
}
},
"summary": "Add vertex collection",
"tags": [
"Graph"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph/general_graph_vertex_collection_add_http_examples.md",
"x-hints": ""
}
},
"/_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 Edition 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 Edition 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 Edition 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 Edition 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",
"operationId": "RemoveVertexCollection",
"parameters": [
{
"description": "The name of the graph.\n\n",
"format": "string",
"in": "path",
"name": "graph",
"required": true,
"type": "string"
},
{
"description": "The name of the vertex collection.\n\n",
"format": "string",
"in": "path",
"name": "collection",
"required": true,
"type": "string"
},
{
"description": "Drop the collection as well.\nCollection will only be dropped if it is not used in other graphs.\n\n",
"in": "query",
"name": "dropCollection",
"required": false,
"type": "boolean"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Returned if the vertex collection was removed from the graph successfully\nand waitForSync is true.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_collection_remove_http_examples_rc_200"
},
"x-description-offset": 350
},
"202": {
"description": "Returned if the request was successful but waitForSync is false.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_collection_remove_http_examples_rc_202"
},
"x-description-offset": 417
},
"400": {
"description": "Returned 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",
"schema": {
"$ref": "#/definitions/general_graph_vertex_collection_remove_http_examples_rc_400"
},
"x-description-offset": 484
},
"403": {
"description": "Returned 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",
"schema": {
"$ref": "#/definitions/general_graph_vertex_collection_remove_http_examples_rc_403"
},
"x-description-offset": 551
},
"404": {
"description": "Returned if no graph with this name could be found.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_collection_remove_http_examples_rc_404"
},
"x-description-offset": 618
}
},
"summary": "Remove vertex collection",
"tags": [
"Graph"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph/general_graph_vertex_collection_remove_http_examples.md",
"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: _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",
"operationId": "CreateAVertex",
"parameters": [
{
"description": "The name of the graph.\n\n",
"format": "string",
"in": "path",
"name": "graph",
"required": true,
"type": "string"
},
{
"description": "The name of the vertex collection the vertex should be inserted into.\n\n",
"format": "string",
"in": "path",
"name": "collection",
"required": true,
"type": "string"
},
{
"description": "Define if the request should wait until synced to disk.\n\n",
"in": "query",
"name": "waitForSync",
"required": false,
"type": "boolean"
},
{
"description": "Define if the response should contain the complete\nnew version of the document.\n\n",
"in": "query",
"name": "returnNew",
"required": false,
"type": "boolean"
},
{
"description": "The body has to be the JSON object to be stored.\n\n",
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"additionalProperties": {},
"type": "object"
},
"x-description-offset": 42
}
],
"produces": [
"application/json"
],
"responses": {
"201": {
"description": "Returned if the vertex could be added and waitForSync is true.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_create_http_examples_rc_201"
},
"x-description-offset": 109
},
"202": {
"description": "Returned if the request was successful but waitForSync is false.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_create_http_examples_rc_202"
},
"x-description-offset": 176
},
"403": {
"description": "Returned if your user has insufficient rights.\nIn order to insert vertices into the graph you at least need to have the following privileges:\n\n 1. `Read Only` access on the Database.\n 2. `Write` access on the given collection.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_create_http_examples_rc_403"
},
"x-description-offset": 243
},
"404": {
"description": "Returned 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",
"schema": {
"$ref": "#/definitions/general_graph_vertex_create_http_examples_rc_404"
},
"x-description-offset": 310
}
},
"summary": "Create a vertex",
"tags": [
"Graph"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph/general_graph_vertex_create_http_examples.md",
"x-hints": ""
}
},
"/_api/gharial/{graph}/vertex/{collection}/{vertex}": {
"delete": {
"description": "\n\nRemoves a vertex from the collection.\n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nReturned if the vertex could be removed.\n\n- **removed**: Is set to true if the remove was successful.\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- **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- **removed**: Is set to true if the remove was successful.\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- **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 delete 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 remove 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 DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/gharial/social/vertex/female/alice\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202, \n
\"removed\" : true \n
}\n
\n\n\n\n",
"operationId": "RemoveAVertex",
"parameters": [
{
"description": "The name of the graph.\n\n",
"format": "string",
"in": "path",
"name": "graph",
"required": true,
"type": "string"
},
{
"description": "The name of the vertex collection the vertex belongs to.\n\n",
"format": "string",
"in": "path",
"name": "collection",
"required": true,
"type": "string"
},
{
"description": "The *_key* attribute of the vertex.\n\n",
"format": "string",
"in": "path",
"name": "vertex",
"required": true,
"type": "string"
},
{
"description": "Define if the request should wait until synced to disk.\n\n",
"in": "query",
"name": "waitForSync",
"required": false,
"type": "boolean"
},
{
"description": "Define if a presentation of the deleted document should\nbe returned within the response object.\n\n",
"in": "query",
"name": "returnOld",
"required": false,
"type": "boolean"
},
{
"description": "If the \"If-Match\" header is given, then it must contain exactly one Etag. The document is updated,\nif it has the same revision as the given Etag. Otherwise a HTTP 412 is returned. As an alternative\nyou can supply the Etag in an attribute rev in the URL.\n\n",
"in": "header",
"name": "if-match",
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Returned if the vertex could be removed.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_delete_http_examples_rc_200"
},
"x-description-offset": 108
},
"202": {
"description": "Returned if the request was successful but waitForSync is false.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_delete_http_examples_rc_202"
},
"x-description-offset": 175
},
"403": {
"description": "Returned if your user has insufficient rights.\nIn order to delete vertices in the graph you at least need to have the following privileges:\n\n 1. `Read Only` access on the Database.\n 2. `Write` access on the given collection.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_delete_http_examples_rc_403"
},
"x-description-offset": 242
},
"404": {
"description": "Returned 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 remove does not exist.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_delete_http_examples_rc_404"
},
"x-description-offset": 309
},
"412": {
"description": "Returned if if-match header is given, but the stored documents revision is different.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_delete_http_examples_rc_412"
},
"x-description-offset": 376
}
},
"summary": "Remove a vertex",
"tags": [
"Graph"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph/general_graph_vertex_delete_http_examples.md",
"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: _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",
"operationId": "GetAVertex",
"parameters": [
{
"description": "The name of the graph.\n\n",
"format": "string",
"in": "path",
"name": "graph",
"required": true,
"type": "string"
},
{
"description": "The name of the vertex collection the vertex belongs to.\n\n",
"format": "string",
"in": "path",
"name": "collection",
"required": true,
"type": "string"
},
{
"description": "The *_key* attribute of the vertex.\n\n",
"format": "string",
"in": "path",
"name": "vertex",
"required": true,
"type": "string"
},
{
"description": "Must contain a revision.\nIf this is set a document is only returned if\nit has exactly this revision.\nAlso see if-match header as an alternative to this.\n\n",
"in": "query",
"name": "rev",
"required": false,
"type": "string"
},
{
"description": "If the \"If-Match\" header is given, then it must contain exactly one Etag. The document is returned,\nif it has the same revision as the given Etag. Otherwise a HTTP 412 is returned. As an alternative\nyou can supply the Etag in an query parameter *rev*.\n\n",
"in": "header",
"name": "if-match",
"type": "string"
},
{
"description": "If the \"If-None-Match\" header is given, then it must contain exactly one Etag. The document is returned,\nonly if it has a different revision as the given Etag. Otherwise a HTTP 304 is returned. \n\n",
"in": "header",
"name": "if-none-match",
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Returned if the vertex could be found.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_get_http_examples_rc_200"
},
"x-description-offset": 111
},
"304": {
"description": "Returned 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",
"schema": {
"$ref": "#/definitions/general_graph_vertex_get_http_examples_rc_304"
},
"x-description-offset": 178
},
"403": {
"description": "Returned if your user has insufficient rights.\nIn order to update vertices in the graph you at least need to have the following privileges:\n\n 1. `Read Only` access on the Database.\n 2. `Read Only` access on the given collection.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_get_http_examples_rc_403"
},
"x-description-offset": 245
},
"404": {
"description": "Returned 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",
"schema": {
"$ref": "#/definitions/general_graph_vertex_get_http_examples_rc_404"
},
"x-description-offset": 312
},
"412": {
"description": "Returned if if-match header is given, but the stored documents revision is different.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_get_http_examples_rc_412"
},
"x-description-offset": 379
}
},
"summary": "Get a vertex",
"tags": [
"Graph"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph/general_graph_vertex_get_http_examples.md",
"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: _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",
"operationId": "UpdateAVertex",
"parameters": [
{
"description": "The name of the graph.\n\n",
"format": "string",
"in": "path",
"name": "graph",
"required": true,
"type": "string"
},
{
"description": "The name of the vertex collection the vertex belongs to.\n\n",
"format": "string",
"in": "path",
"name": "collection",
"required": true,
"type": "string"
},
{
"description": "The *_key* attribute of the vertex.\n\n",
"format": "string",
"in": "path",
"name": "vertex",
"required": true,
"type": "string"
},
{
"description": "Define if the request should wait until synced to disk.\n\n",
"in": "query",
"name": "waitForSync",
"required": false,
"type": "boolean"
},
{
"description": "Define if values set to null should be stored.\nBy default (true) the given documents attribute(s) will be set to null.\nIf this parameter is false the attribute(s) will instead be delete from the\ndocument.\n\n",
"in": "query",
"name": "keepNull",
"required": false,
"type": "boolean"
},
{
"description": "Define if a presentation of the deleted document should\nbe returned within the response object.\n\n",
"in": "query",
"name": "returnOld",
"required": false,
"type": "boolean"
},
{
"description": "Define if a presentation of the new document should\nbe returned within the response object.\n\n",
"in": "query",
"name": "returnNew",
"required": false,
"type": "boolean"
},
{
"description": "If the \"If-Match\" header is given, then it must contain exactly one Etag. The document is updated,\nif it has the same revision as the given Etag. Otherwise a HTTP 412 is returned. As an alternative\nyou can supply the Etag in an attribute rev in the URL.\n\n",
"in": "header",
"name": "if-match",
"type": "string"
},
{
"description": "The body has to contain a JSON object containing exactly the attributes that should be overwritten, all other attributes remain unchanged.\n\n",
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"additionalProperties": {},
"type": "object"
},
"x-description-offset": 62
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Returned if the vertex could be updated, and waitForSync is true.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_modify_http_examples_rc_200"
},
"x-description-offset": 129
},
"202": {
"description": "Returned if the request was successful, and waitForSync is false.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_modify_http_examples_rc_202"
},
"x-description-offset": 196
},
"403": {
"description": "Returned if your user has insufficient rights.\nIn order to update vertices in the graph you at least need to have the following privileges:\n\n 1. `Read Only` access on the Database.\n 2. `Write` access on the given collection.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_modify_http_examples_rc_403"
},
"x-description-offset": 263
},
"404": {
"description": "Returned 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",
"schema": {
"$ref": "#/definitions/general_graph_vertex_modify_http_examples_rc_404"
},
"x-description-offset": 330
},
"412": {
"description": "Returned if if-match header is given, but the stored documents revision is different.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_modify_http_examples_rc_412"
},
"x-description-offset": 397
}
},
"summary": "Update a vertex",
"tags": [
"Graph"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph/general_graph_vertex_modify_http_examples.md",
"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: _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",
"operationId": "ReplaceAVertex",
"parameters": [
{
"description": "The name of the graph.\n\n",
"format": "string",
"in": "path",
"name": "graph",
"required": true,
"type": "string"
},
{
"description": "The name of the vertex collection the vertex belongs to.\n\n",
"format": "string",
"in": "path",
"name": "collection",
"required": true,
"type": "string"
},
{
"description": "The *_key* attribute of the vertex.\n\n",
"format": "string",
"in": "path",
"name": "vertex",
"required": true,
"type": "string"
},
{
"description": "Define if the request should wait until synced to disk.\n\n",
"in": "query",
"name": "waitForSync",
"required": false,
"type": "boolean"
},
{
"description": "Define if values set to null should be stored. By default the key is not removed from the document.\n\n",
"in": "query",
"name": "keepNull",
"required": false,
"type": "boolean"
},
{
"description": "Define if a presentation of the deleted document should\nbe returned within the response object.\n\n",
"in": "query",
"name": "returnOld",
"required": false,
"type": "boolean"
},
{
"description": "Define if a presentation of the new document should\nbe returned within the response object.\n\n",
"in": "query",
"name": "returnNew",
"required": false,
"type": "boolean"
},
{
"description": "If the \"If-Match\" header is given, then it must contain exactly one Etag. The document is updated,\nif it has the same revision as the given Etag. Otherwise a HTTP 412 is returned. As an alternative\nyou can supply the Etag in an attribute rev in the URL.\n\n",
"in": "header",
"name": "if-match",
"type": "string"
},
{
"description": "The body has to be the JSON object to be stored.\n\n",
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"additionalProperties": {},
"type": "object"
},
"x-description-offset": 52
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Returned if the vertex could be replaced, and waitForSync is true.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_replace_http_examples_rc_200"
},
"x-description-offset": 119
},
"202": {
"description": "Returned if the vertex could be replaced, and waitForSync is false.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_replace_http_examples_rc_202"
},
"x-description-offset": 186
},
"403": {
"description": "Returned if your user has insufficient rights.\nIn order to replace vertices in the graph you at least need to have the following privileges:\n\n 1. `Read Only` access on the Database.\n 2. `Write` access on the given collection.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_replace_http_examples_rc_403"
},
"x-description-offset": 253
},
"404": {
"description": "Returned 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",
"schema": {
"$ref": "#/definitions/general_graph_vertex_replace_http_examples_rc_404"
},
"x-description-offset": 320
},
"412": {
"description": "Returned if if-match header is given, but the stored documents revision is different.\n\n",
"schema": {
"$ref": "#/definitions/general_graph_vertex_replace_http_examples_rc_412"
},
"x-description-offset": 387
}
},
"summary": "Replace a vertex",
"tags": [
"Graph"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph/general_graph_vertex_replace_http_examples.md",
"x-hints": ""
}
},
"/_api/import#document": {
"post": {
"description": "\n\n**NOTE** Swagger examples won't work due to the anchor.\n\n\nCreates documents in the collection identified by `collection-name`.\nThe first line of the request body must contain a JSON-encoded array of\nattribute names. All following lines in the request body must contain\nJSON-encoded arrays of attribute values. Each line is interpreted as a\nseparate document, and the values specified will be mapped to the array\nof attribute names specified in the first header line.\n\nThe response is a JSON object with the following attributes:\n\n- `created`: number of documents imported.\n\n- `errors`: number of documents that were not imported due to an error.\n\n- `empty`: number of empty lines found in the input (will only contain a\n value greater zero for types `documents` or `auto`).\n\n- `updated`: number of updated/replaced documents (in case `onDuplicate`\n was set to either `update` or `replace`).\n\n- `ignored`: number of failed but ignored insert operations (in case\n `onDuplicate` was set to `ignore`).\n\n- `details`: if query parameter `details` is set to true, the result will\n contain a `details` attribute which is an array with more detailed\n information about which documents could not be inserted.\n\n\n\n\n**Example:**\n Importing two documents, with attributes `_key`, `value1` and `value2` each. One\nline in the import data is empty\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/import?collection=products <<EOF\n
[ \"_key\", \"value1\", \"value2\" ]\n
[ \"abc\", 25, \"test\" ]\n
\n
[ \"foo\", \"bar\", \"baz\" ]\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
\"error\" : false, \n
\"created\" : 2, \n
\"errors\" : 0, \n
\"empty\" : 1, \n
\"updated\" : 0, \n
\"ignored\" : 0 \n
}\n
\n\n\n\n\n**Example:**\n Importing into an edge collection, with attributes `_from`, `_to` and `name`\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/import?collection=links <<EOF\n
[ \"_from\", \"_to\", \"name\" ]\n
[ \"products/123\",\"products/234\", \"some name\" ]\n
[ \"products/332\", \"products/abc\", \"other name\" ]\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
\"error\" : false, \n
\"created\" : 2, \n
\"errors\" : 0, \n
\"empty\" : 0, \n
\"updated\" : 0, \n
\"ignored\" : 0 \n
}\n
\n\n\n\n\n**Example:**\n Importing into an edge collection, omitting `_from` or `_to`\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/import?collection=links&details=true <<EOF\n
[ \"name\" ]\n
[ \"some name\" ]\n
[ \"other name\" ]\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
\"error\" : false, \n
\"created\" : 0, \n
\"errors\" : 2, \n
\"empty\" : 0, \n
\"updated\" : 0, \n
\"ignored\" : 0, \n
\"details\" : [ \n
\"at position 1: missing '_from' or '_to' attribute, offending document: {\\\"name\\\":\\\"some name\\\"}\", \n
\"at position 2: missing '_from' or '_to' attribute, offending document: {\\\"name\\\":\\\"other name\\\"}\" \n
] \n
}\n
\n\n\n\n\n**Example:**\n Violating a unique constraint, but allow partial imports\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&details=true <<EOF\n
[ \"_key\", \"value1\", \"value2\" ]\n
[ \"abc\", 25, \"test\" ]\n
[\"abc\", \"bar\", \"baz\" ]\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
\"error\" : false, \n
\"created\" : 1, \n
\"errors\" : 1, \n
\"empty\" : 0, \n
\"updated\" : 0, \n
\"ignored\" : 0, \n
\"details\" : [ \n
\"at position 1: creating document failed with error 'unique constraint violated', offending document: {\\\"_key\\\":\\\"abc\\\",\\\"value1\\\":\\\"bar\\\",\\\"value2\\\":\\\"baz\\\"}\" \n
] \n
}\n
\n\n\n\n\n**Example:**\n Violating a unique constraint, not allowing partial imports\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&complete=true <<EOF\n
[ \"_key\", \"value1\", \"value2\" ]\n
[ \"abc\", 25, \"test\" ]\n
[\"abc\", \"bar\", \"baz\" ]\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\", \n
\"code\" : 409, \n
\"errorNum\" : 1210 \n
}\n
\n\n\n\n\n**Example:**\n Using a non-existing collection\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/import?collection=products <<EOF\n
[ \"_key\", \"value1\", \"value2\" ]\n
[ \"abc\", 25, \"test\" ]\n
[\"foo\", \"bar\", \"baz\" ]\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**Example:**\n Using a malformed body\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/import?collection=products <<EOF\n
{ \"_key\": \"foo\", \"value1\": \"bar\" }\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 JSON array found in second line\", \n
\"code\" : 400, \n
\"errorNum\" : 400 \n
}\n
\n\n\n\n\n",
"operationId": "RestImportHandler#document",
"parameters": [
{
"description": "The body must consist of JSON-encoded arrays of attribute values, with one\nline per document. The first row of the request must be a JSON-encoded\narray of attribute names. These attribute names are used for the data in the\nsubsequent lines.\n\n",
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"additionalProperties": {},
"type": "object"
},
"x-description-offset": 0
},
{
"description": "The collection name.\n\n",
"in": "query",
"name": "collection",
"required": true,
"type": "string"
},
{
"description": "An optional prefix for the values in `_from` attributes. If specified, the\nvalue is automatically prepended to each `_from` input value. This allows\nspecifying just the keys for `_from`.\n\n",
"in": "query",
"name": "fromPrefix",
"required": false,
"type": "string"
},
{
"description": "An optional prefix for the values in `_to` attributes. If specified, the\nvalue is automatically prepended to each `_to` input value. This allows\nspecifying just the keys for `_to`.\n\n",
"in": "query",
"name": "toPrefix",
"required": false,
"type": "string"
},
{
"description": "If this parameter has a value of `true` or `yes`, then all data in the\ncollection will be removed prior to the import. Note that any existing\nindex definitions will be preseved.\n\n",
"in": "query",
"name": "overwrite",
"required": false,
"type": "boolean"
},
{
"description": "Wait until documents have been synced to disk before returning.\n\n",
"in": "query",
"name": "waitForSync",
"required": false,
"type": "boolean"
},
{
"description": "Controls what action is carried out in case of a unique key constraint\nviolation. Possible values are:\n\n- *error*: this will not import the current document because of the unique\n key constraint violation. This is the default setting.\n\n- *update*: this will update an existing document in the database with the\n data specified in the request. Attributes of the existing document that\n are not present in the request will be preseved.\n\n- *replace*: this will replace an existing document in the database with the\n data specified in the request.\n\n- *ignore*: this will not update an existing document and simply ignore the\n error caused by the unique key constraint violation.\n\nNote that *update*, *replace* and *ignore* will only work when the\nimport document in the request contains the *_key* attribute. *update* and\n*replace* may also fail because of secondary unique key constraint\nviolations.\n\n",
"in": "query",
"name": "onDuplicate",
"required": false,
"type": "string"
},
{
"description": "If set to `true` or `yes`, it will make the whole import fail if any error\noccurs. Otherwise the import will continue even if some documents cannot\nbe imported.\n\n",
"in": "query",
"name": "complete",
"required": false,
"type": "boolean"
},
{
"description": "If set to `true` or `yes`, the result will include an attribute `details`\nwith details about documents that could not be imported.\n\n",
"in": "query",
"name": "details",
"required": false,
"type": "boolean"
}
],
"responses": {
"201": {
"description": "is returned if all documents could be imported successfully.\n\n"
},
"400": {
"description": "is returned if `type` contains an invalid value, no `collection` is\nspecified, the documents are incorrectly encoded, or the request\nis malformed.\n\n"
},
"404": {
"description": "is returned if `collection` or the `_from` or `_to` attributes of an\nimported edge refer to an unknown collection.\n\n"
},
"409": {
"description": "is returned if the import would trigger a unique key violation and\n`complete` is set to `true`.\n\n"
},
"500": {
"description": "is returned if the server cannot auto-generate a document key (out of keys\nerror) for a document with no user-defined key.\n\n"
}
},
"summary": "imports document values",
"tags": [
"Bulk"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Bulk/import_document.md",
"x-hints": ""
}
},
"/_api/import#json": {
"post": {
"description": "\n\n**NOTE** Swagger examples won't work due to the anchor.\n\n\nCreates documents in the collection identified by `collection-name`.\nThe JSON representations of the documents must be passed as the body of the\nPOST request. The request body can either consist of multiple lines, with\neach line being a single stand-alone JSON object, or a singe JSON array with\nsub-objects.\n\nThe response is a JSON object with the following attributes:\n\n- `created`: number of documents imported.\n\n- `errors`: number of documents that were not imported due to an error.\n\n- `empty`: number of empty lines found in the input (will only contain a\n value greater zero for types `documents` or `auto`).\n\n- `updated`: number of updated/replaced documents (in case `onDuplicate`\n was set to either `update` or `replace`).\n\n- `ignored`: number of failed but ignored insert operations (in case\n `onDuplicate` was set to `ignore`).\n\n- `details`: if query parameter `details` is set to true, the result will\n contain a `details` attribute which is an array with more detailed\n information about which documents could not be inserted.\n\n\n\n\n**Example:**\n Importing documents with heterogenous attributes from a JSON array\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&type=list <<EOF\n
[ \n
{ \n
\"_key\" : \"abc\", \n
\"value1\" : 25, \n
\"value2\" : \"test\", \n
\"allowed\" : true \n
}, \n
{ \n
\"_key\" : \"foo\", \n
\"name\" : \"baz\" \n
}, \n
{ \n
\"name\" : { \n
\"detailed\" : \"detailed name\", \n
\"short\" : \"short name\" \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
\"error\" : false, \n
\"created\" : 3, \n
\"errors\" : 0, \n
\"empty\" : 0, \n
\"updated\" : 0, \n
\"ignored\" : 0 \n
}\n
\n\n\n\n\n**Example:**\n Importing documents from individual JSON lines\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&type=documents <<EOF\n
{ \"_key\": \"abc\", \"value1\": 25, \"value2\": \"test\",\"allowed\": true }\n
{ \"_key\": \"foo\", \"name\": \"baz\" }\n
\n
{ \"name\": { \"detailed\": \"detailed name\", \"short\": \"short name\" } }\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
\"error\" : false, \n
\"created\" : 3, \n
\"errors\" : 0, \n
\"empty\" : 1, \n
\"updated\" : 0, \n
\"ignored\" : 0 \n
}\n
\n\n\n\n\n**Example:**\n Using the auto type detection\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&type=auto <<EOF\n
[ \n
{ \n
\"_key\" : \"abc\", \n
\"value1\" : 25, \n
\"value2\" : \"test\", \n
\"allowed\" : true \n
}, \n
{ \n
\"_key\" : \"foo\", \n
\"name\" : \"baz\" \n
}, \n
{ \n
\"name\" : { \n
\"detailed\" : \"detailed name\", \n
\"short\" : \"short name\" \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
\"error\" : false, \n
\"created\" : 3, \n
\"errors\" : 0, \n
\"empty\" : 0, \n
\"updated\" : 0, \n
\"ignored\" : 0 \n
}\n
\n\n\n\n\n**Example:**\n Importing into an edge collection, with attributes `_from`, `_to` and `name`\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/import?collection=links&type=documents <<EOF\n
{ \"_from\": \"products/123\", \"_to\": \"products/234\" }\n
{\"_from\": \"products/332\", \"_to\": \"products/abc\", \"name\": \"other name\" }\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
\"error\" : false, \n
\"created\" : 2, \n
\"errors\" : 0, \n
\"empty\" : 0, \n
\"updated\" : 0, \n
\"ignored\" : 0 \n
}\n
\n\n\n\n\n**Example:**\n Importing into an edge collection, omitting `_from` or `_to`\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/import?collection=links&type=list&details=true <<EOF\n
[ \n
{ \n
\"name\" : \"some name\" \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
\"error\" : false, \n
\"created\" : 0, \n
\"errors\" : 1, \n
\"empty\" : 0, \n
\"updated\" : 0, \n
\"ignored\" : 0, \n
\"details\" : [ \n
\"at position 1: missing '_from' or '_to' attribute, offending document: {\\\"name\\\":\\\"some name\\\"}\" \n
] \n
}\n
\n\n\n\n\n**Example:**\n Violating a unique constraint, but allow partial imports\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&type=documents&details=true <<EOF\n
{ \"_key\": \"abc\", \"value1\": 25, \"value2\": \"test\" }\n
{ \"_key\": \"abc\", \"value1\": \"bar\", \"value2\": \"baz\" }\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
\"error\" : false, \n
\"created\" : 1, \n
\"errors\" : 1, \n
\"empty\" : 0, \n
\"updated\" : 0, \n
\"ignored\" : 0, \n
\"details\" : [ \n
\"at position 1: creating document failed with error 'unique constraint violated', offending document: {\\\"_key\\\":\\\"abc\\\",\\\"value1\\\":\\\"bar\\\",\\\"value2\\\":\\\"baz\\\"}\" \n
] \n
}\n
\n\n\n\n\n**Example:**\n Violating a unique constraint, not allowing partial imports\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&type=documents&complete=true <<EOF\n
{ \"_key\": \"abc\", \"value1\": 25, \"value2\": \"test\" }\n
{ \"_key\": \"abc\", \"value1\": \"bar\", \"value2\": \"baz\" }\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\", \n
\"code\" : 409, \n
\"errorNum\" : 1210 \n
}\n
\n\n\n\n\n**Example:**\n Using a non-existing collection\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&type=documents <<EOF\n
{ \"name\": \"test\" }\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**Example:**\n Using a malformed body\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&type=list <<EOF\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\" : \"expecting a JSON array in the request\", \n
\"code\" : 400, \n
\"errorNum\" : 400 \n
}\n
\n\n\n\n\n",
"operationId": "RestImportHandler",
"parameters": [
{
"description": "The body must either be a JSON-encoded array of objects or a string with\nmultiple JSON objects separated by newlines.\n\n",
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"additionalProperties": {},
"type": "object"
},
"x-description-offset": 0
},
{
"description": "Determines how the body of the request will be interpreted. `type` can have\nthe following values:\n- `documents`: when this type is used, each line in the request body is\n expected to be an individual JSON-encoded document. Multiple JSON objects\n in the request body need to be separated by newlines.\n- `list`: when this type is used, the request body must contain a single\n JSON-encoded array of individual objects to import.\n- `auto`: if set, this will automatically determine the body type (either\n `documents` or `list`).\n\n",
"in": "query",
"name": "type",
"required": true,
"type": "string"
},
{
"description": "The collection name.\n\n",
"in": "query",
"name": "collection",
"required": true,
"type": "string"
},
{
"description": "An optional prefix for the values in `_from` attributes. If specified, the\nvalue is automatically prepended to each `_from` input value. This allows\nspecifying just the keys for `_from`.\n\n",
"in": "query",
"name": "fromPrefix",
"required": false,
"type": "string"
},
{
"description": "An optional prefix for the values in `_to` attributes. If specified, the\nvalue is automatically prepended to each `_to` input value. This allows\nspecifying just the keys for `_to`.\n\n",
"in": "query",
"name": "toPrefix",
"required": false,
"type": "string"
},
{
"description": "If this parameter has a value of `true` or `yes`, then all data in the\ncollection will be removed prior to the import. Note that any existing\nindex definitions will be preseved.\n\n",
"in": "query",
"name": "overwrite",
"required": false,
"type": "boolean"
},
{
"description": "Wait until documents have been synced to disk before returning.\n\n",
"in": "query",
"name": "waitForSync",
"required": false,
"type": "boolean"
},
{
"description": "Controls what action is carried out in case of a unique key constraint\nviolation. Possible values are:\n\n- *error*: this will not import the current document because of the unique\n key constraint violation. This is the default setting.\n\n- *update*: this will update an existing document in the database with the \n data specified in the request. Attributes of the existing document that\n are not present in the request will be preseved.\n\n- *replace*: this will replace an existing document in the database with the\n data specified in the request. \n\n- *ignore*: this will not update an existing document and simply ignore the\n error caused by a unique key constraint violation.\n\nNote that that *update*, *replace* and *ignore* will only work when the\nimport document in the request contains the *_key* attribute. *update* and\n*replace* may also fail because of secondary unique key constraint violations.\n\n",
"in": "query",
"name": "onDuplicate",
"required": false,
"type": "string"
},
{
"description": "If set to `true` or `yes`, it will make the whole import fail if any error\noccurs. Otherwise the import will continue even if some documents cannot\nbe imported.\n\n",
"in": "query",
"name": "complete",
"required": false,
"type": "boolean"
},
{
"description": "If set to `true` or `yes`, the result will include an attribute `details`\nwith details about documents that could not be imported.\n\n",
"in": "query",
"name": "details",
"required": false,
"type": "boolean"
}
],
"responses": {
"201": {
"description": "is returned if all documents could be imported successfully.\n\n"
},
"400": {
"description": "is returned if `type` contains an invalid value, no `collection` is\nspecified, the documents are incorrectly encoded, or the request\nis malformed.\n\n"
},
"404": {
"description": "is returned if `collection` or the `_from` or `_to` attributes of an\nimported edge refer to an unknown collection.\n\n"
},
"409": {
"description": "is returned if the import would trigger a unique key violation and\n`complete` is set to `true`.\n\n"
},
"500": {
"description": "is returned if the server cannot auto-generate a document key (out of keys\nerror) for a document with no user-defined key.\n\n"
}
},
"summary": "imports documents from JSON",
"tags": [
"Bulk"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Bulk/import_json.md",
"x-hints": ""
}
},
"/_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/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",
"operationId": "getIndexes",
"parameters": [
{
"description": "The collection name.\n\n",
"in": "query",
"name": "collection",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "returns a JSON object containing a list of indexes on that collection.\n\n"
}
},
"summary": "Read all indexes of a collection",
"tags": [
"Indexes"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Indexes/get_api_index.md",
"x-hints": ""
}
},
"/_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/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",
"operationId": "createIndex#fulltext",
"parameters": [
{
"description": "The collection name.\n\n",
"in": "query",
"name": "collection-name",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/post_api_index_fulltext"
},
"x-description-offset": 54
}
],
"responses": {
"200": {
"description": "If the index already exists, then a *HTTP 200* is\nreturned.\n\n"
},
"201": {
"description": "If the index does not already exist and could be created, then a *HTTP 201*\nis returned.\n\n"
},
"404": {
"description": "If the *collection-name* is unknown, then a *HTTP 404* is returned.\n\n"
}
},
"summary": "Create fulltext index",
"tags": [
"Indexes"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Indexes/post_api_index_fulltext.md",
"x-hints": ""
}
},
"/_api/index#general": {
"post": {
"description": "\n\n**NOTE** Swagger examples won't work due to the anchor.\n\n\nCreates a new index in the collection *collection*. Expects\nan object containing the index details.\n\nThe type of the index to be created must specified in the *type*\nattribute of the index details. Depending on the index type, additional\nother attributes may need to specified in the request in order to create\nthe index.\n\nIndexes require the to be indexed attribute(s) in the *fields* attribute\nof the index details. Depending on the index type, a single attribute or\nmultiple attributes can be indexed. In the latter case, an array of\nstrings is expected.\n\nIndexing the system attribute *_id* is not supported for user-defined indexes. \nManually creating an index using *_id* as an index attribute will fail with \nan error.\n\nOptionally, an index name may be specified as a string in the *name* attribute.\nIndex names have the same restrictions as collection names. If no value is\nspecified, one will be auto-generated.\n\nSome indexes can be created as unique or non-unique variants. Uniqueness\ncan be controlled for most indexes by specifying the *unique* flag in the\nindex details. Setting it to *true* will create a unique index.\nSetting it to *false* or omitting the *unique* attribute will\ncreate a non-unique index.\n\n**Note**: The following index types do not support uniqueness, and using\nthe *unique* attribute with these types may lead to an error:\n\n- geo indexes\n- fulltext indexes\n\n**Note**: Unique indexes on non-shard keys are not supported in a\ncluster.\n\nHash, skiplist and persistent indexes can optionally be created in a sparse\nvariant. A sparse index will be created if the *sparse* attribute in\nthe index details is set to *true*. Sparse indexes do not index documents\nfor which any of the index attributes is either not set or is *null*. \n\nThe optional attribute **deduplicate** is supported by array indexes of\ntype *hash* or *skiplist*. It controls whether inserting duplicate index values \nfrom the same document into a unique array index will lead to a unique constraint\nerror or not. The default value is *true*, so only a single instance of each\nnon-unique index value will be inserted into the index per document. Trying to\ninsert a value into the index that already exists in the index will always fail,\nregardless of the value of this attribute.\n\n",
"operationId": "createIndex:general",
"parameters": [
{
"description": "The collection name.\n\n",
"in": "query",
"name": "collection",
"required": true,
"type": "string"
},
{
"description": "\n",
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"additionalProperties": {},
"type": "object"
},
"x-description-offset": 0
}
],
"responses": {
"200": {
"description": "If the index already exists, then an *HTTP 200* is returned.\n\n"
},
"201": {
"description": "If the index does not already exist and could be created, then an *HTTP 201*\nis returned.\n\n"
},
"400": {
"description": "If an invalid index description is posted or attributes are used that the\ntarget index will not support, then an *HTTP 400* is returned.\n\n"
},
"404": {
"description": "If *collection* is unknown, then an *HTTP 404* is returned.\n\n"
}
},
"summary": "Create index",
"tags": [
"Indexes"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Indexes/post_api_index.md",
"x-hints": ""
}
},
"/_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/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",
"operationId": "createIndex#geo",
"parameters": [
{
"description": "The collection name.\n\n\n",
"in": "query",
"name": "collection",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/post_api_index_geo"
},
"x-description-offset": 54
}
],
"responses": {
"200": {
"description": "If the index already exists, then a *HTTP 200* is returned.\n\n"
},
"201": {
"description": "If the index does not already exist and could be created, then a *HTTP 201*\nis returned.\n\n"
},
"404": {
"description": "If the *collection-name* is unknown, then a *HTTP 404* is returned.\n\n"
}
},
"summary": "Create geo-spatial index",
"tags": [
"Indexes"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Indexes/post_api_index_geo.md",
"x-hints": ""
}
},
"/_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/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",
"operationId": "createIndex:hash",
"parameters": [
{
"description": "The collection name.\n\n",
"in": "query",
"name": "collection-name",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/post_api_index_hash"
},
"x-description-offset": 54
}
],
"responses": {
"200": {
"description": "If the index already exists, then a *HTTP 200* is returned.\n\n"
},
"201": {
"description": "If the index does not already exist and could be created, then a *HTTP 201*\nis returned.\n\n"
},
"400": {
"description": "If the collection already contains documents and you try to create a unique\nhash index in such a way that there are documents violating the uniqueness,\nthen a *HTTP 400* is returned.\n\n"
},
"404": {
"description": "If the *collection-name* is unknown, then a *HTTP 404* is returned.\n\n"
}
},
"summary": "Create hash index",
"tags": [
"Indexes"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Indexes/post_api_index_hash.md",
"x-hints": ""
}
},
"/_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/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",
"operationId": "createIndex:persistent",
"parameters": [
{
"description": "The collection name.\n\n",
"in": "query",
"name": "collection-name",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/post_api_index_persistent"
},
"x-description-offset": 54
}
],
"responses": {
"200": {
"description": "If the index already exists, then a *HTTP 200* is\nreturned.\n\n"
},
"201": {
"description": "If the index does not already exist and could be created, then a *HTTP 201*\nis returned.\n\n"
},
"400": {
"description": "If the collection already contains documents and you try to create a unique\npersistent index in such a way that there are documents violating the\nuniqueness, then a *HTTP 400* is returned.\n\n"
},
"404": {
"description": "If the *collection-name* is unknown, then a *HTTP 404* is returned.\n\n"
}
},
"summary": "Create a persistent index",
"tags": [
"Indexes"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Indexes/post_api_index_persistent.md",
"x-hints": ""
}
},
"/_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/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",
"operationId": "createIndex:skiplist",
"parameters": [
{
"description": "The collection name.\n\n",
"in": "query",
"name": "collection-name",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/post_api_index_skiplist"
},
"x-description-offset": 54
}
],
"responses": {
"200": {
"description": "If the index already exists, then a *HTTP 200* is\nreturned.\n\n"
},
"201": {
"description": "If the index does not already exist and could be created, then a *HTTP 201*\nis returned.\n\n"
},
"400": {
"description": "If the collection already contains documents and you try to create a unique\nskip-list index in such a way that there are documents violating the\nuniqueness, then a *HTTP 400* is returned.\n\n"
},
"404": {
"description": "If the *collection-name* is unknown, then a *HTTP 404* is returned.\n\n"
}
},
"summary": "Create skip list",
"tags": [
"Indexes"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Indexes/post_api_index_skiplist.md",
"x-hints": ""
}
},
"/_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/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",
"operationId": "createIndex:ttl",
"parameters": [
{
"description": "The collection name.\n\n",
"in": "query",
"name": "collection-name",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/post_api_index_ttl"
},
"x-description-offset": 54
}
],
"responses": {
"200": {
"description": "If the index already exists, then a *HTTP 200* is returned.\n\n"
},
"201": {
"description": "If the index does not already exist and could be created, then a *HTTP 201*\nis returned.\n\n"
},
"400": {
"description": "If the collection already contains another TTL index, then an *HTTP 400* is \nreturned, as there can be at most one TTL index per collection.\n\n"
},
"404": {
"description": "If the *collection-name* is unknown, then a *HTTP 404* is returned.\n\n"
}
},
"summary": "Create TTL index",
"tags": [
"Indexes"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Indexes/post_api_index_ttl.md",
"x-hints": ""
}
},
"/_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/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",
"operationId": "dropIndex",
"parameters": [
{
"description": "The index handle.\n\n",
"format": "string",
"in": "path",
"name": "index-handle",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "If the index could be deleted, then an *HTTP 200* is\nreturned.\n\n"
},
"404": {
"description": "If the *index-handle* is unknown, then an *HTTP 404* is returned.\n"
}
},
"summary": "Delete index",
"tags": [
"Indexes"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Indexes/post_api_index_delete.md",
"x-hints": ""
},
"get": {
"description": "\n\nThe result is an object describing the index. It has at least the following\nattributes:\n\n- *id*: the identifier of the index\n\n- *type*: the index type\n\nAll other attributes are type-dependent. For example, some indexes provide\n*unique* or *sparse* flags, whereas others don't. Some indexes also provide \na selectivity estimate in the *selectivityEstimate* attribute of the result.\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/index/products/0\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"fields\" : [ \n
\"_key\" \n
], \n
\"id\" : \"products/0\", \n
\"sparse\" : false, \n
\"type\" : \"primary\", \n
\"unique\" : true, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n",
"operationId": "getIndexes:handle",
"parameters": [
{
"description": "The index-handle.\n\n",
"format": "string",
"in": "path",
"name": "index-handle",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "If the index exists, then a *HTTP 200* is returned.\n\n"
},
"404": {
"description": "If the index does not exist, then a *HTTP 404*\nis returned.\n\n"
}
},
"summary": "Read index",
"tags": [
"Indexes"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Indexes/get_api_reads_index.md",
"x-hints": ""
}
},
"/_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: 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",
"operationId": "getJobById",
"parameters": [
{
"description": "The async job id.\n\n",
"format": "string",
"in": "path",
"name": "job-id",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "is returned if the job requested via job-id has been executed\nand its result is ready to fetch.\n\n"
},
"204": {
"description": "is returned if the job requested via job-id is still in the queue of pending\n(or not yet finished) jobs.\n\n"
},
"404": {
"description": "is returned if the job was not found or already deleted or fetched from the\njob result list.\n\n"
}
},
"summary": "Returns async job",
"tags": [
"job"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/job/job_getStatusById.md",
"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: 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",
"operationId": "getJobResult",
"parameters": [
{
"description": "The async job id.\n\n",
"format": "string",
"in": "path",
"name": "job-id",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "is returned if the job requested via job-id is still in the queue of pending\n(or not yet finished) jobs. In this case, no x-arango-async-id HTTP header\nwill be returned.\n\n"
},
"400": {
"description": "is returned if no job-id was specified in the request. In this case,\nno x-arango-async-id HTTP header will be returned.\n\n"
},
"404": {
"description": "is returned if the job was not found or already deleted or fetched from\nthe job result list. In this case, no x-arango-async-id HTTP header will\nbe returned.\n\n"
}
},
"summary": "Return result of an async job",
"tags": [
"job"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/job/job_fetch_result.md",
"x-hints": ""
}
},
"/_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: 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",
"operationId": "putJobMethod:cancel",
"parameters": [
{
"description": "The async job id.\n\n",
"format": "string",
"in": "path",
"name": "job-id",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "cancel has been initiated.\n\n"
},
"400": {
"description": "is returned if no job-id was specified in the request. In this case,\nno x-arango-async-id HTTP header will be returned.\n\n"
},
"404": {
"description": "is returned if the job was not found or already deleted or fetched from\nthe job result list. In this case, no x-arango-async-id HTTP header will\nbe returned.\n\n"
}
},
"summary": "Cancel async job",
"tags": [
"job"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/job/job_cancel.md",
"x-hints": ""
}
},
"/_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: 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",
"operationId": "deleteJob:byType",
"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",
"format": "string",
"in": "path",
"name": "type",
"required": true,
"type": "string"
},
{
"description": "A UNIX timestamp specifying the expiration threshold when type is expired.\n\n",
"in": "query",
"name": "stamp",
"required": false,
"type": "number"
}
],
"responses": {
"200": {
"description": "is returned if the deletion operation was carried out successfully.\nThis code will also be returned if no results were deleted.\n\n"
},
"400": {
"description": "is returned if type is not specified or has an invalid value.\n\n"
},
"404": {
"description": "is returned if type is a job-id but no async job with the specified id was\nfound.\n\n"
}
},
"summary": "Deletes async job",
"tags": [
"job"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/job/job_delete.md",
"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: 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",
"operationId": "getJob",
"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",
"format": "string",
"in": "path",
"name": "type",
"required": true,
"type": "string"
},
{
"description": "\nThe maximum number of ids to return per call. If not specified, a\nserver-defined maximum value will be used.\n\n",
"in": "query",
"name": "count",
"required": false,
"type": "number"
}
],
"responses": {
"200": {
"description": "is returned if the list can be compiled successfully. Note: the list might\nbe empty.\n\n"
},
"400": {
"description": "is returned if type is not specified or has an invalid value.\n\n"
}
},
"summary": "Returns list of async jobs",
"tags": [
"job"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/job/job_getByType.md",
"x-hints": ""
}
},
"/_api/query": {
"post": {
"description": "\n\nThis endpoint is for query validation only. To actually query the database,\nsee `/api/cursor`.\n\n\n**A JSON object with these properties is required:**\n\n - **query**: To validate a query string without executing it, the query string can be\n passed to the server via an HTTP POST request.\n\n\n\n\n\n**Example:**\n a valid query\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/query <<EOF\n
{ \"query\" : \"FOR i IN 1..100 FILTER i > 10 LIMIT 2 RETURN i * 3\" }\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
\"parsed\" : true, \n
\"collections\" : [ ], \n
\"bindVars\" : [ ], \n
\"ast\" : [ \n
{ \n
\"type\" : \"root\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"for\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"variable\", \n
\"name\" : \"i\", \n
\"id\" : 0 \n
}, \n
{ \n
\"type\" : \"range\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"value\", \n
\"value\" : 1 \n
}, \n
{ \n
\"type\" : \"value\", \n
\"value\" : 100 \n
} \n
] \n
}, \n
{ \n
\"type\" : \"no-op\" \n
} \n
] \n
}, \n
{ \n
\"type\" : \"filter\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"compare >\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"reference\", \n
\"name\" : \"i\", \n
\"id\" : 0 \n
}, \n
{ \n
\"type\" : \"value\", \n
\"value\" : 10 \n
} \n
] \n
} \n
] \n
}, \n
{ \n
\"type\" : \"limit\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"value\", \n
\"value\" : 0 \n
}, \n
{ \n
\"type\" : \"value\", \n
\"value\" : 2 \n
} \n
] \n
}, \n
{ \n
\"type\" : \"return\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"times\", \n
\"subNodes\" : [ \n
{ \n
\"type\" : \"reference\", \n
\"name\" : \"i\", \n
\"id\" : 0 \n
}, \n
{ \n
\"type\" : \"value\", \n
\"value\" : 3 \n
} \n
] \n
} \n
] \n
} \n
] \n
} \n
] \n
}\n
\n\n\n\n\n**Example:**\n an invalid query\n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/query <<EOF\n
{ \"query\" : \"FOR i IN 1..100 FILTER i = 1 LIMIT 2 RETURN i * 3\" }\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\" : \"syntax error, unexpected assignment near '= 1 LIMIT 2 RETURN i * 3' at position 1:26\", \n
\"code\" : 400, \n
\"errorNum\" : 1501 \n
}\n
\n\n\n\n\n",
"operationId": "parseQuery",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/PostApiQueryProperties"
},
"x-description-offset": 152
}
],
"responses": {
"200": {
"description": "If the query is valid, the server will respond with *HTTP 200* and\nreturn the names of the bind parameters it found in the query (if any) in\nthe *bindVars* attribute of the response. It will also return an array\nof the collections used in the query in the *collections* attribute.\nIf a query can be parsed successfully, the *ast* attribute of the returned\nJSON will contain the abstract syntax tree representation of the query.\nThe format of the *ast* is subject to change in future versions of\nArangoDB, but it can be used to inspect how ArangoDB interprets a given\nquery. Note that the abstract syntax tree will be returned without any\noptimizations applied to it.\n\n"
},
"400": {
"description": "The server will respond with *HTTP 400* in case of a malformed request,\nor if the query contains a parse error. The body of the response will\ncontain the error details embedded in a JSON object.\n\n"
}
},
"summary": "Parse an AQL query",
"tags": [
"AQL"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/AQL/PostApiQueryProperties.md",
"x-hints": ""
}
},
"/_api/query-cache": {
"delete": {
"description": "\n\nclears the query results cache for the current database\n",
"operationId": "clearCache",
"parameters": [],
"responses": {
"200": {
"description": "The server will respond with *HTTP 200* when the cache was cleared\nsuccessfully.\n\n"
},
"400": {
"description": "The server will respond with *HTTP 400* in case of a malformed request.\n\n\n"
}
},
"summary": "Clears any results in the AQL query results cache",
"tags": [
"AQL"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/AQL/DeleteApiQueryCache.md",
"x-hints": ""
}
},
"/_api/query-cache/entries": {
"get": {
"description": "\n\nReturns an array containing the AQL query results currently stored in the query results\ncache of the selected database. Each result is a JSON object with the following attributes:\n\n- *hash*: the query result's hash\n\n- *query*: the query string \n\n- *bindVars*: the query's bind parameters. this attribute is only shown if tracking for\n bind variables was enabled at server start\n\n- *size*: the size of the query result and bind parameters, in bytes\n\n- *results*: number of documents/rows in the query result\n\n- *started*: the date and time when the query was stored in the cache\n\n- *hits*: number of times the result was served from the cache (can be \n *0* for queries that were only stored in the cache but were never accessed\n again afterwards)\n\n- *runTime*: the query's run time\n\n- *dataSources*: an array of collections/views the query was using\n\n",
"operationId": "readQueries",
"parameters": [],
"responses": {
"200": {
"description": "Is returned when the list of results can be retrieved successfully.\n\n"
},
"400": {
"description": "The server will respond with *HTTP 400* in case of a malformed request,\n\n\n\n"
}
},
"summary": "Returns the currently cached query results",
"tags": [
"AQL"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/AQL/GetApiQueryCacheCurrent.md",
"x-hints": ""
}
},
"/_api/query-cache/properties": {
"get": {
"description": "\n\nReturns the global AQL query results cache configuration. The configuration is a\nJSON object with the following properties:\n\n- *mode*: the mode the AQL query results cache operates in. The mode is one of the following\n values: *off*, *on* or *demand*.\n\n- *maxResults*: the maximum number of query results that will be stored per database-specific\n cache.\n\n- *maxResultsSize*: the maximum cumulated size of query results that will be stored per \n database-specific cache.\n\n- *maxEntrySize*: the maximum individual result size of queries that will be stored per \n database-specific cache.\n\n- *includeSystem*: whether or not results of queries that involve system collections will be\n stored in the query results cache.\n\n",
"operationId": "readProperties",
"parameters": [],
"responses": {
"200": {
"description": "Is returned if the properties can be retrieved successfully.\n\n"
},
"400": {
"description": "The server will respond with *HTTP 400* in case of a malformed request,\n\n\n\n"
}
},
"summary": "Returns the global properties for the AQL query results cache",
"tags": [
"AQL"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/AQL/GetApiQueryCacheProperties.md",
"x-hints": ""
},
"put": {
"description": "\n\nAfter the properties have been changed, the current set of properties will\nbe returned in the HTTP response.\n\nNote: changing the properties may invalidate all results in the cache.\nThe global properties for AQL query cache.\nThe properties need to be passed in the attribute *properties* in the body\nof the HTTP request. *properties* needs to be a JSON object with the following\nproperties:\n\n\n**A JSON object with these properties is required:**\n\n - **maxResultsSize**: the maximum cumulated size of query results that will be stored per database-specific cache.\n - **includeSystem**: whether or not to store results of queries that involve system collections.\n - **mode**: the mode the AQL query cache should operate in. Possible values are *off*, *on* or *demand*.\n - **maxResults**: the maximum number of query results that will be stored per database-specific cache.\n - **maxEntrySize**: the maximum individual size of query results that will be stored per database-specific cache.\n\n\n",
"operationId": "replaceProperties:QueryCache",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/PutApiQueryCacheProperties"
},
"x-description-offset": 447
}
],
"responses": {
"200": {
"description": "Is returned if the properties were changed successfully.\n\n"
},
"400": {
"description": "The server will respond with *HTTP 400* in case of a malformed request,\n\n\n\n"
}
},
"summary": "Globally adjusts the AQL query results cache properties",
"tags": [
"AQL"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/AQL/PutApiQueryCacheProperties.md",
"x-hints": ""
}
},
"/_api/query/current": {
"get": {
"description": "\n\nReturns an array containing the AQL queries currently running in the selected\ndatabase. Each query is a JSON object with the following attributes:\n\n- *id*: the query's id\n\n- *query*: the query string (potentially truncated)\n\n- *bindVars*: the bind parameter values used by the query\n\n- *started*: the date and time when the query was started\n\n- *runTime*: the query's run time up to the point the list of queries was\n queried\n\n- *state*: the query's current execution state (as a string)\n\n- *stream*: whether or not the query uses a streaming cursor\n\n",
"operationId": "readQuery:current",
"parameters": [],
"responses": {
"200": {
"description": "Is returned when the list of queries can be retrieved successfully.\n\n"
},
"400": {
"description": "The server will respond with *HTTP 400* in case of a malformed request,\n\n\n\n"
}
},
"summary": "Returns the currently running AQL queries",
"tags": [
"AQL"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/AQL/GetApiQueryCurrent.md",
"x-hints": ""
}
},
"/_api/query/properties": {
"get": {
"description": "\n\nReturns the current query tracking configuration. The configuration is a\nJSON object with the following properties:\n\n- *enabled*: if set to *true*, then queries will be tracked. If set to\n *false*, neither queries nor slow queries will be tracked.\n\n- *trackSlowQueries*: if set to *true*, then slow queries will be tracked\n in the list of slow queries if their runtime exceeds the value set in \n *slowQueryThreshold*. In order for slow queries to be tracked, the *enabled*\n property must also be set to *true*.\n\n- *trackBindVars*: if set to *true*, then bind variables used in queries will \n be tracked.\n\n- *maxSlowQueries*: the maximum number of slow queries to keep in the list\n of slow queries. If the list of slow queries is full, the oldest entry in\n it will be discarded when additional slow queries occur.\n\n- *slowQueryThreshold*: the threshold value for treating a query as slow. A\n query with a runtime greater or equal to this threshold value will be\n put into the list of slow queries when slow query tracking is enabled.\n The value for *slowQueryThreshold* is specified in seconds.\n\n- *maxQueryStringLength*: the maximum query string length to keep in the\n list of queries. Query strings can have arbitrary lengths, and this property\n can be used to save memory in case very long query strings are used. The\n value is specified in bytes.\n\n",
"operationId": "readQueryProperties",
"parameters": [],
"responses": {
"200": {
"description": "Is returned if properties were retrieved successfully.\n\n"
},
"400": {
"description": "The server will respond with *HTTP 400* in case of a malformed request,\n\n\n\n"
}
},
"summary": "Returns the properties for the AQL query tracking",
"tags": [
"AQL"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/AQL/GetApiQueryProperties.md",
"x-hints": ""
},
"put": {
"description": "\n**A JSON object with these properties is required:**\n\n - **maxSlowQueries**: The maximum number of slow queries to keep in the list\n of slow queries. If the list of slow queries is full, the oldest entry in\n it will be discarded when additional slow queries occur.\n - **slowQueryThreshold**: The threshold value for treating a query as slow. A\n query with a runtime greater or equal to this threshold value will be\n put into the list of slow queries when slow query tracking is enabled.\n The value for *slowQueryThreshold* is specified in seconds.\n - **enabled**: If set to *true*, then queries will be tracked. If set to\n *false*, neither queries nor slow queries will be tracked.\n - **maxQueryStringLength**: The maximum query string length to keep in the list of queries.\n Query strings can have arbitrary lengths, and this property\n can be used to save memory in case very long query strings are used. The\n value is specified in bytes.\n - **trackSlowQueries**: If set to *true*, then slow queries will be tracked\n in the list of slow queries if their runtime exceeds the value set in\n *slowQueryThreshold*. In order for slow queries to be tracked, the *enabled*\n property must also be set to *true*.\n - **trackBindVars**: If set to *true*, then the bind variables used in queries will be tracked \n along with queries.\n\n\n\n\nThe properties need to be passed in the attribute *properties* in the body\nof the HTTP request. *properties* needs to be a JSON object.\n\nAfter the properties have been changed, the current set of properties will\nbe returned in the HTTP response.\n\n",
"operationId": "replaceProperties",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/PutApiQueryProperties"
},
"x-description-offset": 54
}
],
"responses": {
"200": {
"description": "Is returned if the properties were changed successfully.\n\n"
},
"400": {
"description": "The server will respond with *HTTP 400* in case of a malformed request,\n\n\n\n"
}
},
"summary": "Changes the properties for the AQL query tracking",
"tags": [
"AQL"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/AQL/PutApiQueryProperties.md",
"x-hints": ""
}
},
"/_api/query/slow": {
"delete": {
"description": "\n\nClears the list of slow AQL queries\n\n",
"operationId": "deleteQuery",
"parameters": [],
"responses": {
"200": {
"description": "The server will respond with *HTTP 200* when the list of queries was\ncleared successfully.\n\n"
},
"400": {
"description": "The server will respond with *HTTP 400* in case of a malformed request.\n\n\n"
}
},
"summary": "Clears the list of slow AQL queries",
"tags": [
"AQL"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/AQL/DeleteApiQuerySlow.md",
"x-hints": ""
},
"get": {
"description": "\n\nReturns an array containing the last AQL queries that are finished and\nhave exceeded the slow query threshold in the selected database.\nThe maximum amount of queries in the list can be controlled by setting\nthe query tracking property `maxSlowQueries`. The threshold for treating\na query as *slow* can be adjusted by setting the query tracking property\n`slowQueryThreshold`.\n\nEach query is a JSON object with the following attributes:\n\n- *id*: the query's id\n\n- *query*: the query string (potentially truncated)\n\n- *bindVars*: the bind parameter values used by the query\n\n- *started*: the date and time when the query was started\n\n- *runTime*: the query's total run time \n\n- *state*: the query's current execution state (will always be \"finished\"\n for the list of slow queries)\n\n- *stream*: whether or not the query uses a streaming cursor\n\n",
"operationId": "readQuery:Slow",
"parameters": [],
"responses": {
"200": {
"description": "Is returned when the list of queries can be retrieved successfully.\n\n"
},
"400": {
"description": "The server will respond with *HTTP 400* in case of a malformed request,\n\n\n\n"
}
},
"summary": "Returns the list of slow AQL queries",
"tags": [
"AQL"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/AQL/GetApiQuerySlow.md",
"x-hints": ""
}
},
"/_api/query/{query-id}": {
"delete": {
"description": "\n\nKills a running query. The query will be terminated at the next cancelation\npoint.\n\n",
"operationId": "deleteQuery",
"parameters": [
{
"description": "The id of the query.\n\n",
"format": "string",
"in": "path",
"name": "query-id",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "The server will respond with *HTTP 200* when the query was still running when\nthe kill request was executed and the query's kill flag was set.\n\n"
},
"400": {
"description": "The server will respond with *HTTP 400* in case of a malformed request.\n\n"
},
"404": {
"description": "The server will respond with *HTTP 404* when no query with the specified\nid was found.\n\n\n"
}
},
"summary": "Kills a running AQL query",
"tags": [
"AQL"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/AQL/DeleteApiQueryKill.md",
"x-hints": ""
}
},
"/_api/replication/applier-config": {
"get": {
"description": "\n\nReturns the configuration of the replication applier.\n\nThe body of the response is a JSON object with the configuration. The\nfollowing attributes may be present in the configuration:\n\n- *endpoint*: the logger server to connect to (e.g. \"tcp://192.168.173.13:8529\").\n\n- *database*: the name of the database to connect to (e.g. \"_system\").\n\n- *username*: an optional ArangoDB username to use when connecting to the endpoint.\n\n- *password*: the password to use when connecting to the endpoint.\n\n- *maxConnectRetries*: the maximum number of connection attempts the applier\n will make in a row. If the applier cannot establish a connection to the\n endpoint in this number of attempts, it will stop itself.\n\n- *connectTimeout*: the timeout (in seconds) when attempting to connect to the\n endpoint. This value is used for each connection attempt.\n\n- *requestTimeout*: the timeout (in seconds) for individual requests to the endpoint.\n\n- *chunkSize*: the requested maximum size for log transfer packets that\n is used when the endpoint is contacted.\n\n- *autoStart*: whether or not to auto-start the replication applier on\n (next and following) server starts\n\n- *adaptivePolling*: whether or not the replication applier will use\n adaptive polling.\n\n- *includeSystem*: whether or not system collection operations will be applied\n\n- *autoResync*: whether or not the slave should perform a full automatic\n resynchronization with the master in case the master cannot serve log data\n requested by the slave, or when the replication is started and no tick\n value\n can be found.\n\n- *autoResyncRetries*: number of resynchronization retries that will be performed\n in a row when automatic resynchronization is enabled and kicks in. Setting this\n to *0* will effectively disable *autoResync*. Setting it to some other value\n will limit the number of retries that are performed. This helps preventing endless\n retries in case resynchronizations always fail.\n\n- *initialSyncMaxWaitTime*: the maximum wait time (in seconds) that the initial\n synchronization will wait for a response from the master when fetching initial\n collection data.\n This wait time can be used to control after what time the initial synchronization\n will give up waiting for a response and fail. This value is relevant even\n for continuous replication when *autoResync* is set to *true* because this\n may re-start the initial synchronization when the master cannot provide\n log data the slave requires.\n This value will be ignored if set to *0*.\n\n- *connectionRetryWaitTime*: the time (in seconds) that the applier will\n intentionally idle before it retries connecting to the master in case of\n connection problems.\n This value will be ignored if set to *0*.\n\n- *idleMinWaitTime*: the minimum wait time (in seconds) that the applier will\n intentionally idle before fetching more log data from the master in case\n the master has already sent all its log data. This wait time can be used\n to control the frequency with which the replication applier sends HTTP log\n fetch requests to the master in case there is no write activity on the master.\n This value will be ignored if set to *0*.\n\n- *idleMaxWaitTime*: the maximum wait time (in seconds) that the applier will\n intentionally idle before fetching more log data from the master in case the\n master has already sent all its log data and there have been previous log\n fetch attempts that resulted in no more log data. This wait time can be used\n to control the maximum frequency with which the replication applier sends HTTP\n log fetch requests to the master in case there is no write activity on the\n master for longer periods. This configuration value will only be used if the\n option *adaptivePolling* is set to *true*.\n This value will be ignored if set to *0*.\n\n- *requireFromPresent*: if set to *true*, then the replication applier will check\n at start whether the start tick from which it starts or resumes replication is\n still present on the master. If not, then there would be data loss. If\n *requireFromPresent* is *true*, the replication applier will abort with an\n appropriate error message. If set to *false*, then the replication applier will\n still start, and ignore the data loss.\n\n- *verbose*: if set to *true*, then a log line will be emitted for all operations\n performed by the replication applier. This should be used for debugging\n replication\n problems only.\n\n- *restrictType*: the configuration for *restrictCollections*\n\n- *restrictCollections*: the optional array of collections to include or exclude,\n based on the setting of *restrictType*\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/replication/applier-config\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"requestTimeout\" : 600, \n
\"connectTimeout\" : 10, \n
\"ignoreErrors\" : 0, \n
\"maxConnectRetries\" : 100, \n
\"lockTimeoutRetries\" : 0, \n
\"sslProtocol\" : 0, \n
\"chunkSize\" : 0, \n
\"skipCreateDrop\" : false, \n
\"autoStart\" : false, \n
\"adaptivePolling\" : true, \n
\"autoResync\" : false, \n
\"autoResyncRetries\" : 2, \n
\"maxPacketSize\" : 536870912, \n
\"includeSystem\" : true, \n
\"requireFromPresent\" : true, \n
\"verbose\" : false, \n
\"incremental\" : false, \n
\"restrictType\" : \"\", \n
\"restrictCollections\" : [ ], \n
\"connectionRetryWaitTime\" : 15, \n
\"initialSyncMaxWaitTime\" : 300, \n
\"idleMinWaitTime\" : 1, \n
\"idleMaxWaitTime\" : 2.5, \n
\"force32mode\" : false \n
}\n
\n\n\n\n\n",
"operationId": "handleCommandApplierGetConfig",
"parameters": [],
"responses": {
"200": {
"description": "is returned if the request was executed successfully.\n\n"
},
"405": {
"description": "is returned when an invalid HTTP method is used.\n\n"
},
"500": {
"description": "is returned if an error occurred while assembling the response.\n\n"
}
},
"summary": "Return configuration of replication applier",
"tags": [
"Replication"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Replication/put_api_replication_applier.md",
"x-hints": ""
},
"put": {
"description": "\n**A JSON object with these properties is required:**\n\n - **username**: an optional ArangoDB username to use when connecting to the endpoint.\n - **includeSystem**: whether or not system collection operations will be applied\n - **endpoint**: the logger server to connect to (e.g. \"tcp://192.168.173.13:8529\"). The endpoint must be specified.\n - **verbose**: if set to *true*, then a log line will be emitted for all operations \n performed by the replication applier. This should be used for debugging replication\n problems only.\n - **connectTimeout**: the timeout (in seconds) when attempting to connect to the\n endpoint. This value is used for each connection attempt.\n - **autoResync**: whether or not the slave should perform a full automatic resynchronization\n with the master in case the master cannot serve log data requested by the\n slave,\n or when the replication is started and no tick value can be found.\n - **database**: the name of the database on the endpoint. If not specified, defaults to the current local database name.\n - **idleMinWaitTime**: the minimum wait time (in seconds) that the applier will intentionally idle\n before fetching more log data from the master in case the master has\n already sent all its log data. This wait time can be used to control the\n frequency with which the replication applier sends HTTP log fetch requests\n to the master in case there is no write activity on the master.\n This value will be ignored if set to *0*.\n - **requestTimeout**: the timeout (in seconds) for individual requests to the endpoint.\n - **requireFromPresent**: if set to *true*, then the replication applier will check\n at start whether the start tick from which it starts or resumes replication is\n still present on the master. If not, then there would be data loss. If \n *requireFromPresent* is *true*, the replication applier will abort with an\n appropriate error message. If set to *false*, then the replication applier will\n still start, and ignore the data loss.\n - **idleMaxWaitTime**: the maximum wait time (in seconds) that the applier will intentionally idle \n before fetching more log data from the master in case the master has \n already sent all its log data and there have been previous log fetch attempts\n that resulted in no more log data. This wait time can be used to control the\n maximum frequency with which the replication applier sends HTTP log fetch\n requests to the master in case there is no write activity on the master for\n longer periods. This configuration value will only be used if the option\n *adaptivePolling* is set to *true*.\n This value will be ignored if set to *0*.\n - **restrictCollections** (string): the array of collections to include or exclude,\n based on the setting of *restrictType*\n - **restrictType**: the configuration for *restrictCollections*; Has to be either *include* or *exclude*\n - **initialSyncMaxWaitTime**: the maximum wait time (in seconds) that the initial synchronization will\n wait for a response from the master when fetching initial collection data.\n This wait time can be used to control after what time the initial\n synchronization\n will give up waiting for a response and fail. This value is relevant even\n for continuous replication when *autoResync* is set to *true* because this\n may re-start the initial synchronization when the master cannot provide\n log data the slave requires.\n This value will be ignored if set to *0*.\n - **maxConnectRetries**: the maximum number of connection attempts the applier\n will make in a row. If the applier cannot establish a connection to the\n endpoint in this number of attempts, it will stop itself.\n - **autoStart**: whether or not to auto-start the replication applier on\n (next and following) server starts\n - **adaptivePolling**: if set to *true*, the replication applier will fall\n to sleep for an increasingly long period in case the logger server at the\n endpoint does not have any more replication events to apply. Using\n adaptive polling is thus useful to reduce the amount of work for both the\n applier and the logger server for cases when there are only infrequent\n changes. The downside is that when using adaptive polling, it might take\n longer for the replication applier to detect that there are new replication\n events on the logger server.\n Setting *adaptivePolling* to false will make the replication applier\n contact the logger server in a constant interval, regardless of whether\n the logger server provides updates frequently or seldom.\n - **password**: the password to use when connecting to the endpoint.\n - **connectionRetryWaitTime**: the time (in seconds) that the applier will intentionally idle before\n it retries connecting to the master in case of connection problems.\n This value will be ignored if set to *0*.\n - **autoResyncRetries**: number of resynchronization retries that will be performed in a row when\n automatic resynchronization is enabled and kicks in. Setting this to *0*\n will\n effectively disable *autoResync*. Setting it to some other value will limit\n the number of retries that are performed. This helps preventing endless\n retries\n in case resynchronizations always fail.\n - **chunkSize**: the requested maximum size for log transfer packets that\n is used when the endpoint is contacted.\n\n\n\n\nSets the configuration of the replication applier. The configuration can\nonly be changed while the applier is not running. The updated configuration\nwill be saved immediately but only become active with the next start of the\napplier.\n\nIn case of success, the body of the response is a JSON object with the updated\nconfiguration.\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/replication/applier-config <<EOF\n
{ \n
\"endpoint\" : \"tcp://127.0.0.1:8529\", \n
\"username\" : \"replicationApplier\", \n
\"password\" : \"applier1234@foxx\", \n
\"chunkSize\" : 4194304, \n
\"autoStart\" : false, \n
\"adaptivePolling\" : true \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
\"endpoint\" : \"tcp://127.0.0.1:8529\", \n
\"database\" : \"_system\", \n
\"username\" : \"replicationApplier\", \n
\"requestTimeout\" : 600, \n
\"connectTimeout\" : 10, \n
\"ignoreErrors\" : 0, \n
\"maxConnectRetries\" : 100, \n
\"lockTimeoutRetries\" : 0, \n
\"sslProtocol\" : 0, \n
\"chunkSize\" : 4194304, \n
\"skipCreateDrop\" : false, \n
\"autoStart\" : false, \n
\"adaptivePolling\" : true, \n
\"autoResync\" : false, \n
\"autoResyncRetries\" : 2, \n
\"maxPacketSize\" : 536870912, \n
\"includeSystem\" : true, \n
\"requireFromPresent\" : true, \n
\"verbose\" : false, \n
\"incremental\" : false, \n
\"restrictType\" : \"\", \n
\"restrictCollections\" : [ ], \n
\"connectionRetryWaitTime\" : 15, \n
\"initialSyncMaxWaitTime\" : 300, \n
\"idleMinWaitTime\" : 1, \n
\"idleMaxWaitTime\" : 2.5, \n
\"force32mode\" : false \n
}\n
\n\n\n\n\n",
"operationId": "handleCommandApplierSetConfig",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/put_api_replication_applier_adjust"
},
"x-description-offset": 54
}
],
"responses": {
"200": {
"description": "is returned if the request was executed successfully.\n\n"
},
"400": {
"description": "is returned if the configuration is incomplete or malformed, or if the\nreplication applier is currently running.\n\n"
},
"405": {
"description": "is returned when an invalid HTTP method is used.\n\n"
},
"500": {
"description": "is returned if an error occurred while assembling the response.\n\n"
}
},
"summary": "Adjust configuration of replication applier",
"tags": [
"Replication"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Replication/put_api_replication_applier_adjust.md",
"x-hints": ""
}
},
"/_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-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",
"operationId": "handleCommandApplierStart",
"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",
"in": "query",
"name": "from",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "is returned if the request was executed successfully.\n\n"
},
"400": {
"description": "is returned if the replication applier is not fully configured or the\nconfiguration is invalid.\n\n"
},
"405": {
"description": "is returned when an invalid HTTP method is used.\n\n"
},
"500": {
"description": "is returned if an error occurred while assembling the response.\n\n"
}
},
"summary": "Start replication applier",
"tags": [
"Replication"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Replication/put_api_replication_applier_start.md",
"x-hints": ""
}
},
"/_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-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",
"operationId": "handleCommandApplierGetState",
"parameters": [],
"responses": {
"200": {
"description": "is returned if the request was executed successfully.\n\n"
},
"405": {
"description": "is returned when an invalid HTTP method is used.\n\n"
},
"500": {
"description": "is returned if an error occurred while assembling the response.\n\n"
}
},
"summary": "State of the replication applier",
"tags": [
"Replication"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Replication/get_api_replication_applier_state.md",
"x-hints": ""
}
},
"/_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-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",
"operationId": "handleCommandApplierStop",
"parameters": [],
"responses": {
"200": {
"description": "is returned if the request was executed successfully.\n\n"
},
"405": {
"description": "is returned when an invalid HTTP method is used.\n\n"
},
"500": {
"description": "is returned if an error occurred while assembling the response.\n\n"
}
},
"summary": "Stop replication applier",
"tags": [
"Replication"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Replication/put_api_replication_applier_stop.md",
"x-hints": ""
}
},
"/_api/replication/batch": {
"post": {
"description": "\n**A JSON object with these properties is required:**\n\n - **ttl**: the time-to-live for the new batch (in seconds)\n A JSON object with the batch configuration.\n\n\n\n\nCreates a new dump batch and returns the batch's id.\n\nThe response is a JSON object with the following attributes:\n\n- *id*: the id of the batch\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",
"operationId": "handleCommandBatch:Create",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/post_batch_replication"
},
"x-description-offset": 54
}
],
"responses": {
"200": {
"description": "is returned if the batch was created successfully.\n\n"
},
"400": {
"description": "is returned if the ttl value is invalid or if *DBserver* attribute\nis not specified or illegal on a coordinator.\n\n"
},
"405": {
"description": "is returned when an invalid HTTP method is used.\n\n\n"
}
},
"summary": "Create new dump batch",
"tags": [
"Replication"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Replication/post_batch_replication.md",
"x-hints": ""
}
},
"/_api/replication/batch/{id}": {
"delete": {
"description": "\n\nDeletes the existing dump batch, allowing compaction and cleanup to resume.\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",
"operationId": "handleCommandBatch:DELETE",
"parameters": [
{
"description": "The id of the batch.\n\n",
"format": "string",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "is returned if the batch was deleted successfully.\n\n"
},
"400": {
"description": "is returned if the batch was not found.\n\n"
},
"405": {
"description": "is returned when an invalid HTTP method is used.\n\n\n"
}
},
"summary": "Deletes an existing dump batch",
"tags": [
"Replication"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Replication/delete_batch_replication.md",
"x-hints": ""
},
"put": {
"description": "\n**A JSON object with these properties is required:**\n\n - **ttl**: the time-to-live for the new batch (in seconds)\n\n\n\n\nExtends the ttl of an existing dump batch, using the batch's id and\nthe provided ttl value.\n\nIf the batch's ttl can be extended successfully, the response is empty.\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",
"operationId": "handleCommandBatch:Prolong",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/put_batch_replication"
},
"x-description-offset": 54
},
{
"description": "The id of the batch.\n\n",
"format": "string",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "is returned if the batch's ttl was extended successfully.\n\n"
},
"400": {
"description": "is returned if the ttl value is invalid or the batch was not found.\n\n"
},
"405": {
"description": "is returned when an invalid HTTP method is used.\n\n\n"
}
},
"summary": "Prolong existing dump batch",
"tags": [
"Replication"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Replication/put_batch_replication.md",
"x-hints": ""
}
},
"/_api/replication/clusterInventory": {
"get": {
"description": "\n\nReturns the array of collections and indexes available on the cluster.\n\nThe response will be an array of JSON objects, one for each collection.\nEach collection containscontains exactly two keys \"parameters\" and\n\"indexes\". This\ninformation comes from Plan/Collections/{DB-Name}/* in the agency,\njust that the *indexes* attribute there is relocated to adjust it to\nthe data format of arangodump.\n\n",
"operationId": "handleCommandClusterInventory",
"parameters": [
{
"description": "Include system collections in the result. The default value is *true*.\n\n",
"in": "query",
"name": "includeSystem",
"required": false,
"type": "boolean"
}
],
"responses": {
"200": {
"description": "is returned if the request was executed successfully.\n\n"
},
"405": {
"description": "is returned when an invalid HTTP method is used.\n\n"
},
"500": {
"description": "is returned if an error occurred while assembling the response.\n\n\n"
}
},
"summary": "Return cluster inventory of collections and indexes",
"tags": [
"Replication"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Replication/get_api_replication_cluster_inventory.md",
"x-hints": ""
}
},
"/_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: 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",
"operationId": "handleCommandDump",
"parameters": [
{
"description": "The name or id of the collection to dump.\n\n",
"in": "query",
"name": "collection",
"required": true,
"type": "string"
},
{
"description": "\n",
"in": "query",
"name": "chunkSize",
"required": false,
"type": "number"
},
{
"description": "rocksdb only - The id of the snapshot to use\n\n",
"in": "query",
"name": "batchId",
"required": true,
"type": "number"
},
{
"description": "mmfiles only - Lower bound tick value for results.\n\n",
"in": "query",
"name": "from",
"required": false,
"type": "number"
},
{
"description": "mmfiles only - Upper bound tick value for results.\n\n",
"in": "query",
"name": "to",
"required": false,
"type": "number"
},
{
"description": "mmfiles only - Include system collections in the result. The default value is *true*.\n\n",
"in": "query",
"name": "includeSystem",
"required": false,
"type": "boolean"
},
{
"description": "mmfiles only - Whether or not to include tick values in the dump. The default value is *true*.\n\n",
"in": "query",
"name": "ticks",
"required": false,
"type": "boolean"
},
{
"description": "mmfiles only - Whether or not to flush the WAL before dumping. The default value is *true*.\n\n",
"in": "query",
"name": "flush",
"required": false,
"type": "boolean"
}
],
"responses": {
"200": {
"description": "is returned if the request was executed successfully and data was returned. The header\n`x-arango-replication-lastincluded` is set to the tick of the last document returned.\n\n"
},
"204": {
"description": "is returned if the request was executed successfully, but there was no content available.\nThe header `x-arango-replication-lastincluded` is `0` in this case.\n\n"
},
"400": {
"description": "is returned if either the *from* or *to* values are invalid.\n\n"
},
"404": {
"description": "is returned when the collection could not be found.\n\n"
},
"405": {
"description": "is returned when an invalid HTTP method is used.\n\n"
},
"500": {
"description": "is returned if an error occurred while assembling the response.\n\n"
}
},
"summary": "Return data of a collection",
"tags": [
"Replication"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Replication/get_api_replication_dump.md",
"x-hints": ""
}
},
"/_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\" : 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",
"operationId": "handleCommandInventory",
"parameters": [
{
"description": "Include system collections in the result. The default value is *true*.\n\n",
"in": "query",
"name": "includeSystem",
"required": false,
"type": "boolean"
},
{
"description": "Include alll databases in the response. Only works on `_system` The default value is *false*.\n\n",
"in": "query",
"name": "global",
"required": false,
"type": "boolean"
},
{
"description": "The RocksDB engine requires a valid batchId for this API call\n\n",
"in": "query",
"name": "batchId",
"required": true,
"type": "number"
}
],
"responses": {
"200": {
"description": "is returned if the request was executed successfully.\n\n"
},
"405": {
"description": "is returned when an invalid HTTP method is used.\n\n"
},
"500": {
"description": "is returned if an error occurred while assembling the response.\n\n"
}
},
"summary": "Return inventory of collections and indexes",
"tags": [
"Replication"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Replication/put_api_replication_inventory.md",
"x-hints": ""
}
},
"/_api/replication/logger-first-tick": {
"get": {
"description": "\n\nReturns the first available tick value that can be served from the server's\nreplication log. This method can be called by replication clients after to\ndetermine if certain data (identified by a tick value) is still available\nfor replication.\n\nThe result is a JSON object containing the attribute *firstTick*. This\nattribute contains the minimum tick value available in the server's\nreplication\nlog.\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/replication/logger-first-tick\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"firstTick\" : \"5\" \n
}\n
\n\n\n\n\n",
"operationId": "handleCommandLoggerFirstTick",
"parameters": [],
"responses": {
"200": {
"description": "is returned if the request was executed successfully.\n\n"
},
"405": {
"description": "is returned when an invalid HTTP method is used.\n\n"
},
"500": {
"description": "is returned if an error occurred while assembling the response.\n\n"
},
"501": {
"description": "is returned when this operation is called on a coordinator in a cluster.\n\n"
}
},
"summary": "Returns the first available tick value",
"tags": [
"Replication"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Replication/get_api_replication_logger_first_tick.md",
"x-hints": ""
}
},
"/_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](../Replications/WALAccess.html#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",
"operationId": "handleCommandLoggerFollow",
"parameters": [
{
"description": "Exclusive lower bound tick value for results.\n\n",
"in": "query",
"name": "from",
"required": false,
"type": "number"
},
{
"description": "Inclusive upper bound tick value for results.\n\n",
"in": "query",
"name": "to",
"required": false,
"type": "number"
},
{
"description": "Approximate maximum size of the returned result.\n\n",
"in": "query",
"name": "chunkSize",
"required": false,
"type": "number"
},
{
"description": "Include system collections in the result. The default value is *true*.\n\n",
"in": "query",
"name": "includeSystem",
"required": false,
"type": "boolean"
}
],
"responses": {
"200": {
"description": "is returned if the request was executed successfully, and there are log\nevents available for the requested range. The response body will not be empty\nin this case.\n\n"
},
"204": {
"description": "is returned if the request was executed successfully, but there are no log\nevents available for the requested range. The response body will be empty\nin this case.\n\n"
},
"400": {
"description": "is returned if either the *from* or *to* values are invalid.\n\n"
},
"405": {
"description": "is returned when an invalid HTTP method is used.\n\n"
},
"500": {
"description": "is returned if an error occurred while assembling the response.\n\n"
},
"501": {
"description": "is returned when this operation is called on a coordinator in a cluster.\n\n"
}
},
"summary": "Returns log entries",
"tags": [
"Replication"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Replication/get_api_replication_logger_follow.md",
"x-hints": "{% hint 'warning' %}\nThis route should no longer be used.\nIt is considered as deprecated from version 3.4.0 on.\n{% endhint %}\n\n"
}
},
"/_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\" : \"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",
"operationId": "handleCommandLoggerState",
"parameters": [],
"responses": {
"200": {
"description": "is returned if the logger state could be determined successfully.\n\n"
},
"405": {
"description": "is returned when an invalid HTTP method is used.\n\n"
},
"500": {
"description": "is returned if the logger state could not be determined.\n\n"
}
},
"summary": "Return replication logger state",
"tags": [
"Replication"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Replication/get_api_replication_logger_return_state.md",
"x-hints": ""
}
},
"/_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_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",
"operationId": "handleCommandLoggerTickRanges",
"parameters": [],
"responses": {
"200": {
"description": "is returned if the tick ranges could be determined successfully.\n\n"
},
"405": {
"description": "is returned when an invalid HTTP method is used.\n\n"
},
"500": {
"description": "is returned if the logger state could not be determined.\n\n"
},
"501": {
"description": "is returned when this operation is called on a coordinator in a cluster.\n\n"
}
},
"summary": "Return the tick ranges available in the WAL logfiles",
"tags": [
"Replication"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Replication/get_api_replication_logger_tick_ranges.md",
"x-hints": ""
}
},
"/_api/replication/make-slave": {
"put": {
"description": "\n**A JSON object with these properties is required:**\n\n - **username**: an optional ArangoDB username to use when connecting to the master.\n - **includeSystem**: whether or not system collection operations will be applied\n - **endpoint**: the master endpoint to connect to (e.g. \"tcp://192.168.173.13:8529\").\n - **verbose**: if set to *true*, then a log line will be emitted for all operations\n performed by the replication applier. This should be used for debugging\n replication\n problems only.\n - **connectTimeout**: the timeout (in seconds) when attempting to connect to the\n endpoint. This value is used for each connection attempt.\n - **autoResync**: whether or not the slave should perform an automatic resynchronization with\n the master in case the master cannot serve log data requested by the slave,\n or when the replication is started and no tick value can be found.\n - **database**: the database name on the master (if not specified, defaults to the\n name of the local current database).\n - **idleMinWaitTime**: the minimum wait time (in seconds) that the applier will intentionally idle\n before fetching more log data from the master in case the master has\n already sent all its log data. This wait time can be used to control the\n frequency with which the replication applier sends HTTP log fetch requests\n to the master in case there is no write activity on the master.\n This value will be ignored if set to *0*.\n - **requestTimeout**: the timeout (in seconds) for individual requests to the endpoint.\n - **restrictType**: an optional string value for collection filtering. When\n specified, the allowed values are *include* or *exclude*.\n - **idleMaxWaitTime**: the maximum wait time (in seconds) that the applier will intentionally idle\n before fetching more log data from the master in case the master has\n already sent all its log data and there have been previous log fetch attempts\n that resulted in no more log data. This wait time can be used to control the\n maximum frequency with which the replication applier sends HTTP log fetch\n requests to the master in case there is no write activity on the master for\n longer periods. This configuration value will only be used if the option\n *adaptivePolling* is set to *true*.\n This value will be ignored if set to *0*.\n - **initialSyncMaxWaitTime**: the maximum wait time (in seconds) that the initial synchronization will\n wait for a response from the master when fetching initial collection data.\n This wait time can be used to control after what time the initial synchronization\n will give up waiting for a response and fail. This value is relevant even\n for continuous replication when *autoResync* is set to *true* because this\n may re-start the initial synchronization when the master cannot provide\n log data the slave requires.\n This value will be ignored if set to *0*.\n - **restrictCollections** (string): an optional array of collections for use with *restrictType*.\n If *restrictType* is *include*, only the specified collections\n will be sychronised. If *restrictType* is *exclude*, all but the specified\n collections will be synchronized.\n - **requireFromPresent**: if set to *true*, then the replication applier will check\n at start of its continuous replication if the start tick from the dump phase\n is still present on the master. If not, then there would be data loss. If\n *requireFromPresent* is *true*, the replication applier will abort with an\n appropriate error message. If set to *false*, then the replication applier will\n still start, and ignore the data loss.\n - **adaptivePolling**: whether or not the replication applier will use adaptive polling.\n - **maxConnectRetries**: the maximum number of connection attempts the applier\n will make in a row. If the applier cannot establish a connection to the\n endpoint in this number of attempts, it will stop itself.\n - **password**: the password to use when connecting to the master.\n - **connectionRetryWaitTime**: the time (in seconds) that the applier will intentionally idle before\n it retries connecting to the master in case of connection problems.\n This value will be ignored if set to *0*.\n - **autoResyncRetries**: number of resynchronization retries that will be performed in a row when\n automatic resynchronization is enabled and kicks in. Setting this to *0* will\n effectively disable *autoResync*. Setting it to some other value will limit\n the number of retries that are performed. This helps preventing endless retries\n in case resynchronizations always fail.\n - **chunkSize**: the requested maximum size for log transfer packets that\n is used when the endpoint is contacted.\n\n\n\n\nStarts a full data synchronization from a remote endpoint into the local ArangoDB\ndatabase and afterwards starts the continuous replication.\nThe operation works on a per-database level.\n\nAll local database data will be removed prior to the synchronization.\n\nIn case of success, the body of the response is a JSON object with the following\nattributes:\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.\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\nWARNING: calling this method will sychronize data from the collections found\non the remote master to the local ArangoDB database. All data in the local\ncollections will be purged and replaced with data from the master.\n\nUse with caution!\n\nPlease also keep in mind that this command may take a long time to complete\nand return. This is because it will first do a full data synchronization with\nthe master, which will take time roughly proportional to the amount of data.\n\n**Note**: this method is not supported on a coordinator in a cluster.\n\n",
"operationId": "handleCommandMakeSlave",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/put_api_replication_makeSlave"
},
"x-description-offset": 54
}
],
"responses": {
"200": {
"description": "is returned if the request was executed successfully.\n\n"
},
"400": {
"description": "is returned if the configuration is incomplete or malformed.\n\n"
},
"405": {
"description": "is returned when an invalid HTTP method is used.\n\n"
},
"500": {
"description": "is returned if an error occurred during sychronization or when starting the\ncontinuous replication.\n\n"
},
"501": {
"description": "is returned when this operation is called on a coordinator in a cluster.\n\n\n"
}
},
"summary": "Turn the server into a slave of another",
"tags": [
"Replication"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Replication/put_api_replication_makeSlave.md",
"x-hints": ""
}
},
"/_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\" : \"153018529730512\" \n
}\n
\n\n\n\n\n",
"operationId": "handleCommandServerId",
"parameters": [],
"responses": {
"200": {
"description": "is returned if the request was executed successfully.\n\n"
},
"405": {
"description": "is returned when an invalid HTTP method is used.\n\n"
},
"500": {
"description": "is returned if an error occurred while assembling the response.\n\n"
}
},
"summary": "Return server id",
"tags": [
"Replication"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Replication/put_api_replication_serverID.md",
"x-hints": ""
}
},
"/_api/replication/sync": {
"put": {
"description": "\n**A JSON object with these properties is required:**\n\n - **username**: an optional ArangoDB username to use when connecting to the endpoint.\n - **includeSystem**: whether or not system collection operations will be applied\n - **endpoint**: the master endpoint to connect to (e.g. \"tcp://192.168.173.13:8529\").\n - **initialSyncMaxWaitTime**: the maximum wait time (in seconds) that the initial synchronization will\n wait for a response from the master when fetching initial collection data.\n This wait time can be used to control after what time the initial synchronization\n will give up waiting for a response and fail.\n This value will be ignored if set to *0*.\n - **database**: the database name on the master (if not specified, defaults to the\n name of the local current database).\n - **restrictType**: an optional string value for collection filtering. When\n specified, the allowed values are *include* or *exclude*.\n - **incremental**: if set to *true*, then an incremental synchronization method will be used\n for synchronizing data in collections. This method is useful when\n collections already exist locally, and only the remaining differences need\n to be transferred from the remote endpoint. In this case, the incremental\n synchronization can be faster than a full synchronization.\n The default value is *false*, meaning that the complete data from the remote\n collection will be transferred.\n - **restrictCollections** (string): an optional array of collections for use with\n *restrictType*. If *restrictType* is *include*, only the specified collections\n will be sychronised. If *restrictType* is *exclude*, all but the specified\n collections will be synchronized.\n - **password**: the password to use when connecting to the endpoint.\n\n\n\n\nStarts a full data synchronization from a remote endpoint into the local\nArangoDB database.\n\nThe *sync* method can be used by replication clients to connect an ArangoDB database\nto a remote endpoint, fetch the remote list of collections and indexes, and collection\ndata. It will thus create a local backup of the state of data at the remote ArangoDB\ndatabase. *sync* works on a per-database level.\n\n*sync* will first fetch the list of collections and indexes from the remote endpoint.\nIt does so by calling the *inventory* API of the remote database. It will then purge\ndata in the local ArangoDB database, and after start will transfer collection data\nfrom the remote database to the local ArangoDB database. It will extract data from the\nremote database by calling the remote database's *dump* API until all data are fetched.\n\nIn case of success, the body of the response is a JSON object with the following\nattributes:\n\n- *collections*: an array of collections that were transferred from the endpoint\n\n- *lastLogTick*: the last log tick on the endpoint at the time the transfer\n was started. Use this value as the *from* value when starting the continuous\n synchronization later.\n\nWARNING: calling this method will sychronize data from the collections found\non the remote endpoint to the local ArangoDB database. All data in the local\ncollections will be purged and replaced with data from the endpoint.\n\nUse with caution!\n\n**Note**: this method is not supported on a coordinator in a cluster.\n\n",
"operationId": "handleCommandSync",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/put_api_replication_synchronize"
},
"x-description-offset": 54
}
],
"responses": {
"200": {
"description": "is returned if the request was executed successfully.\n\n"
},
"400": {
"description": "is returned if the configuration is incomplete or malformed.\n\n"
},
"405": {
"description": "is returned when an invalid HTTP method is used.\n\n"
},
"500": {
"description": "is returned if an error occurred during sychronization.\n\n"
},
"501": {
"description": "is returned when this operation is called on a coordinator in a cluster.\n\n\n"
}
},
"summary": "Synchronize data from a remote endpoint",
"tags": [
"Replication"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Replication/put_api_replication_synchronize.md",
"x-hints": ""
}
},
"/_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\" : \"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",
"operationId": "ReturnAllDocuments",
"parameters": [
{
"description": "Contains the query.\n\n",
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"additionalProperties": {},
"type": "object"
},
"x-description-offset": 0
}
],
"responses": {
"201": {
"description": "is returned if the query was executed successfully.\n\n"
},
"400": {
"description": "is returned if the body does not contain a valid JSON representation of a\nquery. The response body contains an error document in this case.\n\n"
},
"404": {
"description": "is returned if the collection specified by *collection* is unknown. The\nresponse body contains an error document in this case.\n\n"
}
},
"summary": "Return all documents",
"tags": [
"Simple Queries"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Simple Queries/put_api_simple_all.md",
"x-hints": "{% hint '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{% endhint %}\n\n"
}
},
"/_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/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",
"operationId": "allDocumentKeys",
"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",
"in": "query",
"name": "collection",
"required": false,
"type": "string"
},
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/put_read_all_documents"
},
"x-description-offset": 54
}
],
"responses": {
"201": {
"description": "All went well.\n\n"
},
"404": {
"description": "The collection does not exist.\n\n"
}
},
"summary": "Read all documents",
"tags": [
"Documents"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Documents/put_read_all_documents.md",
"x-hints": "{% hint '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{% endhint %}\n\n"
}
},
"/_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\" : \"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",
"operationId": "ReturnARandomDocument",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/put_api_simple_any"
},
"x-description-offset": 172
}
],
"responses": {
"200": {
"description": "is returned if the query was executed successfully.\n\n"
},
"400": {
"description": "is returned if the body does not contain a valid JSON representation of a\nquery. The response body contains an error document in this case.\n\n"
},
"404": {
"description": "is returned if the collection specified by *collection* is unknown. The\nresponse body contains an error document in this case.\n\n"
}
},
"summary": "Return a random document",
"tags": [
"Simple Queries"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Simple Queries/put_api_simple_any.md",
"x-hints": "{% hint '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{% endhint %}\n\n"
}
},
"/_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\" : \"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",
"operationId": "SimpleQueryBy-example",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/put_api_simple_by_example"
},
"x-description-offset": 54
}
],
"responses": {
"201": {
"description": "is returned if the query was executed successfully.\n\n"
},
"400": {
"description": "is returned if the body does not contain a valid JSON representation of a\nquery. The response body contains an error document in this case.\n\n"
},
"404": {
"description": "is returned if the collection specified by *collection* is unknown. The\nresponse body contains an error document in this case.\n\n"
}
},
"summary": "Simple query by-example",
"tags": [
"Simple Queries"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Simple Queries/put_api_simple_by_example.md",
"x-hints": "{% hint '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{% endhint %}\n\n{% hint '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{% endhint %}\n\n"
}
},
"/_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\" : \"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",
"operationId": "FindDocumentsMatchingAnExample",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/put_api_simple_first_example"
},
"x-description-offset": 54
}
],
"responses": {
"200": {
"description": "is returned when the query was successfully executed.\n\n"
},
"400": {
"description": "is returned if the body does not contain a valid JSON representation of a\nquery. The response body contains an error document in this case.\n\n"
},
"404": {
"description": "is returned if the collection specified by *collection* is unknown. The\nresponse body contains an error document in this case.\n\n"
}
},
"summary": "Find documents matching an example",
"tags": [
"Simple Queries"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Simple Queries/put_api_simple_first_example.md",
"x-hints": "{% hint '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{% endhint %}\n\n{% hint '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{% endhint %}\n\n"
}
},
"/_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\" : \"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",
"operationId": "FulltextIndexQuery",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/put_api_simple_fulltext"
},
"x-description-offset": 54
}
],
"responses": {
"201": {
"description": "is returned if the query was executed successfully.\n\n"
},
"400": {
"description": "is returned if the body does not contain a valid JSON representation of a\nquery. The response body contains an error document in this case.\n\n"
},
"404": {
"description": "is returned if the collection specified by *collection* is unknown. The\nresponse body contains an error document in this case.\n\n"
}
},
"summary": "Fulltext index query",
"tags": [
"Simple Queries"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Simple Queries/put_api_simple_fulltext.md",
"x-hints": "{% hint '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{% endhint %}\n\n"
}
},
"/_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\" : \"_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",
"operationId": "FindDocumentsByTheirKeys",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/RestLookupByKeys"
},
"x-description-offset": 54
}
],
"responses": {
"200": {
"description": "is returned if the operation was carried out successfully.\n\n"
},
"404": {
"description": "is returned if the collection was not found. The response body\ncontains an error document in this case.\n\n"
},
"405": {
"description": "is returned if the operation was called with a different HTTP METHOD than PUT.\n\n"
}
},
"summary": "Find documents by their keys",
"tags": [
"Simple Queries"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Simple Queries/RestLookupByKeys.md",
"x-hints": "{% hint '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{% endhint %}\n\n"
}
},
"/_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\" : \"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",
"operationId": "ReturnsDocumentsNearACoordinate",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/put_api_simple_near"
},
"x-description-offset": 54
}
],
"responses": {
"201": {
"description": "is returned if the query was executed successfully.\n\n"
},
"400": {
"description": "is returned if the body does not contain a valid JSON representation of a\nquery. The response body contains an error document in this case.\n\n"
},
"404": {
"description": "is returned if the collection specified by *collection* is unknown. The\nresponse body contains an error document in this case.\n\n"
}
},
"summary": "Returns documents near a coordinate",
"tags": [
"Simple Queries"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Simple Queries/put_api_simple_near.md",
"x-hints": "{% hint '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{% endhint %}\n\n"
}
},
"/_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\" : \"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",
"operationId": "SimpleRangeQuery",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/put_api_simple_range"
},
"x-description-offset": 54
}
],
"responses": {
"201": {
"description": "is returned if the query was executed successfully.\n\n"
},
"400": {
"description": "is returned if the body does not contain a valid JSON representation of a\nquery. The response body contains an error document in this case.\n\n"
},
"404": {
"description": "is returned if the collection specified by *collection* is unknown or no\nsuitable index for the range query is present. The response body contains \nan error document in this case.\n\n"
}
},
"summary": "Simple range query",
"tags": [
"Simple Queries"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Simple Queries/put_api_simple_range.md",
"x-hints": "{% hint '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{% endhint %}\n\n"
}
},
"/_api/simple/remove-by-example": {
"put": {
"description": "\n**A JSON object with these properties is required:**\n\n - **example**: An example document that all collection documents are compared against.\n - **collection**: The name of the collection to remove from.\n - **options**:\n - **limit**: an optional value that determines how many documents to\n delete at most. If *limit* is specified but is less than the number\n of documents in the collection, it is undefined which of the documents\n will be deleted.\n - **waitForSync**: if set to true, then all removal operations will\n instantly be synchronized to disk. If this is not specified, then the\n collection's default sync behavior will be applied.\n\n\n\n\n\nThis will find all documents in the collection that match the specified\nexample object.\n\nNote: the *limit* attribute is not supported on sharded collections.\nUsing it will result in an error.\n\nReturns the number of documents that were deleted.\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/remove-by-example <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"example\" : { \n
\"a\" : { \n
\"j\" : 1 \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
\"deleted\" : 1, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Using Parameter: waitForSync and limit\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/remove-by-example <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"example\" : { \n
\"a\" : { \n
\"j\" : 1 \n
} \n
}, \n
\"waitForSync\" : true, \n
\"limit\" : 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
\"deleted\" : 1, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Using Parameter: waitForSync and limit with new signature\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/remove-by-example <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"example\" : { \n
\"a\" : { \n
\"j\" : 1 \n
} \n
}, \n
\"options\" : { \n
\"waitForSync\" : true, \n
\"limit\" : 2 \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
\"deleted\" : 1, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n",
"operationId": "RemoveDocumentsByExample",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/put_api_simple_remove_by_example"
},
"x-description-offset": 54
}
],
"responses": {
"200": {
"description": "is returned if the query was executed successfully.\n\n"
},
"400": {
"description": "is returned if the body does not contain a valid JSON representation of a\nquery. The response body contains an error document in this case.\n\n"
},
"404": {
"description": "is returned if the collection specified by *collection* is unknown. The\nresponse body contains an error document in this case.\n\n"
}
},
"summary": "Remove documents by example",
"tags": [
"Simple Queries"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Simple Queries/put_api_simple_remove_by_example.md",
"x-hints": "{% hint '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{% endhint %}\n\n"
}
},
"/_api/simple/remove-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 - **options**:\n - **returnOld**: if set to *true* and *silent* above is *false*, then the above\n information about the removed documents contains the complete\n removed documents.\n - **silent**: if set to *false*, then the result will contain an additional\n attribute *old* which contains an array with one entry for each\n removed document. By default, these entries will have the *_id*,\n *_key* and *_rev* attributes.\n - **waitForSync**: if set to true, then all removal operations will\n instantly be synchronized to disk. If this is not specified, then the\n collection's default sync behavior will be applied.\n - **collection**: The name of the collection to look in for the documents to remove\n\n\n\n\nLooks up the documents in the specified collection using the array of keys\nprovided, and removes all documents from the collection whose keys are\ncontained in the *keys* array. Keys for which no document can be found in\nthe underlying collection are ignored, and no exception will be thrown for\nthem.\n\nEquivalent AQL query (the RETURN clause is optional):\n\n FOR key IN @keys REMOVE key IN @@collection\n RETURN OLD\n\nThe body of the response contains a JSON object with information how many\ndocuments were removed (and how many were not). The *removed* attribute will\ncontain the number of actually removed documents. The *ignored* attribute \nwill contain the number of keys in the request for which no matching document\ncould be found.\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/remove-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
\"removed\" : 10, \n
\"ignored\" : 0, \n
\"error\" : false, \n
\"code\" : 200 \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/remove-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
\"removed\" : 0, \n
\"ignored\" : 3, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n\n",
"operationId": "RemoveDocumentsByTheirKeys",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/RestRemoveByKeys"
},
"x-description-offset": 54
}
],
"responses": {
"200": {
"description": "is returned if the operation was carried out successfully. The number of removed\ndocuments may still be 0 in this case if none of the specified document keys\nwere found in the collection.\n\n"
},
"404": {
"description": "is returned if the collection was not found.\nThe response body contains an error document in this case.\n\n"
},
"405": {
"description": "is returned if the operation was called with a different HTTP METHOD than PUT.\n\n"
}
},
"summary": "Remove documents by their keys",
"tags": [
"Simple Queries"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Simple Queries/RestRemoveByKeys.md",
"x-hints": "{% hint '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{% endhint %}\n\n"
}
},
"/_api/simple/replace-by-example": {
"put": {
"description": "\n**A JSON object with these properties is required:**\n\n - **options**:\n - **limit**: an optional value that determines how many documents to\n replace at most. If *limit* is specified but is less than the number\n of documents in the collection, it is undefined which of the documents\n will be replaced.\n - **waitForSync**: if set to true, then all removal operations will\n instantly be synchronized to disk. If this is not specified, then the\n collection's default sync behavior will be applied.\n - **example**: An example document that all collection documents are compared against.\n - **collection**: The name of the collection to replace within.\n - **newValue**: The replacement document that will get inserted in place\n of the \"old\" documents.\n\n\n\n\n\nThis will find all documents in the collection that match the specified\nexample object, and replace the entire document body with the new value\nspecified. Note that document meta-attributes such as *_id*, *_key*,\n*_from*, *_to* etc. cannot be replaced.\n\nNote: the *limit* attribute is not supported on sharded collections.\nUsing it will result in an error.\n\nReturns the number of documents that were replaced.\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/replace-by-example <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"example\" : { \n
\"a\" : { \n
\"j\" : 1 \n
} \n
}, \n
\"newValue\" : { \n
\"foo\" : \"bar\" \n
}, \n
\"limit\" : 3 \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
\"replaced\" : 1, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n Using new Signature for attributes WaitForSync and limit\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/replace-by-example <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"example\" : { \n
\"a\" : { \n
\"j\" : 1 \n
} \n
}, \n
\"newValue\" : { \n
\"foo\" : \"bar\" \n
}, \n
\"options\" : { \n
\"limit\" : 3, \n
\"waitForSync\" : 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
\"replaced\" : 1, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n",
"operationId": "ReplaceDocumentsByExample",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/put_api_simple_replace_by_example"
},
"x-description-offset": 54
}
],
"responses": {
"200": {
"description": "is returned if the query was executed successfully.\n\n"
},
"400": {
"description": "is returned if the body does not contain a valid JSON representation of a\nquery. The response body contains an error document in this case.\n\n"
},
"404": {
"description": "is returned if the collection specified by *collection* is unknown. The\nresponse body contains an error document in this case.\n\n"
}
},
"summary": "Replace documents by example",
"tags": [
"Simple Queries"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Simple Queries/put_api_simple_replace_by_example.md",
"x-hints": "{% hint '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{% endhint %}\n\n"
}
},
"/_api/simple/update-by-example": {
"put": {
"description": "\n**A JSON object with these properties is required:**\n\n - **options**:\n - **keepNull**: This parameter can be used to modify the behavior when\n handling *null* values. Normally, *null* values are stored in the\n database. By setting the *keepNull* parameter to *false*, this\n behavior can be changed so that all attributes in *data* with *null*\n values will be removed from the updated document.\n - **mergeObjects**: Controls whether objects (not arrays) will be merged if present in both the\n existing and the patch document. If set to false, the value in the\n patch document will overwrite the existing document's value. If set to\n true, objects will be merged. The default is true.\n - **limit**: an optional value that determines how many documents to\n update at most. If *limit* is specified but is less than the number\n of documents in the collection, it is undefined which of the documents\n will be updated.\n - **waitForSync**: if set to true, then all removal operations will\n instantly be synchronized to disk. If this is not specified, then the\n collection's default sync behavior will be applied.\n - **example**: An example document that all collection documents are compared against.\n - **collection**: The name of the collection to update within.\n - **newValue**: A document containing all the attributes to update in the found documents.\n\n\n\n\n\nThis will find all documents in the collection that match the specified\nexample object, and partially update the document body with the new value\nspecified. Note that document meta-attributes such as *_id*, *_key*,\n*_from*, *_to* etc. cannot be replaced.\n\nNote: the *limit* attribute is not supported on sharded collections.\nUsing it will result in an error.\n\nReturns the number of documents that were updated.\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 using old syntax for options\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/update-by-example <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"example\" : { \n
\"a\" : { \n
\"j\" : 1 \n
} \n
}, \n
\"newValue\" : { \n
\"a\" : { \n
\"j\" : 22 \n
} \n
}, \n
\"limit\" : 3 \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
\"updated\" : 1, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n**Example:**\n using new signature for options\n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/simple/update-by-example <<EOF\n
{ \n
\"collection\" : \"products\", \n
\"example\" : { \n
\"a\" : { \n
\"j\" : 1 \n
} \n
}, \n
\"newValue\" : { \n
\"a\" : { \n
\"j\" : 22 \n
} \n
}, \n
\"options\" : { \n
\"limit\" : 3, \n
\"waitForSync\" : 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
\"updated\" : 1, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n",
"operationId": "UpdateDocumentsByExample",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/put_api_simple_update_by_example"
},
"x-description-offset": 54
}
],
"responses": {
"200": {
"description": "is returned if the collection was updated successfully and *waitForSync* was\n*true*.\n\n"
},
"400": {
"description": "is returned if the body does not contain a valid JSON representation of a\nquery. The response body contains an error document in this case.\n\n"
},
"404": {
"description": "is returned if the collection specified by *collection* is unknown. The\nresponse body contains an error document in this case.\n\n"
}
},
"summary": "Update documents by example",
"tags": [
"Simple Queries"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Simple Queries/put_api_simple_update_by_example.md",
"x-hints": "{% hint '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{% endhint %}\n\n"
}
},
"/_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\" : \"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",
"operationId": "FindDocumentsWithinARadiusAroundACoordinate",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/put_api_simple_within"
},
"x-description-offset": 54
}
],
"responses": {
"201": {
"description": "is returned if the query was executed successfully.\n\n"
},
"400": {
"description": "is returned if the body does not contain a valid JSON representation of a\nquery. The response body contains an error document in this case.\n\n"
},
"404": {
"description": "is returned if the collection specified by *collection* is unknown. The\nresponse body contains an error document in this case.\n\n"
}
},
"summary": "Find documents within a radius around a coordinate",
"tags": [
"Simple Queries"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Simple Queries/put_api_simple_within.md",
"x-hints": "{% hint '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{% endhint %}\n\n"
}
},
"/_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\" : \"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",
"operationId": "WithinRectangleQuery",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/put_api_simple_within_rectangle"
},
"x-description-offset": 54
}
],
"responses": {
"201": {
"description": "is returned if the query was executed successfully.\n\n"
},
"400": {
"description": "is returned if the body does not contain a valid JSON representation of a\nquery. The response body contains an error document in this case.\n\n"
},
"404": {
"description": "is returned if the collection specified by *collection* is unknown. The\nresponse body contains an error document in this case.\n\n"
}
},
"summary": "Within rectangle query",
"tags": [
"Simple Queries"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Simple Queries/put_api_simple_within_rectangle.md",
"x-hints": "{% hint '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{% endhint %}\n\n"
}
},
"/_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\" : \"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",
"operationId": "registerTask",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/post_api_new_tasks"
},
"x-description-offset": 54
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "The task was registered\n\n",
"schema": {
"$ref": "#/definitions/post_api_new_tasks_rc_200"
},
"x-description-offset": 164
},
"400": {
"description": "If the post body is not accurate, a *HTTP 400* is returned.\n\n"
}
},
"summary": "creates a task",
"tags": [
"Administration"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Administration/post_api_new_tasks.md",
"x-hints": ""
}
},
"/_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\" : 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",
"operationId": "getTasks",
"parameters": [],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "The list of tasks\n\n",
"schema": {
"$ref": "#/definitions/get_api_tasks_all_rc_200"
},
"x-description-offset": 111
}
},
"summary": "Fetch all tasks or one task",
"tags": [
"Administration"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Administration/get_api_tasks_all.md",
"x-hints": ""
}
},
"/_api/tasks/{id}": {
"delete": {
"description": "\n\nDeletes the task identified by *id* on the server. \n\n\n**HTTP 200**\n*A json document with these Properties is returned:*\n\nIf the task was deleted, *HTTP 200* is returned.\n\n- **code**: The status code, 200 in this case.\n- **error**: *false* in this case\n\n\n**HTTP 404**\n*A json document with these Properties is returned:*\n\nIf the task *id* is unknown, then an *HTTP 404* is returned.\n\n- **errorMessage**: A plain text message stating what went wrong.\n- **code**: The status code, 404 in this case.\n- **error**: *true* in this case\n\n\n\n\n**Example:**\n trying to delete non existing task\n\nshell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/tasks/NoTaskWithThatName\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**Example:**\n Remove existing Task\n\nshell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/tasks/SampleTask\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\" : \"(non-representable type)\" \n
}\n
\n\n\n\n\n",
"operationId": "deleteTask",
"parameters": [
{
"description": "The id of the task to delete.\n\n",
"format": "string",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "If the task was deleted, *HTTP 200* is returned.\n\n",
"schema": {
"$ref": "#/definitions/delete_api_tasks_rc_200"
},
"x-description-offset": 122
},
"404": {
"description": "If the task *id* is unknown, then an *HTTP 404* is returned.\n\n",
"schema": {
"$ref": "#/definitions/delete_api_tasks_rc_404"
},
"x-description-offset": 189
}
},
"summary": "deletes the task with id",
"tags": [
"Administration"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Administration/delete_api_tasks.md",
"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\" : 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",
"operationId": "getTasks",
"parameters": [
{
"description": "The id of the task to fetch.\n\n",
"format": "string",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "The requested task\n\n",
"schema": {
"$ref": "#/definitions/api_task_struct"
},
"x-description-offset": 128
}
},
"summary": "Fetch one task with id",
"tags": [
"Administration"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Administration/get_api_tasks.md",
"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\" : 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",
"operationId": "registerTask:byId",
"parameters": [
{
"description": "The id of the task to create\n\n",
"format": "string",
"in": "path",
"name": "id",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/put_api_new_tasks"
},
"x-description-offset": 54
}
],
"responses": {
"400": {
"description": "If the task *id* already exists or the rest body is not accurate, *HTTP 400* is returned.\n\n"
}
},
"summary": "creates a task with id",
"tags": [
"Administration"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Administration/put_api_new_tasks.md",
"x-hints": ""
}
},
"/_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 - **allowImplicit**: Allow reading from undeclared collections.\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",
"operationId": "executeCommit",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/post_api_transaction"
},
"x-description-offset": 54
}
],
"responses": {
"200": {
"description": "If the transaction is fully executed and committed on the server,\n*HTTP 200* will be returned.\n\n"
},
"400": {
"description": "If the transaction specification is either missing or malformed, the server\nwill respond with *HTTP 400*.\n\n"
},
"404": {
"description": "If the transaction specification contains an unknown collection, the server\nwill respond with *HTTP 404*.\n\n"
},
"500": {
"description": "Exceptions thrown by users will make the server respond with a return code of\n*HTTP 500*\n\n"
}
},
"summary": "Execute transaction",
"tags": [
"Transactions"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Transactions/post_api_transaction.md",
"x-hints": ""
}
},
"/_api/transaction/begin": {
"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 - **allowImplicit**: Allow reading from undeclared collections.\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 - **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\n\n\n\nThe transaction description must be passed in the body of the POST request.\nIf the transaction can be started on the server, *HTTP 201* will be returned. \n\nFor successfully started 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*: result containing\n - *id*: the identifier of the transaction\n - *status*: containing the string 'running'\n\nIf the transaction specification is either missing or malformed, the server\nwill respond with *HTTP 400* or *HTTP 404*.\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\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/begin <<EOF\n
{ \n
\"collections\" : { \n
\"write\" : \"products\" \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
\"code\" : 201, \n
\"error\" : false, \n
\"result\" : { \n
\"id\" : \"106660\", \n
\"status\" : \"running\" \n
} \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/begin <<EOF\n
{ \n
\"collections\" : { \n
\"read\" : \"products\" \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
\"code\" : 404, \n
\"error\" : true, \n
\"errorMessage\" : \"collection or view not found:products\", \n
\"errorNum\" : 1203 \n
}\n
\n\n\n\n\n",
"operationId": "executeBegin",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/post_api_transaction_begin"
},
"x-description-offset": 54
}
],
"responses": {
"201": {
"description": "If the transaction is running on the server,\n*HTTP 201* will be returned.\n\n"
},
"400": {
"description": "If the transaction specification is either missing or malformed, the server\nwill respond with *HTTP 400*.\n\n"
},
"404": {
"description": "If the transaction specification contains an unknown collection, the server\nwill respond with *HTTP 404*.\n\n"
}
},
"summary": "Begin transaction",
"tags": [
"Transactions"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Transactions/post_api_transaction_begin.md",
"x-hints": ""
}
},
"/_api/transaction/{transaction-id}": {
"delete": {
"description": "\n\nAbort a running server-side transaction. Aborting is an idempotent operation. \nIt is not an error to abort a transaction more than once.\n\nIf the transaction can be aborted, *HTTP 200* will be returned. \nThe returned JSON object has the following 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*: result containing\n - *id*: the identifier of the transaction\n - *status*: containing the string 'aborted'\n\nIf the transaction cannot be found, aborting is not allowed or the \ntransaction was already committed, the server\nwill respond with *HTTP 400*, *HTTP 404* or *HTTP 409*.\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\n**Example:**\n Aborting a transaction:\n\nshell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/transaction/106646\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"code\" : 200, \n
\"error\" : false, \n
\"result\" : { \n
\"id\" : \"106646\", \n
\"status\" : \"aborted\" \n
} \n
}\n
\n\n\n\n\n\n",
"operationId": "executeAbort:transaction",
"parameters": [
{
"description": "The transaction identifier,\n\n",
"format": "string",
"in": "path",
"name": "transaction-id",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "If the transaction was aborted,\n*HTTP 200* will be returned.\n\n"
},
"400": {
"description": "If the transaction cannot be aborted, the server\nwill respond with *HTTP 400*.\n\n"
},
"404": {
"description": "If the transaction was not found, the server\nwill respond with *HTTP 404*.\n\n"
},
"409": {
"description": "If the transaction was already committed, the server\nwill respond with *HTTP 409*.\n\n"
}
},
"summary": "Abort transaction",
"tags": [
"Transactions"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Transactions/delete_api_transaction.md",
"x-hints": ""
},
"get": {
"description": "\n\nThe result is an object describing the status of the transaction. \nIt has at least the following attributes:\n\n- *id*: the identifier of the transaction\n\n- *status*: the status of the transaction. One of \"running\", \"committed\" or \"aborted\".\n\n\n\n\n**Example:**\n Get transaction status\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/transaction/106672\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"code\" : 200, \n
\"error\" : false, \n
\"result\" : { \n
\"id\" : \"106672\", \n
\"status\" : \"running\" \n
} \n
}\n
\n\n\n\n\n\n",
"operationId": "executeGetState:transaction",
"parameters": [
{
"description": "The transaction identifier.\n\n",
"format": "string",
"in": "path",
"name": "transaction-id",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "If the transaction is fully executed and committed on the server,\n*HTTP 200* will be returned.\n\n"
},
"400": {
"description": "If the transaction identifier specified is either missing or malformed, the server\nwill respond with *HTTP 400*.\n\n"
},
"404": {
"description": "If the transaction was not found with the specified identifier, the server\nwill respond with *HTTP 404*.\n\n"
}
},
"summary": "Get transaction status",
"tags": [
"Transactions"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Transactions/get_api_transaction.md",
"x-hints": ""
},
"put": {
"description": "\n\nCommit a running server-side transaction. Committing is an idempotent operation. \nIt is not an error to commit a transaction more than once.\n\nIf the transaction can be committed, *HTTP 200* will be returned. \nThe returned JSON object has the following 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*: result containing\n - *id*: the identifier of the transaction\n - *status*: containing the string 'committed'\n\nIf the transaction cannot be found, committing is not allowed or the \ntransaction was aborted, the server\nwill respond with *HTTP 400*, *HTTP 404* or *HTTP 409*.\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\n**Example:**\n Committing a transaction:\n\nshell> curl -X PUT --header 'accept: application/json' --dump - http://localhost:8529/_api/transaction/106634\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"code\" : 200, \n
\"error\" : false, \n
\"result\" : { \n
\"id\" : \"106634\", \n
\"status\" : \"committed\" \n
} \n
}\n
\n\n\n\n\n\n",
"operationId": "executeCommit:Transaction",
"parameters": [
{
"description": "The transaction identifier,\n\n",
"format": "string",
"in": "path",
"name": "transaction-id",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "If the transaction was committed,\n*HTTP 200* will be returned.\n\n"
},
"400": {
"description": "If the transaction cannot be committed, the server\nwill respond with *HTTP 400*.\n\n"
},
"404": {
"description": "If the transaction was not found, the server\nwill respond with *HTTP 404*.\n\n"
},
"409": {
"description": "If the transaction was already aborted, the server\nwill respond with *HTTP 409*.\n\n"
}
},
"summary": "Commit transaction",
"tags": [
"Transactions"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Transactions/put_api_transaction.md",
"x-hints": ""
}
},
"/_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\" : \"_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",
"operationId": "executesATraversal",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/HTTP_API_TRAVERSAL"
},
"x-description-offset": 214
}
],
"responses": {
"200": {
"description": "If the traversal is fully executed\n*HTTP 200* will be returned.\n\n"
},
"400": {
"description": "If the traversal specification is either missing or malformed, the server\nwill respond with *HTTP 400*.\n\n"
},
"404": {
"description": "The server will responded with *HTTP 404* if the specified edge collection\ndoes not exist, or the specified start vertex cannot be found.\n\n"
},
"500": {
"description": "The server will responded with *HTTP 500* when an error occurs inside the\ntraversal or if a traversal performs more than *maxIterations* iterations.\n\n"
}
},
"summary": "executes a traversal",
"tags": [
"Graph Traversal"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Graph Traversal/HTTP_API_TRAVERSAL.md",
"x-hints": "{% hint '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{% endhint %}\n\n"
}
},
"/_api/user": {
"post": {
"description": "\n**A JSON object with these properties is required:**\n\n - **passwd**: The user password as a string. If no password is specified, the empty string\n will be used. If you pass the special value *ARANGODB_DEFAULT_ROOT_PASSWORD*,\n then the password will be set the value stored in the environment variable\n `ARANGODB_DEFAULT_ROOT_PASSWORD`. This can be used to pass an instance\n variable into ArangoDB. For example, the instance identifier from Amazon.\n - **active**: An optional flag that specifies whether the user is active. If not\n specified, this will default to true\n - **user**: The name of the user as a string. This is mandatory.\n - **extra**: An optional JSON object with arbitrary extra data about the user.\n\n\n\n\nCreate a new user. You need server access level *Administrate* in order to\nexecute this REST call.\n\n\n\n\n**Example:**\n \n\nshell> curl -X POST --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/user <<EOF\n
{ \n
\"user\" : \"admin@example\", \n
\"passwd\" : \"secure\" \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
\"user\" : \"admin@example\", \n
\"active\" : true, \n
\"extra\" : { \n
}, \n
\"error\" : false, \n
\"code\" : 201 \n
}\n
\n\n\n\n\n\n\n\n",
"operationId": "CreateUser",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/UserHandling_create"
},
"x-description-offset": 54
}
],
"responses": {
"201": {
"description": "Returned if the user can be added by the server\n\n"
},
"400": {
"description": "If the JSON representation is malformed or mandatory data is missing\nfrom the request.\n\n"
},
"401": {
"description": "Returned if you have *No access* database access level to the *_system*\ndatabase.\n\n"
},
"403": {
"description": "Returned if you have *No access* server access level.\n\n"
},
"409": {
"description": "Returned if a user with the same name already exists.\n\n"
}
},
"summary": "Create User",
"tags": [
"User Management"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/User Management/README.md",
"x-hints": ""
}
},
"/_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\" : \"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",
"operationId": "ListAvailableUsers",
"parameters": [],
"responses": {
"200": {
"description": "The users that were found.\n\n"
},
"401": {
"description": "Returned if you have *No access* database access level to the *_system*\ndatabase.\n\n"
},
"403": {
"description": "Returned if you have *No access* server access level.\n\n"
}
},
"summary": "List available Users",
"tags": [
"User Management"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/User Management/README.md",
"x-hints": ""
}
},
"/_api/user/{user}": {
"delete": {
"description": "\n\nRemoves an existing user, identified by *user*. You need *Administrate* for\nthe server access level in order to execute this REST call.\n\n\n\n\n**Example:**\n \n\nshell> curl -X DELETE --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/user/userToDelete@myapp <<EOF\n
{ \n
}\n
EOF\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202 \n
}\n
\n\n\n\n\n\n\n\n",
"operationId": "RemoveUser",
"parameters": [
{
"description": "The name of the user\n\n",
"format": "string",
"in": "path",
"name": "user",
"required": true,
"type": "string"
}
],
"responses": {
"202": {
"description": "Is returned if the user was removed by the server\n\n"
},
"401": {
"description": "Returned if you have *No access* database access level to the *_system*\ndatabase.\n\n"
},
"403": {
"description": "Returned if you have *No access* server access level.\n\n"
},
"404": {
"description": "The specified user does not exist\n\n"
}
},
"summary": "Remove User",
"tags": [
"User Management"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/User Management/README.md",
"x-hints": ""
},
"get": {
"description": "\n\nFetches data about the specified user. You can fetch information about\nyourself or you need the *Administrate* server access level in order to\nexecute this REST call.\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/user/admin@myapp\n
\n
HTTP/1.1 OK\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"user\" : \"admin@myapp\", \n
\"active\" : true, \n
\"extra\" : { \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n\n\n\n",
"operationId": "FetchUser",
"parameters": [
{
"description": "The name of the user\n\n",
"format": "string",
"in": "path",
"name": "user",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "The user was found.\n\n"
},
"401": {
"description": "Returned if you have *No access* database access level to the *_system*\ndatabase.\n\n"
},
"403": {
"description": "Returned if you have *No access* server access level.\n\n"
},
"404": {
"description": "The user with the specified name does not exist.\n\n"
}
},
"summary": "Fetch User",
"tags": [
"User Management"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/User Management/README.md",
"x-hints": ""
},
"patch": {
"description": "\n**A JSON object with these properties is required:**\n\n - **passwd**: The user password as a string. Specifying a password is mandatory, but\n the empty string is allowed for passwords\n - **active**: An optional flag that specifies whether the user is active. If not\n specified, this will default to true\n - **extra**: An optional JSON object with arbitrary extra data about the user.\n\n\n\n\nPartially updates the data of an existing user. The name of an existing user\nmust be specified in *user*. You need server access level *Administrate* in\norder to execute this REST call. Additionally, a user can change his/her own\ndata.\n\n\n\n\n**Example:**\n \n\nshell> curl -X PATCH --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/user/admin@myapp <<EOF\n
{ \n
\"passwd\" : \"secure\" \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
\"user\" : \"admin@myapp\", \n
\"active\" : true, \n
\"extra\" : { \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n\n\n\n\n\n",
"operationId": "ModifyUser",
"parameters": [
{
"description": "The name of the user\n\n",
"format": "string",
"in": "path",
"name": "user",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/UserHandling_modify"
},
"x-description-offset": 54
}
],
"responses": {
"200": {
"description": "Is returned if the user data can be replaced by the server.\n\n"
},
"400": {
"description": "The JSON representation is malformed or mandatory data is missing from the request.\n\n"
},
"401": {
"description": "Returned if you have *No access* database access level to the *_system*\ndatabase.\n\n"
},
"403": {
"description": "Returned if you have *No access* server access level.\n\n"
},
"404": {
"description": "The specified user does not exist\n\n"
}
},
"summary": "Modify User",
"tags": [
"User Management"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/User Management/README.md",
"x-hints": ""
},
"put": {
"description": "\n**A JSON object with these properties is required:**\n\n - **passwd**: The user password as a string. Specifying a password is mandatory, but\n the empty string is allowed for passwords\n - **active**: An optional flag that specifies whether the user is active. If not\n specified, this will default to true\n - **extra**: An optional JSON object with arbitrary extra data about the user.\n\n\n\n\nReplaces the data of an existing user. The name of an existing user must be\nspecified in *user*. You need server access level *Administrate* in order to\nexecute this REST call. Additionally, a user can change his/her own data.\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/user/admin@myapp <<EOF\n
{ \n
\"passwd\" : \"secure\" \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
\"user\" : \"admin@myapp\", \n
\"active\" : true, \n
\"extra\" : { \n
}, \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n\n\n\n",
"operationId": "ReplaceUser",
"parameters": [
{
"description": "The name of the user\n\n",
"format": "string",
"in": "path",
"name": "user",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/UserHandling_replace"
},
"x-description-offset": 54
}
],
"responses": {
"200": {
"description": "Is returned if the user data can be replaced by the server.\n\n"
},
"400": {
"description": "The JSON representation is malformed or mandatory data is missing from the request\n\n"
},
"401": {
"description": "Returned if you have *No access* database access level to the *_system*\ndatabase.\n\n"
},
"403": {
"description": "Returned if you have *No access* server access level.\n\n"
},
"404": {
"description": "The specified user does not exist\n\n"
}
},
"summary": "Replace User",
"tags": [
"User Management"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/User Management/README.md",
"x-hints": ""
}
},
"/_api/user/{user}/database/": {
"get": {
"description": "\n\nFetch the list of databases available to the specified *user*. You need\n*Administrate* for the server access level in order to execute this REST call.\n\nThe call will return a JSON object with the per-database access\nprivileges for the specified user. The *result* object will contain\nthe databases names as object keys, and the associated privileges\nfor the database as values.\n\nIn case you specified *full*, the result will contain the permissions\nfor the databases as well as the permissions for the collections.\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/user/anotherAdmin@secapp/database/\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
\"_system\" : \"rw\" \n
} \n
}\n
\n\n\n\n\n**Example:**\n With the full response format:\n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/user/anotherAdmin@secapp/database?full=true\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
\"_system\" : { \n
\"permission\" : \"rw\", \n
\"collections\" : { \n
\"_queues\" : \"undefined\", \n
\"_frontend\" : \"undefined\", \n
\"_appbundles\" : \"undefined\", \n
\"_statistics\" : \"undefined\", \n
\"_users\" : \"undefined\", \n
\"_iresearch_analyzers\" : \"undefined\", \n
\"_jobs\" : \"undefined\", \n
\"demo\" : \"undefined\", \n
\"_aqlfunctions\" : \"undefined\", \n
\"_graphs\" : \"undefined\", \n
\"_apps\" : \"undefined\", \n
\"_statisticsRaw\" : \"undefined\", \n
\"_statistics15\" : \"undefined\", \n
\"animals\" : \"undefined\", \n
\"*\" : \"undefined\" \n
} \n
}, \n
\"*\" : { \n
\"permission\" : \"none\" \n
} \n
} \n
}\n
\n\n\n\n\n\n\n\n",
"operationId": "ListTheAccessibleDatabasesForAUser",
"parameters": [
{
"description": "The name of the user for which you want to query the databases.\n\n",
"format": "string",
"in": "path",
"name": "user",
"required": true,
"type": "string"
},
{
"description": "Return the full set of access levels for all databases and all collections.\n\n",
"in": "query",
"name": "full",
"required": false,
"type": "boolean"
}
],
"responses": {
"200": {
"description": "Returned if the list of available databases can be returned.\n\n"
},
"400": {
"description": "If the access privileges are not right etc.\n\n"
},
"401": {
"description": "Returned if you have *No access* database access level to the *_system*\ndatabase.\n\n"
},
"403": {
"description": "Returned if you have *No access* server access level.\n\n"
}
},
"summary": "List the accessible databases for a user",
"tags": [
"User Management"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/User Management/README.md",
"x-hints": ""
}
},
"/_api/user/{user}/database/{database}": {
"get": {
"description": "\n\nFetch the database access level for a specific database\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/user/anotherAdmin@secapp/database/_system\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\" : \"rw\" \n
}\n
\n\n\n\n\n\n\n\n",
"operationId": "GetTheDatabaseAccessLevel",
"parameters": [
{
"description": "The name of the user for which you want to query the databases.\n\n",
"format": "string",
"in": "path",
"name": "user",
"required": true,
"type": "string"
},
{
"description": "The name of the database to query\n\n",
"format": "string",
"in": "path",
"name": "database",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Returned if the acccess level can be returned\n\n"
},
"400": {
"description": "If the access privileges are not right etc.\n\n"
},
"401": {
"description": "Returned if you have *No access* database access level to the *_system*\ndatabase.\n\n"
},
"403": {
"description": "Returned if you have *No access* server access level.\n\n"
}
},
"summary": "Get the database access level",
"tags": [
"User Management"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/User Management/README.md",
"x-hints": ""
}
},
"/_api/user/{user}/database/{database}/{collection}": {
"get": {
"description": "\n\nReturns the collection access level for a specific collection\n\n\n\n\n**Example:**\n \n\nshell> curl --header 'accept: application/json' --dump - http://localhost:8529/_api/user/anotherAdmin@secapp/database/_system/_users\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\" : \"none\" \n
}\n
\n\n\n\n\n\n\n\n",
"operationId": "GetTheSpecificCollectionAccessLevel",
"parameters": [
{
"description": "The name of the user for which you want to query the databases.\n\n",
"format": "string",
"in": "path",
"name": "user",
"required": true,
"type": "string"
},
{
"description": "The name of the database to query\n\n",
"format": "string",
"in": "path",
"name": "database",
"required": true,
"type": "string"
},
{
"description": "The name of the collection\n\n",
"format": "string",
"in": "path",
"name": "collection",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Returned if the acccess level can be returned\n\n"
},
"400": {
"description": "If the access privileges are not right etc.\n\n"
},
"401": {
"description": "Returned if you have *No access* database access level to the *_system*\ndatabase.\n\n"
},
"403": {
"description": "Returned if you have *No access* server access level.\n\n"
}
},
"summary": "Get the specific collection access level",
"tags": [
"User Management"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/User Management/README.md",
"x-hints": ""
}
},
"/_api/user/{user}/database/{dbname}": {
"delete": {
"description": "\n\nClears the database access level for the database *dbname* of user *user*. As\nconsequence the default database access level is used. If there is no defined\ndefault database access level, it defaults to *No access*. You need permission\nto the *_system* database in order to execute this REST call.\n\n\n\n\n**Example:**\n \n\nshell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/user/admin@myapp/database/_system\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202 \n
}\n
\n\n\n\n\n\n\n\n",
"operationId": "ClearTheDatabaseAccessLevel",
"parameters": [
{
"description": "The name of the user.\n\n",
"format": "string",
"in": "path",
"name": "user",
"required": true,
"type": "string"
},
{
"description": "The name of the database.\n\n",
"format": "string",
"in": "path",
"name": "dbname",
"required": true,
"type": "string"
}
],
"responses": {
"202": {
"description": "Returned if the access permissions were changed successfully.\n\n"
},
"400": {
"description": "If the JSON representation is malformed or mandatory data is missing\nfrom the request.\n\n"
}
},
"summary": "Clear the database access level",
"tags": [
"User Management"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/User Management/README.md",
"x-hints": ""
},
"put": {
"description": "\n**A JSON object with these properties is required:**\n\n - **grant**: Use \"rw\" to set the database access level to *Administrate* .\n Use \"ro\" to set the database access level to *Access*.\n Use \"none\" to set the database access level to *No access*.\n\n\n\n\nSets the database access levels for the database *dbname* of user *user*. You\nneed the *Administrate* server access level in order to execute this REST\ncall.\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/user/admin@myapp/database/_system <<EOF\n
{ \n
\"grant\" : \"rw\" \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
\"_system\" : \"rw\", \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n\n\n\n",
"operationId": "SetTheDatabaseAccessLevel",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/UserHandling_grantDatabase"
},
"x-description-offset": 54
},
{
"description": "The name of the user.\n\n",
"format": "string",
"in": "path",
"name": "user",
"required": true,
"type": "string"
},
{
"description": "The name of the database.\n\n",
"format": "string",
"in": "path",
"name": "dbname",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Returned if the access level was changed successfully.\n\n"
},
"400": {
"description": "If the JSON representation is malformed or mandatory data is missing\nfrom the request.\n\n"
},
"401": {
"description": "Returned if you have *No access* database access level to the *_system*\ndatabase.\n\n"
},
"403": {
"description": "Returned if you have *No access* server access level.\n\n"
}
},
"summary": "Set the database access level",
"tags": [
"User Management"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/User Management/README.md",
"x-hints": ""
}
},
"/_api/user/{user}/database/{dbname}/{collection}": {
"delete": {
"description": "\n\nClears the collection access level for the collection *collection* in the\ndatabase *dbname* of user *user*. As consequence the default collection\naccess level is used. If there is no defined default collection access level,\nit defaults to *No access*. You need permissions to the *_system* database in\norder to execute this REST call.\n\n\n\n\n**Example:**\n \n\nshell> curl -X DELETE --header 'accept: application/json' --dump - http://localhost:8529/_api/user/admin@myapp/database/_system/reports\n
\n
HTTP/1.1 Accepted\n
content-type: application/json; charset=utf-8\n
x-content-type-options: nosniff\n
\n
{ \n
\"error\" : false, \n
\"code\" : 202 \n
}\n
\n\n\n\n\n\n\n\n",
"operationId": "ClearTheCollectionAccessLevel",
"parameters": [
{
"description": "The name of the user.\n\n",
"format": "string",
"in": "path",
"name": "user",
"required": true,
"type": "string"
},
{
"description": "The name of the database.\n\n",
"format": "string",
"in": "path",
"name": "dbname",
"required": true,
"type": "string"
},
{
"description": "The name of the collection.\n\n",
"format": "string",
"in": "path",
"name": "collection",
"required": true,
"type": "string"
}
],
"responses": {
"202": {
"description": "Returned if the access permissions were changed successfully.\n\n"
},
"400": {
"description": "If there was an error\n\n"
}
},
"summary": "Clear the collection access level",
"tags": [
"User Management"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/User Management/README.md",
"x-hints": ""
},
"put": {
"description": "\n**A JSON object with these properties is required:**\n\n - **grant**: Use \"rw\" to set the collection level access to *Read/Write*.\n Use \"ro\" to set the collection level access to *Read Only*.\n Use \"none\" to set the collection level access to *No access*.\n\n\n\n\nSets the collection access level for the *collection* in the database *dbname*\nfor user *user*. You need the *Administrate* server access level in order to\nexecute this REST call.\n\n\n\n\n**Example:**\n \n\nshell> curl -X PUT --header 'accept: application/json' --data-binary @- --dump - http://localhost:8529/_api/user/admin@myapp/database/_system/reports <<EOF\n
{ \n
\"grant\" : \"rw\" \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
\"_system/reports\" : \"rw\", \n
\"error\" : false, \n
\"code\" : 200 \n
}\n
\n\n\n\n\n\n\n\n",
"operationId": "SetTheCollectionAccessLevel",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/UserHandling_grantCollection"
},
"x-description-offset": 54
},
{
"description": "The name of the user.\n\n",
"format": "string",
"in": "path",
"name": "user",
"required": true,
"type": "string"
},
{
"description": "The name of the database.\n\n",
"format": "string",
"in": "path",
"name": "dbname",
"required": true,
"type": "string"
},
{
"description": "The name of the collection.\n\n",
"format": "string",
"in": "path",
"name": "collection",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Returned if the access permissions were changed successfully.\n\n"
},
"400": {
"description": "If the JSON representation is malformed or mandatory data is missing\nfrom the request.\n\n"
},
"401": {
"description": "Returned if you have *No access* database access level to the *_system*\ndatabase.\n\n"
},
"403": {
"description": "Returned if you have *No access* server access level.\n\n"
}
},
"summary": "Set the collection access level",
"tags": [
"User Management"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/User Management/README.md",
"x-hints": ""
}
},
"/_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-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",
"operationId": "RestVersionHandler",
"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",
"in": "query",
"name": "details",
"required": false,
"type": "boolean"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "is returned in all cases.\n\n",
"schema": {
"$ref": "#/definitions/get_api_return_rc_200"
},
"x-description-offset": 175
}
},
"summary": "Return server version",
"tags": [
"Administration"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Administration/get_api_return.md",
"x-hints": ""
}
},
"/_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\" : \"h8B2B671BCFD0/102\", \n
\"id\" : \"102\", \n
\"name\" : \"demoView\", \n
\"type\" : \"arangosearch\" \n
} \n
] \n
}\n
\n\n\n\n",
"operationId": "getViews:AllViews",
"parameters": [],
"responses": {
"200": {
"description": "The list of views\n\n"
}
},
"summary": "List all views",
"tags": [
"Views"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Views/get_api_views.md",
"x-hints": ""
}
},
"/_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: 1000, 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 - **type**: The segment candidates for the \"consolidation\" operation are selected based\n upon several possible configurable formulas as defined by their types.\n The currently supported types are (default: \"bytes_accum\"):\n - *bytes_accum*: consolidate if and only if (`{threshold}` range `[0.0, 1.0]`):\n `{threshold} > (segment_bytes + sum_of_merge_candidate_segment_bytes) / all_segment_bytes`\n i.e. the sum of all candidate segment byte size is less than the total\n segment byte size multiplied by the `{threshold}`\n - *tier*: consolidate based on segment byte size and live document count\n as dictated by the customization attributes.\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",
"operationId": "createView",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/post_api_view_iresearch"
},
"x-description-offset": 54
}
],
"responses": {
"400": {
"description": "If the *view-name* is missing, then a *HTTP 400* is returned.\n\n"
},
"404": {
"description": "If the *view-name* is unknown, then a *HTTP 404* is returned.\n\n"
}
},
"summary": "Create an ArangoSearch view",
"tags": [
"Views"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Views/post_api_view_iresearch.md",
"x-hints": ""
}
},
"/_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: 1000, 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 - **type**: The segment candidates for the \"consolidation\" operation are selected based\n upon several possible configurable formulas as defined by their types.\n The currently supported types are (default: \"bytes_accum\"):\n - *bytes_accum*: consolidate if and only if (`{threshold}` range `[0.0, 1.0]`):\n `{threshold} > (segment_bytes + sum_of_merge_candidate_segment_bytes) / all_segment_bytes`\n i.e. the sum of all candidate segment byte size is less than the total\n segment byte size multiplied by the `{threshold}`\n - *tier*: consolidate based on segment byte size and live document count\n as dictated by the customization attributes.\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",
"operationId": "createView:Create",
"parameters": [
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/post_api_view"
},
"x-description-offset": 54
}
],
"responses": {
"400": {
"description": "If the *view-name* is missing, then a *HTTP 400* is\nreturned.\n\n"
},
"404": {
"description": "If the *view-name* is unknown, then a *HTTP 404* is returned.\n\n"
}
},
"summary": "Create an ArangoDB view",
"tags": [
"Views"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Views/post_api_view.md",
"x-hints": ""
}
},
"/_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/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",
"operationId": "deleteView",
"parameters": [
{
"description": "The name of the view to drop.\n\n",
"format": "string",
"in": "path",
"name": "view-name",
"required": true,
"type": "string"
}
],
"responses": {
"400": {
"description": "If the *view-name* is missing, then a *HTTP 400* is returned.\n\n"
},
"404": {
"description": "If the *view-name* is unknown, then a *HTTP 404* is returned.\n\n"
}
},
"summary": "Drops a view",
"tags": [
"Views"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Views/delete_api_view.md",
"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/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",
"operationId": "getViews:Properties",
"parameters": [
{
"description": "The name of the view.\n\n",
"format": "string",
"in": "path",
"name": "view-name",
"required": true,
"type": "string"
}
],
"responses": {
"404": {
"description": "If the *view-name* is unknown, then a *HTTP 404* is returned.\n\n"
}
},
"summary": "Return information about a view",
"tags": [
"Views"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Views/get_api_view_name.md",
"x-hints": ""
}
},
"/_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/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",
"operationId": "getView",
"parameters": [
{
"description": "The name of the view.\n\n",
"format": "string",
"in": "path",
"name": "view-name",
"required": true,
"type": "string"
}
],
"responses": {
"400": {
"description": "If the *view-name* is missing, then a *HTTP 400* is returned.\n\n"
},
"404": {
"description": "If the *view-name* is unknown, then a *HTTP 404* is returned.\n\n"
}
},
"summary": "Read properties of a view",
"tags": [
"Views"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Views/get_api_view_properties.md",
"x-hints": ""
}
},
"/_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: 1000, 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 - **type**: The segment candidates for the \"consolidation\" operation are selected based\n upon several possible configurable formulas as defined by their types.\n The currently supported types are (default: \"bytes_accum\"):\n - *bytes_accum*: consolidate if and only if (`{threshold}` range `[0.0, 1.0]`):\n `{threshold} > (segment_bytes + sum_of_merge_candidate_segment_bytes) / all_segment_bytes`\n i.e. the sum of all candidate segment byte size is less than the total\n segment byte size multiplied by the `{threshold}`\n - *tier*: consolidate based on segment byte size and live document count\n as dictated by the customization attributes.\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",
"operationId": "modifyView",
"parameters": [
{
"description": "The name of the view.\n\n",
"format": "string",
"in": "path",
"name": "view-name",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/patch_api_view_properties_iresearch"
},
"x-description-offset": 54
}
],
"responses": {
"400": {
"description": "If the *view-name* is missing, then a *HTTP 400* is returned.\n\n"
},
"404": {
"description": "If the *view-name* is unknown, then a *HTTP 404* is returned.\n\n"
}
},
"summary": "Partially changes properties of an ArangoSearch view",
"tags": [
"Views"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Views/patch_api_view_properties_iresearch.md",
"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: 1000, 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 - **type**: The segment candidates for the \"consolidation\" operation are selected based\n upon several possible configurable formulas as defined by their types.\n The currently supported types are (default: \"bytes_accum\"):\n - *bytes_accum*: consolidate if and only if (`{threshold}` range `[0.0, 1.0]`):\n `{threshold} > (segment_bytes + sum_of_merge_candidate_segment_bytes) / all_segment_bytes`\n i.e. the sum of all candidate segment byte size is less than the total\n segment byte size multiplied by the `{threshold}`\n - *tier*: consolidate based on segment byte size and live document count\n as dictated by the customization attributes.\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",
"operationId": "modifyView",
"parameters": [
{
"description": "The name of the view.\n\n",
"format": "string",
"in": "path",
"name": "view-name",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "Json Request Body",
"required": true,
"schema": {
"$ref": "#/definitions/put_api_view_properties_iresearch"
},
"x-description-offset": 54
}
],
"responses": {
"400": {
"description": "If the *view-name* is missing, then a *HTTP 400* is returned.\n\n"
},
"404": {
"description": "If the *view-name* is unknown, then a *HTTP 404* is returned.\n\n"
}
},
"summary": "Change properties of an ArangoSearch view",
"tags": [
"Views"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Views/put_api_view_properties_iresearch.md",
"x-hints": ""
}
},
"/_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\" : \"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",
"operationId": "modifyView:partially",
"parameters": [
{
"description": "The name of the view.\n\n",
"format": "string",
"in": "path",
"name": "view-name",
"required": true,
"type": "string"
}
],
"responses": {
"400": {
"description": "If the *view-name* is missing, then a *HTTP 400* is returned.\n\n"
},
"404": {
"description": "If the *view-name* is unknown, then a *HTTP 404* is returned.\n\n"
}
},
"summary": "Partially changes properties of an ArangoDB view",
"tags": [
"Views"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Views/patch_api_view_properties.md",
"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\" : \"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",
"operationId": "modifyView:One",
"parameters": [
{
"description": "The name of the view.\n\n",
"format": "string",
"in": "path",
"name": "view-name",
"required": true,
"type": "string"
}
],
"responses": {
"400": {
"description": "If the *view-name* is missing, then a *HTTP 400* is returned.\n\n"
},
"404": {
"description": "If the *view-name* is unknown, then a *HTTP 404* is returned.\n\n"
}
},
"summary": "Change properties of an ArangoDB view",
"tags": [
"Views"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Views/put_api_view_properties.md",
"x-hints": ""
}
},
"/_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\" : \"h8B2B671BCFD0/107345\", \n
\"id\" : \"107345\" \n
}\n
\n\n\n\n",
"operationId": "modifyView:rename",
"parameters": [
{
"description": "The name of the view to rename.\n\n",
"format": "string",
"in": "path",
"name": "view-name",
"required": true,
"type": "string"
}
],
"responses": {
"400": {
"description": "If the *view-name* is missing, then a *HTTP 400* is returned.\n\n"
},
"404": {
"description": "If the *view-name* is unknown, then a *HTTP 404* is returned.\n\n"
}
},
"summary": "Rename a view",
"tags": [
"Views"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Views/put_api_view_rename.md",
"x-hints": ""
}
},
"/_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-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",
"operationId": "handleCommandLastTick",
"parameters": [],
"responses": {
"200": {
"description": "is returned if the request was executed successfully.\n\n"
},
"405": {
"description": "is returned when an invalid HTTP method is used.\n\n"
},
"500": {
"description": "is returned if an error occurred while assembling the response.\n\n"
},
"501": {
"description": "is returned when this operation is called on a coordinator in a cluster.\n\n"
}
},
"summary": "Return last available tick value",
"tags": [
"Replication"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Replication/get_api_wal_access_last_tick.md",
"x-hints": ""
}
},
"/_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-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",
"operationId": "handleCommandTickRange",
"parameters": [],
"responses": {
"200": {
"description": "is returned if the tick ranges could be determined successfully.\n\n"
},
"405": {
"description": "is returned when an invalid HTTP method is used.\n\n"
},
"500": {
"description": "is returned if the server operations state could not be determined.\n\n"
},
"501": {
"description": "is returned when this operation is called on a coordinator in a cluster.\n\n"
}
},
"summary": "Return tick ranges available in the operations of WAL",
"tags": [
"Replication"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Replication/get_api_wal_access_range.md",
"x-hints": ""
}
},
"/_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=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",
"operationId": "handleCommandTail",
"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",
"in": "query",
"name": "from",
"required": false,
"type": "number"
},
{
"description": "Inclusive upper bound tick value for results.\n\n",
"in": "query",
"name": "to",
"required": false,
"type": "number"
},
{
"description": "Should be set to the value of the *x-arango-replication-lastscanned* header\nor alternatively 0 on first try. This allows the rocksdb engine to break up\nlarge transactions over multiple responses. \n\n",
"in": "query",
"name": "lastScanned",
"required": false,
"type": "number"
},
{
"description": "Whether operations for all databases should be included. When set to *false*\nonly the operations for the current database are included. The value *true* is\nonly valid on the *_system* database. The default is *false*.\n\n",
"in": "query",
"name": "global",
"required": false,
"type": "boolean"
},
{
"description": "Approximate maximum size of the returned result.\n\n",
"in": "query",
"name": "chunkSize",
"required": false,
"type": "number"
},
{
"description": "Id of the client used to tail results. The server will use this to \nkeep operations until the client has fetched them. **Note** this is required\nto have a chance at fetching reading all operations with the rocksdb storage engine\n\n",
"in": "query",
"name": "serverId",
"required": false,
"type": "number"
},
{
"description": "Id of barrier used to keep WAL entries around. **Note** this is only required for the \nMMFiles storage engine\n\n",
"in": "query",
"name": "barrierId",
"required": false,
"type": "number"
}
],
"responses": {
"200": {
"description": "is returned if the request was executed successfully, and there are log\nevents available for the requested range. The response body will not be empty\nin this case.\n\n"
},
"204": {
"description": "is returned if the request was executed successfully, but there are no log\nevents available for the requested range. The response body will be empty\nin this case.\n\n"
},
"400": {
"description": "is returned if either the *from* or *to* values are invalid.\n\n"
},
"405": {
"description": "is returned when an invalid HTTP method is used.\n\n"
},
"500": {
"description": "is returned if an error occurred while assembling the response.\n\n"
},
"501": {
"description": "is returned when this operation is called on a coordinator in a cluster.\n\n"
}
},
"summary": "Tail recent server operations",
"tags": [
"Replication"
],
"x-examples": [],
"x-filename": "/home/willi/src/devel/Documentation/DocuBlocks/Rest/Replication/get_api_wal_access_tail.md",
"x-hints": ""
}
}
},
"swagger": "2.0"
}