diff --git a/CHANGELOG b/CHANGELOG index 4e9ba33cf9..1b2a70cfa0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,5 @@ -v1.4.3-alpha1 (2013-XX-XX) --------------------------- +v1.4.3 (2013-11-25) +------------------- * fixed a segfault in the AQL optimiser, occurring when a constant non-list value was used on the right-hand side of an IN operator that had a collection attribute on the diff --git a/VERSION b/VERSION index 1c8ae79b8c..428b770e3e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4.3-alpha1 +1.4.3 diff --git a/build.h b/build.h index 223b683185..62076b7503 100644 --- a/build.h +++ b/build.h @@ -1 +1 @@ -#define TRI_VERSION "1.4.3-alpha1" +#define TRI_VERSION "1.4.3" diff --git a/configure b/configure index 80cbfc952a..2a929b60a7 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for triAGENS ArangoDB 1.4.3-alpha1. +# Generated by GNU Autoconf 2.69 for triAGENS ArangoDB 1.4.3. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='triAGENS ArangoDB' PACKAGE_TARNAME='arangodb' -PACKAGE_VERSION='1.4.3-alpha1' -PACKAGE_STRING='triAGENS ArangoDB 1.4.3-alpha1' +PACKAGE_VERSION='1.4.3' +PACKAGE_STRING='triAGENS ArangoDB 1.4.3' PACKAGE_BUGREPORT='info@triagens.de' PACKAGE_URL='http://www.arangodb.org' @@ -1403,7 +1403,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures triAGENS ArangoDB 1.4.3-alpha1 to adapt to many kinds of systems. +\`configure' configures triAGENS ArangoDB 1.4.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1474,7 +1474,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of triAGENS ArangoDB 1.4.3-alpha1:";; + short | recursive ) echo "Configuration of triAGENS ArangoDB 1.4.3:";; esac cat <<\_ACEOF @@ -1605,7 +1605,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -triAGENS ArangoDB configure 1.4.3-alpha1 +triAGENS ArangoDB configure 1.4.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2070,7 +2070,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by triAGENS ArangoDB $as_me 1.4.3-alpha1, which was +It was created by triAGENS ArangoDB $as_me 1.4.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3276,7 +3276,7 @@ fi # Define the identity of the package. PACKAGE='arangodb' - VERSION='1.4.3-alpha1' + VERSION='1.4.3' cat >>confdefs.h <<_ACEOF @@ -9160,7 +9160,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by triAGENS ArangoDB $as_me 1.4.3-alpha1, which was +This file was extended by triAGENS ArangoDB $as_me 1.4.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9227,7 +9227,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -triAGENS ArangoDB config.status 1.4.3-alpha1 +triAGENS ArangoDB config.status 1.4.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index d3c8daf5ea..942988efd4 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ dnl ============================================================================ dnl --SECTION-- triAGENS GmbH Build Environment dnl ============================================================================ -AC_INIT([triAGENS ArangoDB], [1.4.3-alpha1], [info@triagens.de], [arangodb], [http://www.arangodb.org]) +AC_INIT([triAGENS ArangoDB], [1.4.3], [info@triagens.de], [arangodb], [http://www.arangodb.org]) dnl ---------------------------------------------------------------------------- dnl auxillary directory for install-sh and missing diff --git a/js/apps/system/aardvark/api-docs.json b/js/apps/system/aardvark/api-docs.json index 8fbbb6843f..88b4827fdb 100644 --- a/js/apps/system/aardvark/api-docs.json +++ b/js/apps/system/aardvark/api-docs.json @@ -1,6 +1,6 @@ { "swaggerVersion": "1.1", - "apiVersion": "1.4.3-alpha1", + "apiVersion": "1.4.3", "apis": [ { "path": "api-docs/aqlfunction.{format}", diff --git a/js/apps/system/aardvark/api-docs/batch.json b/js/apps/system/aardvark/api-docs/batch.json index e967089b00..4a842e8aea 100644 --- a/js/apps/system/aardvark/api-docs/batch.json +++ b/js/apps/system/aardvark/api-docs/batch.json @@ -32,7 +32,7 @@ "notes": "Executes a batch request. A batch request can contain any number of other requests that can be sent to ArangoDB in isolation. The benefit of using batch requests is that batching requests requires less client/server roundtrips than when sending isolated requests.

All parts of a batch request are executed serially on the server. The server will return the results of all parts in a single response when all parts are finished.

Technically, a batch request is a multipart HTTP request, with content-type multipart/form-data. A batch request consists of an envelope and the individual batch part actions. Batch part actions are \"regular\" HTTP requests, including full header and an optional body. Multiple batch parts are separated by a boundary identifier. The boundary identifier is declared in the batch envelope. The MIME content-type for each individual batch part must be application/x-arango-batchpart.

The response sent by the server will be an HTTP 200 response, with an error summary header x-arango-errors. This header contains the number of batch parts that failed with an HTTP error code of at least 400.

The response sent by the server is a multipart response, too. It contains the individual HTTP responses for all batch parts, including the full HTTP result header (with status code and other potential headers) and an optional result body. The individual batch parts in the result are seperated using the same boundary value as specified in the request.

The order of batch parts in the response will be the same as in the original client request. Client can additionally use the Content-Id MIME header in a batch part to define an individual id for each batch part. The server will return this id is the batch part responses, too.

", "summary": "executes a batch request", "httpMethod": "POST", - "examples": "

unix> curl -X POST --header 'Content-Type: multipart/form-data; boundary=SomeBoundaryValue' --data @- --dump - http://localhost:8529/_api/batch\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId1\r\n\r\nGET /_api/version HTTP/1.1\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId2\r\n\r\nDELETE /_api/collection/products HTTP/1.1\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: someId\r\n\r\nPOST /_api/collection/products HTTP/1.1\r\n\r\n{ \"name\": \"products\" }\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: nextId\r\n\r\nGET /_api/collection/products/figures HTTP/1.1\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: otherId\r\n\r\nDELETE /_api/collection/products HTTP/1.1\r\n--SomeBoundaryValue--\r\n\n\nHTTP/1.1 200 OK\ncontent-type: multipart/form-data; boundary=SomeBoundaryValue\nx-arango-errors: 1\n\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId1\r\n\r\nHTTP/1.1 200 OK\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 44\r\n\r\n{\"server\":\"arango\",\"version\":\"1.4.3-alpha1\"}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId2\r\n\r\nHTTP/1.1 404 Not Found\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 88\r\n\r\n{\"error\":true,\"code\":404,\"errorNum\":1203,\"errorMessage\":\"unknown collection 'products'\"}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: someId\r\n\r\nHTTP/1.1 200 OK\r\nlocation: /_db/_system/_api/collection/products\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 137\r\n\r\n{\"id\":\"346636711\",\"name\":\"products\",\"waitForSync\":false,\"isVolatile\":false,\"isSystem\":false,\"status\":3,\"type\":2,\"error\":false,\"code\":200}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: nextId\r\n\r\nHTTP/1.1 200 OK\r\nlocation: /_db/_system/_api/collection/products/figures\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 526\r\n\r\n{\"id\":\"346636711\",\"name\":\"products\",\"doCompact\":true,\"isVolatile\":false,\"isSystem\":false,\"journalSize\":1048576,\"keyOptions\":{\"type\":\"traditional\",\"allowUserKeys\":true},\"waitForSync\":false,\"count\":0,\"figures\":{\"alive\":{\"count\":0,\"size\":0},\"dead\":{\"count\":0,\"size\":0,\"deletion\":0},\"datafiles\":{\"count\":0,\"fileSize\":0},\"journals\":{\"count\":0,\"fileSize\":0},\"compactors\":{\"count\":0,\"fileSize\":0},\"shapefiles\":{\"count\":1,\"fileSize\":2097152},\"shapes\":{\"count\":6},\"attributes\":{\"count\":0}},\"status\":3,\"type\":2,\"error\":false,\"code\":200}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: otherId\r\n\r\nHTTP/1.1 200 OK\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 43\r\n\r\n{\"id\":\"346636711\",\"error\":false,\"code\":200}\r\n--SomeBoundaryValue--\n\n

", + "examples": "

unix> curl -X POST --header 'Content-Type: multipart/form-data; boundary=SomeBoundaryValue' --data @- --dump - http://localhost:8529/_api/batch\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId1\r\n\r\nGET /_api/version HTTP/1.1\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId2\r\n\r\nDELETE /_api/collection/products HTTP/1.1\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: someId\r\n\r\nPOST /_api/collection/products HTTP/1.1\r\n\r\n{ \"name\": \"products\" }\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: nextId\r\n\r\nGET /_api/collection/products/figures HTTP/1.1\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: otherId\r\n\r\nDELETE /_api/collection/products HTTP/1.1\r\n--SomeBoundaryValue--\r\n\n\nHTTP/1.1 200 OK\ncontent-type: multipart/form-data; boundary=SomeBoundaryValue\nx-arango-errors: 1\n\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId1\r\n\r\nHTTP/1.1 200 OK\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 37\r\n\r\n{\"server\":\"arango\",\"version\":\"1.4.3\"}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId2\r\n\r\nHTTP/1.1 404 Not Found\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 88\r\n\r\n{\"error\":true,\"code\":404,\"errorNum\":1203,\"errorMessage\":\"unknown collection 'products'\"}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: someId\r\n\r\nHTTP/1.1 200 OK\r\nlocation: /_db/_system/_api/collection/products\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 137\r\n\r\n{\"id\":\"346112423\",\"name\":\"products\",\"waitForSync\":false,\"isVolatile\":false,\"isSystem\":false,\"status\":3,\"type\":2,\"error\":false,\"code\":200}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: nextId\r\n\r\nHTTP/1.1 200 OK\r\nlocation: /_db/_system/_api/collection/products/figures\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 526\r\n\r\n{\"id\":\"346112423\",\"name\":\"products\",\"doCompact\":true,\"isVolatile\":false,\"isSystem\":false,\"journalSize\":1048576,\"keyOptions\":{\"type\":\"traditional\",\"allowUserKeys\":true},\"waitForSync\":false,\"count\":0,\"figures\":{\"alive\":{\"count\":0,\"size\":0},\"dead\":{\"count\":0,\"size\":0,\"deletion\":0},\"datafiles\":{\"count\":0,\"fileSize\":0},\"journals\":{\"count\":0,\"fileSize\":0},\"compactors\":{\"count\":0,\"fileSize\":0},\"shapefiles\":{\"count\":1,\"fileSize\":2097152},\"shapes\":{\"count\":6},\"attributes\":{\"count\":0}},\"status\":3,\"type\":2,\"error\":false,\"code\":200}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: otherId\r\n\r\nHTTP/1.1 200 OK\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 43\r\n\r\n{\"id\":\"346112423\",\"error\":false,\"code\":200}\r\n--SomeBoundaryValue--\n\n

", "nickname": "executesABatchRequest" } ], diff --git a/js/apps/system/aardvark/api-docs/collection.json b/js/apps/system/aardvark/api-docs/collection.json index d9789c8328..fc6853a4d7 100644 --- a/js/apps/system/aardvark/api-docs/collection.json +++ b/js/apps/system/aardvark/api-docs/collection.json @@ -19,7 +19,7 @@ "notes": "Creates an new collection with a given name. The request must contain an object with the following attributes.

- name: The name of the collection.

- waitForSync (optional, default: false): If true then the data is synchronised to disk before returning from a create or update of a document.

- doCompact (optional, default is true): whether or not the collection will be compacted.

- journalSize (optional, default is a @ref CommandLineArangod \"configuration parameter\"): The maximal size of a journal or datafile. Note that this also limits the maximal size of a single object. Must be at least 1MB.

- isSystem (optional, default is false): If true, create a system collection. In this case collection-name should start with an underscore. End users should normally create non-system collections only. API implementors may be required to create system collections in very special occasions, but normally a regular collection will do.

- isVolatile (optional, default is false): If true then the collection data is kept in-memory only and not made persistent. Unloading the collection will cause the collection data to be discarded. Stopping or re-starting the server will also cause full loss of data in the collection. Setting this option will make the resulting collection be slightly faster than regular collections because ArangoDB does not enforce any synchronisation to disk and does not calculate any CRC checksums for datafiles (as there are no datafiles).

This option should threrefore be used for cache-type collections only, and not for data that cannot be re-created otherwise.

- keyOptions (optional) additional options for key generation. If specified, then keyOptions should be a JSON array containing the following attributes (note: some of them are optional): - type: specifies the type of the key generator. The currently available generators are traditional and autoincrement. - allowUserKeys: if set to true, then it is allowed to supply own key values in the _key attribute of a document. If set to false, then the key generator will solely be responsible for generating keys and supplying own key values in the _key attribute of documents is considered an error. - increment: increment value for autoincrement key generator. Not used for other key generator types. - offset: initial offset value for autoincrement key generator. Not used for other key generator types.

- type (optional, default is 2): the type of the collection to create. The following values for type are valid: - 2: document collection - 3: edges collection

", "summary": "creates a collection", "httpMethod": "POST", - "examples": "

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/collection\n{\"name\":\"testCollectionBasics\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/testCollectionBasics\n\n{ \n  \"id\" : \"19874215\", \n  \"name\" : \"testCollectionBasics\", \n  \"waitForSync\" : false, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\nunix> curl -X POST --data @- --dump - http://localhost:8529/_api/collection\n{\"name\":\"testCollectionEdges\",\"type\":3}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/testCollectionEdges\n\n{ \n  \"id\" : \"20595111\", \n  \"name\" : \"testCollectionEdges\", \n  \"waitForSync\" : false, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"status\" : 3, \n  \"type\" : 3, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n



unix> curl -X POST --data @- --dump - http://localhost:8529/_api/collection\n{\"name\":\"testCollectionUsers\",\"keyOptions\":{\"type\":\"autoincrement\",\"increment\":5,\"allowUserKeys\":true}}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/testCollectionUsers\n\n{ \n  \"id\" : \"21316007\", \n  \"name\" : \"testCollectionUsers\", \n  \"waitForSync\" : false, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/collection\n{\"name\":\"testCollectionBasics\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/testCollectionBasics\n\n{ \n  \"id\" : \"19087783\", \n  \"name\" : \"testCollectionBasics\", \n  \"waitForSync\" : false, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\nunix> curl -X POST --data @- --dump - http://localhost:8529/_api/collection\n{\"name\":\"testCollectionEdges\",\"type\":3}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/testCollectionEdges\n\n{ \n  \"id\" : \"20005287\", \n  \"name\" : \"testCollectionEdges\", \n  \"waitForSync\" : false, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"status\" : 3, \n  \"type\" : 3, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n



unix> curl -X POST --data @- --dump - http://localhost:8529/_api/collection\n{\"name\":\"testCollectionUsers\",\"keyOptions\":{\"type\":\"autoincrement\",\"increment\":5,\"allowUserKeys\":true}}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/testCollectionUsers\n\n{ \n  \"id\" : \"20791719\", \n  \"name\" : \"testCollectionUsers\", \n  \"waitForSync\" : false, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "createsACollection" } ], @@ -40,7 +40,7 @@ "notes": "Returns an object with an attribute collections containing a list of all collection descriptions. The same information is also available in the names as hash map with the collection names as keys.

By providing the optional URL parameter excludeSystem with a value of true, all system collections will be excluded from the response.

", "summary": "reads all collections", "httpMethod": "GET", - "examples": "Return information about all collections:

unix> curl --dump - http://localhost:8529/_api/collection\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"collections\" : [ \n    { \n      \"id\" : \"147879\", \n      \"name\" : \"_users\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"1720743\", \n      \"name\" : \"_graphs\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"5325223\", \n      \"name\" : \"_aal\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"3228071\", \n      \"name\" : \"_routing\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"2572711\", \n      \"name\" : \"_modules\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"7553447\", \n      \"name\" : \"_replication\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"6898087\", \n      \"name\" : \"_trx\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"15352231\", \n      \"name\" : \"demo\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"16794023\", \n      \"name\" : \"animals\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"6242727\", \n      \"name\" : \"_aqlfunctions\", \n      \"status\" : 3, \n      \"type\" : 2 \n    } \n  ], \n  \"names\" : { \n    \"_users\" : { \n      \"id\" : \"147879\", \n      \"name\" : \"_users\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_graphs\" : { \n      \"id\" : \"1720743\", \n      \"name\" : \"_graphs\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_aal\" : { \n      \"id\" : \"5325223\", \n      \"name\" : \"_aal\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_routing\" : { \n      \"id\" : \"3228071\", \n      \"name\" : \"_routing\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_modules\" : { \n      \"id\" : \"2572711\", \n      \"name\" : \"_modules\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_replication\" : { \n      \"id\" : \"7553447\", \n      \"name\" : \"_replication\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_trx\" : { \n      \"id\" : \"6898087\", \n      \"name\" : \"_trx\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"demo\" : { \n      \"id\" : \"15352231\", \n      \"name\" : \"demo\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"animals\" : { \n      \"id\" : \"16794023\", \n      \"name\" : \"animals\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_aqlfunctions\" : { \n      \"id\" : \"6242727\", \n      \"name\" : \"_aqlfunctions\", \n      \"status\" : 3, \n      \"type\" : 2 \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "Return information about all collections:

unix> curl --dump - http://localhost:8529/_api/collection\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"collections\" : [ \n    { \n      \"id\" : \"147879\", \n      \"name\" : \"_users\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"1720743\", \n      \"name\" : \"_graphs\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"5325223\", \n      \"name\" : \"_aal\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"3228071\", \n      \"name\" : \"_routing\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"2572711\", \n      \"name\" : \"_modules\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"7553447\", \n      \"name\" : \"_replication\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"6898087\", \n      \"name\" : \"_trx\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"6242727\", \n      \"name\" : \"_aqlfunctions\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"14827943\", \n      \"name\" : \"demo\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"16269735\", \n      \"name\" : \"animals\", \n      \"status\" : 3, \n      \"type\" : 2 \n    } \n  ], \n  \"names\" : { \n    \"_users\" : { \n      \"id\" : \"147879\", \n      \"name\" : \"_users\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_graphs\" : { \n      \"id\" : \"1720743\", \n      \"name\" : \"_graphs\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_aal\" : { \n      \"id\" : \"5325223\", \n      \"name\" : \"_aal\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_routing\" : { \n      \"id\" : \"3228071\", \n      \"name\" : \"_routing\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_modules\" : { \n      \"id\" : \"2572711\", \n      \"name\" : \"_modules\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_replication\" : { \n      \"id\" : \"7553447\", \n      \"name\" : \"_replication\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_trx\" : { \n      \"id\" : \"6898087\", \n      \"name\" : \"_trx\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_aqlfunctions\" : { \n      \"id\" : \"6242727\", \n      \"name\" : \"_aqlfunctions\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"demo\" : { \n      \"id\" : \"14827943\", \n      \"name\" : \"demo\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"animals\" : { \n      \"id\" : \"16269735\", \n      \"name\" : \"animals\", \n      \"status\" : 3, \n      \"type\" : 2 \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "readsAllCollections" } ], @@ -98,7 +98,7 @@ "notes": "In addition to the above, the result will always contain the waitForSync, doCompact, journalSize, and isVolatile properties. This is achieved by forcing a load of the underlying collection.

- waitForSync: If true then creating or changing a document will wait until the data has been synchronised to disk.

- doCompact: Whether or not the collection will be compacted.

- journalSize: The maximal size setting for journals / datafiles.

- isVolatile: If true then the collection data will be kept in memory only and ArangoDB will not write or sync the data to disk.

", "summary": "reads the properties of a collection", "httpMethod": "GET", - "examples": "Using an identifier:

unix> curl --dump - http://localhost:8529/_api/collection/21971367/properties\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/products/properties\n\n{ \n  \"id\" : \"21971367\", \n  \"name\" : \"products\", \n  \"doCompact\" : true, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"journalSize\" : 1048576, \n  \"keyOptions\" : { \n    \"type\" : \"traditional\", \n    \"allowUserKeys\" : true \n  }, \n  \"waitForSync\" : true, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Using a name:

unix> curl --dump - http://localhost:8529/_api/collection/products/properties\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/products/properties\n\n{ \n  \"id\" : \"22626727\", \n  \"name\" : \"products\", \n  \"doCompact\" : true, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"journalSize\" : 1048576, \n  \"keyOptions\" : { \n    \"type\" : \"traditional\", \n    \"allowUserKeys\" : true \n  }, \n  \"waitForSync\" : true, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "Using an identifier:

unix> curl --dump - http://localhost:8529/_api/collection/21447079/properties\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/products/properties\n\n{ \n  \"id\" : \"21447079\", \n  \"name\" : \"products\", \n  \"doCompact\" : true, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"journalSize\" : 1048576, \n  \"keyOptions\" : { \n    \"type\" : \"traditional\", \n    \"allowUserKeys\" : true \n  }, \n  \"waitForSync\" : true, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Using a name:

unix> curl --dump - http://localhost:8529/_api/collection/products/properties\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/products/properties\n\n{ \n  \"id\" : \"22102439\", \n  \"name\" : \"products\", \n  \"doCompact\" : true, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"journalSize\" : 1048576, \n  \"keyOptions\" : { \n    \"type\" : \"traditional\", \n    \"allowUserKeys\" : true \n  }, \n  \"waitForSync\" : true, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "readsThePropertiesOfACollection" } ], @@ -129,7 +129,7 @@ "notes": "In addition to the above, the result also contains the number of documents. Note that this will always load the collection into memory.

- count: The number of documents inside the collection.

", "summary": "returns the number of documents in a collection", "httpMethod": "GET", - "examples": "Using an identifier and requesting the number of documents:

unix> curl --dump - http://localhost:8529/_api/collection/23282087/count\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/products/count\n\n{ \n  \"id\" : \"23282087\", \n  \"name\" : \"products\", \n  \"doCompact\" : true, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"journalSize\" : 1048576, \n  \"keyOptions\" : { \n    \"type\" : \"traditional\", \n    \"allowUserKeys\" : true \n  }, \n  \"waitForSync\" : true, \n  \"count\" : 100, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "Using an identifier and requesting the number of documents:

unix> curl --dump - http://localhost:8529/_api/collection/22757799/count\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/products/count\n\n{ \n  \"id\" : \"22757799\", \n  \"name\" : \"products\", \n  \"doCompact\" : true, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"journalSize\" : 1048576, \n  \"keyOptions\" : { \n    \"type\" : \"traditional\", \n    \"allowUserKeys\" : true \n  }, \n  \"waitForSync\" : true, \n  \"count\" : 100, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "returnsTheNumberOfDocumentsInACollection" } ], @@ -160,7 +160,7 @@ "notes": "In addition to the above, the result also contains the number of documents and additional statistical information about the collection. Note that this will always load the collection into memory.

- count: The number of documents currently present in the collection.

- figures.alive.count: The number of currently active documents.

- figures.alive.size: The total size in bytes used by all active documents.

- figures.dead.count: The number of dead documents. This includes document versions that have been deleted or replaced by a newer version.

- figures.dead.size: The total size in bytes used by all dead documents.

- figures.dead.deletion: The total number of deletion markers in the collection.

- figures.datafiles.count: The number of current datafiles.- figures.datafiles.fileSize: The total filesize of all datafiles.

- figures.journals.count: The number of journal files.- figures.journals.fileSize: The total filesize of all journal files.

- figures.compactors.count: The number of compactor files.- figures.compactors.fileSize: The total filesize of all compactor files.

- figures.shapefiles.count: The number of shape files.- figures.shapefiles.fileSize: The total filesize of all shape files.

- figures.shapes.count: The total number of shapes in the collection (this includes shapes that are not in use anymore)

- figures.attributes.count: The total number of attributes in the collection (this includes attributes that are not in use anymore)

- journalSize: The maximal size of the journal in bytes.

Note: the filesizes of collection and index parameter JSON files are not reported. These files should normally have a size of a few bytes each. Please also note that the fileSize values are reported in bytes and reflect the logical file sizes. Some filesystems may use optimisations (e.g. sparse files) so that the actual physical file size is somewhat different. Directories and sub-directories may also require space in the file system, but this space is not reported in the fileSize results.

That means that the figures reported do not reflect the actual disk usage of the collection with 100% accuracy. The actual disk usage of a collection is normally slightly higher than the sum of the reported fileSize values. Still the sum of the fileSize values can still be used as a lower bound approximation of the disk usage.

", "summary": "returns the stats for a collection", "httpMethod": "GET", - "examples": "Using an identifier and requesting the figures of the collection:

unix> curl --dump - http://localhost:8529/_api/collection/43860391/figures\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/products/figures\n\n{ \n  \"id\" : \"43860391\", \n  \"name\" : \"products\", \n  \"doCompact\" : true, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"journalSize\" : 1048576, \n  \"keyOptions\" : { \n    \"type\" : \"traditional\", \n    \"allowUserKeys\" : true \n  }, \n  \"waitForSync\" : true, \n  \"count\" : 0, \n  \"figures\" : { \n    \"alive\" : { \n      \"count\" : 0, \n      \"size\" : 0 \n    }, \n    \"dead\" : { \n      \"count\" : 0, \n      \"size\" : 0, \n      \"deletion\" : 0 \n    }, \n    \"datafiles\" : { \n      \"count\" : 0, \n      \"fileSize\" : 0 \n    }, \n    \"journals\" : { \n      \"count\" : 0, \n      \"fileSize\" : 0 \n    }, \n    \"compactors\" : { \n      \"count\" : 0, \n      \"fileSize\" : 0 \n    }, \n    \"shapefiles\" : { \n      \"count\" : 1, \n      \"fileSize\" : 2097152 \n    }, \n    \"shapes\" : { \n      \"count\" : 6 \n    }, \n    \"attributes\" : { \n      \"count\" : 0 \n    } \n  }, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "Using an identifier and requesting the figures of the collection:

unix> curl --dump - http://localhost:8529/_api/collection/43336103/figures\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_db/_system/_api/collection/products/figures\n\n{ \n  \"id\" : \"43336103\", \n  \"name\" : \"products\", \n  \"doCompact\" : true, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"journalSize\" : 1048576, \n  \"keyOptions\" : { \n    \"type\" : \"traditional\", \n    \"allowUserKeys\" : true \n  }, \n  \"waitForSync\" : true, \n  \"count\" : 0, \n  \"figures\" : { \n    \"alive\" : { \n      \"count\" : 0, \n      \"size\" : 0 \n    }, \n    \"dead\" : { \n      \"count\" : 0, \n      \"size\" : 0, \n      \"deletion\" : 0 \n    }, \n    \"datafiles\" : { \n      \"count\" : 0, \n      \"fileSize\" : 0 \n    }, \n    \"journals\" : { \n      \"count\" : 0, \n      \"fileSize\" : 0 \n    }, \n    \"compactors\" : { \n      \"count\" : 0, \n      \"fileSize\" : 0 \n    }, \n    \"shapefiles\" : { \n      \"count\" : 1, \n      \"fileSize\" : 2097152 \n    }, \n    \"shapes\" : { \n      \"count\" : 6 \n    }, \n    \"attributes\" : { \n      \"count\" : 0 \n    } \n  }, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "returnsTheStatsForACollection" } ], @@ -191,7 +191,7 @@ "notes": "In addition to the above, the result will also contain the collection's revision id. The revision id is a server-generated string that clients can use to check whether data in a collection has changed since the last revision check.

- revision: The collection revision id as a string.

", "summary": "return a collection revision id", "httpMethod": "GET", - "examples": "Retrieving the revision of a collection

unix> curl --dump - http://localhost:8529/_api/collection/44646823/revision\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"44646823\", \n  \"name\" : \"products\", \n  \"status\" : 3, \n  \"type\" : 2, \n  \"revision\" : \"0\", \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "Retrieving the revision of a collection

unix> curl --dump - http://localhost:8529/_api/collection/44122535/revision\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"44122535\", \n  \"name\" : \"products\", \n  \"status\" : 3, \n  \"type\" : 2, \n  \"revision\" : \"0\", \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "returnACollectionRevisionId" } ], @@ -234,7 +234,7 @@ "notes": "Will calculate a checksum of the meta-data (keys and optionally revision ids) and optionally the document data in the collection.

The checksum can be used to compare if two collections on different ArangoDB instances contain the same contents. The current revision of the collection is returned too so one can make sure the checksums are calculated for the same state of data.

By default, the checksum will only be calculated on the _key system attribute of the documents contained in the collection. For edge collections, the system attributes _from and _to will also be included in the calculation.

By setting the optional URL parameter withRevisions to true, then revision ids (_rev system attributes) are included in the checksumming.

By providing the optional URL parameter withData with a value of true, the user-defined document attributes will be included in the calculation too. Note that including user-defined attributes will make the checksumming slower.

The response is a JSON object with the following attributes:

- checksum: The calculated checksum as a number.

- revision: The collection revision id as a string.

", "summary": "returns a checksum for the collection", "httpMethod": "GET", - "examples": "Retrieving the checksum of a collection:

unix> curl --dump - http://localhost:8529/_api/collection/45367719/checksum\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"45367719\", \n  \"name\" : \"products\", \n  \"status\" : 3, \n  \"type\" : 2, \n  \"checksum\" : 2013401835, \n  \"revision\" : \"46219687\", \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Retrieving the checksum of a collection including the collection data, but not the revisions:

unix> curl --dump - http://localhost:8529/_api/collection/46481831/checksum?withRevisions=false&withData=true\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"46481831\", \n  \"name\" : \"products\", \n  \"status\" : 3, \n  \"type\" : 2, \n  \"checksum\" : 3024341833, \n  \"revision\" : \"47333799\", \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "Retrieving the checksum of a collection:

unix> curl --dump - http://localhost:8529/_api/collection/44843431/checksum\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"44843431\", \n  \"name\" : \"products\", \n  \"status\" : 3, \n  \"type\" : 2, \n  \"checksum\" : 1354064052, \n  \"revision\" : \"45695399\", \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Retrieving the checksum of a collection including the collection data, but not the revisions:

unix> curl --dump - http://localhost:8529/_api/collection/45957543/checksum?withRevisions=false&withData=true\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"45957543\", \n  \"name\" : \"products\", \n  \"status\" : 3, \n  \"type\" : 2, \n  \"checksum\" : 2469229522, \n  \"revision\" : \"46809511\", \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "returnsAChecksumForTheCollection" } ], @@ -265,7 +265,7 @@ "notes": "Loads a collection into memory. Returns the collection on success.

The request might optionally contain the following attribute:

- count: If set, this controls whether the return value should include the number of documents in the collection. Setting count to false may speed up loading a collection. The default value for count is true.

On success an object with the following attributes is returned:

- id: The identifier of the collection.

- name: The name of the collection.

- count: The number of documents inside the collection. This is only returned if the count input parameters is set to true or has not been specified.

- status: The status of the collection as number.

- type: The collection type. Valid types are: - 2: document collection - 3: edges collection

", "summary": "loads a collection", "httpMethod": "PUT", - "examples": "

unix> curl -X PUT --dump - http://localhost:8529/_api/collection/47595943/load\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"47595943\", \n  \"name\" : \"products\", \n  \"count\" : 0, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "

unix> curl -X PUT --dump - http://localhost:8529/_api/collection/47071655/load\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"47071655\", \n  \"name\" : \"products\", \n  \"count\" : 0, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "loadsACollection" } ], @@ -296,7 +296,7 @@ "notes": "Removes a collection from memory. This call does not delete any documents. You can use the collection afterwards; in which case it will be loaded into memory, again. On success an object with the following attributes is returned:

- id: The identifier of the collection.

- name: The name of the collection.

- status: The status of the collection as number.

- type: The collection type. Valid types are: - 2: document collection - 3: edges collection

", "summary": "unloads a collection", "httpMethod": "PUT", - "examples": "

unix> curl -X PUT --dump - http://localhost:8529/_api/collection/48316839/unload\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"48316839\", \n  \"name\" : \"products\", \n  \"status\" : 2, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "

unix> curl -X PUT --dump - http://localhost:8529/_api/collection/47792551/unload\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"47792551\", \n  \"name\" : \"products\", \n  \"status\" : 2, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "unloadsACollection" } ], @@ -318,7 +318,7 @@ "notes": "Removes all documents from the collection, but leaves the indexes intact.

", "summary": "truncates a collection", "httpMethod": "PUT", - "examples": "

unix> curl -X PUT --dump - http://localhost:8529/_api/collection/48972199/truncate\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"48972199\", \n  \"name\" : \"products\", \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "

unix> curl -X PUT --dump - http://localhost:8529/_api/collection/48447911/truncate\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"48447911\", \n  \"name\" : \"products\", \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "truncatesACollection" } ], @@ -340,7 +340,7 @@ "notes": "Changes the properties of a collection. Expects an object with the attribute(s)

- waitForSync: If true then creating or changing a document will wait until the data has been synchronised to disk.

- journalSize: Size (in bytes) for new journal files that are created for the collection.

If returns an object with the attributes

- id: The identifier of the collection.

- name: The name of the collection.

- waitForSync: The new value.

- journalSize: The new value.

- status: The status of the collection as number.

- type: The collection type. Valid types are: - 2: document collection - 3: edges collection

Note: some other collection properties, such as type or isVolatile cannot be changed once the collection is created.

", "summary": "changes the properties of a collection", "httpMethod": "PUT", - "examples": "

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/collection/49693095/properties\n{\"waitForSync\":true}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"49693095\", \n  \"name\" : \"products\", \n  \"doCompact\" : true, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"journalSize\" : 1048576, \n  \"keyOptions\" : { \n    \"type\" : \"traditional\", \n    \"allowUserKeys\" : true \n  }, \n  \"waitForSync\" : true, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/collection/49168807/properties\n{\"waitForSync\":true}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"49168807\", \n  \"name\" : \"products\", \n  \"doCompact\" : true, \n  \"isVolatile\" : false, \n  \"isSystem\" : false, \n  \"journalSize\" : 1048576, \n  \"keyOptions\" : { \n    \"type\" : \"traditional\", \n    \"allowUserKeys\" : true \n  }, \n  \"waitForSync\" : true, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "changesThePropertiesOfACollection" } ], @@ -362,7 +362,7 @@ "notes": "Renames a collection. Expects an object with the attribute(s)

- name: The new name.

If returns an object with the attributes

- id: The identifier of the collection.

- name: The new name of the collection.

- status: The status of the collection as number.

- type: The collection type. Valid types are: - 2: document collection - 3: edges collection

", "summary": "renames a collection", "httpMethod": "PUT", - "examples": "

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/collection/50348455/rename\n{\"name\":\"newname\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"50348455\", \n  \"name\" : \"newname\", \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/collection/49824167/rename\n{\"name\":\"newname\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"49824167\", \n  \"name\" : \"newname\", \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "renamesACollection" } ], @@ -393,7 +393,7 @@ "notes": "Rotates the journal of a collection. The current journal of the collection will be closed and made a read-only datafile. The purpose of the rotate method is to make the data in the file available for compaction (compaction is only performed for read-only datafiles, and not for journals).

Saving new data in the collection subsequently will create a new journal file automatically if there is no current journal.

If returns an object with the attributes

- result: will be true if rotation succeeded

", "summary": "rotates the journal of a collection", "httpMethod": "PUT", - "examples": "Rotating a journal:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/collection/51003815/rotate\n{}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Rotating without a journal:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/collection/52052391/rotate\n{}\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 400, \n  \"errorNum\" : 1105, \n  \"errorMessage\" : \"could not rotate journal: no journal\" \n}\n\n

", + "examples": "Rotating a journal:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/collection/50479527/rotate\n{}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Rotating without a journal:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/collection/51528103/rotate\n{}\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 400, \n  \"errorNum\" : 1105, \n  \"errorMessage\" : \"could not rotate journal: no journal\" \n}\n\n

", "nickname": "rotatesTheJournalOfACollection" } ], @@ -424,7 +424,7 @@ "notes": "Deletes a collection identified by collection-name.

If the collection was successfully deleted then, an object is returned with the following attributes:

- error: false

- id: The identifier of the deleted collection.

", "summary": "deletes a collection", "httpMethod": "DELETE", - "examples": "Using an identifier:

unix> curl -X DELETE --dump - http://localhost:8529/_api/collection/52707751\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"52707751\", \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Using a name:

unix> curl -X DELETE --dump - http://localhost:8529/_api/collection/products1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"53363111\", \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "Using an identifier:

unix> curl -X DELETE --dump - http://localhost:8529/_api/collection/52183463\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"52183463\", \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Using a name:

unix> curl -X DELETE --dump - http://localhost:8529/_api/collection/products1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"52838823\", \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "deletesACollection" } ], diff --git a/js/apps/system/aardvark/api-docs/cursor.json b/js/apps/system/aardvark/api-docs/cursor.json index 11342e0f16..0aecfbf151 100644 --- a/js/apps/system/aardvark/api-docs/cursor.json +++ b/js/apps/system/aardvark/api-docs/cursor.json @@ -36,7 +36,7 @@ "notes": "The query details include the query string plus optional query options and bind parameters. These values need to be passed in a JSON representation in the body of the POST request.

The following attributes can be used inside the JSON object:

- query: contains the query string to be executed (mandatory)

- count: boolean flag that indicates whether the number of documents in the result set should be returned in the \"count\" attribute of the result (optional). Calculating the \"count\" attribute might in the future have a performance impact for some queries so this option is turned off by default, and \"count\" is only returned when requested.

- batchSize: maximum number of result documents to be transferred from the server to the client in one roundtrip (optional). If this attribute is not set, a server-controlled default value will be used.

- bindVars: key/value list of bind parameters (optional).

- options: key/value list of extra options for the query (optional).

The following options are supported at the moment:

- fullCount: if set to true and the query contains a LIMIT clause, then the result will contain an extra attribute extra with a sub-attribute fullCount. This sub-attribute will contain the number of documents in the result before the last LIMIT in the query was applied. It can be used to count the number of documents that match certain filter criteria, but only return a subset of them, in one go. It is thus similar to MySQL's SQL_CALC_FOUND_ROWS hint. Note that setting the option will disable a few LIMIT optimisations and may lead to more documents being processed, and thus make queries run longer. Note that the fullCount sub-attribute will only be present in the result if the query has a LIMIT clause and the LIMIT clause is actually used in the query.

If the result set can be created by the server, the server will respond with HTTP 201. The body of the response will contain a JSON object with the result set.

The returned JSON object has the following properties:

- error: boolean flag to indicate that an error occurred (false in this case)

- code: the HTTP status code

- result: an array of result documents (might be empty if query has no results)

- hasMore: a boolean indicator whether there are more results available for the cursor on the server

- count: the total number of result documents available (only available if the query was executed with the count attribute set)

- id: id of temporary cursor created on the server (optional, see above)

- extra: an optional JSON object with extra information about the query result

If the JSON representation is malformed or the query specification is missing from the request, the server will respond with HTTP 400.

The body of the response will contain a JSON object with additional error details. The object has the following attributes:

- error: boolean flag to indicate that an error occurred (true in this case)

- code: the HTTP status code

- errorNum: the server error number

- errorMessage: a descriptive error message

If the query specification is complete, the server will process the query. If an error occurs during query processing, the server will respond with HTTP 400. Again, the body of the response will contain details about the error.

A list of query errors can be found the manual here.

", "summary": "creates a cursor", "httpMethod": "POST", - "examples": "Executes a query and extract the result in a single go:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 2 RETURN p\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/55263655\", \n      \"_rev\" : \"55263655\", \n      \"_key\" : \"55263655\", \n      \"hello2\" : \"world1\" \n    }, \n    { \n      \"_id\" : \"products/54870439\", \n      \"_rev\" : \"54870439\", \n      \"_key\" : \"54870439\", \n      \"hello1\" : \"world1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 2, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

Executes a query and extracts part of the result:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 5 RETURN p\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/56312231\", \n      \"_rev\" : \"56312231\", \n      \"_key\" : \"56312231\", \n      \"hello1\" : \"world1\" \n    }, \n    { \n      \"_id\" : \"products/57688487\", \n      \"_rev\" : \"57688487\", \n      \"_key\" : \"57688487\", \n      \"hello5\" : \"world1\" \n    } \n  ], \n  \"hasMore\" : true, \n  \"id\" : \"57885095\", \n  \"count\" : 5, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

Using a query option:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR i IN 1..1000 FILTER i > 500 LIMIT 10 RETURN i\",\"count\":true,\"options\":{\"fullCount\":true}}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    501, \n    502, \n    503, \n    504, \n    505, \n    506, \n    507, \n    508, \n    509, \n    510 \n  ], \n  \"hasMore\" : false, \n  \"count\" : 10, \n  \"extra\" : { \n    \"fullCount\" : 500 \n  }, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

Bad queries: Missing body:

unix> curl -X POST --dump - http://localhost:8529/_api/cursor\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 400, \n  \"errorNum\" : 1502, \n  \"errorMessage\" : \"query is empty\" \n}\n\n

Unknown collection:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR u IN unknowncoll LIMIT 2 RETURN u\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 404, \n  \"errorNum\" : 1203, \n  \"errorMessage\" : \"cannot execute query: collection not found: 'unknowncoll'\" \n}\n\n

", + "examples": "Executes a query and extract the result in a single go:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 2 RETURN p\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/54739367\", \n      \"_rev\" : \"54739367\", \n      \"_key\" : \"54739367\", \n      \"hello2\" : \"world1\" \n    }, \n    { \n      \"_id\" : \"products/54346151\", \n      \"_rev\" : \"54346151\", \n      \"_key\" : \"54346151\", \n      \"hello1\" : \"world1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 2, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

Executes a query and extracts part of the result:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 5 RETURN p\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/56181159\", \n      \"_rev\" : \"56181159\", \n      \"_key\" : \"56181159\", \n      \"hello2\" : \"world1\" \n    }, \n    { \n      \"_id\" : \"products/57164199\", \n      \"_rev\" : \"57164199\", \n      \"_key\" : \"57164199\", \n      \"hello5\" : \"world1\" \n    } \n  ], \n  \"hasMore\" : true, \n  \"id\" : \"57360807\", \n  \"count\" : 5, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

Using a query option:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR i IN 1..1000 FILTER i > 500 LIMIT 10 RETURN i\",\"count\":true,\"options\":{\"fullCount\":true}}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    501, \n    502, \n    503, \n    504, \n    505, \n    506, \n    507, \n    508, \n    509, \n    510 \n  ], \n  \"hasMore\" : false, \n  \"count\" : 10, \n  \"extra\" : { \n    \"fullCount\" : 500 \n  }, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

Bad queries: Missing body:

unix> curl -X POST --dump - http://localhost:8529/_api/cursor\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 400, \n  \"errorNum\" : 1502, \n  \"errorMessage\" : \"query is empty\" \n}\n\n

Unknown collection:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR u IN unknowncoll LIMIT 2 RETURN u\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 404, \n  \"errorNum\" : 1203, \n  \"errorMessage\" : \"cannot execute query: collection not found: 'unknowncoll'\" \n}\n\n

", "nickname": "createsACursor" } ], @@ -71,7 +71,7 @@ "notes": "

If the cursor is still alive, returns an object with the following attributes.

- id: the cursor-identifier- result: a list of documents for the current batch- hasMore: false if this was the last batch- count: if present the total number of elements

Note that even if hasMore returns true, the next call might still return no documents. If, however, hasMore is false, then the cursor is exhausted. Once the hasMore attribute has a value of false, the client can stop.

", "summary": "reads next batch from a cursor", "httpMethod": "PUT", - "examples": "Valid request for next batch:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 5 RETURN p\",\"count\":true,\"batchSize\":2}\n\nunix> curl -X PUT --dump - http://localhost:8529/_api/cursor/60440999\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/59916711\", \n      \"_rev\" : \"59916711\", \n      \"_key\" : \"59916711\", \n      \"hello4\" : \"world1\" \n    }, \n    { \n      \"_id\" : \"products/59261351\", \n      \"_rev\" : \"59261351\", \n      \"_key\" : \"59261351\", \n      \"hello2\" : \"world1\" \n    } \n  ], \n  \"hasMore\" : true, \n  \"id\" : \"60440999\", \n  \"count\" : 5, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Missing identifier

unix> curl -X PUT --dump - http://localhost:8529/_api/cursor\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 400, \n  \"errorNum\" : 400, \n  \"errorMessage\" : \"bad parameter\" \n}\n\n

Unknown identifier

unix> curl -X PUT --dump - http://localhost:8529/_api/cursor/123123\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 404, \n  \"errorNum\" : 1600, \n  \"errorMessage\" : \"cursor not found\" \n}\n\n

", + "examples": "Valid request for next batch:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 5 RETURN p\",\"count\":true,\"batchSize\":2}\n\nunix> curl -X PUT --dump - http://localhost:8529/_api/cursor/59916711\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/58343847\", \n      \"_rev\" : \"58343847\", \n      \"_key\" : \"58343847\", \n      \"hello1\" : \"world1\" \n    }, \n    { \n      \"_id\" : \"products/59720103\", \n      \"_rev\" : \"59720103\", \n      \"_key\" : \"59720103\", \n      \"hello5\" : \"world1\" \n    } \n  ], \n  \"hasMore\" : true, \n  \"id\" : \"59916711\", \n  \"count\" : 5, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Missing identifier

unix> curl -X PUT --dump - http://localhost:8529/_api/cursor\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 400, \n  \"errorNum\" : 400, \n  \"errorMessage\" : \"bad parameter\" \n}\n\n

Unknown identifier

unix> curl -X PUT --dump - http://localhost:8529/_api/cursor/123123\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 404, \n  \"errorNum\" : 1600, \n  \"errorMessage\" : \"cursor not found\" \n}\n\n

", "nickname": "readsNextBatchFromACursor" } ], @@ -102,7 +102,7 @@ "notes": "Deletes the cursor and frees the resources associated with it.

The cursor will automatically be destroyed on the server when the client has retrieved all documents from it. The client can also explicitly destroy the cursor at any earlier time using an HTTP DELETE request. The cursor id must be included as part of the URL.

Note: the server will also destroy abandoned cursors automatically after a certain server-controlled timeout to avoid resource leakage.

", "summary": "deletes a cursor", "httpMethod": "DELETE", - "examples": "

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 5 RETURN p\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/61751719\", \n      \"_rev\" : \"61751719\", \n      \"_key\" : \"61751719\", \n      \"hello2\" : \"world1\" \n    }, \n    { \n      \"_id\" : \"products/62079399\", \n      \"_rev\" : \"62079399\", \n      \"_key\" : \"62079399\", \n      \"hello3\" : \"world1\" \n    } \n  ], \n  \"hasMore\" : true, \n  \"id\" : \"62931367\", \n  \"count\" : 5, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/cursor/62931367\n\n

", + "examples": "

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 5 RETURN p\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/61555111\", \n      \"_rev\" : \"61555111\", \n      \"_key\" : \"61555111\", \n      \"hello3\" : \"world1\" \n    }, \n    { \n      \"_id\" : \"products/60834215\", \n      \"_rev\" : \"60834215\", \n      \"_key\" : \"60834215\", \n      \"hello1\" : \"world1\" \n    } \n  ], \n  \"hasMore\" : true, \n  \"id\" : \"62407079\", \n  \"count\" : 5, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/cursor/62407079\n\n

", "nickname": "deletesACursor" } ], diff --git a/js/apps/system/aardvark/api-docs/database.json b/js/apps/system/aardvark/api-docs/database.json index c655d4324a..2b9e94915f 100644 --- a/js/apps/system/aardvark/api-docs/database.json +++ b/js/apps/system/aardvark/api-docs/database.json @@ -74,7 +74,7 @@ "notes": "Retrieves information about the current database

The response is a JSON object with the following attributes:

- name: the name of the current database

- id: the id of the current database

- path: the filesystem path of the current database

- isSystem: whether or not the current database is the _system database

", "summary": "retrieves information about the current database", "httpMethod": "GET", - "examples": "

unix> curl --dump - http://localhost:8529/_api/database/current\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"name\" : \"_system\", \n    \"id\" : \"82343\", \n    \"path\" : \"/tmp/vocdir.35578/databases/database-82343\", \n    \"isSystem\" : true \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "

unix> curl --dump - http://localhost:8529/_api/database/current\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"name\" : \"_system\", \n    \"id\" : \"82343\", \n    \"path\" : \"/tmp/vocdir.23034/databases/database-82343\", \n    \"isSystem\" : true \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "retrievesInformationAboutTheCurrentDatabase" } ], diff --git a/js/apps/system/aardvark/api-docs/document.json b/js/apps/system/aardvark/api-docs/document.json index 947bb25b08..0f1e1416a8 100644 --- a/js/apps/system/aardvark/api-docs/document.json +++ b/js/apps/system/aardvark/api-docs/document.json @@ -55,7 +55,7 @@ "notes": "Creates a new document in the collection named collection. A JSON representation of the document must be passed as the body of the POST request.

If the document was created successfully, then the \"Location\" header contains the path to the newly created document. The \"ETag\" header field contains the revision of the document.

The body of the response contains a JSON object with the following attributes:

- _id contains the document handle of the newly created document- _key contains the document key- _rev contains the document revision

If the collection parameter waitForSync is false, then the call returns as soon as the document has been accepted. It will not wait until the document has been synced to disk.

Optionally, the URL parameter waitForSync can be used to force synchronisation of the document creation operation to disk even in case that the waitForSync flag had been disabled for the entire collection. Thus, the waitForSync URL parameter can be used to force synchronisation of just this specific operations. To use this, set the waitForSync parameter to true. If the waitForSync parameter is not specified or set to false, then the collection's default waitForSync behavior is applied. The waitForSync URL parameter cannot be used to disable synchronisation for collections that have a default waitForSync value of true.

", "summary": "creates a document", "httpMethod": "POST", - "examples": "Create a document given a collection named products. Note that the revision identifier might or might not by equal to the auto-generated key.

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: \"348275111\"\nlocation: /_db/_system/_api/document/products/348275111\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/348275111\", \n  \"_rev\" : \"348275111\", \n  \"_key\" : \"348275111\" \n}\n\n

Create a document in a collection named products with a collection-level waitForSync value of false.

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"349323687\"\nlocation: /_db/_system/_api/document/products/349323687\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/349323687\", \n  \"_rev\" : \"349323687\", \n  \"_key\" : \"349323687\" \n}\n\n

Create a document in a collection with a collection-level waitForSync value of false, but using the waitForSync URL parameter.

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products&waitForSync=true\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: \"350372263\"\nlocation: /_db/_system/_api/document/products/350372263\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/350372263\", \n  \"_rev\" : \"350372263\", \n  \"_key\" : \"350372263\" \n}\n\n

Create a document in a new, named collection

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products&createCollection=true\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"351420839\"\nlocation: /_db/_system/_api/document/products/351420839\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/351420839\", \n  \"_rev\" : \"351420839\", \n  \"_key\" : \"351420839\" \n}\n\n

Unknown collection name:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"collection 'products' not found\", \n  \"code\" : 404, \n  \"errorNum\" : 1203 \n}\n\n

Illegal document:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products\n{ 1: \"World\" }\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"expecting attribute name\", \n  \"code\" : 400, \n  \"errorNum\" : 600 \n}\n\n

", + "examples": "Create a document given a collection named products. Note that the revision identifier might or might not by equal to the auto-generated key.

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: \"347750823\"\nlocation: /_db/_system/_api/document/products/347750823\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/347750823\", \n  \"_rev\" : \"347750823\", \n  \"_key\" : \"347750823\" \n}\n\n

Create a document in a collection named products with a collection-level waitForSync value of false.

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"348799399\"\nlocation: /_db/_system/_api/document/products/348799399\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/348799399\", \n  \"_rev\" : \"348799399\", \n  \"_key\" : \"348799399\" \n}\n\n

Create a document in a collection with a collection-level waitForSync value of false, but using the waitForSync URL parameter.

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products&waitForSync=true\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: \"349847975\"\nlocation: /_db/_system/_api/document/products/349847975\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/349847975\", \n  \"_rev\" : \"349847975\", \n  \"_key\" : \"349847975\" \n}\n\n

Create a document in a new, named collection

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products&createCollection=true\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"350896551\"\nlocation: /_db/_system/_api/document/products/350896551\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/350896551\", \n  \"_rev\" : \"350896551\", \n  \"_key\" : \"350896551\" \n}\n\n

Unknown collection name:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"collection 'products' not found\", \n  \"code\" : 404, \n  \"errorNum\" : 1203 \n}\n\n

Illegal document:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products\n{ 1: \"World\" }\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"expecting attribute name\", \n  \"code\" : 400, \n  \"errorNum\" : 600 \n}\n\n

", "nickname": "createsADocument" } ], @@ -106,7 +106,7 @@ "notes": "Returns the document identified by document-handle. The returned document contains two special attributes: _id containing the document handle and _rev containing the revision.

", "summary": "reads a document", "httpMethod": "GET", - "examples": "Use a document handle:

unix> curl --dump - http://localhost:8529/_api/document/products/352469415\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"352469415\"\n\n{ \n  \"hello\" : \"world\", \n  \"_id\" : \"products/352469415\", \n  \"_rev\" : \"352469415\", \n  \"_key\" : \"352469415\" \n}\n\n

Use a document handle and an etag:

unix> curl --header 'If-None-Match: \"353583527\"' --dump - http://localhost:8529/_api/document/products/353583527\n\n

Unknown document handle:

unix> curl --dump - http://localhost:8529/_api/document/products/unknownhandle\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"document /_api/document/products/unknownhandle not found\", \n  \"code\" : 404, \n  \"errorNum\" : 1202 \n}\n\n

", + "examples": "Use a document handle:

unix> curl --dump - http://localhost:8529/_api/document/products/351945127\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"351945127\"\n\n{ \n  \"hello\" : \"world\", \n  \"_id\" : \"products/351945127\", \n  \"_rev\" : \"351945127\", \n  \"_key\" : \"351945127\" \n}\n\n

Use a document handle and an etag:

unix> curl --header 'If-None-Match: \"353059239\"' --dump - http://localhost:8529/_api/document/products/353059239\n\n

Unknown document handle:

unix> curl --dump - http://localhost:8529/_api/document/products/unknownhandle\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"document /_api/document/products/unknownhandle not found\", \n  \"code\" : 404, \n  \"errorNum\" : 1202 \n}\n\n

", "nickname": "readsADocument" } ], @@ -137,7 +137,7 @@ "notes": "Returns a list of all URI for all documents from the collection identified by collection.

", "summary": "reads all documents from collection", "httpMethod": "GET", - "examples": "Returns a collection.

unix> curl --dump - http://localhost:8529/_api/document/?collection=products\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"documents\" : [ \n    \"/_api/document/products/355484071\", \n    \"/_api/document/products/354763175\", \n    \"/_api/document/products/355156391\" \n  ] \n}\n\n

Collection does not exist.

unix> curl --dump - http://localhost:8529/_api/document/?collection=doesnotexist\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"collection 'doesnotexist' not found\", \n  \"code\" : 404, \n  \"errorNum\" : 1203 \n}\n\n

", + "examples": "Returns a collection.

unix> curl --dump - http://localhost:8529/_api/document/?collection=products\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"documents\" : [ \n    \"/_api/document/products/354959783\", \n    \"/_api/document/products/354238887\", \n    \"/_api/document/products/354632103\" \n  ] \n}\n\n

Collection does not exist.

unix> curl --dump - http://localhost:8529/_api/document/?collection=doesnotexist\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"collection 'doesnotexist' not found\", \n  \"code\" : 404, \n  \"errorNum\" : 1203 \n}\n\n

", "nickname": "readsAllDocumentsFromCollection" } ], @@ -194,7 +194,7 @@ "notes": "Like GET, but only returns the header fields and not the body. You can use this call to get the current revision of a document or check if the document was deleted.

", "summary": "reads a document header", "httpMethod": "HEAD", - "examples": "

unix> curl -X HEAD --dump - http://localhost:8529/_api/document/products/356532647\n\n

", + "examples": "

unix> curl -X HEAD --dump - http://localhost:8529/_api/document/products/356008359\n\n

", "nickname": "readsADocumentHeader" } ], @@ -268,7 +268,7 @@ "notes": "Completely updates (i.e. replaces) the document identified by document-handle. If the document exists and can be updated, then a HTTP 201 is returned and the \"ETag\" header field contains the new revision of the document.

If the new document passed in the body of the request contains the document-handle in the attribute _id and the revision in _rev, these attributes will be ignored. Only the URI and the \"ETag\" header are relevant in order to avoid confusion when using proxies.

Optionally, the URL parameter waitForSync can be used to force synchronisation of the document replacement operation to disk even in case that the waitForSync flag had been disabled for the entire collection. Thus, the waitForSync URL parameter can be used to force synchronisation of just specific operations. To use this, set the waitForSync parameter to true. If the waitForSync parameter is not specified or set to false, then the collection's default waitForSync behavior is applied. The waitForSync URL parameter cannot be used to disable synchronisation for collections that have a default waitForSync value of true.

The body of the response contains a JSON object with the information about the handle and the revision. The attribute _id contains the known document-handle of the updated document, the attribute _rev contains the new document revision.

If the document does not exist, then a HTTP 404 is returned and the body of the response contains an error document.

There are two ways for specifying the targeted document revision id for conditional replacements (i.e. replacements that will only be executed if the revision id found in the database matches the document revision id specified in the request): - specifying the target revision in the rev URL query parameter- specifying the target revision in the if-match HTTP header

Specifying a target revision is optional, however, if done, only one of the described mechanisms must be used (either the rev URL parameter or the if-match HTTP header). Regardless which mechanism is used, the parameter needs to contain the target document revision id as returned in the _rev attribute of a document or by an HTTP etag header.

For example, to conditionally replace a document based on a specific revision id, you the following request:

- PUT /_api/document/document-handle?rev=etag

If a target revision id is provided in the request (e.g. via the etag value in the rev URL query parameter above), ArangoDB will check that the revision id of the document found in the database is equal to the target revision id provided in the request. If there is a mismatch between the revision id, then by default a HTTP 412 conflict is returned and no replacement is performed.

The conditional update behavior can be overriden with the policy URL query parameter:

- PUT /_api/document/document-handle?policy=policy

If policy is set to error, then the behavior is as before: replacements will fail if the revision id found in the database does not match the target revision id specified in the request.

If policy is set to last, then the replacement will succeed, even if the revision id found in the database does not match the target revision id specified in the request. You can use the last `policy` to force replacements.

", "summary": "replaces a document", "httpMethod": "PUT", - "examples": "Using document handle:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/document/products/357646759\n{\"Hello\": \"you\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"358039975\"\nlocation: /_db/_system/_api/document/products/357646759\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/357646759\", \n  \"_rev\" : \"358039975\", \n  \"_key\" : \"357646759\" \n}\n\n

Unknown document handle:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/document/products/359023015\n{}\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"document /_api/document/products/359023015 not found\", \n  \"code\" : 404, \n  \"errorNum\" : 1202 \n}\n\n

Produce a revision conflict:

unix> curl -X PUT --header 'If-Match: \"360792487\"' --data @- --dump - http://localhost:8529/_api/document/products/360399271\n{\"other\":\"content\"}\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 412, \n  \"errorNum\" : 1200, \n  \"errorMessage\" : \"precondition failed\", \n  \"_id\" : \"products/360399271\", \n  \"_rev\" : \"360399271\", \n  \"_key\" : \"360399271\" \n}\n\n

Last write wins:

unix> curl -X PUT --header 'If-Match: \"362365351\"' --data @- --dump - http://localhost:8529/_api/document/products/361972135?policy=last\n{}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"362627495\"\nlocation: /_db/_system/_api/document/products/361972135\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/361972135\", \n  \"_rev\" : \"362627495\", \n  \"_key\" : \"361972135\" \n}\n\n

Alternative to header field:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/document/products/363610535?rev=364003751\n{\"other\":\"content\"}\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 412, \n  \"errorNum\" : 1200, \n  \"errorMessage\" : \"precondition failed\", \n  \"_id\" : \"products/363610535\", \n  \"_rev\" : \"363610535\", \n  \"_key\" : \"363610535\" \n}\n\n

", + "examples": "Using document handle:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/document/products/357122471\n{\"Hello\": \"you\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"357515687\"\nlocation: /_db/_system/_api/document/products/357122471\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/357122471\", \n  \"_rev\" : \"357515687\", \n  \"_key\" : \"357122471\" \n}\n\n

Unknown document handle:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/document/products/358498727\n{}\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"document /_api/document/products/358498727 not found\", \n  \"code\" : 404, \n  \"errorNum\" : 1202 \n}\n\n

Produce a revision conflict:

unix> curl -X PUT --header 'If-Match: \"360268199\"' --data @- --dump - http://localhost:8529/_api/document/products/359874983\n{\"other\":\"content\"}\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 412, \n  \"errorNum\" : 1200, \n  \"errorMessage\" : \"precondition failed\", \n  \"_id\" : \"products/359874983\", \n  \"_rev\" : \"359874983\", \n  \"_key\" : \"359874983\" \n}\n\n

Last write wins:

unix> curl -X PUT --header 'If-Match: \"361841063\"' --data @- --dump - http://localhost:8529/_api/document/products/361447847?policy=last\n{}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"362103207\"\nlocation: /_db/_system/_api/document/products/361447847\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/361447847\", \n  \"_rev\" : \"362103207\", \n  \"_key\" : \"361447847\" \n}\n\n

Alternative to header field:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/document/products/363086247?rev=363479463\n{\"other\":\"content\"}\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 412, \n  \"errorNum\" : 1200, \n  \"errorMessage\" : \"precondition failed\", \n  \"_id\" : \"products/363086247\", \n  \"_rev\" : \"363086247\", \n  \"_key\" : \"363086247\" \n}\n\n

", "nickname": "replacesADocument" } ], @@ -348,7 +348,7 @@ "notes": "Partially updates the document identified by document-handle. The body of the request must contain a JSON document with the attributes to patch (the patch document). All attributes from the patch document will be added to the existing document if they do not yet exist, and overwritten in the existing document if they do exist there.

Setting an attribute value to null in the patch document will cause a value of null be saved for the attribute by default.

Optionally, the URL parameter waitForSync can be used to force synchronisation of the document update operation to disk even in case that the waitForSync flag had been disabled for the entire collection. Thus, the waitForSync URL parameter can be used to force synchronisation of just specific operations. To use this, set the waitForSync parameter to true. If the waitForSync parameter is not specified or set to false, then the collection's default waitForSync behavior is applied. The waitForSync URL parameter cannot be used to disable synchronisation for collections that have a default waitForSync value of true.

The body of the response contains a JSON object with the information about the handle and the revision. The attribute _id contains the known document-handle of the updated document, the attribute _rev contains the new document revision.

If the document does not exist, then a HTTP 404 is returned and the body of the response contains an error document.

You can conditionally update a document based on a target revision id by using either the rev URL parameter or the if-match HTTP header. To control the update behavior in case there is a revision mismatch, you can use the policy parameter. This is the same as when replacing documents (see replacing documents for details).

", "summary": "patches a document", "httpMethod": "PATCH", - "examples": "patches an existing document with new content.

unix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/document/products/365183399\n{\"hello\":\"world\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"365576615\"\nlocation: /_db/_system/_api/document/products/365183399\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/365183399\", \n  \"_rev\" : \"365576615\", \n  \"_key\" : \"365183399\" \n}\n\nunix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/document/products/365183399\n{\"numbers\":{\"one\":1,\"two\":2,\"three\":3,\"empty\":null}}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"366166439\"\nlocation: /_db/_system/_api/document/products/365183399\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/365183399\", \n  \"_rev\" : \"366166439\", \n  \"_key\" : \"365183399\" \n}\n\nunix> curl --dump - http://localhost:8529/_api/document/products/365183399\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"366166439\"\n\n{ \n  \"one\" : \"world\", \n  \"hello\" : \"world\", \n  \"numbers\" : { \n    \"empty\" : null, \n    \"one\" : 1, \n    \"two\" : 2, \n    \"three\" : 3 \n  }, \n  \"_id\" : \"products/365183399\", \n  \"_rev\" : \"366166439\", \n  \"_key\" : \"365183399\" \n}\n\nunix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/document/products/365183399?keepNull=false\n{\"hello\":null,\"numbers\":{\"four\":4}}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"366625191\"\nlocation: /_db/_system/_api/document/products/365183399\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/365183399\", \n  \"_rev\" : \"366625191\", \n  \"_key\" : \"365183399\" \n}\n\nunix> curl --dump - http://localhost:8529/_api/document/products/365183399\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"366625191\"\n\n{ \n  \"one\" : \"world\", \n  \"numbers\" : { \n    \"empty\" : null, \n    \"one\" : 1, \n    \"two\" : 2, \n    \"three\" : 3, \n    \"four\" : 4 \n  }, \n  \"_id\" : \"products/365183399\", \n  \"_rev\" : \"366625191\", \n  \"_key\" : \"365183399\" \n}\n\n

", + "examples": "patches an existing document with new content.

unix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/document/products/364659111\n{\"hello\":\"world\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"365052327\"\nlocation: /_db/_system/_api/document/products/364659111\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/364659111\", \n  \"_rev\" : \"365052327\", \n  \"_key\" : \"364659111\" \n}\n\nunix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/document/products/364659111\n{\"numbers\":{\"one\":1,\"two\":2,\"three\":3,\"empty\":null}}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"365642151\"\nlocation: /_db/_system/_api/document/products/364659111\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/364659111\", \n  \"_rev\" : \"365642151\", \n  \"_key\" : \"364659111\" \n}\n\nunix> curl --dump - http://localhost:8529/_api/document/products/364659111\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"365642151\"\n\n{ \n  \"one\" : \"world\", \n  \"hello\" : \"world\", \n  \"numbers\" : { \n    \"empty\" : null, \n    \"one\" : 1, \n    \"two\" : 2, \n    \"three\" : 3 \n  }, \n  \"_id\" : \"products/364659111\", \n  \"_rev\" : \"365642151\", \n  \"_key\" : \"364659111\" \n}\n\nunix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/document/products/364659111?keepNull=false\n{\"hello\":null,\"numbers\":{\"four\":4}}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"366100903\"\nlocation: /_db/_system/_api/document/products/364659111\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/364659111\", \n  \"_rev\" : \"366100903\", \n  \"_key\" : \"364659111\" \n}\n\nunix> curl --dump - http://localhost:8529/_api/document/products/364659111\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"366100903\"\n\n{ \n  \"one\" : \"world\", \n  \"numbers\" : { \n    \"empty\" : null, \n    \"one\" : 1, \n    \"two\" : 2, \n    \"three\" : 3, \n    \"four\" : 4 \n  }, \n  \"_id\" : \"products/364659111\", \n  \"_rev\" : \"366100903\", \n  \"_key\" : \"364659111\" \n}\n\n

", "nickname": "patchesADocument" } ], @@ -411,7 +411,7 @@ "notes": "The body of the response contains a JSON object with the information about the handle and the revision. The attribute _id contains the known document-handle of the updated document, the attribute _rev contains the known document revision.

If the waitForSync parameter is not specified or set to false, then the collection's default waitForSync behavior is applied. The waitForSync URL parameter cannot be used to disable synchronisation for collections that have a default waitForSync value of true.

", "summary": "deletes a document", "httpMethod": "DELETE", - "examples": "Using document handle:

unix> curl -X DELETE --dump - http://localhost:8529/_api/document/products/367673767\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/367673767\", \n  \"_rev\" : \"367673767\", \n  \"_key\" : \"367673767\" \n}\n\n

Unknown document handle:

unix> curl -X DELETE --dump - http://localhost:8529/_api/document/products/368918951\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"document /_api/document/products/368918951 not found\", \n  \"code\" : 404, \n  \"errorNum\" : 1202 \n}\n\n

Revision conflict:

unix> curl -X DELETE --header 'If-Match: \"370688423\"' --dump - http://localhost:8529/_api/document/products/370295207\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 412, \n  \"errorNum\" : 1200, \n  \"errorMessage\" : \"precondition failed\", \n  \"_id\" : \"products/370295207\", \n  \"_rev\" : \"370295207\", \n  \"_key\" : \"370295207\" \n}\n\n

", + "examples": "Using document handle:

unix> curl -X DELETE --dump - http://localhost:8529/_api/document/products/367149479\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/367149479\", \n  \"_rev\" : \"367149479\", \n  \"_key\" : \"367149479\" \n}\n\n

Unknown document handle:

unix> curl -X DELETE --dump - http://localhost:8529/_api/document/products/368394663\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"document /_api/document/products/368394663 not found\", \n  \"code\" : 404, \n  \"errorNum\" : 1202 \n}\n\n

Revision conflict:

unix> curl -X DELETE --header 'If-Match: \"370164135\"' --dump - http://localhost:8529/_api/document/products/369770919\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 412, \n  \"errorNum\" : 1200, \n  \"errorMessage\" : \"precondition failed\", \n  \"_id\" : \"products/369770919\", \n  \"_rev\" : \"369770919\", \n  \"_key\" : \"369770919\" \n}\n\n

", "nickname": "deletesADocument" } ], diff --git a/js/apps/system/aardvark/api-docs/edge.json b/js/apps/system/aardvark/api-docs/edge.json index 81e78c56a9..74141aca42 100644 --- a/js/apps/system/aardvark/api-docs/edge.json +++ b/js/apps/system/aardvark/api-docs/edge.json @@ -49,7 +49,7 @@ "notes": "from handle and to handle are immutable once the edge has been created.

In all other respects the method works like POST /document, see the manual for details.

", "summary": "creates an edge", "httpMethod": "POST", - "examples": "Create an edge and reads it back:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/edge/?collection=edges&from=vertices/1&to=vertices/2\n{\"name\":\"Emil\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"374030759\"\nlocation: /_db/_system/_api/document/edges/374030759\n\n{ \n  \"error\" : false, \n  \"_id\" : \"edges/374030759\", \n  \"_rev\" : \"374030759\", \n  \"_key\" : \"374030759\" \n}\n\nunix> curl --dump - http://localhost:8529/_api/edge/edges/374030759\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"374030759\"\n\n{ \n  \"name\" : \"Emil\", \n  \"_id\" : \"edges/374030759\", \n  \"_rev\" : \"374030759\", \n  \"_key\" : \"374030759\", \n  \"_from\" : \"vertices/1\", \n  \"_to\" : \"vertices/2\" \n}\n\n

", + "examples": "Create an edge and reads it back:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/edge/?collection=edges&from=vertices/1&to=vertices/2\n{\"name\":\"Emil\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"373506471\"\nlocation: /_db/_system/_api/document/edges/373506471\n\n{ \n  \"error\" : false, \n  \"_id\" : \"edges/373506471\", \n  \"_rev\" : \"373506471\", \n  \"_key\" : \"373506471\" \n}\n\nunix> curl --dump - http://localhost:8529/_api/edge/edges/373506471\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"373506471\"\n\n{ \n  \"name\" : \"Emil\", \n  \"_id\" : \"edges/373506471\", \n  \"_rev\" : \"373506471\", \n  \"_key\" : \"373506471\", \n  \"_from\" : \"vertices/1\", \n  \"_to\" : \"vertices/2\" \n}\n\n

", "nickname": "createsAnEdge" } ], diff --git a/js/apps/system/aardvark/api-docs/edges.json b/js/apps/system/aardvark/api-docs/edges.json index 9dd8bb0399..2ace52076a 100644 --- a/js/apps/system/aardvark/api-docs/edges.json +++ b/js/apps/system/aardvark/api-docs/edges.json @@ -32,7 +32,7 @@ "notes": "Returns the list of edges starting or ending in the vertex identified by vertex-handle.

", "summary": "reads in- or outbound edges", "httpMethod": "GET", - "examples": "Any direction

unix> curl --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"edges\" : [ \n    { \n      \"_id\" : \"edges/6\", \n      \"_rev\" : \"113525159\", \n      \"_key\" : \"6\", \n      \"_from\" : \"vertices/2\", \n      \"_to\" : \"vertices/1\", \n      \"$label\" : \"v2 -> v1\" \n    }, \n    { \n      \"_id\" : \"edges/7\", \n      \"_rev\" : \"114114983\", \n      \"_key\" : \"7\", \n      \"_from\" : \"vertices/4\", \n      \"_to\" : \"vertices/1\", \n      \"$label\" : \"v4 -> v1\" \n    }, \n    { \n      \"_id\" : \"edges/5\", \n      \"_rev\" : \"112869799\", \n      \"_key\" : \"5\", \n      \"_from\" : \"vertices/1\", \n      \"_to\" : \"vertices/3\", \n      \"$label\" : \"v1 -> v3\" \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

In edges

unix> curl --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&direction=in\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"edges\" : [ \n    { \n      \"_id\" : \"edges/6\", \n      \"_rev\" : \"119292327\", \n      \"_key\" : \"6\", \n      \"_from\" : \"vertices/2\", \n      \"_to\" : \"vertices/1\", \n      \"$label\" : \"v2 -> v1\" \n    }, \n    { \n      \"_id\" : \"edges/7\", \n      \"_rev\" : \"119882151\", \n      \"_key\" : \"7\", \n      \"_from\" : \"vertices/4\", \n      \"_to\" : \"vertices/1\", \n      \"$label\" : \"v4 -> v1\" \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Out edges

unix> curl --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&direction=out\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"edges\" : [ \n    { \n      \"_id\" : \"edges/5\", \n      \"_rev\" : \"124404135\", \n      \"_key\" : \"5\", \n      \"_from\" : \"vertices/1\", \n      \"_to\" : \"vertices/3\", \n      \"$label\" : \"v1 -> v3\" \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "Any direction

unix> curl --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"edges\" : [ \n    { \n      \"_id\" : \"edges/6\", \n      \"_rev\" : \"113000871\", \n      \"_key\" : \"6\", \n      \"_from\" : \"vertices/2\", \n      \"_to\" : \"vertices/1\", \n      \"$label\" : \"v2 -> v1\" \n    }, \n    { \n      \"_id\" : \"edges/7\", \n      \"_rev\" : \"113590695\", \n      \"_key\" : \"7\", \n      \"_from\" : \"vertices/4\", \n      \"_to\" : \"vertices/1\", \n      \"$label\" : \"v4 -> v1\" \n    }, \n    { \n      \"_id\" : \"edges/5\", \n      \"_rev\" : \"112345511\", \n      \"_key\" : \"5\", \n      \"_from\" : \"vertices/1\", \n      \"_to\" : \"vertices/3\", \n      \"$label\" : \"v1 -> v3\" \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

In edges

unix> curl --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&direction=in\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"edges\" : [ \n    { \n      \"_id\" : \"edges/6\", \n      \"_rev\" : \"118768039\", \n      \"_key\" : \"6\", \n      \"_from\" : \"vertices/2\", \n      \"_to\" : \"vertices/1\", \n      \"$label\" : \"v2 -> v1\" \n    }, \n    { \n      \"_id\" : \"edges/7\", \n      \"_rev\" : \"119357863\", \n      \"_key\" : \"7\", \n      \"_from\" : \"vertices/4\", \n      \"_to\" : \"vertices/1\", \n      \"$label\" : \"v4 -> v1\" \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Out edges

unix> curl --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&direction=out\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"edges\" : [ \n    { \n      \"_id\" : \"edges/5\", \n      \"_rev\" : \"123879847\", \n      \"_key\" : \"5\", \n      \"_from\" : \"vertices/1\", \n      \"_to\" : \"vertices/3\", \n      \"$label\" : \"v1 -> v3\" \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "readsIn-OrOutboundEdges" } ], diff --git a/js/apps/system/aardvark/api-docs/endpoint.json b/js/apps/system/aardvark/api-docs/endpoint.json index 14c0868f52..723f8d5a90 100644 --- a/js/apps/system/aardvark/api-docs/endpoint.json +++ b/js/apps/system/aardvark/api-docs/endpoint.json @@ -24,7 +24,7 @@ "notes": "Returns a list of all configured endpoints the server is listening on. For each endpoint, the list of allowed databases is returned too if set.

The result is a JSON hash which has the endpoints as keys, and the list of mapped database names as values for each endpoint.

If a list of mapped databases is empty, it means that all databases can be accessed via the endpoint. If a list of mapped databases contains more than one database name, this means that any of the databases might be accessed via the endpoint, and the first database in the list will be treated as the default database for the endpoint. The default database will be used when an incoming request does not specify a database name in the request explicitly.

Note: retrieving the list of all endpoints is allowed in the system database only. Calling this action in any other database will make the server return an error.

", "summary": "returns a list of all endpoints", "httpMethod": "GET", - "examples": "

unix> curl --dump - http://localhost:8529/_api/endpoint\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n[ \n  { \n    \"endpoint\" : \"tcp://127.0.0.1:35578\", \n    \"databases\" : [ ] \n  }, \n  { \n    \"endpoint\" : \"tcp://127.0.0.1:8532\", \n    \"databases\" : [ \n      \"mydb1\", \n      \"mydb2\" \n    ] \n  } \n]\n\n

", + "examples": "

unix> curl --dump - http://localhost:8529/_api/endpoint\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n[ \n  { \n    \"endpoint\" : \"tcp://127.0.0.1:33034\", \n    \"databases\" : [ ] \n  }, \n  { \n    \"endpoint\" : \"tcp://127.0.0.1:8532\", \n    \"databases\" : [ \n      \"mydb1\", \n      \"mydb2\" \n    ] \n  } \n]\n\n

", "nickname": "returnsAListOfAllEndpoints" } ], diff --git a/js/apps/system/aardvark/api-docs/graph.json b/js/apps/system/aardvark/api-docs/graph.json index 9c6b18439e..d025f9975a 100644 --- a/js/apps/system/aardvark/api-docs/graph.json +++ b/js/apps/system/aardvark/api-docs/graph.json @@ -38,7 +38,7 @@ "notes": "Creates a new graph.

Returns an object with an attribute graph containing a list of all graph properties.

", "summary": "create graph", "httpMethod": "POST", - "examples": "

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/\n{\"_key\":\"graph\",\"vertices\":\"vertices\",\"edges\":\"edges\"}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: 130105767\n\n{ \n  \"graph\" : { \n    \"_id\" : \"_graphs/graph\", \n    \"_rev\" : \"130105767\", \n    \"_key\" : \"graph\", \n    \"edges\" : \"edges\", \n    \"vertices\" : \"vertices\" \n  }, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", + "examples": "

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/\n{\"_key\":\"graph\",\"vertices\":\"vertices\",\"edges\":\"edges\"}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: 129581479\n\n{ \n  \"graph\" : { \n    \"_id\" : \"_graphs/graph\", \n    \"_rev\" : \"129581479\", \n    \"_key\" : \"graph\", \n    \"edges\" : \"edges\", \n    \"vertices\" : \"vertices\" \n  }, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", "nickname": "createGraph" } ], @@ -89,7 +89,7 @@ "notes": "

If graph-name is specified, returns an object with an attribute graph containing a JSON hash with all properties of the specified graph.

If graph-name is not specified, returns a list of graph objects.

", "summary": "get the properties of a specific or all graphs", "httpMethod": "GET", - "examples": "get graph by name

unix> curl --dump - http://localhost:8529/_api/graph/graph\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 132399527\n\n{ \n  \"graph\" : { \n    \"_id\" : \"_graphs/graph\", \n    \"_rev\" : \"132399527\", \n    \"_key\" : \"graph\", \n    \"edges\" : \"edges\", \n    \"vertices\" : \"vertices\" \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

get all graphs

unix> curl --dump - http://localhost:8529/_api/graph\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"graphs\" : [ \n    { \n      \"_id\" : \"_graphs/graph2\", \n      \"_rev\" : \"136855975\", \n      \"_key\" : \"graph2\", \n      \"edges\" : \"edges2\", \n      \"vertices\" : \"vertices2\" \n    }, \n    { \n      \"_id\" : \"_graphs/graph1\", \n      \"_rev\" : \"134758823\", \n      \"_key\" : \"graph1\", \n      \"edges\" : \"edges1\", \n      \"vertices\" : \"vertices1\" \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "get graph by name

unix> curl --dump - http://localhost:8529/_api/graph/graph\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 131875239\n\n{ \n  \"graph\" : { \n    \"_id\" : \"_graphs/graph\", \n    \"_rev\" : \"131875239\", \n    \"_key\" : \"graph\", \n    \"edges\" : \"edges\", \n    \"vertices\" : \"vertices\" \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

get all graphs

unix> curl --dump - http://localhost:8529/_api/graph\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"graphs\" : [ \n    { \n      \"_id\" : \"_graphs/graph2\", \n      \"_rev\" : \"136331687\", \n      \"_key\" : \"graph2\", \n      \"edges\" : \"edges2\", \n      \"vertices\" : \"vertices2\" \n    }, \n    { \n      \"_id\" : \"_graphs/graph1\", \n      \"_rev\" : \"134234535\", \n      \"_key\" : \"graph1\", \n      \"edges\" : \"edges1\", \n      \"vertices\" : \"vertices1\" \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "getThePropertiesOfASpecificOrAllGraphs" } ], @@ -178,7 +178,7 @@ "notes": "Creates a vertex in a graph.

Returns an object with an attribute vertex containing a list of all vertex properties.

", "summary": "create vertex", "httpMethod": "POST", - "examples": "

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/vertex\n{\"_key\":\"v1\",\"optional1\":\"val1\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 142360999\n\n{ \n  \"vertex\" : { \n    \"_id\" : \"vertices/v1\", \n    \"_rev\" : \"142360999\", \n    \"_key\" : \"v1\", \n    \"optional1\" : \"val1\" \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

", + "examples": "

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/vertex\n{\"_key\":\"v1\",\"optional1\":\"val1\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 141836711\n\n{ \n  \"vertex\" : { \n    \"_id\" : \"vertices/v1\", \n    \"_rev\" : \"141836711\", \n    \"_key\" : \"v1\", \n    \"optional1\" : \"val1\" \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

", "nickname": "createVertex" } ], @@ -235,7 +235,7 @@ "notes": "Returns an object with an attribute vertex containing a list of all vertex properties.

", "summary": "get vertex", "httpMethod": "GET", - "examples": "get vertex properties by name

unix> curl --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 145179047\n\n{ \n  \"vertex\" : { \n    \"_id\" : \"vertices/v1\", \n    \"_rev\" : \"145179047\", \n    \"_key\" : \"v1\", \n    \"optional1\" : \"val1\" \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "get vertex properties by name

unix> curl --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 144654759\n\n{ \n  \"vertex\" : { \n    \"_id\" : \"vertices/v1\", \n    \"_rev\" : \"144654759\", \n    \"_key\" : \"v1\", \n    \"optional1\" : \"val1\" \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "getVertex" } ], @@ -356,7 +356,7 @@ "notes": "Replaces the vertex properties.

Returns an object with an attribute vertex containing a list of all vertex properties.

", "summary": "update vertex", "httpMethod": "PUT", - "examples": "

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{\"optional1\":\"val2\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 151994791\n\n{ \n  \"vertex\" : { \n    \"_id\" : \"vertices/v1\", \n    \"_rev\" : \"151994791\", \n    \"_key\" : \"v1\", \n    \"optional1\" : \"val2\" \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

", + "examples": "

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{\"optional1\":\"val2\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 151470503\n\n{ \n  \"vertex\" : { \n    \"_id\" : \"vertices/v1\", \n    \"_rev\" : \"151470503\", \n    \"_key\" : \"v1\", \n    \"optional1\" : \"val2\" \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

", "nickname": "updateVertex" } ], @@ -426,7 +426,7 @@ "notes": "Partially updates the vertex properties.

Setting an attribute value to null in the patch document will cause a value of null be saved for the attribute by default. If the intention is to delete existing attributes with the patch command, the URL parameter keepNull can be used with a value of false. This will modify the behavior of the patch command to remove any attributes from the existing document that are contained in the patch document with an attribute value of null.

Returns an object with an attribute vertex containing a list of all vertex properties.

", "summary": "update vertex", "httpMethod": "PATCH", - "examples": "

unix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{\"optional1\":\"vertexPatch\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 155337127\n\n{ \n  \"vertex\" : { \n    \"_id\" : \"vertices/v1\", \n    \"_rev\" : \"155337127\", \n    \"_key\" : \"v1\", \n    \"optional1\" : \"vertexPatch\" \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\nunix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{\"optional1\":null}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 155861415\n\n{ \n  \"vertex\" : { \n    \"_id\" : \"vertices/v1\", \n    \"_rev\" : \"155861415\", \n    \"_key\" : \"v1\", \n    \"optional1\" : null \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

", + "examples": "

unix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{\"optional1\":\"vertexPatch\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 154812839\n\n{ \n  \"vertex\" : { \n    \"_id\" : \"vertices/v1\", \n    \"_rev\" : \"154812839\", \n    \"_key\" : \"v1\", \n    \"optional1\" : \"vertexPatch\" \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\nunix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{\"optional1\":null}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 155337127\n\n{ \n  \"vertex\" : { \n    \"_id\" : \"vertices/v1\", \n    \"_rev\" : \"155337127\", \n    \"_key\" : \"v1\", \n    \"optional1\" : null \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

", "nickname": "updateVertex" } ], @@ -460,7 +460,7 @@ "notes": "Returns a cursor.

The call expects a JSON hash array as body to filter the result:

- batchSize: the batch size of the returned cursor- limit: limit the result size- count: return the total number of results (default \"false\")- filter: a optional filter

The attributes of filter - properties: filter by an array of vertex properties

The attributes of a property filter - key: filter the result vertices by a key value pair- value: the value of the key- compare: a compare operator

", "summary": "get vertices", "httpMethod": "POST", - "examples": "Select all vertices

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/vertices\n{\"batchSize\":100}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"vertices/v5\", \n      \"_rev\" : \"159990183\", \n      \"_key\" : \"v5\", \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"vertices/v4\", \n      \"_rev\" : \"159662503\", \n      \"_key\" : \"v4\", \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"vertices/v1\", \n      \"_rev\" : \"158613927\", \n      \"_key\" : \"v1\", \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"vertices/v3\", \n      \"_rev\" : \"159334823\", \n      \"_key\" : \"v3\", \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"vertices/v2\", \n      \"_rev\" : \"159007143\", \n      \"_key\" : \"v2\", \n      \"optional1\" : \"val1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", + "examples": "Select all vertices

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/vertices\n{\"batchSize\":100}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"vertices/v5\", \n      \"_rev\" : \"159465895\", \n      \"_key\" : \"v5\", \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"vertices/v4\", \n      \"_rev\" : \"159138215\", \n      \"_key\" : \"v4\", \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"vertices/v1\", \n      \"_rev\" : \"158089639\", \n      \"_key\" : \"v1\", \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"vertices/v3\", \n      \"_rev\" : \"158810535\", \n      \"_key\" : \"v3\", \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"vertices/v2\", \n      \"_rev\" : \"158482855\", \n      \"_key\" : \"v2\", \n      \"optional1\" : \"val1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", "nickname": "getVertices" } ], @@ -494,7 +494,7 @@ "notes": "Returns a cursor.

The call expects a JSON hash array as body to filter the result:

- batchSize: the batch size of the returned cursor- limit: limit the result size- count: return the total number of results (default \"false\")- filter: a optional filter

The attributes of filter - direction: Filter for inbound (value \"in\") or outbound (value \"out\") neighbors. Default value is \"any\". - labels: filter by an array of edge labels (empty array means no restriction)- properties: filter neighbors by an array of edge properties

The attributes of a property filter - key: filter the result vertices by a key value pair- value: the value of the key- compare: a compare operator

", "summary": "get vertices", "httpMethod": "POST", - "examples": "Select all vertices

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/vertices/v2\n{\"batchSize\" : 100, \"filter\" : {\"direction\" : \"any\", \"properties\":[] }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"vertices/v1\", \n      \"_rev\" : \"162873767\", \n      \"_key\" : \"v1\", \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"vertices/v4\", \n      \"_rev\" : \"163922343\", \n      \"_key\" : \"v4\", \n      \"optional1\" : \"val1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

Select vertices by direction and property filter

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/vertices/v2\n{\"batchSize\" : 100, \"filter\" : {\"direction\" : \"out\", \"properties\":[ { \"key\": \"optional1\", \"value\": \"val2\", \"compare\" : \"==\" }, ] }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"vertices/v4\", \n      \"_rev\" : \"171065767\", \n      \"_key\" : \"v4\", \n      \"optional1\" : \"val2\" \n    }, \n    { \n      \"_id\" : \"vertices/v1\", \n      \"_rev\" : \"170017191\", \n      \"_key\" : \"v1\", \n      \"optional1\" : \"val1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", + "examples": "Select all vertices

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/vertices/v2\n{\"batchSize\" : 100, \"filter\" : {\"direction\" : \"any\", \"properties\":[] }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"vertices/v1\", \n      \"_rev\" : \"162349479\", \n      \"_key\" : \"v1\", \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"vertices/v4\", \n      \"_rev\" : \"163398055\", \n      \"_key\" : \"v4\", \n      \"optional1\" : \"val1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

Select vertices by direction and property filter

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/vertices/v2\n{\"batchSize\" : 100, \"filter\" : {\"direction\" : \"out\", \"properties\":[ { \"key\": \"optional1\", \"value\": \"val2\", \"compare\" : \"==\" }, ] }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"vertices/v4\", \n      \"_rev\" : \"170541479\", \n      \"_key\" : \"v4\", \n      \"optional1\" : \"val2\" \n    }, \n    { \n      \"_id\" : \"vertices/v1\", \n      \"_rev\" : \"169492903\", \n      \"_key\" : \"v1\", \n      \"optional1\" : \"val1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", "nickname": "getVertices" } ], @@ -538,7 +538,7 @@ "notes": "Creates an edge in a graph.

The call expects a JSON hash array as body with the edge properties:

- _key: The name of the edge.- _from: The name of the from vertex.- _to: The name of the to vertex.- $label: A label for the edge (optional).- further optional attributes.

Returns an object with an attribute edge containing the list of all edge properties.

", "summary": "create edge", "httpMethod": "POST", - "examples": "

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/edge\n{\"_key\":\"edge1\",\"_from\":\"vert2\",\"_to\":\"vert1\",\"optional1\":\"val1\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 178274727\n\n{ \n  \"edge\" : { \n    \"_id\" : \"edges/edge1\", \n    \"_rev\" : \"178274727\", \n    \"_key\" : \"edge1\", \n    \"_from\" : \"vertices/vert2\", \n    \"_to\" : \"vertices/vert1\", \n    \"$label\" : null, \n    \"optional1\" : \"val1\" \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

", + "examples": "

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/edge\n{\"_key\":\"edge1\",\"_from\":\"vert2\",\"_to\":\"vert1\",\"optional1\":\"val1\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 177750439\n\n{ \n  \"edge\" : { \n    \"_id\" : \"edges/edge1\", \n    \"_rev\" : \"177750439\", \n    \"_key\" : \"edge1\", \n    \"_from\" : \"vertices/vert2\", \n    \"_to\" : \"vertices/vert1\", \n    \"$label\" : null, \n    \"optional1\" : \"val1\" \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

", "nickname": "createEdge" } ], @@ -595,7 +595,7 @@ "notes": "Returns an object with an attribute edge containing a list of all edge properties.

", "summary": "get edge", "httpMethod": "GET", - "examples": "

unix> curl --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 182206887\n\n{ \n  \"edge\" : { \n    \"_id\" : \"edges/edge1\", \n    \"_rev\" : \"182206887\", \n    \"_key\" : \"edge1\", \n    \"_from\" : \"vertices/vert1\", \n    \"_to\" : \"vertices/vert2\", \n    \"$label\" : null, \n    \"optional1\" : \"val1\" \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "

unix> curl --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 181682599\n\n{ \n  \"edge\" : { \n    \"_id\" : \"edges/edge1\", \n    \"_rev\" : \"181682599\", \n    \"_key\" : \"edge1\", \n    \"_from\" : \"vertices/vert1\", \n    \"_to\" : \"vertices/vert2\", \n    \"$label\" : null, \n    \"optional1\" : \"val1\" \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "getEdge" } ], @@ -716,7 +716,7 @@ "notes": "Replaces the optional edge properties.

The call expects a JSON hash array as body with the new edge properties.

Returns an object with an attribute edge containing a list of all edge properties.

", "summary": "update edge", "httpMethod": "PUT", - "examples": "

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n{\"optional1\":\"val2\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 191185319\n\n{ \n  \"edge\" : { \n    \"_id\" : \"edges/edge1\", \n    \"_rev\" : \"191185319\", \n    \"_key\" : \"edge1\", \n    \"_from\" : \"vertices/vert1\", \n    \"_to\" : \"vertices/vert2\", \n    \"$label\" : null, \n    \"optional1\" : \"val2\" \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

", + "examples": "

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n{\"optional1\":\"val2\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 190661031\n\n{ \n  \"edge\" : { \n    \"_id\" : \"edges/edge1\", \n    \"_rev\" : \"190661031\", \n    \"_key\" : \"edge1\", \n    \"_from\" : \"vertices/vert1\", \n    \"_to\" : \"vertices/vert2\", \n    \"$label\" : null, \n    \"optional1\" : \"val2\" \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

", "nickname": "updateEdge" } ], @@ -786,7 +786,7 @@ "notes": "Partially updates the edge properties.

Setting an attribute value to null in the patch document will cause a value of null be saved for the attribute by default. If the intention is to delete existing attributes with the patch command, the URL parameter keepNull can be used with a value of false. This will modify the behavior of the patch command to remove any attributes from the existing document that are contained in the patch document with an attribute value of null.

Returns an object with an attribute edge containing a list of all edge properties.

", "summary": "update edge", "httpMethod": "PATCH", - "examples": "

unix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n{\"optional3\":\"val3\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 195707303\n\n{ \n  \"edge\" : { \n    \"_id\" : \"edges/edge1\", \n    \"_rev\" : \"195707303\", \n    \"_key\" : \"edge1\", \n    \"_from\" : \"vertices/vert1\", \n    \"_to\" : \"vertices/vert2\", \n    \"$label\" : null, \n    \"optional1\" : \"val1\", \n    \"optional3\" : \"val3\" \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

", + "examples": "

unix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n{\"optional3\":\"val3\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 195183015\n\n{ \n  \"edge\" : { \n    \"_id\" : \"edges/edge1\", \n    \"_rev\" : \"195183015\", \n    \"_key\" : \"edge1\", \n    \"_from\" : \"vertices/vert1\", \n    \"_to\" : \"vertices/vert2\", \n    \"$label\" : null, \n    \"optional1\" : \"val1\", \n    \"optional3\" : \"val3\" \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

", "nickname": "updateEdge" } ], @@ -820,7 +820,7 @@ "notes": "Returns a cursor.

The call expects a JSON hash array as body to filter the result:

- batchSize: the batch size of the returned cursor- limit: limit the result size- count: return the total number of results (default \"false\")- filter: a optional filter

The attributes of filter - labels: filter by an array of edge labels- properties: filter by an array of edge properties

The attributes of a property filter - key: filter the result edges by a key value pair- value: the value of the key- compare: a compare operator

", "summary": "get edges", "httpMethod": "POST", - "examples": "Select all edges

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/edges\n{\"batchSize\":100}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"edges/edge4\", \n      \"_rev\" : \"202457511\", \n      \"_key\" : \"edge4\", \n      \"_from\" : \"vertices/v1\", \n      \"_to\" : \"vertices/v5\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"edges/edge1\", \n      \"_rev\" : \"200622503\", \n      \"_key\" : \"edge1\", \n      \"_from\" : \"vertices/v1\", \n      \"_to\" : \"vertices/v2\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"edges/edge2\", \n      \"_rev\" : \"201277863\", \n      \"_key\" : \"edge2\", \n      \"_from\" : \"vertices/v1\", \n      \"_to\" : \"vertices/v3\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"edges/edge3\", \n      \"_rev\" : \"201867687\", \n      \"_key\" : \"edge3\", \n      \"_from\" : \"vertices/v2\", \n      \"_to\" : \"vertices/v4\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", + "examples": "Select all edges

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/edges\n{\"batchSize\":100}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"edges/edge4\", \n      \"_rev\" : \"201933223\", \n      \"_key\" : \"edge4\", \n      \"_from\" : \"vertices/v1\", \n      \"_to\" : \"vertices/v5\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"edges/edge1\", \n      \"_rev\" : \"200098215\", \n      \"_key\" : \"edge1\", \n      \"_from\" : \"vertices/v1\", \n      \"_to\" : \"vertices/v2\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"edges/edge2\", \n      \"_rev\" : \"200753575\", \n      \"_key\" : \"edge2\", \n      \"_from\" : \"vertices/v1\", \n      \"_to\" : \"vertices/v3\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"edges/edge3\", \n      \"_rev\" : \"201343399\", \n      \"_key\" : \"edge3\", \n      \"_from\" : \"vertices/v2\", \n      \"_to\" : \"vertices/v4\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", "nickname": "getEdges" } ], @@ -861,7 +861,7 @@ "notes": "

Returns a cursor.

The call expects a JSON hash array as body to filter the result:

- batchSize: the batch size of the returned cursor- limit: limit the result size- count: return the total number of results (default \"false\")- filter: a optional filter

The attributes of filter - direction: Filter for inbound (value \"in\") or outbound (value \"out\") neighbors. Default value is \"any\". - labels: filter by an array of edge labels- properties: filter neighbors by an array of properties

The attributes of a property filter - key: filter the result vertices by a key value pair- value: the value of the key- compare: a compare operator

", "summary": "get edges", "httpMethod": "POST", - "examples": "Select all edges

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/edges/v2\n{\"batchSize\" : 100, \"filter\" : { \"direction\" : \"any\" }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"edges/edge1\", \n      \"_rev\" : \"207503783\", \n      \"_key\" : \"edge1\", \n      \"_from\" : \"vertices/v1\", \n      \"_to\" : \"vertices/v2\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"edges/edge3\", \n      \"_rev\" : \"208748967\", \n      \"_key\" : \"edge3\", \n      \"_from\" : \"vertices/v2\", \n      \"_to\" : \"vertices/v4\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", + "examples": "Select all edges

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/edges/v2\n{\"batchSize\" : 100, \"filter\" : { \"direction\" : \"any\" }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"edges/edge1\", \n      \"_rev\" : \"206979495\", \n      \"_key\" : \"edge1\", \n      \"_from\" : \"vertices/v1\", \n      \"_to\" : \"vertices/v2\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"edges/edge3\", \n      \"_rev\" : \"208224679\", \n      \"_key\" : \"edge3\", \n      \"_from\" : \"vertices/v2\", \n      \"_to\" : \"vertices/v4\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", "nickname": "getEdges" } ], diff --git a/js/apps/system/aardvark/api-docs/index.json b/js/apps/system/aardvark/api-docs/index.json index 849b335705..5a2329a104 100644 --- a/js/apps/system/aardvark/api-docs/index.json +++ b/js/apps/system/aardvark/api-docs/index.json @@ -92,7 +92,7 @@ "notes": "

Creates a cap constraint for the collection collection-name, if it does not already exist. Expects an object containing the index details.

- type: must be equal to \"cap\".

- size: The maximal number of documents for the collection.

- byteSize: The maximal size of the active document data in the collection.

Note that the cap constraint does not index particular attributes of the documents in a collection, but limits the number of documents in the collection to a maximum value. The cap constraint thus does not support attribute names specified in the fields attribute nor uniqueness of any kind via the unique attribute.

It is allowed to specify either size or byteSize, or both at the same time. If both are specified, then the automatic document removal will be triggered by the first non-met constraint.

", "summary": "creates a cap constraint", "httpMethod": "POST", - "examples": "Creating a cap constraint

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{\"type\":\"cap\",\"size\":10}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"products/212091303\", \n  \"type\" : \"cap\", \n  \"unique\" : false, \n  \"size\" : 10, \n  \"byteSize\" : 0, \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", + "examples": "Creating a cap constraint

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{\"type\":\"cap\",\"size\":10}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"products/211567015\", \n  \"type\" : \"cap\", \n  \"unique\" : false, \n  \"size\" : 10, \n  \"byteSize\" : 0, \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", "nickname": "createsACapConstraint" } ], @@ -134,7 +134,7 @@ "notes": "

Creates a geo-spatial index in the collection collection-name, if it does not already exist. Expects an object containing the index details.

- type: must be equal to \"geo\".

- fields: A list with one or two attribute paths.

If it is a list with one attribute path location, then a geo-spatial index on all documents is created using location as path to the coordinates. The value of the attribute must be a list with at least two double values. The list must contain the latitude (first value) and the longitude (second value). All documents, which do not have the attribute path or with value that are not suitable, are ignored.

If it is a list with two attribute paths latitude and longitude, then a geo-spatial index on all documents is created using latitude and longitude as paths the latitude and the longitude. The value of the attribute latitude and of the attribute longitude must a double. All documents, which do not have the attribute paths or which values are not suitable, are ignored.

- geoJson: If a geo-spatial index on a location is constructed and geoJson is true, then the order within the list is longitude followed by latitude. This corresponds to the format described in http://geojson.org/geojson-spec.html#positions

- constraint: If constraint is true, then a geo-spatial constraint is created. The constraint is a non-unique variant of the index. Note that it is also possible to set the unique attribute instead of the constraint attribute.

- ignoreNull: If a geo-spatial constraint is created and ignoreNull is true, then documents with a null in location or at least one null in latitude or longitude are ignored.

", "summary": "creates a geo-spatial index", "httpMethod": "POST", - "examples": "Creating a geo index with a location attribute:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"geo\", \"fields\" : [ \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"products/212877735\", \n  \"type\" : \"geo1\", \n  \"unique\" : false, \n  \"geoJson\" : false, \n  \"constraint\" : false, \n  \"fields\" : [ \n    \"b\" \n  ], \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

Creating a geo index with latitude and longitude attributes:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"geo\", \"fields\" : [ \"e\", \"f\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"products/213729703\", \n  \"type\" : \"geo2\", \n  \"unique\" : false, \n  \"constraint\" : false, \n  \"fields\" : [ \n    \"e\", \n    \"f\" \n  ], \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", + "examples": "Creating a geo index with a location attribute:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"geo\", \"fields\" : [ \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"products/212353447\", \n  \"type\" : \"geo1\", \n  \"unique\" : false, \n  \"geoJson\" : false, \n  \"constraint\" : false, \n  \"fields\" : [ \n    \"b\" \n  ], \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

Creating a geo index with latitude and longitude attributes:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"geo\", \"fields\" : [ \"e\", \"f\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"products/213205415\", \n  \"type\" : \"geo2\", \n  \"unique\" : false, \n  \"constraint\" : false, \n  \"fields\" : [ \n    \"e\", \n    \"f\" \n  ], \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", "nickname": "createsAGeo-spatialIndex" } ], @@ -180,7 +180,7 @@ "notes": "

Creates a hash index for the collection collection-name, if it does not already exist. The call expects an object containing the index details.

- type: must be equal to \"hash\".

- fields: A list of attribute paths.

- unique: If true, then create a unique index.

", "summary": "creates a hash index", "httpMethod": "POST", - "examples": "Creating an unique constraint:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"hash\", \"unique\" : true, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"products/214647207\", \n  \"type\" : \"hash\", \n  \"unique\" : true, \n  \"fields\" : [ \n    \"a\", \n    \"b\" \n  ], \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

Creating a hash index:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"hash\", \"unique\" : false, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"products/215564711\", \n  \"type\" : \"hash\", \n  \"unique\" : false, \n  \"fields\" : [ \n    \"a\", \n    \"b\" \n  ], \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", + "examples": "Creating an unique constraint:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"hash\", \"unique\" : true, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"products/214122919\", \n  \"type\" : \"hash\", \n  \"unique\" : true, \n  \"fields\" : [ \n    \"a\", \n    \"b\" \n  ], \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

Creating a hash index:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"hash\", \"unique\" : false, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"products/215040423\", \n  \"type\" : \"hash\", \n  \"unique\" : false, \n  \"fields\" : [ \n    \"a\", \n    \"b\" \n  ], \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", "nickname": "createsAHashIndex" } ], @@ -226,7 +226,7 @@ "notes": "

Creates a skip-list index for the collection collection-name, if it does not already exist. The call expects an object containing the index details.

- type: must be equal to \"skiplist\".

- fields: A list of attribute paths.

- unique: If true, then create a unique index.

", "summary": "creates a skip list", "httpMethod": "POST", - "examples": "Creating a skiplist:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"skiplist\", \"unique\" : false, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"products/216482215\", \n  \"type\" : \"skiplist\", \n  \"unique\" : false, \n  \"fields\" : [ \n    \"a\", \n    \"b\" \n  ], \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", + "examples": "Creating a skiplist:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"skiplist\", \"unique\" : false, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"products/215957927\", \n  \"type\" : \"skiplist\", \n  \"unique\" : false, \n  \"fields\" : [ \n    \"a\", \n    \"b\" \n  ], \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", "nickname": "createsASkipList" } ], @@ -268,7 +268,7 @@ "notes": "

Creates a fulltext index for the collection collection-name, if it does not already exist. The call expects an object containing the index details.

- type: must be equal to \"fulltext\".

- fields: A list of attribute names. Currently, the list is limited to exactly one attribute, so the value of fields should look like this for example: [ \"text\" ].

- minLength: Minimum character length of words to index. Will default to a server-defined value if unspecified. It is thus recommended to set this value explicitly when creating the index.

", "summary": "creates a fulltext index", "httpMethod": "POST", - "examples": "Creating a fulltext index:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\" : \"fulltext\", \"fields\" : [ \"text\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"products/217334183\", \n  \"type\" : \"fulltext\", \n  \"unique\" : false, \n  \"minLength\" : 2, \n  \"fields\" : [ \n    \"text\" \n  ], \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", + "examples": "Creating a fulltext index:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\" : \"fulltext\", \"fields\" : [ \"text\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"products/216809895\", \n  \"type\" : \"fulltext\", \n  \"unique\" : false, \n  \"minLength\" : 2, \n  \"fields\" : [ \n    \"text\" \n  ], \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", "nickname": "createsAFulltextIndex" } ], @@ -310,7 +310,7 @@ "notes": "

Creates a bitarray index for the collection collection-name, if it does not already exist. The call expects an object containing the index details.

- type: must be equal to \"bitarray\".

- fields: A list of pairs. A pair consists of an attribute path followed by a list of values.

- unique: Must always be set to false.

", "summary": "creates a bitarray index", "httpMethod": "POST", - "examples": "Creating a bitarray index:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\" : \"bitarray\", \"unique\" : false, \"fields\" : [ \"x\", [0,1,[]], \"y\", [\"a\",\"b\",[]] ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"products/218186151\", \n  \"type\" : \"bitarray\", \n  \"unique\" : false, \n  \"fields\" : [ \n    [ \n      \"x\", \n      [ \n        0, \n        1, \n        [ ] \n      ] \n    ], \n    [ \n      \"y\", \n      [ \n        \"a\", \n        \"b\", \n        [ ] \n      ] \n    ] \n  ], \n  \"undefined\" : false, \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", + "examples": "Creating a bitarray index:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\" : \"bitarray\", \"unique\" : false, \"fields\" : [ \"x\", [0,1,[]], \"y\", [\"a\",\"b\",[]] ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"products/217661863\", \n  \"type\" : \"bitarray\", \n  \"unique\" : false, \n  \"fields\" : [ \n    [ \n      \"x\", \n      [ \n        0, \n        1, \n        [ ] \n      ] \n    ], \n    [ \n      \"y\", \n      [ \n        \"a\", \n        \"b\", \n        [ ] \n      ] \n    ] \n  ], \n  \"undefined\" : false, \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", "nickname": "createsABitarrayIndex" } ], @@ -375,7 +375,7 @@ "notes": "

Deletes an index with index-handle.

", "summary": "deletes an index", "httpMethod": "DELETE", - "examples": "

unix> curl -X DELETE --dump - http://localhost:8529/_api/index/products/219103655\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"products/219103655\", \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "

unix> curl -X DELETE --dump - http://localhost:8529/_api/index/products/218579367\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"products/218579367\", \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "deletesAnIndex" } ], diff --git a/js/apps/system/aardvark/api-docs/job.json b/js/apps/system/aardvark/api-docs/job.json index 986a68c8fb..2c7caa50c8 100644 --- a/js/apps/system/aardvark/api-docs/job.json +++ b/js/apps/system/aardvark/api-docs/job.json @@ -28,7 +28,7 @@ "notes": "Returns the result of an async job identified by job-id. If the async job result is present on the server, the result will be removed from the list of result. That means this method can be called for each job-id once.

The method will return the original job result's headers and body, plus the additional HTTP header x-arango-async-job-id. If this header is present, then the job was found and the response contains the original job's result. If the header is not present, the job was not found and the response contains status information from the job amanger.

", "summary": "Returns the result of an async job", "httpMethod": "PUT", - "examples": "Not providing a job-id:

unix> curl -X PUT --dump - http://localhost:8529/_api/job/\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{\"error\":true,\"errorMessage\":\"bad parameter\",\"code\":400,\"errorNum\":400}\n\n

Providing a job-id for a non-existing job:

unix> curl -X PUT --dump - http://localhost:8529/_api/job/foobar\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{\"error\":true,\"errorMessage\":\"not found\",\"code\":404,\"errorNum\":404}\n\n

Fetching the result of an HTTP GET job:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409944487\n\nunix> curl -X PUT --dump - http://localhost:8529/_api/job/409944487\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nx-arango-async-id: 409944487\n\n{\"server\":\"arango\",\"version\":\"1.4.3-alpha1\"}\n\n

Fetching the result of an HTTP POST job that failed:

unix> curl -X POST --header 'x-arango-async: store' --data @- --dump - http://localhost:8529/_api/collection\n{\"name\":\" this name is invalid \"}\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 410010023\n\nunix> curl -X PUT --dump - http://localhost:8529/_api/job/410010023\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\nx-arango-async-id: 410010023\n\n{\"error\":true,\"code\":400,\"errorNum\":1208,\"errorMessage\":\"cannot create collection: illegal name\"}\n\n

", + "examples": "Not providing a job-id:

unix> curl -X PUT --dump - http://localhost:8529/_api/job/\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{\"error\":true,\"errorMessage\":\"bad parameter\",\"code\":400,\"errorNum\":400}\n\n

Providing a job-id for a non-existing job:

unix> curl -X PUT --dump - http://localhost:8529/_api/job/foobar\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{\"error\":true,\"errorMessage\":\"not found\",\"code\":404,\"errorNum\":404}\n\n

Fetching the result of an HTTP GET job:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409420199\n\nunix> curl -X PUT --dump - http://localhost:8529/_api/job/409420199\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nx-arango-async-id: 409420199\n\n{\"server\":\"arango\",\"version\":\"1.4.3\"}\n\n

Fetching the result of an HTTP POST job that failed:

unix> curl -X POST --header 'x-arango-async: store' --data @- --dump - http://localhost:8529/_api/collection\n{\"name\":\" this name is invalid \"}\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409485735\n\nunix> curl -X PUT --dump - http://localhost:8529/_api/job/409485735\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\nx-arango-async-id: 409485735\n\n{\"error\":true,\"code\":400,\"errorNum\":1208,\"errorMessage\":\"cannot create collection: illegal name\"}\n\n

", "nickname": "ReturnsTheResultOfAnAsyncJob" } ], @@ -65,7 +65,7 @@ "notes": "Returns the list of ids of async jobs with a specific status (either done or pending). The list can be used by the client to get an overview of the job system status and to retrieve completed job results later.

", "summary": "Returns the list of job result ids with a specific status", "httpMethod": "GET", - "examples": "Fetching the list of done jobs:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 410075559\n\nunix> curl --dump - http://localhost:8529/_api/job/done\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n[ \n  \"410075559\" \n]\n\n

Fetching the list of pending jobs:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 410141095\n\nunix> curl --dump - http://localhost:8529/_api/job/pending\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n[ ]\n\n

", + "examples": "Fetching the list of done jobs:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409551271\n\nunix> curl --dump - http://localhost:8529/_api/job/done\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n[ \n  \"409551271\" \n]\n\n

Fetching the list of pending jobs:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409616807\n\nunix> curl --dump - http://localhost:8529/_api/job/pending\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n[ ]\n\n

", "nickname": "ReturnsTheListOfJobResultIdsWithASpecificStatus" } ], @@ -106,7 +106,7 @@ "notes": "Deletes either all job results, expired job results, or the result of a specific job. Clients can use this method to perform an eventual garbage collection of job results.

", "summary": "Deletes the result of async jobs", "httpMethod": "DELETE", - "examples": "Deleting all jobs:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 410206631\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/job/all\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true \n}\n\n

Deleting expired jobs:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 410272167\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/job/expired?stamp=1385154631\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true \n}\n\n

Deleting the result of a specific job:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 410337703\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/job/410337703\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true \n}\n\n

Deleting the result of a non-existing job:

unix> curl -X DELETE --dump - http://localhost:8529/_api/job/foobar\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"not found\", \n  \"code\" : 404, \n  \"errorNum\" : 404 \n}\n\n

", + "examples": "Deleting all jobs:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409682343\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/job/all\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true \n}\n\n

Deleting expired jobs:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409747879\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/job/expired?stamp=1385372569\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true \n}\n\n

Deleting the result of a specific job:

unix> curl --header 'x-arango-async: store' --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 202 Accepted\ncontent-type: text/plain; charset=utf-8\nx-arango-async-id: 409813415\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/job/409813415\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true \n}\n\n

Deleting the result of a non-existing job:

unix> curl -X DELETE --dump - http://localhost:8529/_api/job/foobar\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"not found\", \n  \"code\" : 404, \n  \"errorNum\" : 404 \n}\n\n

", "nickname": "DeletesTheResultOfAsyncJobs" } ], diff --git a/js/apps/system/aardvark/api-docs/replication.json b/js/apps/system/aardvark/api-docs/replication.json index 33a145c82a..9143ad0eb8 100644 --- a/js/apps/system/aardvark/api-docs/replication.json +++ b/js/apps/system/aardvark/api-docs/replication.json @@ -78,7 +78,7 @@ "notes": "Returns the current state of the server's replication logger. The state will include information about whether the logger is running and about the last logged tick value. This tick value is important for incremental fetching of data.

The state API can be called regardless of whether the logger is currently running or not.

The body of the response contains a JSON object with the following attributes:

- state: the current logger state as a JSON hash array with the following sub-attributes:

- running: whether or not the logger is running

- lastLogTick: the tick value of the latest tick the logger has logged. This value can be used for incremental fetching of log data.

- totalEvents: total number of events logged since the server was started. The value is not reset between multiple stops and re-starts of the logger.

- time: the current date and time on the logger server

- server: a JSON hash with the following sub-attributes:

- version: the logger server's version

- serverId: the logger server's id

- clients: a list of all replication clients that ever connected to the logger since it was started. This list can be used to determine approximately how much data the individual clients have already fetched from the logger server. Each entry in the list contains a time value indicating the server time the client last fetched data from the replication logger. The lastServedTick value of each client indicates the latest tick value sent to the client upon a client request to the replication logger.

", "summary": "returns the replication logger state", "httpMethod": "GET", - "examples": "Returns the state of an inactive replication logger.

unix> curl --dump - http://localhost:8529/_api/replication/logger-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : false, \n    \"lastLogTick\" : \"397689255\", \n    \"totalEvents\" : 2, \n    \"time\" : \"2013-11-22T21:04:23Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.3-alpha1\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"clients\" : [ ] \n}\n\n

Returns the state of an active replication logger.

unix> curl --dump - http://localhost:8529/_api/replication/logger-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : true, \n    \"lastLogTick\" : \"398016935\", \n    \"totalEvents\" : 3, \n    \"time\" : \"2013-11-22T21:04:23Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.3-alpha1\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"clients\" : [ ] \n}\n\n

", + "examples": "Returns the state of an inactive replication logger.

unix> curl --dump - http://localhost:8529/_api/replication/logger-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : false, \n    \"lastLogTick\" : \"397164967\", \n    \"totalEvents\" : 2, \n    \"time\" : \"2013-11-25T09:36:41Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.3\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"clients\" : [ ] \n}\n\n

Returns the state of an active replication logger.

unix> curl --dump - http://localhost:8529/_api/replication/logger-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : true, \n    \"lastLogTick\" : \"397492647\", \n    \"totalEvents\" : 3, \n    \"time\" : \"2013-11-25T09:36:41Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.3\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"clients\" : [ ] \n}\n\n

", "nickname": "returnsTheReplicationLoggerState" } ], @@ -298,7 +298,7 @@ "notes": "Returns data from the server's replication log. This method can be called by replication clients after an initial synchronisation of data. The method will return all \"recent\" log entries from the logger server, and the clients can replay and apply these entries locally so they get to the same data state as the logger server.

Clients can call this method repeatedly to incrementally fetch all changes from the logger server. In this case, they should provide the from value so they will only get returned the log events since their last fetch.

When the from URL parameter is not used, the logger server will return log entries starting at the beginning of its replication log. When the from parameter is used, the logger server will only return log entries which have higher tick values than the specified from value (note: the log entry with a tick value equal to from will be excluded). Use the from value when incrementally fetching log data.

The to URL parameter can be used to optionally restrict the upper bound of the result to a certain tick value. If used, the result will contain only log events with tick values up to (including) to. In incremental fetching, there is no need to use the to parameter. It only makes sense in special situations, when only parts of the change log are required.

The chunkSize URL parameter can be used to control the size of the result. It must be specified in bytes. The chunkSize value will only be honored approximately. Otherwise a too low chunkSize value could cause the server to not be able to put just one log entry into the result and return it. Therefore, the chunkSize value will only be consulted after a log entry has been written into the result. If the result size is then bigger than chunkSize, the server will respond with as many log entries as there are in the response already. If the result size is still smaller than chunkSize, the server will try to return more data if there's more data left to return.

If chunkSize is not specified, some server-side default value will be used.

The Content-Type of the result is application/x-arango-dump. This is an easy-to-process format, with all log events going onto separate lines in the response body. Each log event itself is a JSON hash, with at least the following attributes:

- tick: the log event tick value

- type: the log event type

Individual log events will also have additional attributes, depending on the event type. A few common attributes which are used for multiple events types are:

- cid: id of the collection the event was for

- tid: id of the transaction the event was contained in

- key: document key

- rev: document revision id

- data: the original document data

A more detailed description of the individual replication event types and their data structures can be found in the manual.

The response will also contain the following HTTP headers:

- x-arango-replication-active: whether or not the logger is active. Clients can use this flag as an indication for their polling frequency. If the logger is not active and there are no more replication events available, it might be sensible for a client to abort, or to go to sleep for a long time and try again later to check whether the logger has been activated.

- x-arango-replication-lastincluded: the tick value of the last included value in the result. In incremental log fetching, this value can be used as the from value for the following request. Note that if the result is empty, the value will be 0. This value should not be used as from value by clients in the next request (otherwise the server would return the log events from the start of the log again).

- x-arango-replication-lasttick: the last tick value the logger server has logged (not necessarily included in the result). By comparing the the last tick and last included tick values, clients have an approximate indication of how many events there are still left to fetch.

- x-arango-replication-checkmore: whether or not there already exists more log data which the client could fetch immediately. If there is more log data available, the client could call logger-follow again with an adjusted from value to fetch remaining log entries until there are no more.

If there isn't any more log data to fetch, the client might decide to go to sleep for a while before calling the logger again.

", "summary": "returns recent log entries from the replication log", "httpMethod": "GET", - "examples": "No log events available:

unix> curl --dump - http://localhost:8529/_api/replication/logger-follow?from=398410151\n\nHTTP/1.1 204 No Content\ncontent-type: application/x-arango-dump; charset=utf-8\nx-arango-replication-active: true\nx-arango-replication-checkmore: false\nx-arango-replication-lastincluded: 0\nx-arango-replication-lasttick: 398410151\n\n

A few log events:

unix> curl --dump - http://localhost:8529/_api/replication/logger-follow?from=398803367\n\nHTTP/1.1 200 OK\ncontent-type: application/x-arango-dump; charset=utf-8\nx-arango-replication-active: true\nx-arango-replication-checkmore: false\nx-arango-replication-lastincluded: 401359271\nx-arango-replication-lasttick: 401359271\n\n{\"tick\":\"399589799\",\"type\":2000,\"cid\":\"398868903\",\"cname\":\"products\",\"collection\":{\"version\":4,\"type\":2,\"cid\":\"398868903\",\"deleted\":false,\"doCompact\":true,\"maximalSize\":1048576,\"name\":\"products\",\"isVolatile\":false,\"waitForSync\":false}}\n{\"tick\":\"400114087\",\"type\":2300,\"cid\":\"398868903\",\"cname\":\"products\",\"key\":\"p1\",\"rev\":\"399851943\",\"data\":{\"_key\":\"p1\",\"_rev\":\"399851943\",\"name\":\"flux compensator\"}}\n{\"tick\":\"400572839\",\"type\":2300,\"cid\":\"398868903\",\"cname\":\"products\",\"key\":\"p2\",\"rev\":\"400376231\",\"data\":{\"_key\":\"p2\",\"_rev\":\"400376231\",\"hp\":5100,\"name\":\"hybrid hovercraft\"}}\n{\"tick\":\"400900519\",\"type\":2302,\"cid\":\"398868903\",\"cname\":\"products\",\"key\":\"p1\",\"rev\":\"400703911\",\"oldRev\":\"399851943\"}\n{\"tick\":\"401228199\",\"type\":2300,\"cid\":\"398868903\",\"cname\":\"products\",\"key\":\"p2\",\"rev\":\"401031591\",\"oldRev\":\"400376231\",\"data\":{\"_key\":\"p2\",\"_rev\":\"401031591\",\"hp\":5100,\"name\":\"broken hovercraft\"}}\n{\"tick\":\"401359271\",\"type\":2001,\"cid\":\"398868903\",\"cname\":\"products\"}\n\n\n

More events than would fit into the response:

unix> curl --dump - http://localhost:8529/_api/replication/logger-follow?from=401752487&chunkSize=400\n\nHTTP/1.1 200 OK\ncontent-type: application/x-arango-dump; charset=utf-8\nx-arango-replication-active: true\nx-arango-replication-checkmore: true\nx-arango-replication-lastincluded: 403063207\nx-arango-replication-lasttick: 404308391\n\n{\"tick\":\"402538919\",\"type\":2000,\"cid\":\"401818023\",\"cname\":\"products\",\"collection\":{\"version\":4,\"type\":2,\"cid\":\"401818023\",\"deleted\":false,\"doCompact\":true,\"maximalSize\":1048576,\"name\":\"products\",\"isVolatile\":false,\"waitForSync\":false}}\n{\"tick\":\"403063207\",\"type\":2300,\"cid\":\"401818023\",\"cname\":\"products\",\"key\":\"p1\",\"rev\":\"402801063\",\"data\":{\"_key\":\"p1\",\"_rev\":\"402801063\",\"name\":\"flux compensator\"}}\n\n\n

", + "examples": "No log events available:

unix> curl --dump - http://localhost:8529/_api/replication/logger-follow?from=397885863\n\nHTTP/1.1 204 No Content\ncontent-type: application/x-arango-dump; charset=utf-8\nx-arango-replication-active: true\nx-arango-replication-checkmore: false\nx-arango-replication-lastincluded: 0\nx-arango-replication-lasttick: 397885863\n\n

A few log events:

unix> curl --dump - http://localhost:8529/_api/replication/logger-follow?from=398279079\n\nHTTP/1.1 200 OK\ncontent-type: application/x-arango-dump; charset=utf-8\nx-arango-replication-active: true\nx-arango-replication-checkmore: false\nx-arango-replication-lastincluded: 400834983\nx-arango-replication-lasttick: 400834983\n\n{\"tick\":\"399065511\",\"type\":2000,\"cid\":\"398344615\",\"cname\":\"products\",\"collection\":{\"version\":4,\"type\":2,\"cid\":\"398344615\",\"deleted\":false,\"doCompact\":true,\"maximalSize\":1048576,\"name\":\"products\",\"isVolatile\":false,\"waitForSync\":false}}\n{\"tick\":\"399589799\",\"type\":2300,\"cid\":\"398344615\",\"cname\":\"products\",\"key\":\"p1\",\"rev\":\"399327655\",\"data\":{\"_key\":\"p1\",\"_rev\":\"399327655\",\"name\":\"flux compensator\"}}\n{\"tick\":\"400048551\",\"type\":2300,\"cid\":\"398344615\",\"cname\":\"products\",\"key\":\"p2\",\"rev\":\"399851943\",\"data\":{\"_key\":\"p2\",\"_rev\":\"399851943\",\"hp\":5100,\"name\":\"hybrid hovercraft\"}}\n{\"tick\":\"400376231\",\"type\":2302,\"cid\":\"398344615\",\"cname\":\"products\",\"key\":\"p1\",\"rev\":\"400179623\",\"oldRev\":\"399327655\"}\n{\"tick\":\"400703911\",\"type\":2300,\"cid\":\"398344615\",\"cname\":\"products\",\"key\":\"p2\",\"rev\":\"400507303\",\"oldRev\":\"399851943\",\"data\":{\"_key\":\"p2\",\"_rev\":\"400507303\",\"hp\":5100,\"name\":\"broken hovercraft\"}}\n{\"tick\":\"400834983\",\"type\":2001,\"cid\":\"398344615\",\"cname\":\"products\"}\n\n\n

More events than would fit into the response:

unix> curl --dump - http://localhost:8529/_api/replication/logger-follow?from=401228199&chunkSize=400\n\nHTTP/1.1 200 OK\ncontent-type: application/x-arango-dump; charset=utf-8\nx-arango-replication-active: true\nx-arango-replication-checkmore: true\nx-arango-replication-lastincluded: 402538919\nx-arango-replication-lasttick: 403784103\n\n{\"tick\":\"402014631\",\"type\":2000,\"cid\":\"401293735\",\"cname\":\"products\",\"collection\":{\"version\":4,\"type\":2,\"cid\":\"401293735\",\"deleted\":false,\"doCompact\":true,\"maximalSize\":1048576,\"name\":\"products\",\"isVolatile\":false,\"waitForSync\":false}}\n{\"tick\":\"402538919\",\"type\":2300,\"cid\":\"401293735\",\"cname\":\"products\",\"key\":\"p1\",\"rev\":\"402276775\",\"data\":{\"_key\":\"p1\",\"_rev\":\"402276775\",\"name\":\"flux compensator\"}}\n\n\n

", "nickname": "returnsRecentLogEntriesFromTheReplicationLog" } ], @@ -332,7 +332,7 @@ "notes": "Returns the list of collections and indexes available on the server. This list can be used by replication clients to initiate an initial sync with the server.

The response will contain a JSON hash array with the collection and state attributes.

collections is a list of collections with the following sub-attributes:

- parameters: the collection properties

- indexes: a list of the indexes of a the collection. Primary indexes and edges indexes are not included in this list.

tick: the system-wide tick value at the start of the dump

The state attribute contains the current state of the replication logger. It contains the following sub-attributes:

- running: whether or not the replication logger is currently active

- lastLogTick: the value of the last tick the replication logger has written

- time: the current time on the server

Replication clients should note the lastLogTick value returned. They can then fetch collections' data using the dump method up to the value of lastLogTick, and query the continuous replication log for log events after this tick value.

To create a full copy of the collections on the logger server, a replication client can execute these steps:

- call the /inventory API method. This returns the lastLogTick value and the list of collections and indexes from the logger server.

- for each collection returned by /inventory, create the collection locally and call /dump to stream the collection data to the client, up to the value of lastLogTick. After that, the client can create the indexes on the collections as they were reported by /inventory.

If the clients wants to continuously stream replication log events from the logger server, the following additional steps need to be carried out:

- the client should call /logger-follow initially to fetch the first batch of replication events that were logged after the client's call to /inventory.

The call to /logger-follow should use a from parameter with the value of the lastLogTick as reported by /inventory. The call to /logger-follow will return the x-arango-replication-lastincluded which will contain the last tick value included in the response.

- the client can then continuously call /logger-follow to incrementally fetch new replication events that occurred after the last transfer.

Calls should use a from parameter with the value of the x-arango-replication-lastincluded header of the previous response. If there are no more replication events, the response will be empty and clients can go to sleep for a while and try again later.

", "summary": "returns an inventory of collections and indexes", "httpMethod": "GET", - "examples": "

unix> curl --dump - http://localhost:8529/_api/replication/inventory\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"collections\" : [ \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"16794023\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"animals\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"15352231\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"demo\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"132858279\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"vertices1\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 3, \n        \"cid\" : \"135610791\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"edges2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    } \n  ], \n  \"state\" : { \n    \"running\" : false, \n    \"lastLogTick\" : \"404373927\", \n    \"totalEvents\" : 22, \n    \"time\" : \"2013-11-22T21:04:24Z\" \n  }, \n  \"tick\" : \"404439463\" \n}\n\n

With some additional indexes:

unix> curl --dump - http://localhost:8529/_api/replication/inventory\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"collections\" : [ \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"16794023\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"animals\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"15352231\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"demo\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"404504999\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"IndexedCollection1\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ \n        { \n          \"id\" : \"405291431\", \n          \"type\" : \"hash\", \n          \"unique\" : false, \n          \"fields\" : [ \n            \"name\" \n          ] \n        }, \n        { \n          \"id\" : \"405553575\", \n          \"type\" : \"skiplist\", \n          \"unique\" : true, \n          \"fields\" : [ \n            \"a\", \n            \"b\" \n          ] \n        }, \n        { \n          \"id\" : \"405619111\", \n          \"type\" : \"cap\", \n          \"unique\" : false, \n          \"size\" : 500, \n          \"byteSize\" : 0 \n        } \n      ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"405684647\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"IndexedCollection2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ \n        { \n          \"id\" : \"406471079\", \n          \"type\" : \"fulltext\", \n          \"unique\" : false, \n          \"minLength\" : 10, \n          \"fields\" : [ \n            \"text\" \n          ] \n        }, \n        { \n          \"id\" : \"406667687\", \n          \"type\" : \"skiplist\", \n          \"unique\" : false, \n          \"fields\" : [ \n            \"a\" \n          ] \n        }, \n        { \n          \"id\" : \"406733223\", \n          \"type\" : \"cap\", \n          \"unique\" : false, \n          \"size\" : 0, \n          \"byteSize\" : 1048576 \n        } \n      ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"132858279\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"vertices1\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 3, \n        \"cid\" : \"135610791\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"edges2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    } \n  ], \n  \"state\" : { \n    \"running\" : false, \n    \"lastLogTick\" : \"404373927\", \n    \"totalEvents\" : 22, \n    \"time\" : \"2013-11-22T21:04:24Z\" \n  }, \n  \"tick\" : \"406733223\" \n}\n\n

", + "examples": "

unix> curl --dump - http://localhost:8529/_api/replication/inventory\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"collections\" : [ \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"16269735\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"animals\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"14827943\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"demo\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"132333991\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"vertices1\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 3, \n        \"cid\" : \"135086503\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"edges2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    } \n  ], \n  \"state\" : { \n    \"running\" : false, \n    \"lastLogTick\" : \"403849639\", \n    \"totalEvents\" : 22, \n    \"time\" : \"2013-11-25T09:36:41Z\" \n  }, \n  \"tick\" : \"403915175\" \n}\n\n

With some additional indexes:

unix> curl --dump - http://localhost:8529/_api/replication/inventory\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"collections\" : [ \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"16269735\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"animals\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"14827943\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"demo\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"403980711\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"IndexedCollection1\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ \n        { \n          \"id\" : \"404767143\", \n          \"type\" : \"hash\", \n          \"unique\" : false, \n          \"fields\" : [ \n            \"name\" \n          ] \n        }, \n        { \n          \"id\" : \"405029287\", \n          \"type\" : \"skiplist\", \n          \"unique\" : true, \n          \"fields\" : [ \n            \"a\", \n            \"b\" \n          ] \n        }, \n        { \n          \"id\" : \"405094823\", \n          \"type\" : \"cap\", \n          \"unique\" : false, \n          \"size\" : 500, \n          \"byteSize\" : 0 \n        } \n      ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"405160359\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"IndexedCollection2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ \n        { \n          \"id\" : \"405946791\", \n          \"type\" : \"fulltext\", \n          \"unique\" : false, \n          \"minLength\" : 10, \n          \"fields\" : [ \n            \"text\" \n          ] \n        }, \n        { \n          \"id\" : \"406143399\", \n          \"type\" : \"skiplist\", \n          \"unique\" : false, \n          \"fields\" : [ \n            \"a\" \n          ] \n        }, \n        { \n          \"id\" : \"406208935\", \n          \"type\" : \"cap\", \n          \"unique\" : false, \n          \"size\" : 0, \n          \"byteSize\" : 1048576 \n        } \n      ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 2, \n        \"cid\" : \"132333991\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"vertices1\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 4, \n        \"type\" : 3, \n        \"cid\" : \"135086503\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"edges2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    } \n  ], \n  \"state\" : { \n    \"running\" : false, \n    \"lastLogTick\" : \"403849639\", \n    \"totalEvents\" : 22, \n    \"time\" : \"2013-11-25T09:36:41Z\" \n  }, \n  \"tick\" : \"406208935\" \n}\n\n

", "nickname": "returnsAnInventoryOfCollectionsAndIndexes" } ], @@ -399,7 +399,7 @@ "notes": "Returns the data from the collection for the requested range.

When the from URL parameter is not used, collection events are returned from the beginning. When the from parameter is used, the result will only contain collection entries which have higher tick values than the specified from value (note: the log entry with a tick value equal to from will be excluded).

The to URL parameter can be used to optionally restrict the upper bound of the result to a certain tick value. If used, the result will only contain collection entries with tick values up to (including) to.

The chunkSize URL parameter can be used to control the size of the result. It must be specified in bytes. The chunkSize value will only be honored approximately. Otherwise a too low chunkSize value could cause the server to not be able to put just one entry into the result and return it. Therefore, the chunkSize value will only be consulted after an entry has been written into the result. If the result size is then bigger than chunkSize, the server will respond with as many entries as there are in the response already. If the result size is still smaller than chunkSize, the server will try to return more data if there's more data left to return.

If chunkSize is not specified, some server-side default value will be used.

The Content-Type of the result is application/x-arango-dump. This is an easy-to-process format, with all entries going onto separate lines in the response body.

Each line itself is a JSON hash, with at least the following attributes:

- type: the type of entry. Possible values for type are:

- 2300: document insertion/update

- 2301: edge insertion/update

- 2302: document/edge deletion

- key: the key of the document/edge or the key used in the deletion operation

- rev: the revision id of the document/edge or the deletion operation

- data: the actual document/edge data for types 2300 and 2301. The full document/edge data will be returned even for updates.

A more detailed description of the different entry types and their data structures can be found in the manual.

Note: there will be no distinction between inserts and updates when calling this method.

", "summary": "returns the data of a collection", "httpMethod": "GET", - "examples": "Empty collection:

unix> curl --dump - http://localhost:8529/_api/replication/dump?collection=testCollection\n\nHTTP/1.1 204 No Content\ncontent-type: application/x-arango-dump; charset=utf-8\nx-arango-replication-checkmore: false\nx-arango-replication-lastincluded: 0\n\n

Non-empty collection:

unix> curl --dump - http://localhost:8529/_api/replication/dump?collection=testCollection\n\nHTTP/1.1 200 OK\ncontent-type: application/x-arango-dump; charset=utf-8\nx-arango-replication-checkmore: false\nx-arango-replication-lastincluded: 409878951\n\n{\"tick\":\"408502695\",\"type\":2300,\"key\":\"abcdef\",\"rev\":\"408371623\",\"data\":{\"_key\":\"abcdef\",\"_rev\":\"408371623\",\"test\":true,\"a\":\"abc\"}}\n{\"tick\":\"408895911\",\"type\":2300,\"key\":\"123456\",\"rev\":\"408830375\",\"data\":{\"_key\":\"123456\",\"_rev\":\"408830375\",\"c\":false,\"b\":1}}\n{\"tick\":\"409223591\",\"type\":2300,\"key\":\"123456\",\"rev\":\"409158055\",\"data\":{\"_key\":\"123456\",\"_rev\":\"409158055\",\"c\":false,\"b\":1,\"d\":\"additional value\"}}\n{\"tick\":\"409485735\",\"type\":2300,\"key\":\"foobar\",\"rev\":\"409420199\",\"data\":{\"_key\":\"foobar\",\"_rev\":\"409420199\"}}\n{\"tick\":\"409682343\",\"type\":2302,\"key\":\"foobar\",\"rev\":\"409616807\"}\n{\"tick\":\"409878951\",\"type\":2302,\"key\":\"abcdef\",\"rev\":\"409813415\"}\n\n\n

", + "examples": "Empty collection:

unix> curl --dump - http://localhost:8529/_api/replication/dump?collection=testCollection\n\nHTTP/1.1 204 No Content\ncontent-type: application/x-arango-dump; charset=utf-8\nx-arango-replication-checkmore: false\nx-arango-replication-lastincluded: 0\n\n

Non-empty collection:

unix> curl --dump - http://localhost:8529/_api/replication/dump?collection=testCollection\n\nHTTP/1.1 200 OK\ncontent-type: application/x-arango-dump; charset=utf-8\nx-arango-replication-checkmore: false\nx-arango-replication-lastincluded: 409354663\n\n{\"tick\":\"407978407\",\"type\":2300,\"key\":\"abcdef\",\"rev\":\"407847335\",\"data\":{\"_key\":\"abcdef\",\"_rev\":\"407847335\",\"test\":true,\"a\":\"abc\"}}\n{\"tick\":\"408371623\",\"type\":2300,\"key\":\"123456\",\"rev\":\"408306087\",\"data\":{\"_key\":\"123456\",\"_rev\":\"408306087\",\"c\":false,\"b\":1}}\n{\"tick\":\"408699303\",\"type\":2300,\"key\":\"123456\",\"rev\":\"408633767\",\"data\":{\"_key\":\"123456\",\"_rev\":\"408633767\",\"c\":false,\"b\":1,\"d\":\"additional value\"}}\n{\"tick\":\"408961447\",\"type\":2300,\"key\":\"foobar\",\"rev\":\"408895911\",\"data\":{\"_key\":\"foobar\",\"_rev\":\"408895911\"}}\n{\"tick\":\"409158055\",\"type\":2302,\"key\":\"foobar\",\"rev\":\"409092519\"}\n{\"tick\":\"409354663\",\"type\":2302,\"key\":\"abcdef\",\"rev\":\"409289127\"}\n\n\n

", "nickname": "returnsTheDataOfACollection" } ], @@ -565,7 +565,7 @@ "notes": "Starts the replication applier. This will return immediately if the replication applier is already running.

If the replication applier is not already running, the applier configuration will be checked, and if it is complete, the applier will be started in a background thread. This means that even if the applier will encounter any errors while running, they will not be reported in the response to this method.

To detect replication applier errors after the applier was started, use the /_api/replication/applier-state API instead.

", "summary": "starts the replication applier", "httpMethod": "PUT", - "examples": "

unix> curl -X PUT --dump - http://localhost:8529/_api/replication/applier-start\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : true, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2013-11-22T21:03:36Z\", \n      \"message\" : \"applier created\", \n      \"failedConnects\" : 0 \n    }, \n    \"totalRequests\" : 0, \n    \"totalFailedConnects\" : 0, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"errorNum\" : 0 \n    }, \n    \"time\" : \"2013-11-22T21:04:25Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.3-alpha1\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

", + "examples": "

unix> curl -X PUT --dump - http://localhost:8529/_api/replication/applier-start\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : true, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2013-11-25T09:35:52Z\", \n      \"message\" : \"applier created\", \n      \"failedConnects\" : 0 \n    }, \n    \"totalRequests\" : 0, \n    \"totalFailedConnects\" : 0, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"errorNum\" : 0 \n    }, \n    \"time\" : \"2013-11-25T09:36:42Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.3\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

", "nickname": "startsTheReplicationApplier" } ], @@ -592,7 +592,7 @@ "notes": "Stops the replication applier. This will return immediately if the replication applier is not running.

", "summary": "stops the replication applier", "httpMethod": "PUT", - "examples": "

unix> curl -X PUT --dump - http://localhost:8529/_api/replication/applier-stop\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : false, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2013-11-22T21:04:25Z\", \n      \"message\" : \"applier stopped\", \n      \"failedConnects\" : 1 \n    }, \n    \"totalRequests\" : 2, \n    \"totalFailedConnects\" : 2, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"time\" : \"2013-11-22T21:04:25Z\", \n      \"errorMessage\" : \"could not connect to master at tcp://127.0.0.1:8529: Could not connect to 'tcp:/...\", \n      \"errorNum\" : 1412 \n    }, \n    \"time\" : \"2013-11-22T21:04:25Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.3-alpha1\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

", + "examples": "

unix> curl -X PUT --dump - http://localhost:8529/_api/replication/applier-stop\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : false, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2013-11-25T09:36:42Z\", \n      \"message\" : \"applier stopped\", \n      \"failedConnects\" : 0 \n    }, \n    \"totalRequests\" : 0, \n    \"totalFailedConnects\" : 0, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"time\" : \"2013-11-25T09:36:42Z\", \n      \"errorMessage\" : \"got same server id (190048212006786) from endpoint 'tcp://127.0.0.1:8529' as the...\", \n      \"errorNum\" : 1405 \n    }, \n    \"time\" : \"2013-11-25T09:36:42Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.3\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

", "nickname": "stopsTheReplicationApplier" } ], @@ -619,7 +619,7 @@ "notes": "Returns the state of the replication applier, regardless of whether the applier is currently running or not.

The response is a JSON hash with the following attributes:

- state: a JSON hash with the following sub-attributes:

- running: whether or not the applier is active and running

- lastAppliedContinuousTick: the last tick value from the continuous replication log the applier has applied.

- lastProcessedContinuousTick: the last tick value from the continuous replication log the applier has processed.

Regularly, the last applied and last processed tick values should be identical. For transactional operations, the replication applier will first process incoming log events before applying them, so the processed tick value might be higher than the applied tick value. This will be the case until the applier encounters the transaction commit log event for the transaction.

- lastAvailableContinuousTick: the last tick value the logger server can provide.

- time: the time on the applier server.

- totalRequests: the total number of requests the applier has made to the endpoint.

- totalFailedConnects: the total number of failed connection attempts the applier has made.

- totalEvents: the total number of log events the applier has processed.

- progress: a JSON hash with details about the replication applier progress. It contains the following sub-attributes if there is progress to report:

- message: a textual description of the progress

- time: the date and time the progress was logged

- failedConnects: the current number of failed connection attempts

- lastError: a JSON hash with details about the last error that happened on the applier. It contains the following sub-attributes if there was an error:

- errorNum: a numerical error code

- errorMessage: a textual error description

- time: the date and time the error occurred

In case no error has occurred, lastError will be empty.

- server: a JSON hash with the following sub-attributes:

- version: the applier server's version

- serverId: the applier server's id

- endpoint: the endpoint the applier is connected to (if applier is active) or will connect to (if applier is currently inactive)

- database: the name of the database the applier is connected to (if applier is active) or will connect to (if applier is currently inactive)

", "summary": "returns the state of the replication applier", "httpMethod": "GET", - "examples": "Fetching the state of an inactive applier:

unix> curl --dump - http://localhost:8529/_api/replication/applier-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : false, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2013-11-22T21:04:25Z\", \n      \"message\" : \"applier stopped\", \n      \"failedConnects\" : 1 \n    }, \n    \"totalRequests\" : 2, \n    \"totalFailedConnects\" : 2, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"time\" : \"2013-11-22T21:04:25Z\", \n      \"errorMessage\" : \"could not connect to master at tcp://127.0.0.1:8529: Could not connect to 'tcp:/...\", \n      \"errorNum\" : 1412 \n    }, \n    \"time\" : \"2013-11-22T21:04:25Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.3-alpha1\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

Fetching the state of an active applier:

unix> curl --dump - http://localhost:8529/_api/replication/applier-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : true, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2013-11-22T21:04:25Z\", \n      \"message\" : \"fetching master state information\", \n      \"failedConnects\" : 1 \n    }, \n    \"totalRequests\" : 3, \n    \"totalFailedConnects\" : 3, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"errorNum\" : 0 \n    }, \n    \"time\" : \"2013-11-22T21:04:25Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.3-alpha1\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

", + "examples": "Fetching the state of an inactive applier:

unix> curl --dump - http://localhost:8529/_api/replication/applier-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : false, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2013-11-25T09:36:42Z\", \n      \"message\" : \"applier stopped\", \n      \"failedConnects\" : 0 \n    }, \n    \"totalRequests\" : 0, \n    \"totalFailedConnects\" : 0, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"time\" : \"2013-11-25T09:36:42Z\", \n      \"errorMessage\" : \"got same server id (190048212006786) from endpoint 'tcp://127.0.0.1:8529' as the...\", \n      \"errorNum\" : 1405 \n    }, \n    \"time\" : \"2013-11-25T09:36:42Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.3\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

Fetching the state of an active applier:

unix> curl --dump - http://localhost:8529/_api/replication/applier-state\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"state\" : { \n    \"running\" : true, \n    \"lastAppliedContinuousTick\" : null, \n    \"lastProcessedContinuousTick\" : null, \n    \"lastAvailableContinuousTick\" : null, \n    \"progress\" : { \n      \"time\" : \"2013-11-25T09:36:42Z\", \n      \"message\" : \"fetching master state information\", \n      \"failedConnects\" : 0 \n    }, \n    \"totalRequests\" : 0, \n    \"totalFailedConnects\" : 0, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"errorNum\" : 0 \n    }, \n    \"time\" : \"2013-11-25T09:36:42Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"1.4.3\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

", "nickname": "returnsTheStateOfTheReplicationApplier" } ], diff --git a/js/apps/system/aardvark/api-docs/simple.json b/js/apps/system/aardvark/api-docs/simple.json index 6ee19949d9..beee054ca7 100644 --- a/js/apps/system/aardvark/api-docs/simple.json +++ b/js/apps/system/aardvark/api-docs/simple.json @@ -32,7 +32,7 @@ "notes": "

Returns all documents of a collections. The call expects a JSON object as body with the following attributes:

- collection: The name of the collection to query.

- skip: The number of documents to skip in the query (optional).

- limit: The maximal amount of documents to return. The skip is applied before the limit restriction. (optional)

Returns a cursor containing the result, see the manual for details.

", "summary": "executes simple query ALL", "httpMethod": "PUT", - "examples": "Limit the amount of documents using limit

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/all\n{ \"collection\": \"products\", \"skip\": 2, \"limit\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/221069735\", \n      \"_rev\" : \"221069735\", \n      \"_key\" : \"221069735\", \n      \"Hello4\" : \"World4\" \n    }, \n    { \n      \"_id\" : \"products/221397415\", \n      \"_rev\" : \"221397415\", \n      \"_key\" : \"221397415\", \n      \"Hello5\" : \"World5\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 2, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

Using a batchSize value

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/all\n{ \"collection\": \"products\", \"batchSize\" : 3 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/223887783\", \n      \"_rev\" : \"223887783\", \n      \"_key\" : \"223887783\", \n      \"Hello5\" : \"World5\" \n    }, \n    { \n      \"_id\" : \"products/222511527\", \n      \"_rev\" : \"222511527\", \n      \"_key\" : \"222511527\", \n      \"Hello1\" : \"World1\" \n    }, \n    { \n      \"_id\" : \"products/222904743\", \n      \"_rev\" : \"222904743\", \n      \"_key\" : \"222904743\", \n      \"Hello2\" : \"World2\" \n    } \n  ], \n  \"hasMore\" : true, \n  \"id\" : \"224084391\", \n  \"count\" : 5, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", + "examples": "Limit the amount of documents using limit

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/all\n{ \"collection\": \"products\", \"skip\": 2, \"limit\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/219496871\", \n      \"_rev\" : \"219496871\", \n      \"_key\" : \"219496871\", \n      \"Hello1\" : \"World1\" \n    }, \n    { \n      \"_id\" : \"products/220217767\", \n      \"_rev\" : \"220217767\", \n      \"_key\" : \"220217767\", \n      \"Hello3\" : \"World3\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 2, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

Using a batchSize value

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/all\n{ \"collection\": \"products\", \"batchSize\" : 3 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/222708135\", \n      \"_rev\" : \"222708135\", \n      \"_key\" : \"222708135\", \n      \"Hello3\" : \"World3\" \n    }, \n    { \n      \"_id\" : \"products/221987239\", \n      \"_rev\" : \"221987239\", \n      \"_key\" : \"221987239\", \n      \"Hello1\" : \"World1\" \n    }, \n    { \n      \"_id\" : \"products/222380455\", \n      \"_rev\" : \"222380455\", \n      \"_key\" : \"222380455\", \n      \"Hello2\" : \"World2\" \n    } \n  ], \n  \"hasMore\" : true, \n  \"id\" : \"223560103\", \n  \"count\" : 5, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", "nickname": "executesSimpleQueryAll" } ], @@ -67,7 +67,7 @@ "notes": "

Returns a random document of a collection. The call expects a JSON object as body with the following attributes:

- collection: The identifier or name of the collection to query.

Returns a JSON object with the document stored in the attribute document if the collection contains at least one document. If the collection is empty, the attrbute contains null.

", "summary": "executes simple query ANY", "httpMethod": "PUT", - "examples": "

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/any\n{ \"collection\": \"products\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"document\" : { \n    \"_id\" : \"products/226050471\", \n    \"_rev\" : \"226050471\", \n    \"_key\" : \"226050471\", \n    \"Hello4\" : \"World4\" \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/any\n{ \"collection\": \"products\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"document\" : { \n    \"_id\" : \"products/225526183\", \n    \"_rev\" : \"225526183\", \n    \"_key\" : \"225526183\", \n    \"Hello4\" : \"World4\" \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "executesSimpleQueryAny" } ], @@ -102,7 +102,7 @@ "notes": "

The default will find at most 100 documents near a given coordinate. The returned list is sorted according to the distance, with the nearest document coming first. If there are near documents of equal distance, documents are chosen randomly from this set until the limit is reached.

In order to use the near operator, a geo index must be defined for the collection. This index also defines which attribute holds the coordinates for the document. If you have more then one geo-spatial index, you can use the geo field to select a particular index.

The call expects a JSON object as body with the following attributes:

- collection: The name of the collection to query.

- latitude: The latitude of the coordinate.

- longitude: The longitude of the coordinate.

- distance: If given, the attribute key used to store the distance. (optional)

- skip: The number of documents to skip in the query. (optional)

- limit: The maximal amount of documents to return. The skip is applied before the limit restriction. The default is 100. (optional)

- geo: If given, the identifier of the geo-index to use. (optional)

Returns a cursor containing the result, see the manual for details.

", "summary": "executes simple query NEAR", "httpMethod": "PUT", - "examples": "Without distance:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/228868519\", \n      \"_rev\" : \"228868519\", \n      \"_key\" : \"228868519\", \n      \"name\" : \"Name/0.002/\", \n      \"loc\" : [ \n        0.002, \n        0 \n      ] \n    }, \n    { \n      \"_id\" : \"products/228475303\", \n      \"_rev\" : \"228475303\", \n      \"_key\" : \"228475303\", \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

With distance:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 3, \"distance\" : \"distance\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/231883175\", \n      \"_rev\" : \"231883175\", \n      \"_key\" : \"231883175\", \n      \"distance\" : 222.38985328911744, \n      \"name\" : \"Name/-0.002/\", \n      \"loc\" : [ \n        -0.002, \n        0 \n      ] \n    }, \n    { \n      \"_id\" : \"products/232276391\", \n      \"_rev\" : \"232276391\", \n      \"_key\" : \"232276391\", \n      \"distance\" : 222.38985328911744, \n      \"name\" : \"Name/0.002/\", \n      \"loc\" : [ \n        0.002, \n        0 \n      ] \n    }, \n    { \n      \"_id\" : \"products/231686567\", \n      \"_rev\" : \"231686567\", \n      \"_key\" : \"231686567\", \n      \"distance\" : 444.779706578235, \n      \"name\" : \"Name/-0.004/\", \n      \"loc\" : [ \n        -0.004, \n        0 \n      ] \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 3, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", + "examples": "Without distance:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/228344231\", \n      \"_rev\" : \"228344231\", \n      \"_key\" : \"228344231\", \n      \"name\" : \"Name/0.002/\", \n      \"loc\" : [ \n        0.002, \n        0 \n      ] \n    }, \n    { \n      \"_id\" : \"products/227951015\", \n      \"_rev\" : \"227951015\", \n      \"_key\" : \"227951015\", \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

With distance:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 3, \"distance\" : \"distance\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/231358887\", \n      \"_rev\" : \"231358887\", \n      \"_key\" : \"231358887\", \n      \"distance\" : 222.38985328911744, \n      \"name\" : \"Name/-0.002/\", \n      \"loc\" : [ \n        -0.002, \n        0 \n      ] \n    }, \n    { \n      \"_id\" : \"products/231752103\", \n      \"_rev\" : \"231752103\", \n      \"_key\" : \"231752103\", \n      \"distance\" : 222.38985328911744, \n      \"name\" : \"Name/0.002/\", \n      \"loc\" : [ \n        0.002, \n        0 \n      ] \n    }, \n    { \n      \"_id\" : \"products/231162279\", \n      \"_rev\" : \"231162279\", \n      \"_key\" : \"231162279\", \n      \"distance\" : 444.779706578235, \n      \"name\" : \"Name/-0.004/\", \n      \"loc\" : [ \n        -0.004, \n        0 \n      ] \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 3, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", "nickname": "executesSimpleQueryNear" } ], @@ -137,7 +137,7 @@ "notes": "

This will find all documents with in a given radius around the coordinate (latitude, longitude). The returned list is sorted by distance.

In order to use the within operator, a geo index must be defined for the collection. This index also defines which attribute holds the coordinates for the document. If you have more then one geo-spatial index, you can use the geo field to select a particular index.

The call expects a JSON object as body with the following attributes:

- collection: The name of the collection to query.

- latitude: The latitude of the coordinate.

- longitude: The longitude of the coordinate.

- radius: The maximal radius (in meters).

- distance: If given, the result attribute key used to store the distance values (optional). If specified, distances are returned in meters.

- skip: The documents to skip in the query. (optional)

- limit: The maximal amount of documents to return. (optional)

- geo: If given, the identifier of the geo-index to use. (optional)

Returns a cursor containing the result, see the manual for details.

", "summary": "executes simple query WITHIN", "httpMethod": "PUT", - "examples": "Without distance:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 2, \"radius\" : 500 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/235684263\", \n      \"_rev\" : \"235684263\", \n      \"_key\" : \"235684263\", \n      \"name\" : \"Name/0.002/\", \n      \"loc\" : [ \n        0.002, \n        0 \n      ] \n    }, \n    { \n      \"_id\" : \"products/235291047\", \n      \"_rev\" : \"235291047\", \n      \"_key\" : \"235291047\", \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

With distance:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 3, \"distance\" : \"distance\", \"radius\" : 300 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/238698919\", \n      \"_rev\" : \"238698919\", \n      \"_key\" : \"238698919\", \n      \"distance\" : 222.38985328911744, \n      \"name\" : \"Name/-0.002/\", \n      \"loc\" : [ \n        -0.002, \n        0 \n      ] \n    }, \n    { \n      \"_id\" : \"products/239092135\", \n      \"_rev\" : \"239092135\", \n      \"_key\" : \"239092135\", \n      \"distance\" : 222.38985328911744, \n      \"name\" : \"Name/0.002/\", \n      \"loc\" : [ \n        0.002, \n        0 \n      ] \n    }, \n    { \n      \"_id\" : \"products/238502311\", \n      \"_rev\" : \"238502311\", \n      \"_key\" : \"238502311\", \n      \"distance\" : 444.779706578235, \n      \"name\" : \"Name/-0.004/\", \n      \"loc\" : [ \n        -0.004, \n        0 \n      ] \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 3, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", + "examples": "Without distance:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 2, \"radius\" : 500 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/235159975\", \n      \"_rev\" : \"235159975\", \n      \"_key\" : \"235159975\", \n      \"name\" : \"Name/0.002/\", \n      \"loc\" : [ \n        0.002, \n        0 \n      ] \n    }, \n    { \n      \"_id\" : \"products/234766759\", \n      \"_rev\" : \"234766759\", \n      \"_key\" : \"234766759\", \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

With distance:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 3, \"distance\" : \"distance\", \"radius\" : 300 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/238174631\", \n      \"_rev\" : \"238174631\", \n      \"_key\" : \"238174631\", \n      \"distance\" : 222.38985328911744, \n      \"name\" : \"Name/-0.002/\", \n      \"loc\" : [ \n        -0.002, \n        0 \n      ] \n    }, \n    { \n      \"_id\" : \"products/238567847\", \n      \"_rev\" : \"238567847\", \n      \"_key\" : \"238567847\", \n      \"distance\" : 222.38985328911744, \n      \"name\" : \"Name/0.002/\", \n      \"loc\" : [ \n        0.002, \n        0 \n      ] \n    }, \n    { \n      \"_id\" : \"products/237978023\", \n      \"_rev\" : \"237978023\", \n      \"_key\" : \"237978023\", \n      \"distance\" : 444.779706578235, \n      \"name\" : \"Name/-0.004/\", \n      \"loc\" : [ \n        -0.004, \n        0 \n      ] \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 3, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", "nickname": "executesSimpleQueryWithin" } ], @@ -172,7 +172,7 @@ "notes": "

This will find all documents from the collection that match the fulltext query specified in query.

In order to use the fulltext operator, a fulltext index must be defined for the collection and the specified attribute.

The call expects a JSON object as body with the following attributes:

- collection: The name of the collection to query.

- attribute: The attribute that contains the texts.

- query: The fulltext query.

- skip: The documents to skip in the query. (optional)

- limit: The maximal amount of documents to return. (optional)

- index: If given, the identifier of the fulltext-index to use. (optional)

Returns a cursor containing the result, see the manual for details.

", "summary": "executes simple query FULLTEXT", "httpMethod": "PUT", - "examples": "

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/fulltext\n{ \"collection\": \"products\", \"attribute\" : \"text\", \"query\" : \"word\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/241320359\", \n      \"_rev\" : \"241320359\", \n      \"_key\" : \"241320359\", \n      \"text\" : \"this text also has a word\" \n    }, \n    { \n      \"_id\" : \"products/241058215\", \n      \"_rev\" : \"241058215\", \n      \"_key\" : \"241058215\", \n      \"text\" : \"this text contains word\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 2, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", + "examples": "

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/fulltext\n{ \"collection\": \"products\", \"attribute\" : \"text\", \"query\" : \"word\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/240533927\", \n      \"_rev\" : \"240533927\", \n      \"_key\" : \"240533927\", \n      \"text\" : \"this text contains word\" \n    }, \n    { \n      \"_id\" : \"products/240796071\", \n      \"_rev\" : \"240796071\", \n      \"_key\" : \"240796071\", \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

", "nickname": "executesSimpleQueryFulltext" } ], @@ -207,7 +207,7 @@ "notes": "

This will find all documents matching a given example.

The call expects a JSON object as body with the following attributes:

- collection: The name of the collection to query.

- example: The example.

- skip: The documents to skip in the query. (optional)

- limit: The maximal amount of documents to return. (optional)

Returns a cursor containing the result, see the manual for details.

", "summary": "executes simple query by-example", "httpMethod": "PUT", - "examples": "Matching an attribute:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" :  { \"i\" : 1 }  }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/243745191\", \n      \"_rev\" : \"243745191\", \n      \"_key\" : \"243745191\", \n      \"i\" : 1 \n    }, \n    { \n      \"_id\" : \"products/243941799\", \n      \"_rev\" : \"243941799\", \n      \"_key\" : \"243941799\", \n      \"i\" : 1, \n      \"a\" : { \n        \"k\" : 2, \n        \"j\" : 2 \n      } \n    }, \n    { \n      \"_id\" : \"products/243483047\", \n      \"_rev\" : \"243483047\", \n      \"_key\" : \"243483047\", \n      \"i\" : 1, \n      \"a\" : { \n        \"j\" : 1 \n      } \n    }, \n    { \n      \"_id\" : \"products/243089831\", \n      \"_rev\" : \"243089831\", \n      \"_key\" : \"243089831\", \n      \"i\" : 1, \n      \"a\" : { \n        \"k\" : 1, \n        \"j\" : 1 \n      } \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 4, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

Matching an attribute which is a sub-document:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"a.j\" : 1 } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/245842343\", \n      \"_rev\" : \"245842343\", \n      \"_key\" : \"245842343\", \n      \"i\" : 1, \n      \"a\" : { \n        \"j\" : 1 \n      } \n    }, \n    { \n      \"_id\" : \"products/245449127\", \n      \"_rev\" : \"245449127\", \n      \"_key\" : \"245449127\", \n      \"i\" : 1, \n      \"a\" : { \n        \"k\" : 1, \n        \"j\" : 1 \n      } \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 2, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

Matching an attribute within a sub-document:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/248201639\", \n      \"_rev\" : \"248201639\", \n      \"_key\" : \"248201639\", \n      \"i\" : 1, \n      \"a\" : { \n        \"j\" : 1 \n      } \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 1, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", + "examples": "Matching an attribute:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" :  { \"i\" : 1 }  }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/242565543\", \n      \"_rev\" : \"242565543\", \n      \"_key\" : \"242565543\", \n      \"i\" : 1, \n      \"a\" : { \n        \"k\" : 1, \n        \"j\" : 1 \n      } \n    }, \n    { \n      \"_id\" : \"products/242958759\", \n      \"_rev\" : \"242958759\", \n      \"_key\" : \"242958759\", \n      \"i\" : 1, \n      \"a\" : { \n        \"j\" : 1 \n      } \n    }, \n    { \n      \"_id\" : \"products/243417511\", \n      \"_rev\" : \"243417511\", \n      \"_key\" : \"243417511\", \n      \"i\" : 1, \n      \"a\" : { \n        \"k\" : 2, \n        \"j\" : 2 \n      } \n    }, \n    { \n      \"_id\" : \"products/243220903\", \n      \"_rev\" : \"243220903\", \n      \"_key\" : \"243220903\", \n      \"i\" : 1 \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 4, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

Matching an attribute which is a sub-document:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"a.j\" : 1 } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/244924839\", \n      \"_rev\" : \"244924839\", \n      \"_key\" : \"244924839\", \n      \"i\" : 1, \n      \"a\" : { \n        \"k\" : 1, \n        \"j\" : 1 \n      } \n    }, \n    { \n      \"_id\" : \"products/245318055\", \n      \"_rev\" : \"245318055\", \n      \"_key\" : \"245318055\", \n      \"i\" : 1, \n      \"a\" : { \n        \"j\" : 1 \n      } \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 2, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

Matching an attribute within a sub-document:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/247677351\", \n      \"_rev\" : \"247677351\", \n      \"_key\" : \"247677351\", \n      \"i\" : 1, \n      \"a\" : { \n        \"j\" : 1 \n      } \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 1, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", "nickname": "executesSimpleQueryBy-example" } ], @@ -242,7 +242,7 @@ "notes": "

This will return the first document matching a given example.

The call expects a JSON object as body with the following attributes:

- collection: The name of the collection to query.

- example: The example.

Returns a result containing the document or HTTP 404 if no document matched the example.

", "summary": "executes simple query first-example", "httpMethod": "PUT", - "examples": "If a matching document was found:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/first-example\n{ \"collection\": \"products\", \"example\" :  { \"i\" : 1 }  }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"document\" : { \n    \"_id\" : \"products/251019687\", \n    \"_rev\" : \"251019687\", \n    \"_key\" : \"251019687\", \n    \"i\" : 1, \n    \"a\" : { \n      \"k\" : 2, \n      \"j\" : 2 \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

If no document was found:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/first-example\n{ \"collection\": \"products\", \"example\" :  { \"l\" : 1 }  }\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 404, \n  \"errorNum\" : 404, \n  \"errorMessage\" : \"no match\" \n}\n\n

", + "examples": "If a matching document was found:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/first-example\n{ \"collection\": \"products\", \"example\" :  { \"i\" : 1 }  }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"document\" : { \n    \"_id\" : \"products/250495399\", \n    \"_rev\" : \"250495399\", \n    \"_key\" : \"250495399\", \n    \"i\" : 1, \n    \"a\" : { \n      \"k\" : 2, \n      \"j\" : 2 \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

If no document was found:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/first-example\n{ \"collection\": \"products\", \"example\" :  { \"l\" : 1 }  }\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 404, \n  \"errorNum\" : 404, \n  \"errorMessage\" : \"no match\" \n}\n\n

", "nickname": "executesSimpleQueryFirst-example" } ], @@ -277,7 +277,7 @@ "notes": "

The request body must be a JSON object with the following attributes: - collection: the name of the collection

- count: the number of documents to return at most. Specifiying count is optional. If it is not specified, it defaults to 1.

This will return the first documents from the collection, in the order of insertion/update time. When the count argument is supplied, the result will be a list of documents, with the \"oldest\" document being first in the result list. If the count argument is not supplied, the result is the \"oldest\" document of the collection, or null if the collection is empty.

", "summary": "executes simple query first", "httpMethod": "PUT", - "examples": "Retrieving the first n documents:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/first\n{ \"collection\": \"products\", \"count\" : 2 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/254820775\", \n      \"_rev\" : \"254820775\", \n      \"_key\" : \"254820775\", \n      \"i\" : 1, \n      \"a\" : { \n        \"k\" : 1, \n        \"j\" : 1 \n      } \n    }, \n    { \n      \"_id\" : \"products/255213991\", \n      \"_rev\" : \"255213991\", \n      \"_key\" : \"255213991\", \n      \"i\" : 1, \n      \"a\" : { \n        \"j\" : 1 \n      } \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Retrieving the first document:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/first\n{ \"collection\": \"products\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"_id\" : \"products/256983463\", \n    \"_rev\" : \"256983463\", \n    \"_key\" : \"256983463\", \n    \"i\" : 1, \n    \"a\" : { \n      \"k\" : 1, \n      \"j\" : 1 \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "Retrieving the first n documents:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/first\n{ \"collection\": \"products\", \"count\" : 2 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/254296487\", \n      \"_rev\" : \"254296487\", \n      \"_key\" : \"254296487\", \n      \"i\" : 1, \n      \"a\" : { \n        \"k\" : 1, \n        \"j\" : 1 \n      } \n    }, \n    { \n      \"_id\" : \"products/254689703\", \n      \"_rev\" : \"254689703\", \n      \"_key\" : \"254689703\", \n      \"i\" : 1, \n      \"a\" : { \n        \"j\" : 1 \n      } \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Retrieving the first document:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/first\n{ \"collection\": \"products\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"_id\" : \"products/256459175\", \n    \"_rev\" : \"256459175\", \n    \"_key\" : \"256459175\", \n    \"i\" : 1, \n    \"a\" : { \n      \"k\" : 1, \n      \"j\" : 1 \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "executesSimpleQueryFirst" } ], @@ -312,7 +312,7 @@ "notes": "

The request body must be a JSON object with the following attributes: - collection: the name of the collection

- count: the number of documents to return at most. Specifiying count is optional. If it is not specified, it defaults to 1.

This will return the last documents from the collection, in the order of insertion/update time. When the count argument is supplied, the result will be a list of documents, with the \"latest\" document being first in the result list.

If the count argument is not supplied, the result is the \"latest\" document of the collection, or null if the collection is empty.

", "summary": "executes simple query last", "httpMethod": "PUT", - "examples": "Retrieving the last n documents:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/last\n{ \"collection\": \"products\", \"count\" : 2 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/259998119\", \n      \"_rev\" : \"259998119\", \n      \"_key\" : \"259998119\", \n      \"i\" : 1, \n      \"a\" : { \n        \"k\" : 2, \n        \"j\" : 2 \n      } \n    }, \n    { \n      \"_id\" : \"products/259801511\", \n      \"_rev\" : \"259801511\", \n      \"_key\" : \"259801511\", \n      \"i\" : 1 \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Retrieving the first document:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/last\n{ \"collection\": \"products\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"_id\" : \"products/262160807\", \n    \"_rev\" : \"262160807\", \n    \"_key\" : \"262160807\", \n    \"i\" : 1, \n    \"a\" : { \n      \"k\" : 2, \n      \"j\" : 2 \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "Retrieving the last n documents:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/last\n{ \"collection\": \"products\", \"count\" : 2 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/259473831\", \n      \"_rev\" : \"259473831\", \n      \"_key\" : \"259473831\", \n      \"i\" : 1, \n      \"a\" : { \n        \"k\" : 2, \n        \"j\" : 2 \n      } \n    }, \n    { \n      \"_id\" : \"products/259277223\", \n      \"_rev\" : \"259277223\", \n      \"_key\" : \"259277223\", \n      \"i\" : 1 \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Retrieving the first document:

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/last\n{ \"collection\": \"products\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"_id\" : \"products/261636519\", \n    \"_rev\" : \"261636519\", \n    \"_key\" : \"261636519\", \n    \"i\" : 1, \n    \"a\" : { \n      \"k\" : 2, \n      \"j\" : 2 \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "executesSimpleQueryLast" } ], @@ -347,7 +347,7 @@ "notes": "

This will find all documents within a given range. You must declare a skip-list index on the attribute in order to be able to use a range query.

The call expects a JSON object as body with the following attributes:

- collection: The name of the collection to query.

- attribute: The attribute path to check.

- left: The lower bound.

- right: The upper bound.

- closed: If true, use interval including left and right, otherwise exclude right, but include left.

- skip: The documents to skip in the query. (optional)

- limit: The maximal amount of documents to return. (optional)

Returns a cursor containing the result, see the manual for details.

", "summary": "executes simple range query", "httpMethod": "PUT", - "examples": "

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/range\n{ \"collection\": \"products\", \"attribute\" : \"i\", \"left\" : 2, \"right\" : 4 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/263602599\", \n      \"_rev\" : \"263602599\", \n      \"_key\" : \"263602599\", \n      \"i\" : 2 \n    }, \n    { \n      \"_id\" : \"products/263799207\", \n      \"_rev\" : \"263799207\", \n      \"_key\" : \"263799207\", \n      \"i\" : 3 \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 2, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", + "examples": "

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/range\n{ \"collection\": \"products\", \"attribute\" : \"i\", \"left\" : 2, \"right\" : 4 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/263078311\", \n      \"_rev\" : \"263078311\", \n      \"_key\" : \"263078311\", \n      \"i\" : 2 \n    }, \n    { \n      \"_id\" : \"products/263274919\", \n      \"_rev\" : \"263274919\", \n      \"_key\" : \"263274919\", \n      \"i\" : 3 \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 2, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", "nickname": "executesSimpleRangeQuery" } ], diff --git a/js/apps/system/aardvark/api-docs/system.json b/js/apps/system/aardvark/api-docs/system.json index d59460fc93..383548ad12 100644 --- a/js/apps/system/aardvark/api-docs/system.json +++ b/js/apps/system/aardvark/api-docs/system.json @@ -92,7 +92,7 @@ "notes": "

Returns the statistics information. The returned object contains the statistics figures grouped together according to the description returned by _admin/statistics-description. For instance, to access a figure userTime from the group system, you first select the sub-object describing the group stored in system and in that sub-object the value for userTime is stored in the attribute of the same name.

In case of a distribution, the returned object contains the total count in count and the distribution list in counts. The sum (or total) of the individual values is returned in sum.

", "summary": "reads the statistics", "httpMethod": "GET", - "examples": "

unix> curl --dump - http://localhost:8529/_admin/statistics\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"system\" : { \n    \"minorPageFaults\" : 104792, \n    \"majorPageFaults\" : 1911, \n    \"userTime\" : 12.249086, \n    \"systemTime\" : 1.63322, \n    \"numberOfThreads\" : 16, \n    \"residentSize\" : 59092992, \n    \"virtualSize\" : 4995182592 \n  }, \n  \"client\" : { \n    \"httpConnections\" : 1, \n    \"connectionTime\" : { \n      \"sum\" : 0.0008349418640136719, \n      \"count\" : 1, \n      \"counts\" : [ \n        1, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"totalTime\" : { \n      \"sum\" : 24.59118390083313, \n      \"count\" : 850, \n      \"counts\" : [ \n        535, \n        193, \n        47, \n        57, \n        15, \n        1, \n        2 \n      ] \n    }, \n    \"requestTime\" : { \n      \"sum\" : 24.436599016189575, \n      \"count\" : 850, \n      \"counts\" : [ \n        541, \n        187, \n        47, \n        57, \n        15, \n        1, \n        2 \n      ] \n    }, \n    \"queueTime\" : { \n      \"sum\" : 0.01686716079711914, \n      \"count\" : 848, \n      \"counts\" : [ \n        848, \n        0, \n        0, \n        0, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"bytesSent\" : { \n      \"sum\" : 381736, \n      \"count\" : 850, \n      \"counts\" : [ \n        234, \n        501, \n        115, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"bytesReceived\" : { \n      \"sum\" : 196618, \n      \"count\" : 850, \n      \"counts\" : [ \n        633, \n        217, \n        0, \n        0, \n        0, \n        0 \n      ] \n    } \n  }, \n  \"server\" : { \n    \"uptime\" : 29.160708904266357 \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "

unix> curl --dump - http://localhost:8529/_admin/statistics\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"system\" : { \n    \"minorPageFaults\" : 102411, \n    \"majorPageFaults\" : 1911, \n    \"userTime\" : 25.156714, \n    \"systemTime\" : 2.520451, \n    \"numberOfThreads\" : 16, \n    \"residentSize\" : 58978304, \n    \"virtualSize\" : 4995182592 \n  }, \n  \"client\" : { \n    \"httpConnections\" : 1, \n    \"connectionTime\" : { \n      \"sum\" : 0.0017819404602050781, \n      \"count\" : 1, \n      \"counts\" : [ \n        1, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"totalTime\" : { \n      \"sum\" : 29.14753556251526, \n      \"count\" : 850, \n      \"counts\" : [ \n        403, \n        314, \n        78, \n        42, \n        10, \n        0, \n        3 \n      ] \n    }, \n    \"requestTime\" : { \n      \"sum\" : 28.887927770614624, \n      \"count\" : 850, \n      \"counts\" : [ \n        409, \n        308, \n        78, \n        42, \n        10, \n        0, \n        3 \n      ] \n    }, \n    \"queueTime\" : { \n      \"sum\" : 0.03221774101257324, \n      \"count\" : 848, \n      \"counts\" : [ \n        848, \n        0, \n        0, \n        0, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"bytesSent\" : { \n      \"sum\" : 381722, \n      \"count\" : 850, \n      \"counts\" : [ \n        234, \n        501, \n        115, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"bytesReceived\" : { \n      \"sum\" : 196618, \n      \"count\" : 850, \n      \"counts\" : [ \n        633, \n        217, \n        0, \n        0, \n        0, \n        0 \n      ] \n    } \n  }, \n  \"server\" : { \n    \"uptime\" : 36.27197599411011 \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "readsTheStatistics" } ], diff --git a/js/apps/system/aardvark/api-docs/traversal.json b/js/apps/system/aardvark/api-docs/traversal.json index 9e9a2b70fa..850d028ac8 100644 --- a/js/apps/system/aardvark/api-docs/traversal.json +++ b/js/apps/system/aardvark/api-docs/traversal.json @@ -36,7 +36,7 @@ "notes": "Starts a traversal starting from a given vertex and following. edges contained in a given edgeCollection. The request must contain the following attributes.

- startVertex: id of the startVertex, e.g. \"users/foo\".

- edgeCollection: name of the collection that contains the edges.

- filter (optional, default is to include all nodes): body (JavaScript code) of custom filter function function signature: (config, vertex, path) -> mixed can return four different string values: - \"exclude\" -> this vertex will not be visited. - \"prune\" -> the edges of this vertex will not be followed. - \"\" or undefined -> visit the vertex and follow it's edges. - Array -> containing any combination of the above. If there is at least one \"exclude\" or \"prune\" respectivly is contained, it's effect will occur. - minDepth (optional, ANDed with any existing filters): visits only nodes in at least the given depth - maxDepth (optional, ANDed with any existing filters): visits only nodes in at most the given depth - visitor (optional): body (JavaScript) code of custom visitor function function signature: (config, result, vertex, path) -> void visitor function can do anything, but its return value is ignored. To populate a result, use the result variable by reference - direction (optional): direction for traversal - *if set*, must be either \"outbound\", \"inbound\", or \"any\" - *if not set*, the expander attribute must be specified - init (optional): body (JavaScript) code of custom result initialisation function function signature: (config, result) -> void initialise any values in result with what is required - expander (optional): body (JavaScript) code of custom expander function *must* be set if direction attribute is *not* set function signature: (config, vertex, path) -> array expander must return an array of the connections for vertex each connection is an object with the attributes edge and vertex - strategy (optional): traversal strategy can be \"depthfirst\" or \"breadthfirst\" - order (optional): traversal order can be \"preorder\" or \"postorder\" - itemOrder (optional): item iteration order can be \"forward\" or \"backward\" - uniqueness (optional): specifies uniqueness for vertices and edges visited if set, must be an object like this: \"uniqueness\": {\"vertices\": \"none\"|\"global\"|path\", \"edges\": \"none\"|\"global\"|\"path\"} - maxIterations (optional): Maximum number of iterations in each traversal. This number can be set to prevent endless loops in traversal of cyclic graphs. When a traversal performs as many iterations as the maxIterations value, the traversal will abort with an error. If maxIterations is not set, a server-defined value may be used.



If the Traversal is successfully executed HTTP 200 will be returned. Additionally the result object will be returned by the traversal.

For successful traversals, the returned JSON object has the following properties:

- error: boolean flag to indicate if an error occurred (false in this case)

- code: the HTTP status code

- result: the return value of the traversal

If the traversal specification is either missing or malformed, the server will respond with HTTP 400.

The body of the response will then contain a JSON object with additional error details. The object has the following attributes:

- error: boolean flag to indicate that an error occurred (true in this case)

- code: the HTTP status code

- errorNum: the server error number

- errorMessage: a descriptive error message

", "summary": "executes a traversal", "httpMethod": "POST", - "examples": "In the following examples the underlying graph will contain five persons Alice, Bob, Charlie, Dave and Eve. We will have the following directed relations: - Alice knows Bob - Bob knows Charlie - Bob knows Dave - Eve knows Alice - Eve knows Bob The starting vertex will always be Alice. Follow only outbound edges:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/280183207\", \"edgeCollection\" : \"knows\", \"direction\" : \"outbound\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/280183207\", \n          \"_rev\" : \"280183207\", \n          \"_key\" : \"280183207\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/280445351\", \n          \"_rev\" : \"280445351\", \n          \"_key\" : \"280445351\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/280707495\", \n          \"_rev\" : \"280707495\", \n          \"_key\" : \"280707495\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/280904103\", \n          \"_rev\" : \"280904103\", \n          \"_key\" : \"280904103\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/280183207\", \n              \"_rev\" : \"280183207\", \n              \"_key\" : \"280183207\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/281362855\", \n              \"_rev\" : \"281362855\", \n              \"_key\" : \"281362855\", \n              \"_from\" : \"persons/280183207\", \n              \"_to\" : \"persons/280445351\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/280183207\", \n              \"_rev\" : \"280183207\", \n              \"_key\" : \"280183207\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/280445351\", \n              \"_rev\" : \"280445351\", \n              \"_key\" : \"280445351\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/281362855\", \n              \"_rev\" : \"281362855\", \n              \"_key\" : \"281362855\", \n              \"_from\" : \"persons/280183207\", \n              \"_to\" : \"persons/280445351\" \n            }, \n            { \n              \"_id\" : \"knows/281624999\", \n              \"_rev\" : \"281624999\", \n              \"_key\" : \"281624999\", \n              \"_from\" : \"persons/280445351\", \n              \"_to\" : \"persons/280707495\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/280183207\", \n              \"_rev\" : \"280183207\", \n              \"_key\" : \"280183207\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/280445351\", \n              \"_rev\" : \"280445351\", \n              \"_key\" : \"280445351\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/280707495\", \n              \"_rev\" : \"280707495\", \n              \"_key\" : \"280707495\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/281362855\", \n              \"_rev\" : \"281362855\", \n              \"_key\" : \"281362855\", \n              \"_from\" : \"persons/280183207\", \n              \"_to\" : \"persons/280445351\" \n            }, \n            { \n              \"_id\" : \"knows/281821607\", \n              \"_rev\" : \"281821607\", \n              \"_key\" : \"281821607\", \n              \"_from\" : \"persons/280445351\", \n              \"_to\" : \"persons/280904103\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/280183207\", \n              \"_rev\" : \"280183207\", \n              \"_key\" : \"280183207\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/280445351\", \n              \"_rev\" : \"280445351\", \n              \"_key\" : \"280445351\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/280904103\", \n              \"_rev\" : \"280904103\", \n              \"_key\" : \"280904103\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Follow only inbound edges:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/284705191\", \"edgeCollection\" : \"knows\", \"direction\" : \"inbound\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/284705191\", \n          \"_rev\" : \"284705191\", \n          \"_key\" : \"284705191\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/285622695\", \n          \"_rev\" : \"285622695\", \n          \"_key\" : \"285622695\", \n          \"name\" : \"Eve\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/284705191\", \n              \"_rev\" : \"284705191\", \n              \"_key\" : \"284705191\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/286540199\", \n              \"_rev\" : \"286540199\", \n              \"_key\" : \"286540199\", \n              \"_from\" : \"persons/285622695\", \n              \"_to\" : \"persons/284705191\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/284705191\", \n              \"_rev\" : \"284705191\", \n              \"_key\" : \"284705191\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/285622695\", \n              \"_rev\" : \"285622695\", \n              \"_key\" : \"285622695\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Follow any direction of edges:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/288965031\",\"edgeCollection\":\"knows\",\"direction\":\"any\",\"uniqueness\":{\"vertices\":\"none\",\"edges\":\"global\"}}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/288965031\", \n          \"_rev\" : \"288965031\", \n          \"_key\" : \"288965031\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/289882535\", \n          \"_rev\" : \"289882535\", \n          \"_key\" : \"289882535\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/289227175\", \n          \"_rev\" : \"289227175\", \n          \"_key\" : \"289227175\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/288965031\", \n          \"_rev\" : \"288965031\", \n          \"_key\" : \"288965031\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/289489319\", \n          \"_rev\" : \"289489319\", \n          \"_key\" : \"289489319\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/289685927\", \n          \"_rev\" : \"289685927\", \n          \"_key\" : \"289685927\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/288965031\", \n              \"_rev\" : \"288965031\", \n              \"_key\" : \"288965031\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/290800039\", \n              \"_rev\" : \"290800039\", \n              \"_key\" : \"290800039\", \n              \"_from\" : \"persons/289882535\", \n              \"_to\" : \"persons/288965031\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/288965031\", \n              \"_rev\" : \"288965031\", \n              \"_key\" : \"288965031\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/289882535\", \n              \"_rev\" : \"289882535\", \n              \"_key\" : \"289882535\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/290800039\", \n              \"_rev\" : \"290800039\", \n              \"_key\" : \"290800039\", \n              \"_from\" : \"persons/289882535\", \n              \"_to\" : \"persons/288965031\" \n            }, \n            { \n              \"_id\" : \"knows/290996647\", \n              \"_rev\" : \"290996647\", \n              \"_key\" : \"290996647\", \n              \"_from\" : \"persons/289882535\", \n              \"_to\" : \"persons/289227175\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/288965031\", \n              \"_rev\" : \"288965031\", \n              \"_key\" : \"288965031\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/289882535\", \n              \"_rev\" : \"289882535\", \n              \"_key\" : \"289882535\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/289227175\", \n              \"_rev\" : \"289227175\", \n              \"_key\" : \"289227175\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/290800039\", \n              \"_rev\" : \"290800039\", \n              \"_key\" : \"290800039\", \n              \"_from\" : \"persons/289882535\", \n              \"_to\" : \"persons/288965031\" \n            }, \n            { \n              \"_id\" : \"knows/290996647\", \n              \"_rev\" : \"290996647\", \n              \"_key\" : \"290996647\", \n              \"_from\" : \"persons/289882535\", \n              \"_to\" : \"persons/289227175\" \n            }, \n            { \n              \"_id\" : \"knows/290144679\", \n              \"_rev\" : \"290144679\", \n              \"_key\" : \"290144679\", \n              \"_from\" : \"persons/288965031\", \n              \"_to\" : \"persons/289227175\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/288965031\", \n              \"_rev\" : \"288965031\", \n              \"_key\" : \"288965031\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/289882535\", \n              \"_rev\" : \"289882535\", \n              \"_key\" : \"289882535\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/289227175\", \n              \"_rev\" : \"289227175\", \n              \"_key\" : \"289227175\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/288965031\", \n              \"_rev\" : \"288965031\", \n              \"_key\" : \"288965031\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/290800039\", \n              \"_rev\" : \"290800039\", \n              \"_key\" : \"290800039\", \n              \"_from\" : \"persons/289882535\", \n              \"_to\" : \"persons/288965031\" \n            }, \n            { \n              \"_id\" : \"knows/290996647\", \n              \"_rev\" : \"290996647\", \n              \"_key\" : \"290996647\", \n              \"_from\" : \"persons/289882535\", \n              \"_to\" : \"persons/289227175\" \n            }, \n            { \n              \"_id\" : \"knows/290406823\", \n              \"_rev\" : \"290406823\", \n              \"_key\" : \"290406823\", \n              \"_from\" : \"persons/289227175\", \n              \"_to\" : \"persons/289489319\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/288965031\", \n              \"_rev\" : \"288965031\", \n              \"_key\" : \"288965031\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/289882535\", \n              \"_rev\" : \"289882535\", \n              \"_key\" : \"289882535\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/289227175\", \n              \"_rev\" : \"289227175\", \n              \"_key\" : \"289227175\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/289489319\", \n              \"_rev\" : \"289489319\", \n              \"_key\" : \"289489319\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/290800039\", \n              \"_rev\" : \"290800039\", \n              \"_key\" : \"290800039\", \n              \"_from\" : \"persons/289882535\", \n              \"_to\" : \"persons/288965031\" \n            }, \n            { \n              \"_id\" : \"knows/290996647\", \n              \"_rev\" : \"290996647\", \n              \"_key\" : \"290996647\", \n              \"_from\" : \"persons/289882535\", \n              \"_to\" : \"persons/289227175\" \n            }, \n            { \n              \"_id\" : \"knows/290603431\", \n              \"_rev\" : \"290603431\", \n              \"_key\" : \"290603431\", \n              \"_from\" : \"persons/289227175\", \n              \"_to\" : \"persons/289685927\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/288965031\", \n              \"_rev\" : \"288965031\", \n              \"_key\" : \"288965031\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/289882535\", \n              \"_rev\" : \"289882535\", \n              \"_key\" : \"289882535\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/289227175\", \n              \"_rev\" : \"289227175\", \n              \"_key\" : \"289227175\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/289685927\", \n              \"_rev\" : \"289685927\", \n              \"_key\" : \"289685927\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Excluding Charlie and Bob:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/294207911\", \"edgeCollection\" : \"knows\", \"direction\" : \"outbound\", \"filter\" : \"if (vertex.name === \\\"Bob\\\" || vertex.name === \\\"Charlie\\\") {return \\\"exclude\\\";}return;\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/294207911\", \n          \"_rev\" : \"294207911\", \n          \"_key\" : \"294207911\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/294928807\", \n          \"_rev\" : \"294928807\", \n          \"_key\" : \"294928807\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/294207911\", \n              \"_rev\" : \"294207911\", \n              \"_key\" : \"294207911\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/295387559\", \n              \"_rev\" : \"295387559\", \n              \"_key\" : \"295387559\", \n              \"_from\" : \"persons/294207911\", \n              \"_to\" : \"persons/294470055\" \n            }, \n            { \n              \"_id\" : \"knows/295846311\", \n              \"_rev\" : \"295846311\", \n              \"_key\" : \"295846311\", \n              \"_from\" : \"persons/294470055\", \n              \"_to\" : \"persons/294928807\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/294207911\", \n              \"_rev\" : \"294207911\", \n              \"_key\" : \"294207911\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/294470055\", \n              \"_rev\" : \"294470055\", \n              \"_key\" : \"294470055\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/294928807\", \n              \"_rev\" : \"294928807\", \n              \"_key\" : \"294928807\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Do not follow edges from Bob:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/298729895\", \"edgeCollection\" : \"knows\", \"direction\" : \"outbound\", \"filter\" : \"if (vertex.name === \\\"Bob\\\") {return \\\"prune\\\";}return;\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/298729895\", \n          \"_rev\" : \"298729895\", \n          \"_key\" : \"298729895\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/298992039\", \n          \"_rev\" : \"298992039\", \n          \"_key\" : \"298992039\", \n          \"name\" : \"Bob\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/298729895\", \n              \"_rev\" : \"298729895\", \n              \"_key\" : \"298729895\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/299909543\", \n              \"_rev\" : \"299909543\", \n              \"_key\" : \"299909543\", \n              \"_from\" : \"persons/298729895\", \n              \"_to\" : \"persons/298992039\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/298729895\", \n              \"_rev\" : \"298729895\", \n              \"_key\" : \"298729895\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/298992039\", \n              \"_rev\" : \"298992039\", \n              \"_key\" : \"298992039\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Visit only nodes in a depth of at least 2:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/302924199\", \"edgeCollection\" : \"knows\", \"direction\" : \"outbound\", \"minDepth\" : 2}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/303448487\", \n          \"_rev\" : \"303448487\", \n          \"_key\" : \"303448487\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/303645095\", \n          \"_rev\" : \"303645095\", \n          \"_key\" : \"303645095\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/304103847\", \n              \"_rev\" : \"304103847\", \n              \"_key\" : \"304103847\", \n              \"_from\" : \"persons/302924199\", \n              \"_to\" : \"persons/303186343\" \n            }, \n            { \n              \"_id\" : \"knows/304365991\", \n              \"_rev\" : \"304365991\", \n              \"_key\" : \"304365991\", \n              \"_from\" : \"persons/303186343\", \n              \"_to\" : \"persons/303448487\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/302924199\", \n              \"_rev\" : \"302924199\", \n              \"_key\" : \"302924199\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/303186343\", \n              \"_rev\" : \"303186343\", \n              \"_key\" : \"303186343\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/303448487\", \n              \"_rev\" : \"303448487\", \n              \"_key\" : \"303448487\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/304103847\", \n              \"_rev\" : \"304103847\", \n              \"_key\" : \"304103847\", \n              \"_from\" : \"persons/302924199\", \n              \"_to\" : \"persons/303186343\" \n            }, \n            { \n              \"_id\" : \"knows/304562599\", \n              \"_rev\" : \"304562599\", \n              \"_key\" : \"304562599\", \n              \"_from\" : \"persons/303186343\", \n              \"_to\" : \"persons/303645095\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/302924199\", \n              \"_rev\" : \"302924199\", \n              \"_key\" : \"302924199\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/303186343\", \n              \"_rev\" : \"303186343\", \n              \"_key\" : \"303186343\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/303645095\", \n              \"_rev\" : \"303645095\", \n              \"_key\" : \"303645095\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Visit only nodes in a depth of at most 1:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/307446183\", \"edgeCollection\" : \"knows\", \"direction\" : \"outbound\", \"maxDepth\" : 1}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/307446183\", \n          \"_rev\" : \"307446183\", \n          \"_key\" : \"307446183\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/307708327\", \n          \"_rev\" : \"307708327\", \n          \"_key\" : \"307708327\", \n          \"name\" : \"Bob\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/307446183\", \n              \"_rev\" : \"307446183\", \n              \"_key\" : \"307446183\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/308625831\", \n              \"_rev\" : \"308625831\", \n              \"_key\" : \"308625831\", \n              \"_from\" : \"persons/307446183\", \n              \"_to\" : \"persons/307708327\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/307446183\", \n              \"_rev\" : \"307446183\", \n              \"_key\" : \"307446183\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/307708327\", \n              \"_rev\" : \"307708327\", \n              \"_key\" : \"307708327\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Count all visited nodes and return a list of nodes only:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/311640487\", \"edgeCollection\" : \"knows\", \"direction\" : \"outbound\", \"init\" : \"result.visited = 0; result.myVertices = [ ];\", \"visitor\" : \"result.visited++; result.myVertices.push(vertex);\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : 4, \n    \"myVertices\" : [ \n      { \n        \"_id\" : \"persons/311640487\", \n        \"_rev\" : \"311640487\", \n        \"_key\" : \"311640487\", \n        \"name\" : \"Alice\" \n      }, \n      { \n        \"_id\" : \"persons/311902631\", \n        \"_rev\" : \"311902631\", \n        \"_key\" : \"311902631\", \n        \"name\" : \"Bob\" \n      }, \n      { \n        \"_id\" : \"persons/312164775\", \n        \"_rev\" : \"312164775\", \n        \"_key\" : \"312164775\", \n        \"name\" : \"Charlie\" \n      }, \n      { \n        \"_id\" : \"persons/312361383\", \n        \"_rev\" : \"312361383\", \n        \"_key\" : \"312361383\", \n        \"name\" : \"Dave\" \n      } \n    ] \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Expand only inbound edges of Alice and outbound edges of Eve:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/315900327\",\"edgeCollection\":\"knows\",\"expander\":\"var connections = [ ];if (vertex.name === \\\"Alice\\\") {config.edgeCollection.inEdges(vertex).forEach(function (e) {connections.push({ vertex: require(\\\"internal\\\").db._document(e._from), edge: e});});}if (vertex.name === \\\"Eve\\\") {config.edgeCollection.outEdges(vertex).forEach(function (e) {connections.push({vertex: require(\\\"internal\\\").db._document(e._to), edge: e});});}return connections;\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/315900327\", \n          \"_rev\" : \"315900327\", \n          \"_key\" : \"315900327\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/316817831\", \n          \"_rev\" : \"316817831\", \n          \"_key\" : \"316817831\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/316162471\", \n          \"_rev\" : \"316162471\", \n          \"_key\" : \"316162471\", \n          \"name\" : \"Bob\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/315900327\", \n              \"_rev\" : \"315900327\", \n              \"_key\" : \"315900327\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/317735335\", \n              \"_rev\" : \"317735335\", \n              \"_key\" : \"317735335\", \n              \"_from\" : \"persons/316817831\", \n              \"_to\" : \"persons/315900327\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/315900327\", \n              \"_rev\" : \"315900327\", \n              \"_key\" : \"315900327\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/316817831\", \n              \"_rev\" : \"316817831\", \n              \"_key\" : \"316817831\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/317735335\", \n              \"_rev\" : \"317735335\", \n              \"_key\" : \"317735335\", \n              \"_from\" : \"persons/316817831\", \n              \"_to\" : \"persons/315900327\" \n            }, \n            { \n              \"_id\" : \"knows/317931943\", \n              \"_rev\" : \"317931943\", \n              \"_key\" : \"317931943\", \n              \"_from\" : \"persons/316817831\", \n              \"_to\" : \"persons/316162471\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/315900327\", \n              \"_rev\" : \"315900327\", \n              \"_key\" : \"315900327\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/316817831\", \n              \"_rev\" : \"316817831\", \n              \"_key\" : \"316817831\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/316162471\", \n              \"_rev\" : \"316162471\", \n              \"_key\" : \"316162471\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Follow the depthfirst strategy:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/320291239\",\"edgeCollection\":\"knows\",\"direction\":\"any\",\"strategy\":\"depthfirst\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/320291239\", \n          \"_rev\" : \"320291239\", \n          \"_key\" : \"320291239\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/321208743\", \n          \"_rev\" : \"321208743\", \n          \"_key\" : \"321208743\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/320553383\", \n          \"_rev\" : \"320553383\", \n          \"_key\" : \"320553383\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/320291239\", \n          \"_rev\" : \"320291239\", \n          \"_key\" : \"320291239\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/320815527\", \n          \"_rev\" : \"320815527\", \n          \"_key\" : \"320815527\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/321012135\", \n          \"_rev\" : \"321012135\", \n          \"_key\" : \"321012135\", \n          \"name\" : \"Dave\" \n        }, \n        { \n          \"_id\" : \"persons/320553383\", \n          \"_rev\" : \"320553383\", \n          \"_key\" : \"320553383\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/321208743\", \n          \"_rev\" : \"321208743\", \n          \"_key\" : \"321208743\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/320291239\", \n          \"_rev\" : \"320291239\", \n          \"_key\" : \"320291239\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/320815527\", \n          \"_rev\" : \"320815527\", \n          \"_key\" : \"320815527\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/321012135\", \n          \"_rev\" : \"321012135\", \n          \"_key\" : \"321012135\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/320291239\", \n              \"_rev\" : \"320291239\", \n              \"_key\" : \"320291239\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/322126247\", \n              \"_rev\" : \"322126247\", \n              \"_key\" : \"322126247\", \n              \"_from\" : \"persons/321208743\", \n              \"_to\" : \"persons/320291239\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/320291239\", \n              \"_rev\" : \"320291239\", \n              \"_key\" : \"320291239\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/321208743\", \n              \"_rev\" : \"321208743\", \n              \"_key\" : \"321208743\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/322126247\", \n              \"_rev\" : \"322126247\", \n              \"_key\" : \"322126247\", \n              \"_from\" : \"persons/321208743\", \n              \"_to\" : \"persons/320291239\" \n            }, \n            { \n              \"_id\" : \"knows/322322855\", \n              \"_rev\" : \"322322855\", \n              \"_key\" : \"322322855\", \n              \"_from\" : \"persons/321208743\", \n              \"_to\" : \"persons/320553383\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/320291239\", \n              \"_rev\" : \"320291239\", \n              \"_key\" : \"320291239\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/321208743\", \n              \"_rev\" : \"321208743\", \n              \"_key\" : \"321208743\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/320553383\", \n              \"_rev\" : \"320553383\", \n              \"_key\" : \"320553383\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/322126247\", \n              \"_rev\" : \"322126247\", \n              \"_key\" : \"322126247\", \n              \"_from\" : \"persons/321208743\", \n              \"_to\" : \"persons/320291239\" \n            }, \n            { \n              \"_id\" : \"knows/322322855\", \n              \"_rev\" : \"322322855\", \n              \"_key\" : \"322322855\", \n              \"_from\" : \"persons/321208743\", \n              \"_to\" : \"persons/320553383\" \n            }, \n            { \n              \"_id\" : \"knows/321470887\", \n              \"_rev\" : \"321470887\", \n              \"_key\" : \"321470887\", \n              \"_from\" : \"persons/320291239\", \n              \"_to\" : \"persons/320553383\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/320291239\", \n              \"_rev\" : \"320291239\", \n              \"_key\" : \"320291239\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/321208743\", \n              \"_rev\" : \"321208743\", \n              \"_key\" : \"321208743\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/320553383\", \n              \"_rev\" : \"320553383\", \n              \"_key\" : \"320553383\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/320291239\", \n              \"_rev\" : \"320291239\", \n              \"_key\" : \"320291239\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/322126247\", \n              \"_rev\" : \"322126247\", \n              \"_key\" : \"322126247\", \n              \"_from\" : \"persons/321208743\", \n              \"_to\" : \"persons/320291239\" \n            }, \n            { \n              \"_id\" : \"knows/322322855\", \n              \"_rev\" : \"322322855\", \n              \"_key\" : \"322322855\", \n              \"_from\" : \"persons/321208743\", \n              \"_to\" : \"persons/320553383\" \n            }, \n            { \n              \"_id\" : \"knows/321733031\", \n              \"_rev\" : \"321733031\", \n              \"_key\" : \"321733031\", \n              \"_from\" : \"persons/320553383\", \n              \"_to\" : \"persons/320815527\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/320291239\", \n              \"_rev\" : \"320291239\", \n              \"_key\" : \"320291239\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/321208743\", \n              \"_rev\" : \"321208743\", \n              \"_key\" : \"321208743\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/320553383\", \n              \"_rev\" : \"320553383\", \n              \"_key\" : \"320553383\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/320815527\", \n              \"_rev\" : \"320815527\", \n              \"_key\" : \"320815527\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/322126247\", \n              \"_rev\" : \"322126247\", \n              \"_key\" : \"322126247\", \n              \"_from\" : \"persons/321208743\", \n              \"_to\" : \"persons/320291239\" \n            }, \n            { \n              \"_id\" : \"knows/322322855\", \n              \"_rev\" : \"322322855\", \n              \"_key\" : \"322322855\", \n              \"_from\" : \"persons/321208743\", \n              \"_to\" : \"persons/320553383\" \n            }, \n            { \n              \"_id\" : \"knows/321929639\", \n              \"_rev\" : \"321929639\", \n              \"_key\" : \"321929639\", \n              \"_from\" : \"persons/320553383\", \n              \"_to\" : \"persons/321012135\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/320291239\", \n              \"_rev\" : \"320291239\", \n              \"_key\" : \"320291239\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/321208743\", \n              \"_rev\" : \"321208743\", \n              \"_key\" : \"321208743\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/320553383\", \n              \"_rev\" : \"320553383\", \n              \"_key\" : \"320553383\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/321012135\", \n              \"_rev\" : \"321012135\", \n              \"_key\" : \"321012135\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/321470887\", \n              \"_rev\" : \"321470887\", \n              \"_key\" : \"321470887\", \n              \"_from\" : \"persons/320291239\", \n              \"_to\" : \"persons/320553383\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/320291239\", \n              \"_rev\" : \"320291239\", \n              \"_key\" : \"320291239\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/320553383\", \n              \"_rev\" : \"320553383\", \n              \"_key\" : \"320553383\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/321470887\", \n              \"_rev\" : \"321470887\", \n              \"_key\" : \"321470887\", \n              \"_from\" : \"persons/320291239\", \n              \"_to\" : \"persons/320553383\" \n            }, \n            { \n              \"_id\" : \"knows/322322855\", \n              \"_rev\" : \"322322855\", \n              \"_key\" : \"322322855\", \n              \"_from\" : \"persons/321208743\", \n              \"_to\" : \"persons/320553383\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/320291239\", \n              \"_rev\" : \"320291239\", \n              \"_key\" : \"320291239\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/320553383\", \n              \"_rev\" : \"320553383\", \n              \"_key\" : \"320553383\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/321208743\", \n              \"_rev\" : \"321208743\", \n              \"_key\" : \"321208743\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/321470887\", \n              \"_rev\" : \"321470887\", \n              \"_key\" : \"321470887\", \n              \"_from\" : \"persons/320291239\", \n              \"_to\" : \"persons/320553383\" \n            }, \n            { \n              \"_id\" : \"knows/322322855\", \n              \"_rev\" : \"322322855\", \n              \"_key\" : \"322322855\", \n              \"_from\" : \"persons/321208743\", \n              \"_to\" : \"persons/320553383\" \n            }, \n            { \n              \"_id\" : \"knows/322126247\", \n              \"_rev\" : \"322126247\", \n              \"_key\" : \"322126247\", \n              \"_from\" : \"persons/321208743\", \n              \"_to\" : \"persons/320291239\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/320291239\", \n              \"_rev\" : \"320291239\", \n              \"_key\" : \"320291239\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/320553383\", \n              \"_rev\" : \"320553383\", \n              \"_key\" : \"320553383\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/321208743\", \n              \"_rev\" : \"321208743\", \n              \"_key\" : \"321208743\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/320291239\", \n              \"_rev\" : \"320291239\", \n              \"_key\" : \"320291239\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/321470887\", \n              \"_rev\" : \"321470887\", \n              \"_key\" : \"321470887\", \n              \"_from\" : \"persons/320291239\", \n              \"_to\" : \"persons/320553383\" \n            }, \n            { \n              \"_id\" : \"knows/321733031\", \n              \"_rev\" : \"321733031\", \n              \"_key\" : \"321733031\", \n              \"_from\" : \"persons/320553383\", \n              \"_to\" : \"persons/320815527\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/320291239\", \n              \"_rev\" : \"320291239\", \n              \"_key\" : \"320291239\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/320553383\", \n              \"_rev\" : \"320553383\", \n              \"_key\" : \"320553383\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/320815527\", \n              \"_rev\" : \"320815527\", \n              \"_key\" : \"320815527\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/321470887\", \n              \"_rev\" : \"321470887\", \n              \"_key\" : \"321470887\", \n              \"_from\" : \"persons/320291239\", \n              \"_to\" : \"persons/320553383\" \n            }, \n            { \n              \"_id\" : \"knows/321929639\", \n              \"_rev\" : \"321929639\", \n              \"_key\" : \"321929639\", \n              \"_from\" : \"persons/320553383\", \n              \"_to\" : \"persons/321012135\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/320291239\", \n              \"_rev\" : \"320291239\", \n              \"_key\" : \"320291239\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/320553383\", \n              \"_rev\" : \"320553383\", \n              \"_key\" : \"320553383\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/321012135\", \n              \"_rev\" : \"321012135\", \n              \"_key\" : \"321012135\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Using postorder ordering:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/326517159\",\"edgeCollection\":\"knows\",\"direction\":\"any\",\"order\":\"postorder\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/326517159\", \n          \"_rev\" : \"326517159\", \n          \"_key\" : \"326517159\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/327041447\", \n          \"_rev\" : \"327041447\", \n          \"_key\" : \"327041447\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/327238055\", \n          \"_rev\" : \"327238055\", \n          \"_key\" : \"327238055\", \n          \"name\" : \"Dave\" \n        }, \n        { \n          \"_id\" : \"persons/326779303\", \n          \"_rev\" : \"326779303\", \n          \"_key\" : \"326779303\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/327434663\", \n          \"_rev\" : \"327434663\", \n          \"_key\" : \"327434663\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/326517159\", \n          \"_rev\" : \"326517159\", \n          \"_key\" : \"326517159\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/327434663\", \n          \"_rev\" : \"327434663\", \n          \"_key\" : \"327434663\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/327041447\", \n          \"_rev\" : \"327041447\", \n          \"_key\" : \"327041447\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/327238055\", \n          \"_rev\" : \"327238055\", \n          \"_key\" : \"327238055\", \n          \"name\" : \"Dave\" \n        }, \n        { \n          \"_id\" : \"persons/326779303\", \n          \"_rev\" : \"326779303\", \n          \"_key\" : \"326779303\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/326517159\", \n          \"_rev\" : \"326517159\", \n          \"_key\" : \"326517159\", \n          \"name\" : \"Alice\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/328352167\", \n              \"_rev\" : \"328352167\", \n              \"_key\" : \"328352167\", \n              \"_from\" : \"persons/327434663\", \n              \"_to\" : \"persons/326517159\" \n            }, \n            { \n              \"_id\" : \"knows/328548775\", \n              \"_rev\" : \"328548775\", \n              \"_key\" : \"328548775\", \n              \"_from\" : \"persons/327434663\", \n              \"_to\" : \"persons/326779303\" \n            }, \n            { \n              \"_id\" : \"knows/327696807\", \n              \"_rev\" : \"327696807\", \n              \"_key\" : \"327696807\", \n              \"_from\" : \"persons/326517159\", \n              \"_to\" : \"persons/326779303\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/326517159\", \n              \"_rev\" : \"326517159\", \n              \"_key\" : \"326517159\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/327434663\", \n              \"_rev\" : \"327434663\", \n              \"_key\" : \"327434663\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/326779303\", \n              \"_rev\" : \"326779303\", \n              \"_key\" : \"326779303\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/326517159\", \n              \"_rev\" : \"326517159\", \n              \"_key\" : \"326517159\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/328352167\", \n              \"_rev\" : \"328352167\", \n              \"_key\" : \"328352167\", \n              \"_from\" : \"persons/327434663\", \n              \"_to\" : \"persons/326517159\" \n            }, \n            { \n              \"_id\" : \"knows/328548775\", \n              \"_rev\" : \"328548775\", \n              \"_key\" : \"328548775\", \n              \"_from\" : \"persons/327434663\", \n              \"_to\" : \"persons/326779303\" \n            }, \n            { \n              \"_id\" : \"knows/327958951\", \n              \"_rev\" : \"327958951\", \n              \"_key\" : \"327958951\", \n              \"_from\" : \"persons/326779303\", \n              \"_to\" : \"persons/327041447\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/326517159\", \n              \"_rev\" : \"326517159\", \n              \"_key\" : \"326517159\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/327434663\", \n              \"_rev\" : \"327434663\", \n              \"_key\" : \"327434663\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/326779303\", \n              \"_rev\" : \"326779303\", \n              \"_key\" : \"326779303\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/327041447\", \n              \"_rev\" : \"327041447\", \n              \"_key\" : \"327041447\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/328352167\", \n              \"_rev\" : \"328352167\", \n              \"_key\" : \"328352167\", \n              \"_from\" : \"persons/327434663\", \n              \"_to\" : \"persons/326517159\" \n            }, \n            { \n              \"_id\" : \"knows/328548775\", \n              \"_rev\" : \"328548775\", \n              \"_key\" : \"328548775\", \n              \"_from\" : \"persons/327434663\", \n              \"_to\" : \"persons/326779303\" \n            }, \n            { \n              \"_id\" : \"knows/328155559\", \n              \"_rev\" : \"328155559\", \n              \"_key\" : \"328155559\", \n              \"_from\" : \"persons/326779303\", \n              \"_to\" : \"persons/327238055\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/326517159\", \n              \"_rev\" : \"326517159\", \n              \"_key\" : \"326517159\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/327434663\", \n              \"_rev\" : \"327434663\", \n              \"_key\" : \"327434663\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/326779303\", \n              \"_rev\" : \"326779303\", \n              \"_key\" : \"326779303\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/327238055\", \n              \"_rev\" : \"327238055\", \n              \"_key\" : \"327238055\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/328352167\", \n              \"_rev\" : \"328352167\", \n              \"_key\" : \"328352167\", \n              \"_from\" : \"persons/327434663\", \n              \"_to\" : \"persons/326517159\" \n            }, \n            { \n              \"_id\" : \"knows/328548775\", \n              \"_rev\" : \"328548775\", \n              \"_key\" : \"328548775\", \n              \"_from\" : \"persons/327434663\", \n              \"_to\" : \"persons/326779303\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/326517159\", \n              \"_rev\" : \"326517159\", \n              \"_key\" : \"326517159\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/327434663\", \n              \"_rev\" : \"327434663\", \n              \"_key\" : \"327434663\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/326779303\", \n              \"_rev\" : \"326779303\", \n              \"_key\" : \"326779303\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/328352167\", \n              \"_rev\" : \"328352167\", \n              \"_key\" : \"328352167\", \n              \"_from\" : \"persons/327434663\", \n              \"_to\" : \"persons/326517159\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/326517159\", \n              \"_rev\" : \"326517159\", \n              \"_key\" : \"326517159\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/327434663\", \n              \"_rev\" : \"327434663\", \n              \"_key\" : \"327434663\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/327696807\", \n              \"_rev\" : \"327696807\", \n              \"_key\" : \"327696807\", \n              \"_from\" : \"persons/326517159\", \n              \"_to\" : \"persons/326779303\" \n            }, \n            { \n              \"_id\" : \"knows/328548775\", \n              \"_rev\" : \"328548775\", \n              \"_key\" : \"328548775\", \n              \"_from\" : \"persons/327434663\", \n              \"_to\" : \"persons/326779303\" \n            }, \n            { \n              \"_id\" : \"knows/328352167\", \n              \"_rev\" : \"328352167\", \n              \"_key\" : \"328352167\", \n              \"_from\" : \"persons/327434663\", \n              \"_to\" : \"persons/326517159\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/326517159\", \n              \"_rev\" : \"326517159\", \n              \"_key\" : \"326517159\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/326779303\", \n              \"_rev\" : \"326779303\", \n              \"_key\" : \"326779303\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/327434663\", \n              \"_rev\" : \"327434663\", \n              \"_key\" : \"327434663\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/326517159\", \n              \"_rev\" : \"326517159\", \n              \"_key\" : \"326517159\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/327696807\", \n              \"_rev\" : \"327696807\", \n              \"_key\" : \"327696807\", \n              \"_from\" : \"persons/326517159\", \n              \"_to\" : \"persons/326779303\" \n            }, \n            { \n              \"_id\" : \"knows/328548775\", \n              \"_rev\" : \"328548775\", \n              \"_key\" : \"328548775\", \n              \"_from\" : \"persons/327434663\", \n              \"_to\" : \"persons/326779303\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/326517159\", \n              \"_rev\" : \"326517159\", \n              \"_key\" : \"326517159\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/326779303\", \n              \"_rev\" : \"326779303\", \n              \"_key\" : \"326779303\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/327434663\", \n              \"_rev\" : \"327434663\", \n              \"_key\" : \"327434663\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/327696807\", \n              \"_rev\" : \"327696807\", \n              \"_key\" : \"327696807\", \n              \"_from\" : \"persons/326517159\", \n              \"_to\" : \"persons/326779303\" \n            }, \n            { \n              \"_id\" : \"knows/327958951\", \n              \"_rev\" : \"327958951\", \n              \"_key\" : \"327958951\", \n              \"_from\" : \"persons/326779303\", \n              \"_to\" : \"persons/327041447\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/326517159\", \n              \"_rev\" : \"326517159\", \n              \"_key\" : \"326517159\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/326779303\", \n              \"_rev\" : \"326779303\", \n              \"_key\" : \"326779303\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/327041447\", \n              \"_rev\" : \"327041447\", \n              \"_key\" : \"327041447\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/327696807\", \n              \"_rev\" : \"327696807\", \n              \"_key\" : \"327696807\", \n              \"_from\" : \"persons/326517159\", \n              \"_to\" : \"persons/326779303\" \n            }, \n            { \n              \"_id\" : \"knows/328155559\", \n              \"_rev\" : \"328155559\", \n              \"_key\" : \"328155559\", \n              \"_from\" : \"persons/326779303\", \n              \"_to\" : \"persons/327238055\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/326517159\", \n              \"_rev\" : \"326517159\", \n              \"_key\" : \"326517159\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/326779303\", \n              \"_rev\" : \"326779303\", \n              \"_key\" : \"326779303\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/327238055\", \n              \"_rev\" : \"327238055\", \n              \"_key\" : \"327238055\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/327696807\", \n              \"_rev\" : \"327696807\", \n              \"_key\" : \"327696807\", \n              \"_from\" : \"persons/326517159\", \n              \"_to\" : \"persons/326779303\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/326517159\", \n              \"_rev\" : \"326517159\", \n              \"_key\" : \"326517159\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/326779303\", \n              \"_rev\" : \"326779303\", \n              \"_key\" : \"326779303\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/326517159\", \n              \"_rev\" : \"326517159\", \n              \"_key\" : \"326517159\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Using backward item-ordering:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/332743079\",\"edgeCollection\":\"knows\",\"direction\":\"any\",\"itemOrder\":\"backward\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/332743079\", \n          \"_rev\" : \"332743079\", \n          \"_key\" : \"332743079\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/333005223\", \n          \"_rev\" : \"333005223\", \n          \"_key\" : \"333005223\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/333463975\", \n          \"_rev\" : \"333463975\", \n          \"_key\" : \"333463975\", \n          \"name\" : \"Dave\" \n        }, \n        { \n          \"_id\" : \"persons/333267367\", \n          \"_rev\" : \"333267367\", \n          \"_key\" : \"333267367\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/333660583\", \n          \"_rev\" : \"333660583\", \n          \"_key\" : \"333660583\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/332743079\", \n          \"_rev\" : \"332743079\", \n          \"_key\" : \"332743079\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/333660583\", \n          \"_rev\" : \"333660583\", \n          \"_key\" : \"333660583\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/333005223\", \n          \"_rev\" : \"333005223\", \n          \"_key\" : \"333005223\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/333463975\", \n          \"_rev\" : \"333463975\", \n          \"_key\" : \"333463975\", \n          \"name\" : \"Dave\" \n        }, \n        { \n          \"_id\" : \"persons/333267367\", \n          \"_rev\" : \"333267367\", \n          \"_key\" : \"333267367\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/332743079\", \n          \"_rev\" : \"332743079\", \n          \"_key\" : \"332743079\", \n          \"name\" : \"Alice\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332743079\", \n              \"_rev\" : \"332743079\", \n              \"_key\" : \"332743079\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/333922727\", \n              \"_rev\" : \"333922727\", \n              \"_key\" : \"333922727\", \n              \"_from\" : \"persons/332743079\", \n              \"_to\" : \"persons/333005223\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332743079\", \n              \"_rev\" : \"332743079\", \n              \"_key\" : \"332743079\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/333005223\", \n              \"_rev\" : \"333005223\", \n              \"_key\" : \"333005223\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/333922727\", \n              \"_rev\" : \"333922727\", \n              \"_key\" : \"333922727\", \n              \"_from\" : \"persons/332743079\", \n              \"_to\" : \"persons/333005223\" \n            }, \n            { \n              \"_id\" : \"knows/334381479\", \n              \"_rev\" : \"334381479\", \n              \"_key\" : \"334381479\", \n              \"_from\" : \"persons/333005223\", \n              \"_to\" : \"persons/333463975\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332743079\", \n              \"_rev\" : \"332743079\", \n              \"_key\" : \"332743079\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/333005223\", \n              \"_rev\" : \"333005223\", \n              \"_key\" : \"333005223\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/333463975\", \n              \"_rev\" : \"333463975\", \n              \"_key\" : \"333463975\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/333922727\", \n              \"_rev\" : \"333922727\", \n              \"_key\" : \"333922727\", \n              \"_from\" : \"persons/332743079\", \n              \"_to\" : \"persons/333005223\" \n            }, \n            { \n              \"_id\" : \"knows/334184871\", \n              \"_rev\" : \"334184871\", \n              \"_key\" : \"334184871\", \n              \"_from\" : \"persons/333005223\", \n              \"_to\" : \"persons/333267367\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332743079\", \n              \"_rev\" : \"332743079\", \n              \"_key\" : \"332743079\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/333005223\", \n              \"_rev\" : \"333005223\", \n              \"_key\" : \"333005223\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/333267367\", \n              \"_rev\" : \"333267367\", \n              \"_key\" : \"333267367\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/333922727\", \n              \"_rev\" : \"333922727\", \n              \"_key\" : \"333922727\", \n              \"_from\" : \"persons/332743079\", \n              \"_to\" : \"persons/333005223\" \n            }, \n            { \n              \"_id\" : \"knows/334774695\", \n              \"_rev\" : \"334774695\", \n              \"_key\" : \"334774695\", \n              \"_from\" : \"persons/333660583\", \n              \"_to\" : \"persons/333005223\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332743079\", \n              \"_rev\" : \"332743079\", \n              \"_key\" : \"332743079\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/333005223\", \n              \"_rev\" : \"333005223\", \n              \"_key\" : \"333005223\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/333660583\", \n              \"_rev\" : \"333660583\", \n              \"_key\" : \"333660583\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/333922727\", \n              \"_rev\" : \"333922727\", \n              \"_key\" : \"333922727\", \n              \"_from\" : \"persons/332743079\", \n              \"_to\" : \"persons/333005223\" \n            }, \n            { \n              \"_id\" : \"knows/334774695\", \n              \"_rev\" : \"334774695\", \n              \"_key\" : \"334774695\", \n              \"_from\" : \"persons/333660583\", \n              \"_to\" : \"persons/333005223\" \n            }, \n            { \n              \"_id\" : \"knows/334578087\", \n              \"_rev\" : \"334578087\", \n              \"_key\" : \"334578087\", \n              \"_from\" : \"persons/333660583\", \n              \"_to\" : \"persons/332743079\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332743079\", \n              \"_rev\" : \"332743079\", \n              \"_key\" : \"332743079\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/333005223\", \n              \"_rev\" : \"333005223\", \n              \"_key\" : \"333005223\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/333660583\", \n              \"_rev\" : \"333660583\", \n              \"_key\" : \"333660583\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/332743079\", \n              \"_rev\" : \"332743079\", \n              \"_key\" : \"332743079\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/334578087\", \n              \"_rev\" : \"334578087\", \n              \"_key\" : \"334578087\", \n              \"_from\" : \"persons/333660583\", \n              \"_to\" : \"persons/332743079\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332743079\", \n              \"_rev\" : \"332743079\", \n              \"_key\" : \"332743079\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/333660583\", \n              \"_rev\" : \"333660583\", \n              \"_key\" : \"333660583\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/334578087\", \n              \"_rev\" : \"334578087\", \n              \"_key\" : \"334578087\", \n              \"_from\" : \"persons/333660583\", \n              \"_to\" : \"persons/332743079\" \n            }, \n            { \n              \"_id\" : \"knows/334774695\", \n              \"_rev\" : \"334774695\", \n              \"_key\" : \"334774695\", \n              \"_from\" : \"persons/333660583\", \n              \"_to\" : \"persons/333005223\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332743079\", \n              \"_rev\" : \"332743079\", \n              \"_key\" : \"332743079\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/333660583\", \n              \"_rev\" : \"333660583\", \n              \"_key\" : \"333660583\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/333005223\", \n              \"_rev\" : \"333005223\", \n              \"_key\" : \"333005223\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/334578087\", \n              \"_rev\" : \"334578087\", \n              \"_key\" : \"334578087\", \n              \"_from\" : \"persons/333660583\", \n              \"_to\" : \"persons/332743079\" \n            }, \n            { \n              \"_id\" : \"knows/334774695\", \n              \"_rev\" : \"334774695\", \n              \"_key\" : \"334774695\", \n              \"_from\" : \"persons/333660583\", \n              \"_to\" : \"persons/333005223\" \n            }, \n            { \n              \"_id\" : \"knows/334381479\", \n              \"_rev\" : \"334381479\", \n              \"_key\" : \"334381479\", \n              \"_from\" : \"persons/333005223\", \n              \"_to\" : \"persons/333463975\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332743079\", \n              \"_rev\" : \"332743079\", \n              \"_key\" : \"332743079\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/333660583\", \n              \"_rev\" : \"333660583\", \n              \"_key\" : \"333660583\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/333005223\", \n              \"_rev\" : \"333005223\", \n              \"_key\" : \"333005223\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/333463975\", \n              \"_rev\" : \"333463975\", \n              \"_key\" : \"333463975\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/334578087\", \n              \"_rev\" : \"334578087\", \n              \"_key\" : \"334578087\", \n              \"_from\" : \"persons/333660583\", \n              \"_to\" : \"persons/332743079\" \n            }, \n            { \n              \"_id\" : \"knows/334774695\", \n              \"_rev\" : \"334774695\", \n              \"_key\" : \"334774695\", \n              \"_from\" : \"persons/333660583\", \n              \"_to\" : \"persons/333005223\" \n            }, \n            { \n              \"_id\" : \"knows/334184871\", \n              \"_rev\" : \"334184871\", \n              \"_key\" : \"334184871\", \n              \"_from\" : \"persons/333005223\", \n              \"_to\" : \"persons/333267367\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332743079\", \n              \"_rev\" : \"332743079\", \n              \"_key\" : \"332743079\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/333660583\", \n              \"_rev\" : \"333660583\", \n              \"_key\" : \"333660583\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/333005223\", \n              \"_rev\" : \"333005223\", \n              \"_key\" : \"333005223\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/333267367\", \n              \"_rev\" : \"333267367\", \n              \"_key\" : \"333267367\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/334578087\", \n              \"_rev\" : \"334578087\", \n              \"_key\" : \"334578087\", \n              \"_from\" : \"persons/333660583\", \n              \"_to\" : \"persons/332743079\" \n            }, \n            { \n              \"_id\" : \"knows/334774695\", \n              \"_rev\" : \"334774695\", \n              \"_key\" : \"334774695\", \n              \"_from\" : \"persons/333660583\", \n              \"_to\" : \"persons/333005223\" \n            }, \n            { \n              \"_id\" : \"knows/333922727\", \n              \"_rev\" : \"333922727\", \n              \"_key\" : \"333922727\", \n              \"_from\" : \"persons/332743079\", \n              \"_to\" : \"persons/333005223\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332743079\", \n              \"_rev\" : \"332743079\", \n              \"_key\" : \"332743079\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/333660583\", \n              \"_rev\" : \"333660583\", \n              \"_key\" : \"333660583\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/333005223\", \n              \"_rev\" : \"333005223\", \n              \"_key\" : \"333005223\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/332743079\", \n              \"_rev\" : \"332743079\", \n              \"_key\" : \"332743079\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Edges should only be included once globally, but nodes are included every time they are visited:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/338968999\",\"edgeCollection\":\"knows\",\"direction\":\"any\",\"uniqueness\":{\"vertices\":\"none\",\"edges\":\"global\"}}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/338968999\", \n          \"_rev\" : \"338968999\", \n          \"_key\" : \"338968999\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/339886503\", \n          \"_rev\" : \"339886503\", \n          \"_key\" : \"339886503\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/339231143\", \n          \"_rev\" : \"339231143\", \n          \"_key\" : \"339231143\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/338968999\", \n          \"_rev\" : \"338968999\", \n          \"_key\" : \"338968999\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/339493287\", \n          \"_rev\" : \"339493287\", \n          \"_key\" : \"339493287\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/339689895\", \n          \"_rev\" : \"339689895\", \n          \"_key\" : \"339689895\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/338968999\", \n              \"_rev\" : \"338968999\", \n              \"_key\" : \"338968999\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/340804007\", \n              \"_rev\" : \"340804007\", \n              \"_key\" : \"340804007\", \n              \"_from\" : \"persons/339886503\", \n              \"_to\" : \"persons/338968999\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/338968999\", \n              \"_rev\" : \"338968999\", \n              \"_key\" : \"338968999\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/339886503\", \n              \"_rev\" : \"339886503\", \n              \"_key\" : \"339886503\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/340804007\", \n              \"_rev\" : \"340804007\", \n              \"_key\" : \"340804007\", \n              \"_from\" : \"persons/339886503\", \n              \"_to\" : \"persons/338968999\" \n            }, \n            { \n              \"_id\" : \"knows/341000615\", \n              \"_rev\" : \"341000615\", \n              \"_key\" : \"341000615\", \n              \"_from\" : \"persons/339886503\", \n              \"_to\" : \"persons/339231143\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/338968999\", \n              \"_rev\" : \"338968999\", \n              \"_key\" : \"338968999\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/339886503\", \n              \"_rev\" : \"339886503\", \n              \"_key\" : \"339886503\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/339231143\", \n              \"_rev\" : \"339231143\", \n              \"_key\" : \"339231143\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/340804007\", \n              \"_rev\" : \"340804007\", \n              \"_key\" : \"340804007\", \n              \"_from\" : \"persons/339886503\", \n              \"_to\" : \"persons/338968999\" \n            }, \n            { \n              \"_id\" : \"knows/341000615\", \n              \"_rev\" : \"341000615\", \n              \"_key\" : \"341000615\", \n              \"_from\" : \"persons/339886503\", \n              \"_to\" : \"persons/339231143\" \n            }, \n            { \n              \"_id\" : \"knows/340148647\", \n              \"_rev\" : \"340148647\", \n              \"_key\" : \"340148647\", \n              \"_from\" : \"persons/338968999\", \n              \"_to\" : \"persons/339231143\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/338968999\", \n              \"_rev\" : \"338968999\", \n              \"_key\" : \"338968999\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/339886503\", \n              \"_rev\" : \"339886503\", \n              \"_key\" : \"339886503\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/339231143\", \n              \"_rev\" : \"339231143\", \n              \"_key\" : \"339231143\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/338968999\", \n              \"_rev\" : \"338968999\", \n              \"_key\" : \"338968999\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/340804007\", \n              \"_rev\" : \"340804007\", \n              \"_key\" : \"340804007\", \n              \"_from\" : \"persons/339886503\", \n              \"_to\" : \"persons/338968999\" \n            }, \n            { \n              \"_id\" : \"knows/341000615\", \n              \"_rev\" : \"341000615\", \n              \"_key\" : \"341000615\", \n              \"_from\" : \"persons/339886503\", \n              \"_to\" : \"persons/339231143\" \n            }, \n            { \n              \"_id\" : \"knows/340410791\", \n              \"_rev\" : \"340410791\", \n              \"_key\" : \"340410791\", \n              \"_from\" : \"persons/339231143\", \n              \"_to\" : \"persons/339493287\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/338968999\", \n              \"_rev\" : \"338968999\", \n              \"_key\" : \"338968999\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/339886503\", \n              \"_rev\" : \"339886503\", \n              \"_key\" : \"339886503\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/339231143\", \n              \"_rev\" : \"339231143\", \n              \"_key\" : \"339231143\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/339493287\", \n              \"_rev\" : \"339493287\", \n              \"_key\" : \"339493287\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/340804007\", \n              \"_rev\" : \"340804007\", \n              \"_key\" : \"340804007\", \n              \"_from\" : \"persons/339886503\", \n              \"_to\" : \"persons/338968999\" \n            }, \n            { \n              \"_id\" : \"knows/341000615\", \n              \"_rev\" : \"341000615\", \n              \"_key\" : \"341000615\", \n              \"_from\" : \"persons/339886503\", \n              \"_to\" : \"persons/339231143\" \n            }, \n            { \n              \"_id\" : \"knows/340607399\", \n              \"_rev\" : \"340607399\", \n              \"_key\" : \"340607399\", \n              \"_from\" : \"persons/339231143\", \n              \"_to\" : \"persons/339689895\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/338968999\", \n              \"_rev\" : \"338968999\", \n              \"_key\" : \"338968999\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/339886503\", \n              \"_rev\" : \"339886503\", \n              \"_key\" : \"339886503\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/339231143\", \n              \"_rev\" : \"339231143\", \n              \"_key\" : \"339231143\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/339689895\", \n              \"_rev\" : \"339689895\", \n              \"_key\" : \"339689895\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

If the underlying graph is cyclic, maxIterations should be set: The underlying graph has two vertices Alice and Bob. With the directed edges: - Alice knows Bob _ Bob knows Alice

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/344211879\",\"edgeCollection\":\"knows\",\"direction\":\"any\",\"uniqueness\":{\"vertices\":\"none\",\"edges\":\"none\"},\"maxIterations\":5}\n\nHTTP/1.1 500 Internal Error\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 500, \n  \"errorNum\" : 1909, \n  \"errorMessage\" : \"too many iterations\" \n}\n\n

", + "examples": "In the following examples the underlying graph will contain five persons Alice, Bob, Charlie, Dave and Eve. We will have the following directed relations: - Alice knows Bob - Bob knows Charlie - Bob knows Dave - Eve knows Alice - Eve knows Bob The starting vertex will always be Alice. Follow only outbound edges:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/279658919\", \"edgeCollection\" : \"knows\", \"direction\" : \"outbound\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/279658919\", \n          \"_rev\" : \"279658919\", \n          \"_key\" : \"279658919\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/279921063\", \n          \"_rev\" : \"279921063\", \n          \"_key\" : \"279921063\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/280183207\", \n          \"_rev\" : \"280183207\", \n          \"_key\" : \"280183207\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/280379815\", \n          \"_rev\" : \"280379815\", \n          \"_key\" : \"280379815\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/279658919\", \n              \"_rev\" : \"279658919\", \n              \"_key\" : \"279658919\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/280838567\", \n              \"_rev\" : \"280838567\", \n              \"_key\" : \"280838567\", \n              \"_from\" : \"persons/279658919\", \n              \"_to\" : \"persons/279921063\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/279658919\", \n              \"_rev\" : \"279658919\", \n              \"_key\" : \"279658919\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/279921063\", \n              \"_rev\" : \"279921063\", \n              \"_key\" : \"279921063\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/280838567\", \n              \"_rev\" : \"280838567\", \n              \"_key\" : \"280838567\", \n              \"_from\" : \"persons/279658919\", \n              \"_to\" : \"persons/279921063\" \n            }, \n            { \n              \"_id\" : \"knows/281100711\", \n              \"_rev\" : \"281100711\", \n              \"_key\" : \"281100711\", \n              \"_from\" : \"persons/279921063\", \n              \"_to\" : \"persons/280183207\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/279658919\", \n              \"_rev\" : \"279658919\", \n              \"_key\" : \"279658919\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/279921063\", \n              \"_rev\" : \"279921063\", \n              \"_key\" : \"279921063\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/280183207\", \n              \"_rev\" : \"280183207\", \n              \"_key\" : \"280183207\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/280838567\", \n              \"_rev\" : \"280838567\", \n              \"_key\" : \"280838567\", \n              \"_from\" : \"persons/279658919\", \n              \"_to\" : \"persons/279921063\" \n            }, \n            { \n              \"_id\" : \"knows/281297319\", \n              \"_rev\" : \"281297319\", \n              \"_key\" : \"281297319\", \n              \"_from\" : \"persons/279921063\", \n              \"_to\" : \"persons/280379815\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/279658919\", \n              \"_rev\" : \"279658919\", \n              \"_key\" : \"279658919\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/279921063\", \n              \"_rev\" : \"279921063\", \n              \"_key\" : \"279921063\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/280379815\", \n              \"_rev\" : \"280379815\", \n              \"_key\" : \"280379815\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Follow only inbound edges:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/284180903\", \"edgeCollection\" : \"knows\", \"direction\" : \"inbound\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/284180903\", \n          \"_rev\" : \"284180903\", \n          \"_key\" : \"284180903\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/285098407\", \n          \"_rev\" : \"285098407\", \n          \"_key\" : \"285098407\", \n          \"name\" : \"Eve\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/284180903\", \n              \"_rev\" : \"284180903\", \n              \"_key\" : \"284180903\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/286015911\", \n              \"_rev\" : \"286015911\", \n              \"_key\" : \"286015911\", \n              \"_from\" : \"persons/285098407\", \n              \"_to\" : \"persons/284180903\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/284180903\", \n              \"_rev\" : \"284180903\", \n              \"_key\" : \"284180903\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/285098407\", \n              \"_rev\" : \"285098407\", \n              \"_key\" : \"285098407\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Follow any direction of edges:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/288440743\",\"edgeCollection\":\"knows\",\"direction\":\"any\",\"uniqueness\":{\"vertices\":\"none\",\"edges\":\"global\"}}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/288440743\", \n          \"_rev\" : \"288440743\", \n          \"_key\" : \"288440743\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/289358247\", \n          \"_rev\" : \"289358247\", \n          \"_key\" : \"289358247\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/288702887\", \n          \"_rev\" : \"288702887\", \n          \"_key\" : \"288702887\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/288440743\", \n          \"_rev\" : \"288440743\", \n          \"_key\" : \"288440743\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/288965031\", \n          \"_rev\" : \"288965031\", \n          \"_key\" : \"288965031\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/289161639\", \n          \"_rev\" : \"289161639\", \n          \"_key\" : \"289161639\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/288440743\", \n              \"_rev\" : \"288440743\", \n              \"_key\" : \"288440743\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/290275751\", \n              \"_rev\" : \"290275751\", \n              \"_key\" : \"290275751\", \n              \"_from\" : \"persons/289358247\", \n              \"_to\" : \"persons/288440743\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/288440743\", \n              \"_rev\" : \"288440743\", \n              \"_key\" : \"288440743\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/289358247\", \n              \"_rev\" : \"289358247\", \n              \"_key\" : \"289358247\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/290275751\", \n              \"_rev\" : \"290275751\", \n              \"_key\" : \"290275751\", \n              \"_from\" : \"persons/289358247\", \n              \"_to\" : \"persons/288440743\" \n            }, \n            { \n              \"_id\" : \"knows/290472359\", \n              \"_rev\" : \"290472359\", \n              \"_key\" : \"290472359\", \n              \"_from\" : \"persons/289358247\", \n              \"_to\" : \"persons/288702887\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/288440743\", \n              \"_rev\" : \"288440743\", \n              \"_key\" : \"288440743\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/289358247\", \n              \"_rev\" : \"289358247\", \n              \"_key\" : \"289358247\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/288702887\", \n              \"_rev\" : \"288702887\", \n              \"_key\" : \"288702887\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/290275751\", \n              \"_rev\" : \"290275751\", \n              \"_key\" : \"290275751\", \n              \"_from\" : \"persons/289358247\", \n              \"_to\" : \"persons/288440743\" \n            }, \n            { \n              \"_id\" : \"knows/290472359\", \n              \"_rev\" : \"290472359\", \n              \"_key\" : \"290472359\", \n              \"_from\" : \"persons/289358247\", \n              \"_to\" : \"persons/288702887\" \n            }, \n            { \n              \"_id\" : \"knows/289620391\", \n              \"_rev\" : \"289620391\", \n              \"_key\" : \"289620391\", \n              \"_from\" : \"persons/288440743\", \n              \"_to\" : \"persons/288702887\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/288440743\", \n              \"_rev\" : \"288440743\", \n              \"_key\" : \"288440743\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/289358247\", \n              \"_rev\" : \"289358247\", \n              \"_key\" : \"289358247\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/288702887\", \n              \"_rev\" : \"288702887\", \n              \"_key\" : \"288702887\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/288440743\", \n              \"_rev\" : \"288440743\", \n              \"_key\" : \"288440743\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/290275751\", \n              \"_rev\" : \"290275751\", \n              \"_key\" : \"290275751\", \n              \"_from\" : \"persons/289358247\", \n              \"_to\" : \"persons/288440743\" \n            }, \n            { \n              \"_id\" : \"knows/290472359\", \n              \"_rev\" : \"290472359\", \n              \"_key\" : \"290472359\", \n              \"_from\" : \"persons/289358247\", \n              \"_to\" : \"persons/288702887\" \n            }, \n            { \n              \"_id\" : \"knows/289882535\", \n              \"_rev\" : \"289882535\", \n              \"_key\" : \"289882535\", \n              \"_from\" : \"persons/288702887\", \n              \"_to\" : \"persons/288965031\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/288440743\", \n              \"_rev\" : \"288440743\", \n              \"_key\" : \"288440743\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/289358247\", \n              \"_rev\" : \"289358247\", \n              \"_key\" : \"289358247\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/288702887\", \n              \"_rev\" : \"288702887\", \n              \"_key\" : \"288702887\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/288965031\", \n              \"_rev\" : \"288965031\", \n              \"_key\" : \"288965031\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/290275751\", \n              \"_rev\" : \"290275751\", \n              \"_key\" : \"290275751\", \n              \"_from\" : \"persons/289358247\", \n              \"_to\" : \"persons/288440743\" \n            }, \n            { \n              \"_id\" : \"knows/290472359\", \n              \"_rev\" : \"290472359\", \n              \"_key\" : \"290472359\", \n              \"_from\" : \"persons/289358247\", \n              \"_to\" : \"persons/288702887\" \n            }, \n            { \n              \"_id\" : \"knows/290079143\", \n              \"_rev\" : \"290079143\", \n              \"_key\" : \"290079143\", \n              \"_from\" : \"persons/288702887\", \n              \"_to\" : \"persons/289161639\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/288440743\", \n              \"_rev\" : \"288440743\", \n              \"_key\" : \"288440743\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/289358247\", \n              \"_rev\" : \"289358247\", \n              \"_key\" : \"289358247\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/288702887\", \n              \"_rev\" : \"288702887\", \n              \"_key\" : \"288702887\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/289161639\", \n              \"_rev\" : \"289161639\", \n              \"_key\" : \"289161639\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Excluding Charlie and Bob:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/293683623\", \"edgeCollection\" : \"knows\", \"direction\" : \"outbound\", \"filter\" : \"if (vertex.name === \\\"Bob\\\" || vertex.name === \\\"Charlie\\\") {return \\\"exclude\\\";}return;\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/293683623\", \n          \"_rev\" : \"293683623\", \n          \"_key\" : \"293683623\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/294404519\", \n          \"_rev\" : \"294404519\", \n          \"_key\" : \"294404519\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/293683623\", \n              \"_rev\" : \"293683623\", \n              \"_key\" : \"293683623\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/294863271\", \n              \"_rev\" : \"294863271\", \n              \"_key\" : \"294863271\", \n              \"_from\" : \"persons/293683623\", \n              \"_to\" : \"persons/293945767\" \n            }, \n            { \n              \"_id\" : \"knows/295322023\", \n              \"_rev\" : \"295322023\", \n              \"_key\" : \"295322023\", \n              \"_from\" : \"persons/293945767\", \n              \"_to\" : \"persons/294404519\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/293683623\", \n              \"_rev\" : \"293683623\", \n              \"_key\" : \"293683623\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/293945767\", \n              \"_rev\" : \"293945767\", \n              \"_key\" : \"293945767\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/294404519\", \n              \"_rev\" : \"294404519\", \n              \"_key\" : \"294404519\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Do not follow edges from Bob:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/298205607\", \"edgeCollection\" : \"knows\", \"direction\" : \"outbound\", \"filter\" : \"if (vertex.name === \\\"Bob\\\") {return \\\"prune\\\";}return;\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/298205607\", \n          \"_rev\" : \"298205607\", \n          \"_key\" : \"298205607\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/298467751\", \n          \"_rev\" : \"298467751\", \n          \"_key\" : \"298467751\", \n          \"name\" : \"Bob\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/298205607\", \n              \"_rev\" : \"298205607\", \n              \"_key\" : \"298205607\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/299385255\", \n              \"_rev\" : \"299385255\", \n              \"_key\" : \"299385255\", \n              \"_from\" : \"persons/298205607\", \n              \"_to\" : \"persons/298467751\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/298205607\", \n              \"_rev\" : \"298205607\", \n              \"_key\" : \"298205607\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/298467751\", \n              \"_rev\" : \"298467751\", \n              \"_key\" : \"298467751\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Visit only nodes in a depth of at least 2:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/302399911\", \"edgeCollection\" : \"knows\", \"direction\" : \"outbound\", \"minDepth\" : 2}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/302924199\", \n          \"_rev\" : \"302924199\", \n          \"_key\" : \"302924199\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/303120807\", \n          \"_rev\" : \"303120807\", \n          \"_key\" : \"303120807\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/303579559\", \n              \"_rev\" : \"303579559\", \n              \"_key\" : \"303579559\", \n              \"_from\" : \"persons/302399911\", \n              \"_to\" : \"persons/302662055\" \n            }, \n            { \n              \"_id\" : \"knows/303841703\", \n              \"_rev\" : \"303841703\", \n              \"_key\" : \"303841703\", \n              \"_from\" : \"persons/302662055\", \n              \"_to\" : \"persons/302924199\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/302399911\", \n              \"_rev\" : \"302399911\", \n              \"_key\" : \"302399911\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/302662055\", \n              \"_rev\" : \"302662055\", \n              \"_key\" : \"302662055\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/302924199\", \n              \"_rev\" : \"302924199\", \n              \"_key\" : \"302924199\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/303579559\", \n              \"_rev\" : \"303579559\", \n              \"_key\" : \"303579559\", \n              \"_from\" : \"persons/302399911\", \n              \"_to\" : \"persons/302662055\" \n            }, \n            { \n              \"_id\" : \"knows/304038311\", \n              \"_rev\" : \"304038311\", \n              \"_key\" : \"304038311\", \n              \"_from\" : \"persons/302662055\", \n              \"_to\" : \"persons/303120807\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/302399911\", \n              \"_rev\" : \"302399911\", \n              \"_key\" : \"302399911\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/302662055\", \n              \"_rev\" : \"302662055\", \n              \"_key\" : \"302662055\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/303120807\", \n              \"_rev\" : \"303120807\", \n              \"_key\" : \"303120807\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Visit only nodes in a depth of at most 1:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/306921895\", \"edgeCollection\" : \"knows\", \"direction\" : \"outbound\", \"maxDepth\" : 1}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/306921895\", \n          \"_rev\" : \"306921895\", \n          \"_key\" : \"306921895\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/307184039\", \n          \"_rev\" : \"307184039\", \n          \"_key\" : \"307184039\", \n          \"name\" : \"Bob\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/306921895\", \n              \"_rev\" : \"306921895\", \n              \"_key\" : \"306921895\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/308101543\", \n              \"_rev\" : \"308101543\", \n              \"_key\" : \"308101543\", \n              \"_from\" : \"persons/306921895\", \n              \"_to\" : \"persons/307184039\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/306921895\", \n              \"_rev\" : \"306921895\", \n              \"_key\" : \"306921895\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/307184039\", \n              \"_rev\" : \"307184039\", \n              \"_key\" : \"307184039\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Count all visited nodes and return a list of nodes only:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/311116199\", \"edgeCollection\" : \"knows\", \"direction\" : \"outbound\", \"init\" : \"result.visited = 0; result.myVertices = [ ];\", \"visitor\" : \"result.visited++; result.myVertices.push(vertex);\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : 4, \n    \"myVertices\" : [ \n      { \n        \"_id\" : \"persons/311116199\", \n        \"_rev\" : \"311116199\", \n        \"_key\" : \"311116199\", \n        \"name\" : \"Alice\" \n      }, \n      { \n        \"_id\" : \"persons/311378343\", \n        \"_rev\" : \"311378343\", \n        \"_key\" : \"311378343\", \n        \"name\" : \"Bob\" \n      }, \n      { \n        \"_id\" : \"persons/311640487\", \n        \"_rev\" : \"311640487\", \n        \"_key\" : \"311640487\", \n        \"name\" : \"Charlie\" \n      }, \n      { \n        \"_id\" : \"persons/311837095\", \n        \"_rev\" : \"311837095\", \n        \"_key\" : \"311837095\", \n        \"name\" : \"Dave\" \n      } \n    ] \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Expand only inbound edges of Alice and outbound edges of Eve:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/315376039\",\"edgeCollection\":\"knows\",\"expander\":\"var connections = [ ];if (vertex.name === \\\"Alice\\\") {config.edgeCollection.inEdges(vertex).forEach(function (e) {connections.push({ vertex: require(\\\"internal\\\").db._document(e._from), edge: e});});}if (vertex.name === \\\"Eve\\\") {config.edgeCollection.outEdges(vertex).forEach(function (e) {connections.push({vertex: require(\\\"internal\\\").db._document(e._to), edge: e});});}return connections;\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/315376039\", \n          \"_rev\" : \"315376039\", \n          \"_key\" : \"315376039\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/316293543\", \n          \"_rev\" : \"316293543\", \n          \"_key\" : \"316293543\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/315638183\", \n          \"_rev\" : \"315638183\", \n          \"_key\" : \"315638183\", \n          \"name\" : \"Bob\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/315376039\", \n              \"_rev\" : \"315376039\", \n              \"_key\" : \"315376039\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/317211047\", \n              \"_rev\" : \"317211047\", \n              \"_key\" : \"317211047\", \n              \"_from\" : \"persons/316293543\", \n              \"_to\" : \"persons/315376039\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/315376039\", \n              \"_rev\" : \"315376039\", \n              \"_key\" : \"315376039\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/316293543\", \n              \"_rev\" : \"316293543\", \n              \"_key\" : \"316293543\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/317211047\", \n              \"_rev\" : \"317211047\", \n              \"_key\" : \"317211047\", \n              \"_from\" : \"persons/316293543\", \n              \"_to\" : \"persons/315376039\" \n            }, \n            { \n              \"_id\" : \"knows/317407655\", \n              \"_rev\" : \"317407655\", \n              \"_key\" : \"317407655\", \n              \"_from\" : \"persons/316293543\", \n              \"_to\" : \"persons/315638183\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/315376039\", \n              \"_rev\" : \"315376039\", \n              \"_key\" : \"315376039\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/316293543\", \n              \"_rev\" : \"316293543\", \n              \"_key\" : \"316293543\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/315638183\", \n              \"_rev\" : \"315638183\", \n              \"_key\" : \"315638183\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Follow the depthfirst strategy:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/319766951\",\"edgeCollection\":\"knows\",\"direction\":\"any\",\"strategy\":\"depthfirst\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/319766951\", \n          \"_rev\" : \"319766951\", \n          \"_key\" : \"319766951\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/320684455\", \n          \"_rev\" : \"320684455\", \n          \"_key\" : \"320684455\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/320029095\", \n          \"_rev\" : \"320029095\", \n          \"_key\" : \"320029095\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/319766951\", \n          \"_rev\" : \"319766951\", \n          \"_key\" : \"319766951\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/320291239\", \n          \"_rev\" : \"320291239\", \n          \"_key\" : \"320291239\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/320487847\", \n          \"_rev\" : \"320487847\", \n          \"_key\" : \"320487847\", \n          \"name\" : \"Dave\" \n        }, \n        { \n          \"_id\" : \"persons/320029095\", \n          \"_rev\" : \"320029095\", \n          \"_key\" : \"320029095\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/320684455\", \n          \"_rev\" : \"320684455\", \n          \"_key\" : \"320684455\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/319766951\", \n          \"_rev\" : \"319766951\", \n          \"_key\" : \"319766951\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/320291239\", \n          \"_rev\" : \"320291239\", \n          \"_key\" : \"320291239\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/320487847\", \n          \"_rev\" : \"320487847\", \n          \"_key\" : \"320487847\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/319766951\", \n              \"_rev\" : \"319766951\", \n              \"_key\" : \"319766951\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/321601959\", \n              \"_rev\" : \"321601959\", \n              \"_key\" : \"321601959\", \n              \"_from\" : \"persons/320684455\", \n              \"_to\" : \"persons/319766951\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/319766951\", \n              \"_rev\" : \"319766951\", \n              \"_key\" : \"319766951\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/320684455\", \n              \"_rev\" : \"320684455\", \n              \"_key\" : \"320684455\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/321601959\", \n              \"_rev\" : \"321601959\", \n              \"_key\" : \"321601959\", \n              \"_from\" : \"persons/320684455\", \n              \"_to\" : \"persons/319766951\" \n            }, \n            { \n              \"_id\" : \"knows/321798567\", \n              \"_rev\" : \"321798567\", \n              \"_key\" : \"321798567\", \n              \"_from\" : \"persons/320684455\", \n              \"_to\" : \"persons/320029095\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/319766951\", \n              \"_rev\" : \"319766951\", \n              \"_key\" : \"319766951\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/320684455\", \n              \"_rev\" : \"320684455\", \n              \"_key\" : \"320684455\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/320029095\", \n              \"_rev\" : \"320029095\", \n              \"_key\" : \"320029095\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/321601959\", \n              \"_rev\" : \"321601959\", \n              \"_key\" : \"321601959\", \n              \"_from\" : \"persons/320684455\", \n              \"_to\" : \"persons/319766951\" \n            }, \n            { \n              \"_id\" : \"knows/321798567\", \n              \"_rev\" : \"321798567\", \n              \"_key\" : \"321798567\", \n              \"_from\" : \"persons/320684455\", \n              \"_to\" : \"persons/320029095\" \n            }, \n            { \n              \"_id\" : \"knows/320946599\", \n              \"_rev\" : \"320946599\", \n              \"_key\" : \"320946599\", \n              \"_from\" : \"persons/319766951\", \n              \"_to\" : \"persons/320029095\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/319766951\", \n              \"_rev\" : \"319766951\", \n              \"_key\" : \"319766951\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/320684455\", \n              \"_rev\" : \"320684455\", \n              \"_key\" : \"320684455\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/320029095\", \n              \"_rev\" : \"320029095\", \n              \"_key\" : \"320029095\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/319766951\", \n              \"_rev\" : \"319766951\", \n              \"_key\" : \"319766951\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/321601959\", \n              \"_rev\" : \"321601959\", \n              \"_key\" : \"321601959\", \n              \"_from\" : \"persons/320684455\", \n              \"_to\" : \"persons/319766951\" \n            }, \n            { \n              \"_id\" : \"knows/321798567\", \n              \"_rev\" : \"321798567\", \n              \"_key\" : \"321798567\", \n              \"_from\" : \"persons/320684455\", \n              \"_to\" : \"persons/320029095\" \n            }, \n            { \n              \"_id\" : \"knows/321208743\", \n              \"_rev\" : \"321208743\", \n              \"_key\" : \"321208743\", \n              \"_from\" : \"persons/320029095\", \n              \"_to\" : \"persons/320291239\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/319766951\", \n              \"_rev\" : \"319766951\", \n              \"_key\" : \"319766951\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/320684455\", \n              \"_rev\" : \"320684455\", \n              \"_key\" : \"320684455\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/320029095\", \n              \"_rev\" : \"320029095\", \n              \"_key\" : \"320029095\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/320291239\", \n              \"_rev\" : \"320291239\", \n              \"_key\" : \"320291239\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/321601959\", \n              \"_rev\" : \"321601959\", \n              \"_key\" : \"321601959\", \n              \"_from\" : \"persons/320684455\", \n              \"_to\" : \"persons/319766951\" \n            }, \n            { \n              \"_id\" : \"knows/321798567\", \n              \"_rev\" : \"321798567\", \n              \"_key\" : \"321798567\", \n              \"_from\" : \"persons/320684455\", \n              \"_to\" : \"persons/320029095\" \n            }, \n            { \n              \"_id\" : \"knows/321405351\", \n              \"_rev\" : \"321405351\", \n              \"_key\" : \"321405351\", \n              \"_from\" : \"persons/320029095\", \n              \"_to\" : \"persons/320487847\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/319766951\", \n              \"_rev\" : \"319766951\", \n              \"_key\" : \"319766951\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/320684455\", \n              \"_rev\" : \"320684455\", \n              \"_key\" : \"320684455\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/320029095\", \n              \"_rev\" : \"320029095\", \n              \"_key\" : \"320029095\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/320487847\", \n              \"_rev\" : \"320487847\", \n              \"_key\" : \"320487847\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/320946599\", \n              \"_rev\" : \"320946599\", \n              \"_key\" : \"320946599\", \n              \"_from\" : \"persons/319766951\", \n              \"_to\" : \"persons/320029095\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/319766951\", \n              \"_rev\" : \"319766951\", \n              \"_key\" : \"319766951\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/320029095\", \n              \"_rev\" : \"320029095\", \n              \"_key\" : \"320029095\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/320946599\", \n              \"_rev\" : \"320946599\", \n              \"_key\" : \"320946599\", \n              \"_from\" : \"persons/319766951\", \n              \"_to\" : \"persons/320029095\" \n            }, \n            { \n              \"_id\" : \"knows/321798567\", \n              \"_rev\" : \"321798567\", \n              \"_key\" : \"321798567\", \n              \"_from\" : \"persons/320684455\", \n              \"_to\" : \"persons/320029095\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/319766951\", \n              \"_rev\" : \"319766951\", \n              \"_key\" : \"319766951\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/320029095\", \n              \"_rev\" : \"320029095\", \n              \"_key\" : \"320029095\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/320684455\", \n              \"_rev\" : \"320684455\", \n              \"_key\" : \"320684455\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/320946599\", \n              \"_rev\" : \"320946599\", \n              \"_key\" : \"320946599\", \n              \"_from\" : \"persons/319766951\", \n              \"_to\" : \"persons/320029095\" \n            }, \n            { \n              \"_id\" : \"knows/321798567\", \n              \"_rev\" : \"321798567\", \n              \"_key\" : \"321798567\", \n              \"_from\" : \"persons/320684455\", \n              \"_to\" : \"persons/320029095\" \n            }, \n            { \n              \"_id\" : \"knows/321601959\", \n              \"_rev\" : \"321601959\", \n              \"_key\" : \"321601959\", \n              \"_from\" : \"persons/320684455\", \n              \"_to\" : \"persons/319766951\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/319766951\", \n              \"_rev\" : \"319766951\", \n              \"_key\" : \"319766951\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/320029095\", \n              \"_rev\" : \"320029095\", \n              \"_key\" : \"320029095\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/320684455\", \n              \"_rev\" : \"320684455\", \n              \"_key\" : \"320684455\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/319766951\", \n              \"_rev\" : \"319766951\", \n              \"_key\" : \"319766951\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/320946599\", \n              \"_rev\" : \"320946599\", \n              \"_key\" : \"320946599\", \n              \"_from\" : \"persons/319766951\", \n              \"_to\" : \"persons/320029095\" \n            }, \n            { \n              \"_id\" : \"knows/321208743\", \n              \"_rev\" : \"321208743\", \n              \"_key\" : \"321208743\", \n              \"_from\" : \"persons/320029095\", \n              \"_to\" : \"persons/320291239\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/319766951\", \n              \"_rev\" : \"319766951\", \n              \"_key\" : \"319766951\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/320029095\", \n              \"_rev\" : \"320029095\", \n              \"_key\" : \"320029095\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/320291239\", \n              \"_rev\" : \"320291239\", \n              \"_key\" : \"320291239\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/320946599\", \n              \"_rev\" : \"320946599\", \n              \"_key\" : \"320946599\", \n              \"_from\" : \"persons/319766951\", \n              \"_to\" : \"persons/320029095\" \n            }, \n            { \n              \"_id\" : \"knows/321405351\", \n              \"_rev\" : \"321405351\", \n              \"_key\" : \"321405351\", \n              \"_from\" : \"persons/320029095\", \n              \"_to\" : \"persons/320487847\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/319766951\", \n              \"_rev\" : \"319766951\", \n              \"_key\" : \"319766951\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/320029095\", \n              \"_rev\" : \"320029095\", \n              \"_key\" : \"320029095\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/320487847\", \n              \"_rev\" : \"320487847\", \n              \"_key\" : \"320487847\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Using postorder ordering:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/325992871\",\"edgeCollection\":\"knows\",\"direction\":\"any\",\"order\":\"postorder\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/325992871\", \n          \"_rev\" : \"325992871\", \n          \"_key\" : \"325992871\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/326517159\", \n          \"_rev\" : \"326517159\", \n          \"_key\" : \"326517159\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/326713767\", \n          \"_rev\" : \"326713767\", \n          \"_key\" : \"326713767\", \n          \"name\" : \"Dave\" \n        }, \n        { \n          \"_id\" : \"persons/326255015\", \n          \"_rev\" : \"326255015\", \n          \"_key\" : \"326255015\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/326910375\", \n          \"_rev\" : \"326910375\", \n          \"_key\" : \"326910375\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/325992871\", \n          \"_rev\" : \"325992871\", \n          \"_key\" : \"325992871\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/326910375\", \n          \"_rev\" : \"326910375\", \n          \"_key\" : \"326910375\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/326517159\", \n          \"_rev\" : \"326517159\", \n          \"_key\" : \"326517159\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/326713767\", \n          \"_rev\" : \"326713767\", \n          \"_key\" : \"326713767\", \n          \"name\" : \"Dave\" \n        }, \n        { \n          \"_id\" : \"persons/326255015\", \n          \"_rev\" : \"326255015\", \n          \"_key\" : \"326255015\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/325992871\", \n          \"_rev\" : \"325992871\", \n          \"_key\" : \"325992871\", \n          \"name\" : \"Alice\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/327827879\", \n              \"_rev\" : \"327827879\", \n              \"_key\" : \"327827879\", \n              \"_from\" : \"persons/326910375\", \n              \"_to\" : \"persons/325992871\" \n            }, \n            { \n              \"_id\" : \"knows/328024487\", \n              \"_rev\" : \"328024487\", \n              \"_key\" : \"328024487\", \n              \"_from\" : \"persons/326910375\", \n              \"_to\" : \"persons/326255015\" \n            }, \n            { \n              \"_id\" : \"knows/327172519\", \n              \"_rev\" : \"327172519\", \n              \"_key\" : \"327172519\", \n              \"_from\" : \"persons/325992871\", \n              \"_to\" : \"persons/326255015\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/325992871\", \n              \"_rev\" : \"325992871\", \n              \"_key\" : \"325992871\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/326910375\", \n              \"_rev\" : \"326910375\", \n              \"_key\" : \"326910375\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/326255015\", \n              \"_rev\" : \"326255015\", \n              \"_key\" : \"326255015\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/325992871\", \n              \"_rev\" : \"325992871\", \n              \"_key\" : \"325992871\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/327827879\", \n              \"_rev\" : \"327827879\", \n              \"_key\" : \"327827879\", \n              \"_from\" : \"persons/326910375\", \n              \"_to\" : \"persons/325992871\" \n            }, \n            { \n              \"_id\" : \"knows/328024487\", \n              \"_rev\" : \"328024487\", \n              \"_key\" : \"328024487\", \n              \"_from\" : \"persons/326910375\", \n              \"_to\" : \"persons/326255015\" \n            }, \n            { \n              \"_id\" : \"knows/327434663\", \n              \"_rev\" : \"327434663\", \n              \"_key\" : \"327434663\", \n              \"_from\" : \"persons/326255015\", \n              \"_to\" : \"persons/326517159\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/325992871\", \n              \"_rev\" : \"325992871\", \n              \"_key\" : \"325992871\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/326910375\", \n              \"_rev\" : \"326910375\", \n              \"_key\" : \"326910375\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/326255015\", \n              \"_rev\" : \"326255015\", \n              \"_key\" : \"326255015\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/326517159\", \n              \"_rev\" : \"326517159\", \n              \"_key\" : \"326517159\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/327827879\", \n              \"_rev\" : \"327827879\", \n              \"_key\" : \"327827879\", \n              \"_from\" : \"persons/326910375\", \n              \"_to\" : \"persons/325992871\" \n            }, \n            { \n              \"_id\" : \"knows/328024487\", \n              \"_rev\" : \"328024487\", \n              \"_key\" : \"328024487\", \n              \"_from\" : \"persons/326910375\", \n              \"_to\" : \"persons/326255015\" \n            }, \n            { \n              \"_id\" : \"knows/327631271\", \n              \"_rev\" : \"327631271\", \n              \"_key\" : \"327631271\", \n              \"_from\" : \"persons/326255015\", \n              \"_to\" : \"persons/326713767\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/325992871\", \n              \"_rev\" : \"325992871\", \n              \"_key\" : \"325992871\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/326910375\", \n              \"_rev\" : \"326910375\", \n              \"_key\" : \"326910375\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/326255015\", \n              \"_rev\" : \"326255015\", \n              \"_key\" : \"326255015\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/326713767\", \n              \"_rev\" : \"326713767\", \n              \"_key\" : \"326713767\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/327827879\", \n              \"_rev\" : \"327827879\", \n              \"_key\" : \"327827879\", \n              \"_from\" : \"persons/326910375\", \n              \"_to\" : \"persons/325992871\" \n            }, \n            { \n              \"_id\" : \"knows/328024487\", \n              \"_rev\" : \"328024487\", \n              \"_key\" : \"328024487\", \n              \"_from\" : \"persons/326910375\", \n              \"_to\" : \"persons/326255015\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/325992871\", \n              \"_rev\" : \"325992871\", \n              \"_key\" : \"325992871\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/326910375\", \n              \"_rev\" : \"326910375\", \n              \"_key\" : \"326910375\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/326255015\", \n              \"_rev\" : \"326255015\", \n              \"_key\" : \"326255015\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/327827879\", \n              \"_rev\" : \"327827879\", \n              \"_key\" : \"327827879\", \n              \"_from\" : \"persons/326910375\", \n              \"_to\" : \"persons/325992871\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/325992871\", \n              \"_rev\" : \"325992871\", \n              \"_key\" : \"325992871\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/326910375\", \n              \"_rev\" : \"326910375\", \n              \"_key\" : \"326910375\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/327172519\", \n              \"_rev\" : \"327172519\", \n              \"_key\" : \"327172519\", \n              \"_from\" : \"persons/325992871\", \n              \"_to\" : \"persons/326255015\" \n            }, \n            { \n              \"_id\" : \"knows/328024487\", \n              \"_rev\" : \"328024487\", \n              \"_key\" : \"328024487\", \n              \"_from\" : \"persons/326910375\", \n              \"_to\" : \"persons/326255015\" \n            }, \n            { \n              \"_id\" : \"knows/327827879\", \n              \"_rev\" : \"327827879\", \n              \"_key\" : \"327827879\", \n              \"_from\" : \"persons/326910375\", \n              \"_to\" : \"persons/325992871\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/325992871\", \n              \"_rev\" : \"325992871\", \n              \"_key\" : \"325992871\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/326255015\", \n              \"_rev\" : \"326255015\", \n              \"_key\" : \"326255015\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/326910375\", \n              \"_rev\" : \"326910375\", \n              \"_key\" : \"326910375\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/325992871\", \n              \"_rev\" : \"325992871\", \n              \"_key\" : \"325992871\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/327172519\", \n              \"_rev\" : \"327172519\", \n              \"_key\" : \"327172519\", \n              \"_from\" : \"persons/325992871\", \n              \"_to\" : \"persons/326255015\" \n            }, \n            { \n              \"_id\" : \"knows/328024487\", \n              \"_rev\" : \"328024487\", \n              \"_key\" : \"328024487\", \n              \"_from\" : \"persons/326910375\", \n              \"_to\" : \"persons/326255015\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/325992871\", \n              \"_rev\" : \"325992871\", \n              \"_key\" : \"325992871\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/326255015\", \n              \"_rev\" : \"326255015\", \n              \"_key\" : \"326255015\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/326910375\", \n              \"_rev\" : \"326910375\", \n              \"_key\" : \"326910375\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/327172519\", \n              \"_rev\" : \"327172519\", \n              \"_key\" : \"327172519\", \n              \"_from\" : \"persons/325992871\", \n              \"_to\" : \"persons/326255015\" \n            }, \n            { \n              \"_id\" : \"knows/327434663\", \n              \"_rev\" : \"327434663\", \n              \"_key\" : \"327434663\", \n              \"_from\" : \"persons/326255015\", \n              \"_to\" : \"persons/326517159\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/325992871\", \n              \"_rev\" : \"325992871\", \n              \"_key\" : \"325992871\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/326255015\", \n              \"_rev\" : \"326255015\", \n              \"_key\" : \"326255015\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/326517159\", \n              \"_rev\" : \"326517159\", \n              \"_key\" : \"326517159\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/327172519\", \n              \"_rev\" : \"327172519\", \n              \"_key\" : \"327172519\", \n              \"_from\" : \"persons/325992871\", \n              \"_to\" : \"persons/326255015\" \n            }, \n            { \n              \"_id\" : \"knows/327631271\", \n              \"_rev\" : \"327631271\", \n              \"_key\" : \"327631271\", \n              \"_from\" : \"persons/326255015\", \n              \"_to\" : \"persons/326713767\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/325992871\", \n              \"_rev\" : \"325992871\", \n              \"_key\" : \"325992871\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/326255015\", \n              \"_rev\" : \"326255015\", \n              \"_key\" : \"326255015\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/326713767\", \n              \"_rev\" : \"326713767\", \n              \"_key\" : \"326713767\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/327172519\", \n              \"_rev\" : \"327172519\", \n              \"_key\" : \"327172519\", \n              \"_from\" : \"persons/325992871\", \n              \"_to\" : \"persons/326255015\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/325992871\", \n              \"_rev\" : \"325992871\", \n              \"_key\" : \"325992871\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/326255015\", \n              \"_rev\" : \"326255015\", \n              \"_key\" : \"326255015\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/325992871\", \n              \"_rev\" : \"325992871\", \n              \"_key\" : \"325992871\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Using backward item-ordering:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/332218791\",\"edgeCollection\":\"knows\",\"direction\":\"any\",\"itemOrder\":\"backward\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/332218791\", \n          \"_rev\" : \"332218791\", \n          \"_key\" : \"332218791\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/332480935\", \n          \"_rev\" : \"332480935\", \n          \"_key\" : \"332480935\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/332939687\", \n          \"_rev\" : \"332939687\", \n          \"_key\" : \"332939687\", \n          \"name\" : \"Dave\" \n        }, \n        { \n          \"_id\" : \"persons/332743079\", \n          \"_rev\" : \"332743079\", \n          \"_key\" : \"332743079\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/333136295\", \n          \"_rev\" : \"333136295\", \n          \"_key\" : \"333136295\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/332218791\", \n          \"_rev\" : \"332218791\", \n          \"_key\" : \"332218791\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/333136295\", \n          \"_rev\" : \"333136295\", \n          \"_key\" : \"333136295\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/332480935\", \n          \"_rev\" : \"332480935\", \n          \"_key\" : \"332480935\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/332939687\", \n          \"_rev\" : \"332939687\", \n          \"_key\" : \"332939687\", \n          \"name\" : \"Dave\" \n        }, \n        { \n          \"_id\" : \"persons/332743079\", \n          \"_rev\" : \"332743079\", \n          \"_key\" : \"332743079\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/332218791\", \n          \"_rev\" : \"332218791\", \n          \"_key\" : \"332218791\", \n          \"name\" : \"Alice\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332218791\", \n              \"_rev\" : \"332218791\", \n              \"_key\" : \"332218791\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/333398439\", \n              \"_rev\" : \"333398439\", \n              \"_key\" : \"333398439\", \n              \"_from\" : \"persons/332218791\", \n              \"_to\" : \"persons/332480935\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332218791\", \n              \"_rev\" : \"332218791\", \n              \"_key\" : \"332218791\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/332480935\", \n              \"_rev\" : \"332480935\", \n              \"_key\" : \"332480935\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/333398439\", \n              \"_rev\" : \"333398439\", \n              \"_key\" : \"333398439\", \n              \"_from\" : \"persons/332218791\", \n              \"_to\" : \"persons/332480935\" \n            }, \n            { \n              \"_id\" : \"knows/333857191\", \n              \"_rev\" : \"333857191\", \n              \"_key\" : \"333857191\", \n              \"_from\" : \"persons/332480935\", \n              \"_to\" : \"persons/332939687\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332218791\", \n              \"_rev\" : \"332218791\", \n              \"_key\" : \"332218791\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/332480935\", \n              \"_rev\" : \"332480935\", \n              \"_key\" : \"332480935\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/332939687\", \n              \"_rev\" : \"332939687\", \n              \"_key\" : \"332939687\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/333398439\", \n              \"_rev\" : \"333398439\", \n              \"_key\" : \"333398439\", \n              \"_from\" : \"persons/332218791\", \n              \"_to\" : \"persons/332480935\" \n            }, \n            { \n              \"_id\" : \"knows/333660583\", \n              \"_rev\" : \"333660583\", \n              \"_key\" : \"333660583\", \n              \"_from\" : \"persons/332480935\", \n              \"_to\" : \"persons/332743079\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332218791\", \n              \"_rev\" : \"332218791\", \n              \"_key\" : \"332218791\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/332480935\", \n              \"_rev\" : \"332480935\", \n              \"_key\" : \"332480935\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/332743079\", \n              \"_rev\" : \"332743079\", \n              \"_key\" : \"332743079\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/333398439\", \n              \"_rev\" : \"333398439\", \n              \"_key\" : \"333398439\", \n              \"_from\" : \"persons/332218791\", \n              \"_to\" : \"persons/332480935\" \n            }, \n            { \n              \"_id\" : \"knows/334250407\", \n              \"_rev\" : \"334250407\", \n              \"_key\" : \"334250407\", \n              \"_from\" : \"persons/333136295\", \n              \"_to\" : \"persons/332480935\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332218791\", \n              \"_rev\" : \"332218791\", \n              \"_key\" : \"332218791\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/332480935\", \n              \"_rev\" : \"332480935\", \n              \"_key\" : \"332480935\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/333136295\", \n              \"_rev\" : \"333136295\", \n              \"_key\" : \"333136295\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/333398439\", \n              \"_rev\" : \"333398439\", \n              \"_key\" : \"333398439\", \n              \"_from\" : \"persons/332218791\", \n              \"_to\" : \"persons/332480935\" \n            }, \n            { \n              \"_id\" : \"knows/334250407\", \n              \"_rev\" : \"334250407\", \n              \"_key\" : \"334250407\", \n              \"_from\" : \"persons/333136295\", \n              \"_to\" : \"persons/332480935\" \n            }, \n            { \n              \"_id\" : \"knows/334053799\", \n              \"_rev\" : \"334053799\", \n              \"_key\" : \"334053799\", \n              \"_from\" : \"persons/333136295\", \n              \"_to\" : \"persons/332218791\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332218791\", \n              \"_rev\" : \"332218791\", \n              \"_key\" : \"332218791\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/332480935\", \n              \"_rev\" : \"332480935\", \n              \"_key\" : \"332480935\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/333136295\", \n              \"_rev\" : \"333136295\", \n              \"_key\" : \"333136295\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/332218791\", \n              \"_rev\" : \"332218791\", \n              \"_key\" : \"332218791\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/334053799\", \n              \"_rev\" : \"334053799\", \n              \"_key\" : \"334053799\", \n              \"_from\" : \"persons/333136295\", \n              \"_to\" : \"persons/332218791\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332218791\", \n              \"_rev\" : \"332218791\", \n              \"_key\" : \"332218791\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/333136295\", \n              \"_rev\" : \"333136295\", \n              \"_key\" : \"333136295\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/334053799\", \n              \"_rev\" : \"334053799\", \n              \"_key\" : \"334053799\", \n              \"_from\" : \"persons/333136295\", \n              \"_to\" : \"persons/332218791\" \n            }, \n            { \n              \"_id\" : \"knows/334250407\", \n              \"_rev\" : \"334250407\", \n              \"_key\" : \"334250407\", \n              \"_from\" : \"persons/333136295\", \n              \"_to\" : \"persons/332480935\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332218791\", \n              \"_rev\" : \"332218791\", \n              \"_key\" : \"332218791\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/333136295\", \n              \"_rev\" : \"333136295\", \n              \"_key\" : \"333136295\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/332480935\", \n              \"_rev\" : \"332480935\", \n              \"_key\" : \"332480935\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/334053799\", \n              \"_rev\" : \"334053799\", \n              \"_key\" : \"334053799\", \n              \"_from\" : \"persons/333136295\", \n              \"_to\" : \"persons/332218791\" \n            }, \n            { \n              \"_id\" : \"knows/334250407\", \n              \"_rev\" : \"334250407\", \n              \"_key\" : \"334250407\", \n              \"_from\" : \"persons/333136295\", \n              \"_to\" : \"persons/332480935\" \n            }, \n            { \n              \"_id\" : \"knows/333857191\", \n              \"_rev\" : \"333857191\", \n              \"_key\" : \"333857191\", \n              \"_from\" : \"persons/332480935\", \n              \"_to\" : \"persons/332939687\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332218791\", \n              \"_rev\" : \"332218791\", \n              \"_key\" : \"332218791\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/333136295\", \n              \"_rev\" : \"333136295\", \n              \"_key\" : \"333136295\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/332480935\", \n              \"_rev\" : \"332480935\", \n              \"_key\" : \"332480935\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/332939687\", \n              \"_rev\" : \"332939687\", \n              \"_key\" : \"332939687\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/334053799\", \n              \"_rev\" : \"334053799\", \n              \"_key\" : \"334053799\", \n              \"_from\" : \"persons/333136295\", \n              \"_to\" : \"persons/332218791\" \n            }, \n            { \n              \"_id\" : \"knows/334250407\", \n              \"_rev\" : \"334250407\", \n              \"_key\" : \"334250407\", \n              \"_from\" : \"persons/333136295\", \n              \"_to\" : \"persons/332480935\" \n            }, \n            { \n              \"_id\" : \"knows/333660583\", \n              \"_rev\" : \"333660583\", \n              \"_key\" : \"333660583\", \n              \"_from\" : \"persons/332480935\", \n              \"_to\" : \"persons/332743079\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332218791\", \n              \"_rev\" : \"332218791\", \n              \"_key\" : \"332218791\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/333136295\", \n              \"_rev\" : \"333136295\", \n              \"_key\" : \"333136295\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/332480935\", \n              \"_rev\" : \"332480935\", \n              \"_key\" : \"332480935\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/332743079\", \n              \"_rev\" : \"332743079\", \n              \"_key\" : \"332743079\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/334053799\", \n              \"_rev\" : \"334053799\", \n              \"_key\" : \"334053799\", \n              \"_from\" : \"persons/333136295\", \n              \"_to\" : \"persons/332218791\" \n            }, \n            { \n              \"_id\" : \"knows/334250407\", \n              \"_rev\" : \"334250407\", \n              \"_key\" : \"334250407\", \n              \"_from\" : \"persons/333136295\", \n              \"_to\" : \"persons/332480935\" \n            }, \n            { \n              \"_id\" : \"knows/333398439\", \n              \"_rev\" : \"333398439\", \n              \"_key\" : \"333398439\", \n              \"_from\" : \"persons/332218791\", \n              \"_to\" : \"persons/332480935\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/332218791\", \n              \"_rev\" : \"332218791\", \n              \"_key\" : \"332218791\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/333136295\", \n              \"_rev\" : \"333136295\", \n              \"_key\" : \"333136295\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/332480935\", \n              \"_rev\" : \"332480935\", \n              \"_key\" : \"332480935\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/332218791\", \n              \"_rev\" : \"332218791\", \n              \"_key\" : \"332218791\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Edges should only be included once globally, but nodes are included every time they are visited:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/338444711\",\"edgeCollection\":\"knows\",\"direction\":\"any\",\"uniqueness\":{\"vertices\":\"none\",\"edges\":\"global\"}}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/338444711\", \n          \"_rev\" : \"338444711\", \n          \"_key\" : \"338444711\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/339362215\", \n          \"_rev\" : \"339362215\", \n          \"_key\" : \"339362215\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/338706855\", \n          \"_rev\" : \"338706855\", \n          \"_key\" : \"338706855\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/338444711\", \n          \"_rev\" : \"338444711\", \n          \"_key\" : \"338444711\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/338968999\", \n          \"_rev\" : \"338968999\", \n          \"_key\" : \"338968999\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/339165607\", \n          \"_rev\" : \"339165607\", \n          \"_key\" : \"339165607\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/338444711\", \n              \"_rev\" : \"338444711\", \n              \"_key\" : \"338444711\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/340279719\", \n              \"_rev\" : \"340279719\", \n              \"_key\" : \"340279719\", \n              \"_from\" : \"persons/339362215\", \n              \"_to\" : \"persons/338444711\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/338444711\", \n              \"_rev\" : \"338444711\", \n              \"_key\" : \"338444711\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/339362215\", \n              \"_rev\" : \"339362215\", \n              \"_key\" : \"339362215\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/340279719\", \n              \"_rev\" : \"340279719\", \n              \"_key\" : \"340279719\", \n              \"_from\" : \"persons/339362215\", \n              \"_to\" : \"persons/338444711\" \n            }, \n            { \n              \"_id\" : \"knows/340476327\", \n              \"_rev\" : \"340476327\", \n              \"_key\" : \"340476327\", \n              \"_from\" : \"persons/339362215\", \n              \"_to\" : \"persons/338706855\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/338444711\", \n              \"_rev\" : \"338444711\", \n              \"_key\" : \"338444711\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/339362215\", \n              \"_rev\" : \"339362215\", \n              \"_key\" : \"339362215\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/338706855\", \n              \"_rev\" : \"338706855\", \n              \"_key\" : \"338706855\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/340279719\", \n              \"_rev\" : \"340279719\", \n              \"_key\" : \"340279719\", \n              \"_from\" : \"persons/339362215\", \n              \"_to\" : \"persons/338444711\" \n            }, \n            { \n              \"_id\" : \"knows/340476327\", \n              \"_rev\" : \"340476327\", \n              \"_key\" : \"340476327\", \n              \"_from\" : \"persons/339362215\", \n              \"_to\" : \"persons/338706855\" \n            }, \n            { \n              \"_id\" : \"knows/339624359\", \n              \"_rev\" : \"339624359\", \n              \"_key\" : \"339624359\", \n              \"_from\" : \"persons/338444711\", \n              \"_to\" : \"persons/338706855\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/338444711\", \n              \"_rev\" : \"338444711\", \n              \"_key\" : \"338444711\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/339362215\", \n              \"_rev\" : \"339362215\", \n              \"_key\" : \"339362215\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/338706855\", \n              \"_rev\" : \"338706855\", \n              \"_key\" : \"338706855\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/338444711\", \n              \"_rev\" : \"338444711\", \n              \"_key\" : \"338444711\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/340279719\", \n              \"_rev\" : \"340279719\", \n              \"_key\" : \"340279719\", \n              \"_from\" : \"persons/339362215\", \n              \"_to\" : \"persons/338444711\" \n            }, \n            { \n              \"_id\" : \"knows/340476327\", \n              \"_rev\" : \"340476327\", \n              \"_key\" : \"340476327\", \n              \"_from\" : \"persons/339362215\", \n              \"_to\" : \"persons/338706855\" \n            }, \n            { \n              \"_id\" : \"knows/339886503\", \n              \"_rev\" : \"339886503\", \n              \"_key\" : \"339886503\", \n              \"_from\" : \"persons/338706855\", \n              \"_to\" : \"persons/338968999\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/338444711\", \n              \"_rev\" : \"338444711\", \n              \"_key\" : \"338444711\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/339362215\", \n              \"_rev\" : \"339362215\", \n              \"_key\" : \"339362215\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/338706855\", \n              \"_rev\" : \"338706855\", \n              \"_key\" : \"338706855\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/338968999\", \n              \"_rev\" : \"338968999\", \n              \"_key\" : \"338968999\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/340279719\", \n              \"_rev\" : \"340279719\", \n              \"_key\" : \"340279719\", \n              \"_from\" : \"persons/339362215\", \n              \"_to\" : \"persons/338444711\" \n            }, \n            { \n              \"_id\" : \"knows/340476327\", \n              \"_rev\" : \"340476327\", \n              \"_key\" : \"340476327\", \n              \"_from\" : \"persons/339362215\", \n              \"_to\" : \"persons/338706855\" \n            }, \n            { \n              \"_id\" : \"knows/340083111\", \n              \"_rev\" : \"340083111\", \n              \"_key\" : \"340083111\", \n              \"_from\" : \"persons/338706855\", \n              \"_to\" : \"persons/339165607\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/338444711\", \n              \"_rev\" : \"338444711\", \n              \"_key\" : \"338444711\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/339362215\", \n              \"_rev\" : \"339362215\", \n              \"_key\" : \"339362215\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/338706855\", \n              \"_rev\" : \"338706855\", \n              \"_key\" : \"338706855\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/339165607\", \n              \"_rev\" : \"339165607\", \n              \"_key\" : \"339165607\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

If the underlying graph is cyclic, maxIterations should be set: The underlying graph has two vertices Alice and Bob. With the directed edges: - Alice knows Bob _ Bob knows Alice

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/343687591\",\"edgeCollection\":\"knows\",\"direction\":\"any\",\"uniqueness\":{\"vertices\":\"none\",\"edges\":\"none\"},\"maxIterations\":5}\n\nHTTP/1.1 500 Internal Error\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 500, \n  \"errorNum\" : 1909, \n  \"errorMessage\" : \"too many iterations\" \n}\n\n

", "nickname": "executesATraversal" } ],