diff --git a/CHANGELOG b/CHANGELOG index f0318ded75..f8c0345638 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,55 @@ -v2.2.1 (XXXX-XX-XX) +v2.2.2-rc1 (XXXX-XX-XX) +------------------- + +* allow storing non-reserved attribute names starting with an underscore + + Previous versions of ArangoDB parsed away all attribute names that started with an + underscore (e.g. `_test', '_foo', `_bar`) on all levels of a document (root level + and sub-attribute levels). While this behavior was documented, it was unintuitive and + prevented storing documents inside other documents, e.g.: + + { + "_key" : "foo", + "_type" : "mydoc", + "references" : [ + { + "_key" : "something", + "_rev" : "...", + "value" : 1 + }, + { + "_key" : "something else", + "_rev" : "...", + "value" : 2 + } + ] + } + + In the above example, previous versions of ArangoDB removed all attributes and + sub-attributes that started with underscores, meaning the embedded documents would lose + some of their attributes. 2.2.2 should preserve such attributes, and will also allow + storing user-defined attribute names on the top-level even if they start with underscores + (such as `_type` in the above example). + +* fix conversion of JavaScript String, Number and Boolean objects to JSON. + + Objects created in JavaScript using `new Number(...)`, `new String(...)`, or + `new Boolean(...)` were not converted to JSON correctly. + +* fixed a race condition on task registration (i.e. `require("org/arangodb/tasks").register()`) + + this race condition led to undefined behavior when a just-created task with no offset and + no period was instantly executed and deleted by the task scheduler, before the `register` + function returned to the caller. + +* changed run-tests.sh to execute all suitable tests. + +* switch to new version of gyp + +* fixed upgrade button + + +v2.2.1 (2014-07-24) ------------------- * fixed hanging write-ahead log recovery for certain cases that involved dropping @@ -6,6 +57,10 @@ v2.2.1 (XXXX-XX-XX) * fixed issue with --check-version: when creating a new database the check failed +* issue #947 Foxx applicationContext missing some properties + +* fixed issue with --check-version: when creating a new database the check failed + * added startup option `--wal.suppress-shape-information` Setting this option to `true` will reduce memory and disk space usage and require diff --git a/Documentation/Books/Users/Arangoimp/README.mdpp b/Documentation/Books/Users/Arangoimp/README.mdpp index c9e2893f8c..083d1ad68a 100644 --- a/Documentation/Books/Users/Arangoimp/README.mdpp +++ b/Documentation/Books/Users/Arangoimp/README.mdpp @@ -220,14 +220,9 @@ ArangoDB: - *_rev*: this attribute contains the revision number of a document. However, the revision numbers are managed by ArangoDB and cannot be specified on import. Thus any value in this attribute is ignored on import. -- all other attributes starting with an underscore are discarded on import without - any warnings. If you import values into *_key*, you should make sure they are valid and unique. When importing data into an edge collection, you should make sure that all import documents can *_from* and *_to* and that their values point to existing documents. -Finally you should make sure that all other attributes in the import file do not -start with an underscore - otherwise they might be discarded. - diff --git a/Documentation/Books/Users/NamingConventions/AttributeNames.mdpp b/Documentation/Books/Users/NamingConventions/AttributeNames.mdpp index f46a9bb467..99bded4e9c 100644 --- a/Documentation/Books/Users/NamingConventions/AttributeNames.mdpp +++ b/Documentation/Books/Users/NamingConventions/AttributeNames.mdpp @@ -15,8 +15,8 @@ following attribute naming constraints are not violated: attributes are used to reference other documents. More system attributes may be added in the future without further notice so - end users should not use attribute names starting with an underscore for their - own attributes. + end users should try to avoid using their own attribute names starting with + underscores. * Attribute names should not start with the at-mark (*@*). The at-mark at the start of attribute names is reserved in ArangoDB for future use cases. @@ -39,16 +39,15 @@ following attribute naming constraints are not violated: length is variable and depends on the number and data types of attributes used. * Attribute names are case-sensitive. -* Attributes with empty names (the empty string) and attributes with names that - start with an underscore and don't have a special meaning (system attributes) - are removed from the document when saving it. +* Attributes with empty names (the empty string) are removed from the document + when saving it. When the document is later requested, it will be returned without these attributes. For example, if this document is saved: - { "a" : 1, "" : 2, "_test" : 3, "b": 4 } + { "a" : 1, "" : 2, "b": 3 } and later requested, it will be returned like this: - { "a" : 1, "b": 4 } + { "a" : 1, "b": 3 } diff --git a/UnitTests/HttpInterface/api-attributes-spec.rb b/UnitTests/HttpInterface/api-attributes-spec.rb index ad081b76b0..9648a1cf81 100644 --- a/UnitTests/HttpInterface/api-attributes-spec.rb +++ b/UnitTests/HttpInterface/api-attributes-spec.rb @@ -89,7 +89,8 @@ describe ArangoDB do doc.parsed_response['_rev'].should_not eq('99') doc.parsed_response.should_not have_key('_from') doc.parsed_response.should_not have_key('_to') - doc.parsed_response.should_not have_key('_test') + doc.parsed_response.should have_key('_test') + doc.parsed_response['_test'].should eq('c') doc.parsed_response.should have_key('meow') doc.parsed_response['meow'].should eq('d') doc.parsed_response['foo'].should eq('002') @@ -101,7 +102,7 @@ describe ArangoDB do it "creates a document with nested attribute names" do cmd = api + "?collection=" + @cn - body = "{ \"a\" : \"1\", \"b\" : { \"b\" : \"2\" , \"a\" : \"3\", \"\": \"4\", \"_from\": \"5\", \"c\" : 6 } }" + body = "{ \"a\" : \"1\", \"b\" : { \"b\" : \"2\" , \"a\" : \"3\", \"\": \"4\", \"_key\": \"moetoer\", \"_from\": \"5\", \"_lol\" : false, \"c\" : 6 } }" doc = ArangoDB.log_post("#{prefix}-create-duplicate-names", cmd, :body => body) doc.code.should eq(201) @@ -118,11 +119,13 @@ describe ArangoDB do doc.parsed_response.should have_key('b') doc.parsed_response['b'].should_not have_key('') - doc.parsed_response['b'].should_not have_key('_from') + doc.parsed_response['b'].should have_key('_from') + doc.parsed_response['b'].should have_key('_key') + doc.parsed_response['b'].should have_key('_lol') doc.parsed_response['b'].should have_key('b') doc.parsed_response['b'].should have_key('a') doc.parsed_response['b'].should have_key('c') - doc.parsed_response['b'].should eq({ "b" => "2", "a" => "3", "c" => 6 }) + doc.parsed_response['b'].should eq({ "b" => "2", "a" => "3", "_key" => "moetoer", "_from" => "5", "_lol" => false, "c" => 6 }) end ################################################################################ diff --git a/arangod/RestHandler/RestDocumentHandler.cpp b/arangod/RestHandler/RestDocumentHandler.cpp index 5a65a54ffc..b626212206 100644 --- a/arangod/RestHandler/RestDocumentHandler.cpp +++ b/arangod/RestHandler/RestDocumentHandler.cpp @@ -429,7 +429,7 @@ bool RestDocumentHandler::readDocument () { /// @startDocuBlock REST_DOCUMENT_READ /// @brief reads a single document /// -/// @RESTHEADER{GET /_api/document/document-handle,Read document} +/// @RESTHEADER{GET /_api/document/{document-handle},Read document} /// /// @RESTURLPARAMETERS /// @@ -835,7 +835,7 @@ bool RestDocumentHandler::getAllDocumentsCoordinator ( /// @startDocuBlock REST_DOCUMENT_READ_HEAD /// @brief reads a single document head /// -/// @RESTHEADER{HEAD /_api/document/document-handle,Read document header} +/// @RESTHEADER{HEAD /_api/document/{document-handle},Read document header} /// /// @RESTURLPARAMETERS /// @@ -917,7 +917,7 @@ bool RestDocumentHandler::checkDocument () { /// @startDocuBlock REST_DOCUMENT_REPLACE /// @brief replaces a document /// -/// @RESTHEADER{PUT /_api/document/document-handle,Replace document} +/// @RESTHEADER{PUT /_api/document/{document-handle},Replace document} /// /// @RESTBODYPARAM{document,json,required} /// A JSON representation of the new document. @@ -1138,7 +1138,7 @@ bool RestDocumentHandler::replaceDocument () { /// @startDocuBlock REST_DOCUMENT_UPDATE /// @brief updates a document /// -/// @RESTHEADER{PATCH /_api/document/document-handle, Patch document} +/// @RESTHEADER{PATCH /_api/document/{document-handle}, Patch document} /// /// @RESTBODYPARAM{document,json,required} /// A JSON representation of the document update. @@ -1554,7 +1554,7 @@ bool RestDocumentHandler::modifyDocumentCoordinator ( /// @startDocuBlock REST_DOCUMENT_DELETE /// @brief deletes a document /// -/// @RESTHEADER{DELETE /_api/document/document-handle, Deletes document} +/// @RESTHEADER{DELETE /_api/document/{document-handle}, Deletes document} /// /// @RESTURLPARAMETERS /// diff --git a/arangod/RestHandler/RestEdgeHandler.cpp b/arangod/RestHandler/RestEdgeHandler.cpp index e2643d77a4..edaf509c09 100644 --- a/arangod/RestHandler/RestEdgeHandler.cpp +++ b/arangod/RestHandler/RestEdgeHandler.cpp @@ -353,7 +353,7 @@ bool RestEdgeHandler::createDocumentCoordinator (string const& collname, /// @startDocuBlock API_EDGE_READ /// @brief reads a single edge /// -/// @RESTHEADER{GET /_api/edge/document-handle, Read edge} +/// @RESTHEADER{GET /_api/edge/{document-handle}, Read edge} /// /// @RESTURLPARAMETERS /// @@ -433,7 +433,7 @@ bool RestEdgeHandler::createDocumentCoordinator (string const& collname, /// @startDocuBlock API_EDGE_READ_HEAD /// @brief reads a single edge head /// -/// @RESTHEADER{HEAD /_api/edge/document-handle, Read edge header} +/// @RESTHEADER{HEAD /_api/edge/{document-handle}, Read edge header} /// /// @RESTURLPARAMETERS /// @@ -480,7 +480,7 @@ bool RestEdgeHandler::createDocumentCoordinator (string const& collname, /// @startDocuBlock API_EDGE_REPLACE /// @brief replaces an edge /// -/// @RESTHEADER{PUT /_api/edge/document-handle,replaces an edge} +/// @RESTHEADER{PUT /_api/edge/{document-handle},replaces an edge} /// /// @RESTBODYPARAM{edge,json,required} /// A JSON representation of the new edge data. @@ -608,7 +608,7 @@ bool RestEdgeHandler::createDocumentCoordinator (string const& collname, /// @startDocuBlock API_EDGE_UPDATES /// @brief updates an edge /// -/// @RESTHEADER{PATCH /_api/edge/document-handle, Patches edge} +/// @RESTHEADER{PATCH /_api/edge/{document-handle}, Patches edge} /// /// @RESTBODYPARAM{document,json,required} /// A JSON representation of the edge update. @@ -712,7 +712,7 @@ bool RestEdgeHandler::createDocumentCoordinator (string const& collname, /// @startDocuBlock API_EDGE_DELETE /// @brief deletes an edge /// -/// @RESTHEADER{DELETE /_api/edge/document-handle, Deletes edge} +/// @RESTHEADER{DELETE /_api/edge/{document-handle}, Deletes edge} /// /// @RESTURLPARAMETERS /// diff --git a/arangod/RestHandler/RestReplicationHandler.cpp b/arangod/RestHandler/RestReplicationHandler.cpp index 2003be5f14..a59839b9d1 100644 --- a/arangod/RestHandler/RestReplicationHandler.cpp +++ b/arangod/RestHandler/RestReplicationHandler.cpp @@ -647,7 +647,7 @@ void RestReplicationHandler::handleCommandLoggerSetConfig () { //////////////////////////////////////////////////////////////////////////////// /// @brief handle a dump batch command /// -/// @RESTHEADER{PUT /_api/replication/batch/id, Prolong existing dump batch} +/// @RESTHEADER{PUT /_api/replication/batch/{id}, Prolong existing dump batch} /// /// @RESTBODYPARAM{body,json,required} /// A JSON object with the batch configration. @@ -687,7 +687,7 @@ void RestReplicationHandler::handleCommandLoggerSetConfig () { //////////////////////////////////////////////////////////////////////////////// /// @brief handle a dump batch command /// -/// @RESTHEADER{DELETE /_api/replication/batch/id, Deletes an existing dump batch} +/// @RESTHEADER{DELETE /_api/replication/batch/{id}, Deletes an existing dump batch} /// /// @RESTURLPARAMETERS /// diff --git a/arangod/V8Server/v8-vocbase.cpp b/arangod/V8Server/v8-vocbase.cpp index 68f6e43a88..6e8f428518 100644 --- a/arangod/V8Server/v8-vocbase.cpp +++ b/arangod/V8Server/v8-vocbase.cpp @@ -933,7 +933,7 @@ int ProcessBitarrayIndexFields (v8::Handle const obj, // "fields" is a list of fields v8::Handle fieldList = v8::Handle::Cast(obj->Get(TRI_V8_SYMBOL("fields"))); - const uint32_t n = fieldList->Length(); + uint32_t const n = fieldList->Length(); for (uint32_t i = 0; i < n; ++i) { if (! fieldList->Get(i)->IsArray()) { @@ -948,7 +948,7 @@ int ProcessBitarrayIndexFields (v8::Handle const obj, break; } - const string f = TRI_ObjectToString(fieldPair->Get(0)); + string const f = TRI_ObjectToString(fieldPair->Get(0)); if (f.empty() || (create && f[0] == '_')) { // accessing internal attributes is disallowed @@ -9903,7 +9903,17 @@ static v8::Handle MapGetNamedShapedJson (v8::Local name, v8::String::Utf8Value const str(name); string const key(*str, (size_t) str.length()); - if (key.empty() || key[0] == '_' || strchr(key.c_str(), '.') != 0) { + if (key.empty()) { + return scope.Close(v8::Handle()); + } + + if (key[0] == '_' && + (key == "_key" || key == "_rev" || key == "_id" || key == "_from" || key == "_to")) { + // strip reserved attributes + return scope.Close(v8::Handle()); + } + + if (strchr(key.c_str(), '.') != nullptr) { return scope.Close(v8::Handle()); } @@ -9954,7 +9964,7 @@ static v8::Handle KeysOfShapedJson (const v8::AccessorInfo& info) { // get shaped json void* marker = TRI_UnwrapClass(self, WRP_SHAPED_JSON_TYPE); - if (marker == 0) { + if (marker == nullptr) { return scope.Close(v8::Array::New()); } @@ -10000,7 +10010,7 @@ static v8::Handle KeysOfShapedJson (const v8::AccessorInfo& info) { } } - TRI_v8_global_t* v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); + TRI_v8_global_t* v8g = static_cast(v8::Isolate::GetCurrent()->GetData()); result->Set(count++, v8g->_IdKey); result->Set(count++, v8g->_RevKey); result->Set(count++, v8g->_KeyKey); @@ -10038,7 +10048,7 @@ static v8::Handle PropertyQueryShapedJson (v8::Local na } if (key[0] == '_') { - if (key == "_id" || key == TRI_VOC_ATTRIBUTE_REV || key == TRI_VOC_ATTRIBUTE_KEY) { + if (key == "_key" || key == "_rev" || key == "_id" || key == "_from" || key == "_to") { return scope.Close(v8::Handle(v8::Integer::New(v8::ReadOnly))); } } @@ -10069,7 +10079,7 @@ static v8::Handle PropertyQueryShapedJson (v8::Local na TRI_shape_access_t const* acc = TRI_FindAccessorVocShaper(shaper, sid, pid); // key not found - if (acc == 0 || acc->_resultSid == TRI_SHAPE_ILLEGAL) { + if (acc == nullptr || acc->_resultSid == TRI_SHAPE_ILLEGAL) { return scope.Close(v8::Handle()); } @@ -10172,7 +10182,7 @@ TRI_index_t* TRI_LookupIndexByHandle (CollectionNameResolver const* resolver, // extract the index identifier from an object else if (val->IsObject()) { - TRI_v8_global_t* v8g = (TRI_v8_global_t*) v8::Isolate::GetCurrent()->GetData(); + TRI_v8_global_t* v8g = static_cast(v8::Isolate::GetCurrent()->GetData()); v8::Handle obj = val->ToObject(); v8::Handle iidVal = obj->Get(v8g->IdKey); diff --git a/js/actions/api-aqlfunction.js b/js/actions/api-aqlfunction.js index b69406b6d6..2b4691b141 100644 --- a/js/actions/api-aqlfunction.js +++ b/js/actions/api-aqlfunction.js @@ -186,7 +186,7 @@ function post_api_aqlfunction (req, res) { /// @startDocuBlock JSF_delete_api_aqlfunction /// @brief remove an existing AQL user function /// -/// @RESTHEADER{DELETE /_api/aqlfunction/name, Remove existing AQL user function} +/// @RESTHEADER{DELETE /_api/aqlfunction/{name}, Remove existing AQL user function} /// /// @RESTURLPARAMETERS /// diff --git a/js/actions/api-cursor.js b/js/actions/api-cursor.js index c2b4a219f2..86dc1df6d2 100644 --- a/js/actions/api-cursor.js +++ b/js/actions/api-cursor.js @@ -379,7 +379,7 @@ function post_api_cursor(req, res) { /// @startDocuBlock JSF_post_api_cursor_identifier /// @brief return the next results from an existing cursor /// -/// @RESTHEADER{PUT /_api/cursor/cursor-identifier, Read next batch from cursor} +/// @RESTHEADER{PUT /_api/cursor/{cursor-identifier}, Read next batch from cursor} /// /// @RESTURLPARAMETERS /// @@ -501,7 +501,7 @@ function put_api_cursor (req, res) { /// @startDocuBlock JSF_post_api_cursor_delete /// @brief dispose an existing cursor /// -/// @RESTHEADER{DELETE /_api/cursor/cursor-identifier, Delete cursor} +/// @RESTHEADER{DELETE /_api/cursor/{cursor-identifier}, Delete cursor} /// /// @RESTURLPARAMETERS /// diff --git a/js/actions/api-database.js b/js/actions/api-database.js index 90274e3830..3a80a1a3b1 100644 --- a/js/actions/api-database.js +++ b/js/actions/api-database.js @@ -397,7 +397,7 @@ function post_api_database (req, res) { /// @startDocuBlock JSF_get_api_database_delete /// @brief drop an existing database /// -/// @RESTHEADER{DELETE /_api/database/database-name, Drop database} +/// @RESTHEADER{DELETE /_api/database/{database-name}, Drop database} /// /// @RESTURLPARAMETERS /// diff --git a/js/actions/api-edges.js b/js/actions/api-edges.js index e2d14662c1..113fb45e49 100644 --- a/js/actions/api-edges.js +++ b/js/actions/api-edges.js @@ -42,7 +42,7 @@ var API = "/_api/edges"; /// @startDocuBlock API_EDGE_READINOUTBOUND /// @brief get edges /// -/// @RESTHEADER{GET /_api/edges/collection-id, Read in- or outbound edges} +/// @RESTHEADER{GET /_api/edges/{collection-id}, Read in- or outbound edges} /// /// @RESTURLPARAMETERS /// diff --git a/js/actions/api-graph.js b/js/actions/api-graph.js index edac08ea08..1bacce2f9f 100644 --- a/js/actions/api-graph.js +++ b/js/actions/api-graph.js @@ -1223,13 +1223,16 @@ function post_graph_all_vertices (req, res, g) { //////////////////////////////////////////////////////////////////////////////// /// @brief get neighbors of a vertex /// -/// @RESTHEADER{POST /_api/graph/`graph-name`/vertices/`vertice-name`,get vertices} +/// @RESTHEADER{POST /_api/graph/`graph-name`/vertices/`vertex-name`,get vertices} /// /// @RESTURLPARAMETERS /// /// @RESTURLPARAM{graph-name,string,required} /// The name of the graph /// +/// @RESTURLPARAM{vertex-name,string,required} +/// The key of the vertex +/// /// @RESTBODYPARAM{graph,json,required} /// The call expects a JSON hash array as body to filter the result: /// diff --git a/js/apps/system/aardvark/api-docs.json b/js/apps/system/aardvark/api-docs.json index 37c0c6f8db..6776be0f5c 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": "2.0.0-rc1", + "apiVersion": "2.2.0", "apis": [ { "path": "api-docs/aqlfunction.{format}", diff --git a/js/apps/system/aardvark/api-docs/aqlfunction.json b/js/apps/system/aardvark/api-docs/aqlfunction.json index 4df918719b..b2db3981c1 100644 --- a/js/apps/system/aardvark/api-docs/aqlfunction.json +++ b/js/apps/system/aardvark/api-docs/aqlfunction.json @@ -22,10 +22,10 @@ } ], "notes": "Returns all registered AQL user functions.

The call will return a JSON list with all user functions found. Each user function will at least have the following attributes:

  • name: The fully qualified name of the user function
  • code: A string representation of the function body", - "summary": "returns registered AQL user functions", + "summary": " Return registered AQL user functions", "httpMethod": "GET", - "examples": "



    unix> curl --dump - http://localhost:8529/_api/aqlfunction\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n[ ]\n\n

    ", - "nickname": "returnsRegisteredAqlUserFunctions" + "examples": "



    shell> curl --data-binary @- --dump - http://localhost:8529/_api/aqlfunction\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n[ ]\n

    @endDocuBlock", + "nickname": "ReturnRegisteredAqlUserFunctions" } ], "path": "/_api/aqlfunction" @@ -57,10 +57,10 @@ } ], "notes": "

    The following data need to be passed in a JSON representation in the body of the POST request:

    • name: the fully qualified name of the user functions.
    • code: a string representation of the function body.
    • isDeterministic: an optional boolean value to indicate that the function results are fully deterministic (function return value solely depends on the input value and return value is the same for repeated calls with same input). The isDeterministic attribute is currently not used but may be used later for optimisations.
    In case of success, 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
    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", - "summary": "creates or replaces an AQL user function", + "summary": " Create AQL user function", "httpMethod": "POST", - "examples": "



      unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/aqlfunction\n{ \"name\" : \"myfunctions::temperature::celsiustofahrenheit\", \"code\" : \"function (celsius) { return celsius * 1.8 + 32; }\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

      ", - "nickname": "createsOrReplacesAnAqlUserFunction" + "examples": "



      shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/aqlfunction\n{ \"name\" : \"myfunctions::temperature::celsiustofahrenheit\", \"code\" : \"function (celsius) { return celsius * 1.8 + 32; }\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"code\" : 201 \n}\n

      @endDocuBlock", + "nickname": "CreateAqlUserFunction" } ], "path": "/_api/aqlfunction" @@ -99,10 +99,10 @@ } ], "notes": "

      Removes an existing AQL user function, identified by name.

      In case of success, 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
      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", - "summary": "remove an existing AQL user function", + "summary": " Remove existing AQL user function", "httpMethod": "DELETE", - "examples": "

        deletes a function:



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



        function not found:



        unix> curl -X DELETE --dump - http://localhost:8529/_api/aqlfunction/myfunction::x::y\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 404, \n  \"errorNum\" : 1582, \n  \"errorMessage\" : \"user function '%s()' not found\" \n}\n\n

        ", - "nickname": "removeAnExistingAqlUserFunction" + "examples": "

        deletes a function:



        shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/aqlfunction/square::x::y\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"code\" : 200 \n}\n



        function not found:



        shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/aqlfunction/myfunction::x::y\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 404, \n  \"errorNum\" : 1582, \n  \"errorMessage\" : \"user function '%s()' not found\" \n}\n

        @endDocuBlock", + "nickname": "RemoveExistingAqlUserFunction" } ], "path": "/_api/aqlfunction/{name}" diff --git a/js/apps/system/aardvark/api-docs/batch.json b/js/apps/system/aardvark/api-docs/batch.json index d3de6a9809..e900a78dd0 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.

        Please note that when constructing the individual batch parts, you must use CRLF (\\r\\n) as the line terminator as in regular HTTP messages.

        The response sent by the server will be an HTTP 200 response, with an optional error summary header x-arango-errors. This header contains the number of batch part operations that failed with an HTTP error code of at least 400. This header is only present in the response if the number of errors is greater than zero.

        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": "

        Sending a batch request with five batch parts:

        • GET /_api/version
        • DELETE /_api/collection/products
        • POST /_api/collection/products
        • GET /_api/collection/products/figures
        • DELETE /_api/collection/products
        The boundary (SomeBoundaryValue) is passed to the server in the HTTP Content-Type HTTP header.



        unix> curl -X POST --header 'Content-Type: multipart/form-data; boundary=SomeBoundaryValue' --data-binary @- --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: 43\r\n\r\n{\"server\":\"arango\",\"version\":\"2.1.0-devel\"}\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\":\"293945767\",\"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: 570\r\n\r\n{\"id\":\"293945767\",\"name\":\"products\",\"isSystem\":false,\"doCompact\":true,\"isVolatile\":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\":0,\"fileSize\":0},\"shapes\":{\"count\":0,\"size\":0},\"attributes\":{\"count\":0,\"size\":0},\"indexes\":{\"count\":1,\"size\":88}},\"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\":\"293945767\",\"error\":false,\"code\":200}\r\n--SomeBoundaryValue--\n\n



        Sending a batch request, setting the boundary implicitly (the server will in this case try to find the boundary at the beginning of the request body).



        unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/batch\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\n\r\nDELETE /_api/collection/notexisting1 HTTP/1.1\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\n\r\nDELETE /_api/collection/notexisting2 HTTP/1.1\r\n--SomeBoundaryValue--\r\n\n\nHTTP/1.1 200 OK\nx-arango-errors: 2\n\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\n\r\nHTTP/1.1 404 Not Found\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 92\r\n\r\n{\"error\":true,\"code\":404,\"errorNum\":1203,\"errorMessage\":\"unknown collection 'notexisting1'\"}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\n\r\nHTTP/1.1 404 Not Found\r\ncontent-type: application/json; charset=utf-8\r\ncontent-length: 92\r\n\r\n{\"error\":true,\"code\":404,\"errorNum\":1203,\"errorMessage\":\"unknown collection 'notexisting2'\"}\r\n--SomeBoundaryValue--\n\n

        ", + "examples": "

        Sending a batch request with five batch parts:

        • GET /_api/version
        • DELETE /_api/collection/products
        • POST /_api/collection/products
        • GET /_api/collection/products/figures
        • DELETE /_api/collection/products
        The boundary (SomeBoundaryValue) is passed to the server in the HTTP Content-Type HTTP header.



        shell> curl -X POST --header 'Content-Type: multipart/form-data; boundary=SomeBoundaryValue' --data-binary @- --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: 41\\r\\n\\r\\n{\\\"server\\\":\\\"arango\\\",\\\"version\\\":\\\"2.2.2-rc1\\\"}\\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: 138\\r\\n\\r\\n{\\\"id\\\":\\\"1215897094\\\",\\\"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: 618\\r\\n\\r\\n{\\\"id\\\":\\\"1215897094\\\",\\\"name\\\":\\\"products\\\",\\\"isSystem\\\":false,\\\"doCompact\\\":true,\\\"isVolatile\\\":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\\\":0,\\\"fileSize\\\":0},\\\"shapes\\\":{\\\"count\\\":0,\\\"size\\\":0},\\\"attributes\\\":{\\\"count\\\":0,\\\"size\\\":0},\\\"indexes\\\":{\\\"count\\\":1,\\\"size\\\":2008},\\\"lastTick\\\":\\\"0\\\",\\\"uncollectedLogfileEntries\\\":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: 44\\r\\n\\r\\n{\\\"id\\\":\\\"1215897094\\\",\\\"error\\\":false,\\\"code\\\":200}\\r\\n--SomeBoundaryValue--\"\n



        Sending a batch request, setting the boundary implicitly (the server will in this case try to find the boundary at the beginning of the request body).



        shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/batch\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\n\r\nDELETE /_api/collection/notexisting1 HTTP/1.1\r\n\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\n\r\nDELETE /_api/collection/notexisting2 HTTP/1.1\r\n--SomeBoundaryValue--\r\n\n\nHTTP/1.1 200 OK\nx-arango-errors: 2\n\n\"--SomeBoundaryValue\\r\\nContent-Type: application/x-arango-batchpart\\r\\n\\r\\nHTTP/1.1 404 Not Found\\r\\ncontent-type: application/json; charset=utf-8\\r\\ncontent-length: 92\\r\\n\\r\\n{\\\"error\\\":true,\\\"code\\\":404,\\\"errorNum\\\":1203,\\\"errorMessage\\\":\\\"unknown collection 'notexisting1'\\\"}\\r\\n--SomeBoundaryValue\\r\\nContent-Type: application/x-arango-batchpart\\r\\n\\r\\nHTTP/1.1 404 Not Found\\r\\ncontent-type: application/json; charset=utf-8\\r\\ncontent-length: 92\\r\\n\\r\\n{\\\"error\\\":true,\\\"code\\\":404,\\\"errorNum\\\":1203,\\\"errorMessage\\\":\\\"unknown collection 'notexisting2'\\\"}\\r\\n--SomeBoundaryValue--\"\n

        ", "nickname": "executesABatchRequest" } ], diff --git a/js/apps/system/aardvark/api-docs/collection.json b/js/apps/system/aardvark/api-docs/collection.json index d2a7e8716d..978577005a 100644 --- a/js/apps/system/aardvark/api-docs/collection.json +++ b/js/apps/system/aardvark/api-docs/collection.json @@ -16,11 +16,11 @@ "description": "the body with name and options for a collection.

        " } ], - "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
        • numberOfShards (optional, default is 1): in a cluster, this value determines the number of shards to create for the collection. In a single server setup, this option is meaningless.
        • shardKeys (optional, default is [ \"_key\" ]): in a cluster, this attribute determines which document attributes are used to determine the target shard for documents. Documents are sent to shards based on the values of their shard key attributes. The values of all shard key attributes in a document are hashed, and the hash value is used to determine the target shard. Note that values of shard key attributes cannot be changed once set. This option is meaningless in a single server setup.", - "summary": "creates a collection", + "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 configuration parameter): The maximal size of a journal or datafile.
          *Note*: 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
          • numberOfShards (optional, default is 1): in a cluster, this value determines the number of shards to create for the collection. In a single server setup, this option is meaningless.
          • shardKeys (optional, default is [ \"_key\" ]): in a cluster, this attribute determines which document attributes are used to determine the target shard for documents. Documents are sent to shards based on the values of their shard key attributes. The values of all shard key attributes in a document are hashed, and the hash value is used to determine the target shard.
          *Note*: Values of shard key attributes cannot be changed once set. This option is meaningless in a single server setup.", + "summary": " Create collection", "httpMethod": "POST", - "examples": "



          unix> curl -X POST --data-binary @- --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\" : \"42615207\", \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-binary @- --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\" : \"42680743\", \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-binary @- --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\" : \"42746279\", \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" + "examples": "



          shell> curl -X POST --data-binary @- --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\" : \"809311750\", \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}\nshell> curl -X POST --data-binary @- --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\" : \"809442822\", \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





          shell> curl -X POST --data-binary @- --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\" : \"809704966\", \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

          @endDocuBlock", + "nickname": "CreateCollection" } ], "path": "/_api/collection" @@ -41,7 +41,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\" : \"1458599\", \n      \"name\" : \"_routing\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"29376935\", \n      \"name\" : \"relation\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 3 \n    }, \n    { \n      \"id\" : \"3031463\", \n      \"name\" : \"_aal\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"1327527\", \n      \"name\" : \"_graphs\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"3555751\", \n      \"name\" : \"_replication\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"147879\", \n      \"name\" : \"_users\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"1524135\", \n      \"name\" : \"_cluster_kickstarter_plans\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"29245863\", \n      \"name\" : \"female\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"3424679\", \n      \"name\" : \"_aqlfunctions\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"1393063\", \n      \"name\" : \"_modules\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"3621287\", \n      \"name\" : \"_configuration\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"29311399\", \n      \"name\" : \"male\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"40780199\", \n      \"name\" : \"animals\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"39928231\", \n      \"name\" : \"demo\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"3490215\", \n      \"name\" : \"_trx\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    } \n  ], \n  \"names\" : { \n    \"_routing\" : { \n      \"id\" : \"1458599\", \n      \"name\" : \"_routing\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"relation\" : { \n      \"id\" : \"29376935\", \n      \"name\" : \"relation\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 3 \n    }, \n    \"_aal\" : { \n      \"id\" : \"3031463\", \n      \"name\" : \"_aal\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_graphs\" : { \n      \"id\" : \"1327527\", \n      \"name\" : \"_graphs\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_replication\" : { \n      \"id\" : \"3555751\", \n      \"name\" : \"_replication\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_users\" : { \n      \"id\" : \"147879\", \n      \"name\" : \"_users\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_cluster_kickstarter_plans\" : { \n      \"id\" : \"1524135\", \n      \"name\" : \"_cluster_kickstarter_plans\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"female\" : { \n      \"id\" : \"29245863\", \n      \"name\" : \"female\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_aqlfunctions\" : { \n      \"id\" : \"3424679\", \n      \"name\" : \"_aqlfunctions\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_modules\" : { \n      \"id\" : \"1393063\", \n      \"name\" : \"_modules\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_configuration\" : { \n      \"id\" : \"3621287\", \n      \"name\" : \"_configuration\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"male\" : { \n      \"id\" : \"29311399\", \n      \"name\" : \"male\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"animals\" : { \n      \"id\" : \"40780199\", \n      \"name\" : \"animals\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"demo\" : { \n      \"id\" : \"39928231\", \n      \"name\" : \"demo\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_trx\" : { \n      \"id\" : \"3490215\", \n      \"name\" : \"_trx\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

          ", + "examples": "

          Return information about all collections:



          shell> curl --data-binary @- --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\" : \"718151174\", \n      \"name\" : \"Electronics\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"3939846\", \n      \"name\" : \"_aqlfunctions\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"1711622\", \n      \"name\" : \"_modules\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"3481094\", \n      \"name\" : \"_aal\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"778575366\", \n      \"name\" : \"relation\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 3 \n    }, \n    { \n      \"id\" : \"807476742\", \n      \"name\" : \"animals\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"717626886\", \n      \"name\" : \"Customer\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"806559238\", \n      \"name\" : \"demo\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"802102790\", \n      \"name\" : \"frenchCity\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"718020102\", \n      \"name\" : \"Groceries\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"1580550\", \n      \"name\" : \"_graphs\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"778444294\", \n      \"name\" : \"male\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"1973766\", \n      \"name\" : \"_cluster_kickstarter_plans\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"387063302\", \n      \"name\" : \"_statisticsRaw\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"801971718\", \n      \"name\" : \"germanHighway\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 3 \n    }, \n    { \n      \"id\" : \"138758\", \n      \"name\" : \"_users\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"717889030\", \n      \"name\" : \"Company\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"387456518\", \n      \"name\" : \"_statistics\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"802364934\", \n      \"name\" : \"internationalHighway\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 3 \n    }, \n    { \n      \"id\" : \"623123974\", \n      \"name\" : \"better-example\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"718282246\", \n      \"name\" : \"has_bought\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 3 \n    }, \n    { \n      \"id\" : \"778313222\", \n      \"name\" : \"female\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"4070918\", \n      \"name\" : \"_configuration\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"1842694\", \n      \"name\" : \"_routing\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"387849734\", \n      \"name\" : \"_statistics15\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"801840646\", \n      \"name\" : \"germanCity\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"717757958\", \n      \"name\" : \"friend_of\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 3 \n    }, \n    { \n      \"id\" : \"802233862\", \n      \"name\" : \"frenchHighway\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 3 \n    } \n  ], \n  \"names\" : { \n    \"Electronics\" : { \n      \"id\" : \"718151174\", \n      \"name\" : \"Electronics\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_aqlfunctions\" : { \n      \"id\" : \"3939846\", \n      \"name\" : \"_aqlfunctions\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_modules\" : { \n      \"id\" : \"1711622\", \n      \"name\" : \"_modules\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_aal\" : { \n      \"id\" : \"3481094\", \n      \"name\" : \"_aal\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"relation\" : { \n      \"id\" : \"778575366\", \n      \"name\" : \"relation\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 3 \n    }, \n    \"animals\" : { \n      \"id\" : \"807476742\", \n      \"name\" : \"animals\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"Customer\" : { \n      \"id\" : \"717626886\", \n      \"name\" : \"Customer\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"demo\" : { \n      \"id\" : \"806559238\", \n      \"name\" : \"demo\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"frenchCity\" : { \n      \"id\" : \"802102790\", \n      \"name\" : \"frenchCity\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"Groceries\" : { \n      \"id\" : \"718020102\", \n      \"name\" : \"Groceries\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_graphs\" : { \n      \"id\" : \"1580550\", \n      \"name\" : \"_graphs\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"male\" : { \n      \"id\" : \"778444294\", \n      \"name\" : \"male\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_cluster_kickstarter_plans\" : { \n      \"id\" : \"1973766\", \n      \"name\" : \"_cluster_kickstarter_plans\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_statisticsRaw\" : { \n      \"id\" : \"387063302\", \n      \"name\" : \"_statisticsRaw\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"germanHighway\" : { \n      \"id\" : \"801971718\", \n      \"name\" : \"germanHighway\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 3 \n    }, \n    \"_users\" : { \n      \"id\" : \"138758\", \n      \"name\" : \"_users\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"Company\" : { \n      \"id\" : \"717889030\", \n      \"name\" : \"Company\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_statistics\" : { \n      \"id\" : \"387456518\", \n      \"name\" : \"_statistics\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"internationalHighway\" : { \n      \"id\" : \"802364934\", \n      \"name\" : \"internationalHighway\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 3 \n    }, \n    \"better-example\" : { \n      \"id\" : \"623123974\", \n      \"name\" : \"better-example\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"has_bought\" : { \n      \"id\" : \"718282246\", \n      \"name\" : \"has_bought\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 3 \n    }, \n    \"female\" : { \n      \"id\" : \"778313222\", \n      \"name\" : \"female\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_configuration\" : { \n      \"id\" : \"4070918\", \n      \"name\" : \"_configuration\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_routing\" : { \n      \"id\" : \"1842694\", \n      \"name\" : \"_routing\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_statistics15\" : { \n      \"id\" : \"387849734\", \n      \"name\" : \"_statistics15\", \n      \"isSystem\" : true, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"germanCity\" : { \n      \"id\" : \"801840646\", \n      \"name\" : \"germanCity\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"friend_of\" : { \n      \"id\" : \"717757958\", \n      \"name\" : \"friend_of\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 3 \n    }, \n    \"frenchHighway\" : { \n      \"id\" : \"802233862\", \n      \"name\" : \"frenchHighway\", \n      \"isSystem\" : false, \n      \"status\" : 3, \n      \"type\" : 3 \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n

          @endDocuBlock", "nickname": "readsAllCollections" } ], @@ -52,7 +52,7 @@ { "errorResponses": [ { - "reason": "If the collection-name is unknown, then a HTTP 404 is returned.

          ", + "reason": "If the collection-name is unknown, then a HTTP 404 is returned. @endDocuBlock", "code": "404" } ], @@ -66,10 +66,10 @@ } ], "notes": "The result is an object describing the collection with the following attributes:

          • id: The identifier of the collection.
          • name: The name of the collection.
          • status: The status of the collection as number.
          - 1: new born collection - 2: unloaded - 3: loaded - 4: in the process of being unloaded - 5: deleted

          Every other status indicates a corrupted collection.

          • type: The type of the collection as number. - 2: document collection (normal case) - 3: edges collection", - "summary": "returns information about a collection", + "summary": " Return information about a collection", "httpMethod": "GET", "examples": "", - "nickname": "returnsInformationAboutACollection" + "nickname": "ReturnInformationAboutACollection" } ], "path": "/_api/collection/{collection-name}" @@ -97,10 +97,10 @@ } ], "notes": "In addition to the above, the result will always contain the waitForSync, doCompact, journalSize, and isVolatile attributes. 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.
            In a cluster setup, the result will also contain the following attributes:
            • numberOfShards: the number of shards of the collection.
            • shardKeys: contains the names of document attributes that are used to determine the target shard for documents.", - "summary": "reads the properties of a collection", + "summary": " Read properties of a collection", "httpMethod": "GET", - "examples": "

              Using an identifier:



              unix> curl --dump - http://localhost:8529/_api/collection/42811815/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\" : \"42811815\", \n  \"name\" : \"products\", \n  \"isSystem\" : false, \n  \"doCompact\" : true, \n  \"isVolatile\" : 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\" : \"42877351\", \n  \"name\" : \"products\", \n  \"isSystem\" : false, \n  \"doCompact\" : true, \n  \"isVolatile\" : 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" + "examples": "

              Using an identifier:



              shell> curl --data-binary @- --dump - http://localhost:8529/_api/collection/809901574/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\" : \"809901574\", \n  \"name\" : \"products\", \n  \"isSystem\" : false, \n  \"doCompact\" : true, \n  \"isVolatile\" : 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



              Using a name:



              shell> curl --data-binary @- --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\" : \"810098182\", \n  \"name\" : \"products\", \n  \"isSystem\" : false, \n  \"doCompact\" : true, \n  \"isVolatile\" : 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

              @endDocuBlock", + "nickname": "ReadPropertiesOfACollection" } ], "path": "/_api/collection/{collection-name}/properties" @@ -127,11 +127,11 @@ "description": "The name of the collection.

              " } ], - "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", + "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": " Return 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/42942887/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\" : \"42942887\", \n  \"name\" : \"products\", \n  \"isSystem\" : false, \n  \"doCompact\" : true, \n  \"isVolatile\" : 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" + "examples": "

                  Requesting the number of documents:



                  shell> curl --data-binary @- --dump - http://localhost:8529/_api/collection/products/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\" : \"810294790\", \n  \"name\" : \"products\", \n  \"isSystem\" : false, \n  \"doCompact\" : true, \n  \"isVolatile\" : 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

                  @endDocuBlock", + "nickname": "ReturnNumberOfDocumentsInACollection" } ], "path": "/_api/collection/{collection-name}/count" @@ -158,11 +158,11 @@ "description": "The name of the collection.

                  " } ], - "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)
                  • figures.attributes.size: The total size used by all attribute names in the collection (this includes attributes that are not in use anymore)
                  • figures.indexes.count: The total number of indexes defined for the collection (this includes internal indexes such as the primary index)
                  • figures.indexes.size: The total memory allocated by the indexes in bytes
                  • 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", + "notes": "In addition to the above, the result also contains the number of documents and additional statistical information about the collection. *Note* : This will always load the collection into memory.

                  • count: The number of documents currently present in the collection.
                  *figures.alive.count: The number of curretly active documents in all datafiles and journals of the collection. Documents that are contained in the write-ahead log only are not reported in this figure.

                  *figures.alive.size: The total size in bytes used by all active documents of the collection. Documents that are contained in the write-ahead log only are not reported in this figure.

                  • figures.dead.count: The number of dead documents. This includes document versions that have been deleted or replaced by a newer version. Documents deleted or replaced that are contained the write-ahead log only are not reported in this figure.
                  *figures.dead.size: The total size in bytes used by all dead documents.

                  *figures.dead.deletion: The total number of deletion markers. Deletion markers only contained in the write-ahead log are not reporting in this figure.

                  • figures.datafiles.count: The number of datafiles.
                  • figures.datafiles.fileSize: The total filesize of datafiles (in bytes).
                  • figures.journals.count: The number of journal files.
                  • figures.journals.fileSize: The total filesize of all journal files (in bytes).
                  • figures.compactors.count: The number of compactor files.
                  • figures.compactors.fileSize: The total filesize of all compactor files (in bytes).
                  *figures.shapefiles.count: The number of shape files. This value is deprecated and kept for compatibility reasons only. The value will always be 0 since ArangoDB 2.0 and higher. *figures.shapefiles.fileSize: The total filesize of the shape files. This value is deprecated and kept for compatibility reasons only. The value will always be 0 in ArangoDB 2.0 and higher.

                  *figures.shapes.count: The total number of shapes used in the collection. This includes shapes that are not in use anymore. Shapes that are contained in the write-ahead log only are not reported in this figure. *figures.shapes.size: The total size of all shapes (in bytes). This includes shapes that are not in use anymore. Shapes that are contained in the write-ahead log only are not reported in this figure.

                  *figures.attributes.count: The total number of attributes used in the collection. Note: the value includes data of attributes that are not in use anymore. Attributes that are contained in the write-ahead log only are not reported in this figure. *figures.attributes.size: The total size of the attribute data (in bytes). Note: the value includes data of attributes that are not in use anymore. Attributes that are contained in the write-ahead log only are not reported in this figure.

                  *figures.indexes.count: The total number of indexes defined for the collection, including the pre-defined indexes (e.g. primary index).

                  *figures.indexes.size: The total memory allocated for indexes in bytes.

                  *figures.maxTick: The tick of the last marker that was stored in a journal of the collection. This might be 0 if the collection does not yet have a journal.

                  *figures.uncollectedLogfileEntries: The number of markers in the write-ahead log for this collection that have not been transferred to journals or datafiles.

                  • journalSize: The maximal size of the journal in bytes.
                  *Note*: collection data that are stored in the write-ahead log only are not reported in the results. When the write-ahead log is collected, documents might be added to journals and datafiles of the collection, which may modify the figures of the collection.

                  Additionally, 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": " Return statistics for a collection", "httpMethod": "GET", - "examples": "

                  Using an identifier and requesting the figures of the collection:



                  unix> curl --dump - http://localhost:8529/_api/collection/62931367/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\" : \"62931367\", \n  \"name\" : \"products\", \n  \"isSystem\" : false, \n  \"doCompact\" : true, \n  \"isVolatile\" : 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\" : 0, \n      \"fileSize\" : 0 \n    }, \n    \"shapes\" : { \n      \"count\" : 0, \n      \"size\" : 0 \n    }, \n    \"attributes\" : { \n      \"count\" : 0, \n      \"size\" : 0 \n    }, \n    \"indexes\" : { \n      \"count\" : 1, \n      \"size\" : 88 \n    } \n  }, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                  ", - "nickname": "returnsTheStatsForACollection" + "examples": "

                  Using an identifier and requesting the figures of the collection:



                  shell> curl --data-binary @- --dump - http://localhost:8529/_api/collection/products/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\" : \"830348806\", \n  \"name\" : \"products\", \n  \"isSystem\" : false, \n  \"doCompact\" : true, \n  \"isVolatile\" : false, \n  \"journalSize\" : 1048576, \n  \"keyOptions\" : { \n    \"type\" : \"traditional\", \n    \"allowUserKeys\" : true \n  }, \n  \"waitForSync\" : false, \n  \"count\" : 1, \n  \"figures\" : { \n    \"alive\" : { \n      \"count\" : 1, \n      \"size\" : 88 \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\" : 1, \n      \"fileSize\" : 1048576 \n    }, \n    \"compactors\" : { \n      \"count\" : 0, \n      \"fileSize\" : 0 \n    }, \n    \"shapefiles\" : { \n      \"count\" : 0, \n      \"fileSize\" : 0 \n    }, \n    \"shapes\" : { \n      \"count\" : 1, \n      \"size\" : 104 \n    }, \n    \"attributes\" : { \n      \"count\" : 1, \n      \"size\" : 48 \n    }, \n    \"indexes\" : { \n      \"count\" : 1, \n      \"size\" : 2008 \n    }, \n    \"lastTick\" : \"830742022\", \n    \"uncollectedLogfileEntries\" : 0 \n  }, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                  @endDocuBlock", + "nickname": "ReturnStatisticsForACollection" } ], "path": "/_api/collection/{collection-name}/figures" @@ -190,10 +190,10 @@ } ], "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", + "summary": " Return collection revision id", "httpMethod": "GET", - "examples": "

                    Retrieving the revision of a collection



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

                    ", - "nickname": "returnACollectionRevisionId" + "examples": "

                    Retrieving the revision of a collection



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

                    @endDocuBlock", + "nickname": "ReturnCollectionRevisionId" } ], "path": "/_api/collection/{collection-name}/revision" @@ -234,11 +234,11 @@ "description": "Whether or not to include document body data in the checksum calculation.

                    " } ], - "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.
                    Note: this method is not available in a cluster.

                    ", - "summary": "returns a checksum for the collection", + "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*: 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.
                    *Note*: this method is not available in a cluster.

                    ", + "summary": " Return checksum for the collection", "httpMethod": "GET", - "examples": "

                    Retrieving the checksum of a collection:



                    unix> curl --dump - http://localhost:8529/_api/collection/63259047/checksum\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"63259047\", \n  \"name\" : \"products\", \n  \"isSystem\" : false, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"checksum\" : 3678730771, \n  \"revision\" : \"63586727\", \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/63783335/checksum?withRevisions=false&withData=true\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"63783335\", \n  \"name\" : \"products\", \n  \"isSystem\" : false, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"checksum\" : 2330506211, \n  \"revision\" : \"64111015\", \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                    ", - "nickname": "returnsAChecksumForTheCollection" + "examples": "

                    Retrieving the checksum of a collection:



                    shell> curl --data-binary @- --dump - http://localhost:8529/_api/collection/products/checksum\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"831462918\", \n  \"name\" : \"products\", \n  \"isSystem\" : false, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"checksum\" : 938838784, \n  \"revision\" : \"831790598\", \n  \"error\" : false, \n  \"code\" : 200 \n}\n



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



                    shell> curl --data-binary @- --dump - http://localhost:8529/_api/collection/products/checksum?withRevisions=false&withData=true\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"832052742\", \n  \"name\" : \"products\", \n  \"isSystem\" : false, \n  \"status\" : 3, \n  \"type\" : 2, \n  \"checksum\" : 1461607571, \n  \"revision\" : \"832380422\", \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                    @endDocuBlock", + "nickname": "ReturnChecksumForTheCollection" } ], "path": "/_api/collection/{collection-name}/checksum" @@ -266,10 +266,10 @@ } ], "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", + "summary": " Load collection", "httpMethod": "PUT", - "examples": "



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

                      ", - "nickname": "loadsACollection" + "examples": "



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

                      @endDocuBlock", + "nickname": "LoadCollection" } ], "path": "/_api/collection/{collection-name}/load" @@ -297,10 +297,10 @@ } ], "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", + "summary": " Unload collection", "httpMethod": "PUT", - "examples": "



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

                        ", - "nickname": "unloadsACollection" + "examples": "



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

                        @endDocuBlock", + "nickname": "UnloadCollection" } ], "path": "/_api/collection/{collection-name}/unload" @@ -319,10 +319,10 @@ } ], "notes": "Removes all documents from the collection, but leaves the indexes intact.

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



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

                        ", - "nickname": "truncatesACollection" + "examples": "



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

                        @endDocuBlock", + "nickname": "TruncateCollection" } ], "path": "/_api/collection/{collection-name}/truncate" @@ -340,11 +340,11 @@ "description": "The name of the collection.

                        " } ], - "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, isVolatile, numberOfShards or shardKeys cannot be changed once a collection is created.

                        ", - "summary": "changes the properties of a collection", + "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, isVolatile, numberOfShards or shardKeys cannot be changed once a collection is created.

                        ", + "summary": " Change properties of a collection", "httpMethod": "PUT", - "examples": "



                        unix> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/collection/64635303/properties\n{\"waitForSync\":true}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"64635303\", \n  \"name\" : \"products\", \n  \"isSystem\" : false, \n  \"doCompact\" : true, \n  \"isVolatile\" : 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" + "examples": "



                        shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/collection/products/properties\n{ \n  \"waitForSync\" : true \n}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"833494534\", \n  \"name\" : \"products\", \n  \"isSystem\" : false, \n  \"doCompact\" : true, \n  \"isVolatile\" : 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

                        @endDocuBlock", + "nickname": "ChangePropertiesOfACollection" } ], "path": "/_api/collection/{collection-name}/properties" @@ -363,10 +363,10 @@ } ], "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", + "summary": " Rename collection", "httpMethod": "PUT", - "examples": "



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

                          ", - "nickname": "renamesACollection" + "examples": "



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

                          @endDocuBlock", + "nickname": "RenameCollection" } ], "path": "/_api/collection/{collection-name}/rename" @@ -393,11 +393,11 @@ "description": "The name of the collection.

                          " } ], - "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
                          Note: this method is not available in a cluster.

                          ", - "summary": "rotates the journal of a collection", + "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
                          *Note*: This method is not available in a cluster.

                          ", + "summary": " Rotate journal of a collection", "httpMethod": "PUT", - "examples": "

                          Rotating a journal:



                          unix> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/collection/64766375/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-binary @- --dump - http://localhost:8529/_api/collection/65225127/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" + "examples": "

                          Rotating a journal:



                          shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/collection/products/rotate\n{ \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



                          Rotating without a journal:



                          shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/collection/products/rotate\n{ \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

                          @endDocuBlock", + "nickname": "RotateJournalOfACollection" } ], "path": "/_api/collection/{collection-name}/rotate" @@ -425,10 +425,10 @@ } ], "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", + "summary": " Delete collection", "httpMethod": "DELETE", - "examples": "

                            Using an identifier:



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

                            ", - "nickname": "deletesACollection" + "examples": "

                            Using an identifier:



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



                            Using a name:



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

                            @endDocuBlock", + "nickname": "DeleteCollection" } ], "path": "/_api/collection/{collection-name}" diff --git a/js/apps/system/aardvark/api-docs/cursor.json b/js/apps/system/aardvark/api-docs/cursor.json index 7736e76711..0e10ab35ad 100644 --- a/js/apps/system/aardvark/api-docs/cursor.json +++ b/js/apps/system/aardvark/api-docs/cursor.json @@ -33,11 +33,11 @@ "description": "A JSON object describing the query and query parameters.

                            " } ], - "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", + "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.
                            • ttl: an optional time-to-live for the cursor (in seconds). The cursor will be removed on the server automatically after the specified amount of time. This is useful to ensure garbage collection of cursors that are not fully fetched by clients. If not set, a server-defined 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 optimizations 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. For data-modification queries, the extra attribute will contain the number of modified documents and the number of documents that could not be modified due to an error (if ignoreErrors query option is specified)
                            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 (../ArangoErrors/README.md) here.

                            ", + "summary": " Create cursor", "httpMethod": "POST", - "examples": "

                            Executes a query and extract the result in a single go:



                            unix> curl -X POST --data-binary @- --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/65749415\", \n      \"_rev\" : \"65749415\", \n      \"_key\" : \"65749415\", \n      \"hello1\" : \"world1\" \n    }, \n    { \n      \"_id\" : \"products/66077095\", \n      \"_rev\" : \"66077095\", \n      \"_key\" : \"66077095\", \n      \"hello2\" : \"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-binary @- --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/66929063\", \n      \"_rev\" : \"66929063\", \n      \"_key\" : \"66929063\", \n      \"hello2\" : \"world1\" \n    }, \n    { \n      \"_id\" : \"products/67584423\", \n      \"_rev\" : \"67584423\", \n      \"_key\" : \"67584423\", \n      \"hello4\" : \"world1\" \n    } \n  ], \n  \"hasMore\" : true, \n  \"id\" : \"68108711\", \n  \"count\" : 5, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n



                            Using a query option:



                            unix> curl -X POST --data-binary @- --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-binary @- --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" + "examples": "

                            Executes a query and extract the result in a single go:



                            shell> curl -X POST --data-binary @- --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/835657222\", \n      \"_rev\" : \"835657222\", \n      \"_key\" : \"835657222\", \n      \"hello1\" : \"world1\" \n    }, \n    { \n      \"_id\" : \"products/835984902\", \n      \"_rev\" : \"835984902\", \n      \"_key\" : \"835984902\", \n      \"hello2\" : \"world1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 2, \n  \"error\" : false, \n  \"code\" : 201 \n}\n



                            Executes a query and extracts part of the result:



                            shell> curl -X POST --data-binary @- --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/837885446\", \n      \"_rev\" : \"837885446\", \n      \"_key\" : \"837885446\", \n      \"hello5\" : \"world1\" \n    }, \n    { \n      \"_id\" : \"products/836902406\", \n      \"_rev\" : \"836902406\", \n      \"_key\" : \"836902406\", \n      \"hello2\" : \"world1\" \n    } \n  ], \n  \"hasMore\" : true, \n  \"id\" : \"838082054\", \n  \"count\" : 5, \n  \"error\" : false, \n  \"code\" : 201 \n}\n



                            Using a query option:



                            shell> curl -X POST --data-binary @- --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



                            Executes a data-modification query and retrieves the number of modified documents:



                            shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products REMOVE p IN products\"}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ ], \n  \"hasMore\" : false, \n  \"extra\" : { \n    \"operations\" : { \n      \"executed\" : 2, \n      \"ignored\" : 0 \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 201 \n}\n



                            Executes a data-modification query with option ignoreErrors:



                            shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"REMOVE 'bar' IN products OPTIONS { ignoreErrors: true }\"}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ ], \n  \"hasMore\" : false, \n  \"extra\" : { \n    \"operations\" : { \n      \"executed\" : 0, \n      \"ignored\" : 1 \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 201 \n}\n



                            Bad queries:

                            Missing body:



                            shell> 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



                            Unknown collection:



                            shell> curl -X POST --data-binary @- --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



                            Executes a data-modification query that attempts to remove a non-existing document:



                            shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"REMOVE 'foo' IN products\"}\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 404, \n  \"errorNum\" : 1202, \n  \"errorMessage\" : \"document not found\" \n}\n



                            @endDocuBlock", + "nickname": "CreateCursor" } ], "path": "/_api/cursor" @@ -51,7 +51,7 @@ "code": "200" }, { - "reason": "If the cursor identifier is ommitted, the server will respond with HTTP 404.

                            ", + "reason": "If the cursor identifier is omitted, the server will respond with HTTP 404.

                            ", "code": "400" }, { @@ -69,10 +69,10 @@ } ], "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", + "summary": " Read next batch from cursor", "httpMethod": "PUT", - "examples": "

                            Valid request for next batch:



                            unix> curl -X POST --data-binary @- --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/70074791\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"products/69222823\", \n      \"_rev\" : \"69222823\", \n      \"_key\" : \"69222823\", \n      \"hello3\" : \"world1\" \n    }, \n    { \n      \"_id\" : \"products/68567463\", \n      \"_rev\" : \"68567463\", \n      \"_key\" : \"68567463\", \n      \"hello1\" : \"world1\" \n    } \n  ], \n  \"hasMore\" : true, \n  \"id\" : \"70074791\", \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" + "examples": "

                            Valid request for next batch:



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



                            Missing identifier



                            shell> 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



                            Unknown identifier



                            shell> 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

                            @endDocuBlock", + "nickname": "ReadNextBatchFromCursor" } ], "path": "/_api/cursor/{cursor-identifier}" @@ -100,10 +100,10 @@ } ], "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", + "summary": " Delete cursor", "httpMethod": "DELETE", - "examples": "



                            unix> curl -X POST --data-binary @- --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/70795687\", \n      \"_rev\" : \"70795687\", \n      \"_key\" : \"70795687\", \n      \"hello2\" : \"world1\" \n    }, \n    { \n      \"_id\" : \"products/71123367\", \n      \"_rev\" : \"71123367\", \n      \"_key\" : \"71123367\", \n      \"hello3\" : \"world1\" \n    } \n  ], \n  \"hasMore\" : true, \n  \"id\" : \"71975335\", \n  \"count\" : 5, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/cursor/71975335\n\n

                            ", - "nickname": "deletesACursor" + "examples": "



                            shell> curl -X POST --data-binary @- --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/843980294\", \n      \"_rev\" : \"843980294\", \n      \"_key\" : \"843980294\", \n      \"hello3\" : \"world1\" \n    }, \n    { \n      \"_id\" : \"products/844307974\", \n      \"_rev\" : \"844307974\", \n      \"_key\" : \"844307974\", \n      \"hello4\" : \"world1\" \n    } \n  ], \n  \"hasMore\" : true, \n  \"id\" : \"844832262\", \n  \"count\" : 5, \n  \"error\" : false, \n  \"code\" : 201 \n}\nshell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/cursor/844832262\n\n

                            @endDocuBlock", + "nickname": "DeleteCursor" } ], "path": "/_api/cursor/{cursor-identifier}" diff --git a/js/apps/system/aardvark/api-docs/database.json b/js/apps/system/aardvark/api-docs/database.json index 0fbcd564ac..2392c9c573 100644 --- a/js/apps/system/aardvark/api-docs/database.json +++ b/js/apps/system/aardvark/api-docs/database.json @@ -21,11 +21,11 @@ } ], "parameters": [], - "notes": "Retrieves the list of all existing databases

                            Note: retrieving the list of databases is only possible from within the _system database.

                            ", - "summary": "retrieves a list of all existing databases", + "notes": "Retrieves the list of all existing databases

                            *Note*: retrieving the list of databases is only possible from within the _system database.

                            ", + "summary": " List of databases", "httpMethod": "GET", - "examples": "



                            unix> curl --dump - http://localhost:8529/_api/database\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    \"_system\" \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                            ", - "nickname": "retrievesAListOfAllExistingDatabases" + "examples": "



                            shell> curl --data-binary @- --dump - http://localhost:8529/_api/database\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    \"_system\" \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                            @endDocuBlock", + "nickname": "ListOfDatabases" } ], "path": "/_api/database" @@ -45,10 +45,10 @@ ], "parameters": [], "notes": "Retrieves the list of all databases the current user can access without specifying a different username or password.

                            ", - "summary": "retrieves a list of all databases the current user can access", + "summary": " List of accessible databases ", "httpMethod": "GET", - "examples": "



                            unix> curl --dump - http://localhost:8529/_api/database/user\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    \"_system\" \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                            ", - "nickname": "retrievesAListOfAllDatabasesTheCurrentUserCanAccess" + "examples": "



                            shell> curl --data-binary @- --dump - http://localhost:8529/_api/database/user\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    \"_system\" \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                            @endDocuBlock", + "nickname": "ListOfAccessibleDatabases" } ], "path": "/_api/database/user" @@ -72,10 +72,10 @@ ], "parameters": [], "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", + "summary": " Information of the 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.75134/databases/database-82343\", \n    \"isSystem\" : true \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                              ", - "nickname": "retrievesInformationAboutTheCurrentDatabase" + "examples": "



                              shell> curl --data-binary @- --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\" : \"73222\", \n    \"path\" : \"/tmp/vocdir.92357/databases/database-73222\", \n    \"isSystem\" : true \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                              @endDocuBlock", + "nickname": "InformationOfTheDatabase" } ], "path": "/_api/database/current" @@ -110,11 +110,11 @@ "description": "the body with the name of the database.

                              " } ], - "notes": "Creates a new database

                              The request body must be a JSON object with the attribute name. name must contain a valid the manual \"database name\".

                              The request body can optionally contain an attribute users, which then must be a list of user objects to initially create for the new database. Each user object can contain the following attributes:

                              • username: the user name as a string. This attribute is mandatory.
                              • passwd: the user password as a string. If not specified, then it defaults to the empty string.
                              • active: a boolean flag indicating whether the user accout should be actived or not. The default value is true.
                              • extra: an optional JSON object with extra user information. The data contained in extra will be stored for the user but not be interpreted further by ArangoDB.
                              If users is not specified or does not contain any users, a default user root will be created with an empty string password. This ensures that the new database will be accessible after it is created.

                              The response is a JSON object with the attribute result set to true.

                              Note: creating a new database is only possible from within the _system database.

                              ", - "summary": "creates a new database", + "notes": "Creates a new database

                              The request body must be a JSON object with the attribute name. name must contain a valid database name.

                              The request body can optionally contain an attribute users, which then must be a list of user objects to initially create for the new database. Each user object can contain the following attributes:

                              • username: the user name as a string. This attribute is mandatory.
                              • passwd: the user password as a string. If not specified, then it defaults to the empty string.
                              • active: a boolean flag indicating whether the user accout should be actived or not. The default value is true.
                              • extra: an optional JSON object with extra user information. The data contained in extra will be stored for the user but not be interpreted further by ArangoDB.
                              If users is not specified or does not contain any users, a default user root will be created with an empty string password. This ensures that the new database will be accessible after it is created.

                              The response is a JSON object with the attribute result set to true.

                              *Note*: creating a new database is only possible from within the _system database.

                              ", + "summary": " Create database", "httpMethod": "POST", - "examples": "

                              Creating a database named example.



                              unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/database\n{\"name\":\"example\"}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n



                              Creating a database named mydb with two users.



                              unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/database\n{\"name\":\"mydb\",\"users\":[{\"username\":\"admin\",\"passwd\":\"secret\",\"active\":true},{\"username\":\"tester\",\"passwd\":\"test001\",\"active\":false}]}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

                              ", - "nickname": "createsANewDatabase" + "examples": "

                              Creating a database named example.



                              shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/database\n{\"name\":\"example\"}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n



                              Creating a database named mydb with two users.



                              shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/database\n{\"name\":\"mydb\",\"users\":[{\"username\":\"admin\",\"passwd\":\"secret\",\"active\":true},{\"username\":\"tester\",\"passwd\":\"test001\",\"active\":false}]}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n

                              @endDocuBlock", + "nickname": "CreateDatabase" } ], "path": "/_api/database" @@ -149,11 +149,11 @@ "description": "The name of the database

                              " } ], - "notes": "Deletes the database along with all data stored in it.

                              Note: dropping a database is only possible from within the _system database. The _system database itself cannot be dropped.

                              ", - "summary": "drops an existing database", + "notes": "Deletes the database along with all data stored in it.

                              *Note*: dropping a database is only possible from within the _system database. The _system database itself cannot be dropped.

                              ", + "summary": " Drop database", "httpMethod": "DELETE", - "examples": "



                              unix> curl -X DELETE --dump - http://localhost:8529/_api/database/example\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

                              ", - "nickname": "dropsAnExistingDatabase" + "examples": "



                              shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/database/example\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

                              @endDocuBlock", + "nickname": "DropDatabase" } ], "path": "/_api/database/{database-name}" diff --git a/js/apps/system/aardvark/api-docs/document.json b/js/apps/system/aardvark/api-docs/document.json index c0d5184e40..46970aec4d 100644 --- a/js/apps/system/aardvark/api-docs/document.json +++ b/js/apps/system/aardvark/api-docs/document.json @@ -44,7 +44,7 @@ "paramType": "query", "required": "false", "name": "createCollection", - "description": "If this parameter has a value of true or yes, then the collection is created if it does not yet exist. Other values will be ignored so the collection must be present for the operation to succeed.

                              Note: this flag is not supported in a cluster. Using it will result in an error.

                              " + "description": "If this parameter has a value of true or yes, then the collection is created if it does not yet exist. Other values will be ignored so the collection must be present for the operation to succeed.

                              *Note*: this flag is not supported in a cluster. Using it will result in an error.

                              " }, { "dataType": "Boolean", @@ -55,10 +55,10 @@ } ], "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", + "summary": "Create 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-binary @- --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: \"294470055\"\nlocation: /_db/_system/_api/document/products/294470055\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/294470055\", \n  \"_rev\" : \"294470055\", \n  \"_key\" : \"294470055\" \n}\n\n



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



                              unix> curl -X POST --data-binary @- --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: \"294928807\"\nlocation: /_db/_system/_api/document/products/294928807\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/294928807\", \n  \"_rev\" : \"294928807\", \n  \"_key\" : \"294928807\" \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-binary @- --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: \"295387559\"\nlocation: /_db/_system/_api/document/products/295387559\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/295387559\", \n  \"_rev\" : \"295387559\", \n  \"_key\" : \"295387559\" \n}\n\n



                              Create a document in a new, named collection



                              unix> curl -X POST --data-binary @- --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: \"295846311\"\nlocation: /_db/_system/_api/document/products/295846311\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/295846311\", \n  \"_rev\" : \"295846311\", \n  \"_key\" : \"295846311\" \n}\n\n



                              Unknown collection name:



                              unix> curl -X POST --data-binary @- --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-binary @- --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" + "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.



                              shell> curl -X POST --data-binary @- --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: \"1216552454\"\nlocation: /_db/_system/_api/document/products/1216552454\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/1216552454\", \n  \"_rev\" : \"1216552454\", \n  \"_key\" : \"1216552454\" \n}\n



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



                              shell> curl -X POST --data-binary @- --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: \"1217076742\"\nlocation: /_db/_system/_api/document/products/1217076742\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/1217076742\", \n  \"_rev\" : \"1217076742\", \n  \"_key\" : \"1217076742\" \n}\n



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



                              shell> curl -X POST --data-binary @- --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: \"1217601030\"\nlocation: /_db/_system/_api/document/products/1217601030\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/1217601030\", \n  \"_rev\" : \"1217601030\", \n  \"_key\" : \"1217601030\" \n}\n



                              Create a document in a new, named collection



                              shell> curl -X POST --data-binary @- --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: \"1218125318\"\nlocation: /_db/_system/_api/document/products/1218125318\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/1218125318\", \n  \"_rev\" : \"1218125318\", \n  \"_key\" : \"1218125318\" \n}\n



                              Unknown collection name:



                              shell> curl -X POST --data-binary @- --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



                              Illegal document:



                              shell> curl -X POST --data-binary @- --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

                              @endDocuBlock", + "nickname": "CreateDocument" } ], "path": "/_api/document" @@ -106,10 +106,10 @@ } ], "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", + "summary": "Read document", "httpMethod": "GET", - "examples": "

                              Use a document handle:



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



                              Use a document handle and an etag:



                              unix> curl --header 'If-None-Match: \"296829351\"' --dump - http://localhost:8529/_api/document/products/296829351\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" + "examples": "

                              Use a document handle:



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



                              Use a document handle and an etag:



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



                              Unknown document handle:



                              shell> curl --data-binary @- --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

                              @endDocuBlock", + "nickname": "ReadDocument" } ], "path": "/_api/document/{document-handle}" @@ -137,10 +137,10 @@ } ], "notes": "Returns a list of all URI for all documents from the collection identified by collection.

                              ", - "summary": "reads all documents from collection", + "summary": "Read all documents", "httpMethod": "GET", - "examples": "

                              Returns a all ids.



                              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/298074535\", \n    \"/_api/document/products/297419175\", \n    \"/_api/document/products/297746855\" \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" + "examples": "

                              Returns a all ids.



                              shell> curl --data-binary @- --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/1220550150\", \n    \"/_api/document/products/1220222470\", \n    \"/_api/document/products/1219894790\" \n  ] \n}\n



                              Collection does not exist.



                              shell> curl --data-binary @- --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

                              @endDocuBlock", + "nickname": "ReadAllDocuments" } ], "path": "/_api/document" @@ -195,10 +195,10 @@ } ], "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", + "summary": "Read document header", "httpMethod": "HEAD", - "examples": "



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

                              ", - "nickname": "readsADocumentHeader" + "examples": "



                              shell> curl -X HEAD --data-binary @- --dump - http://localhost:8529/_api/document/products/1221139974\n\n

                              @endDocuBlock @endDocuBlock", + "nickname": "ReadDocumentHeader" } ], "path": "/_api/document/{document-handle}" @@ -271,11 +271,11 @@ "description": "You can conditionally replace a document based on a target revision id by using the if-match HTTP header.

                              " } ], - "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 can use 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", + "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 can use 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": "Replace document", "httpMethod": "PUT", - "examples": "

                              Using document handle:



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



                              Unknown document handle:



                              unix> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/299909543\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/299909543 not found\", \n  \"code\" : 404, \n  \"errorNum\" : 1202 \n}\n\n



                              Produce a revision conflict:



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



                              Last write wins:



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



                              Alternative to header field:



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

                              ", - "nickname": "replacesADocument" + "examples": "

                              Using document handle:



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



                              Unknown document handle:



                              shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1222581766\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/1222581766 not found\", \n  \"code\" : 404, \n  \"errorNum\" : 1202 \n}\n



                              Produce a revision conflict:



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



                              Last write wins:



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



                              Alternative to header field:



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

                              @endDocuBlock", + "nickname": "ReplaceDocument" } ], "path": "/_api/document/{document-handle}" @@ -356,10 +356,10 @@ } ], "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", + "summary": " Patch document", "httpMethod": "PATCH", - "examples": "

                              patches an existing document with new content.



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

                              ", - "nickname": "patchesADocument" + "examples": "

                              patches an existing document with new content.



                              shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1226841606\n{ \n  \"hello\" : \"world\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1227169286\"\nlocation: /_db/_system/_api/document/products/1226841606\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/1226841606\", \n  \"_rev\" : \"1227169286\", \n  \"_key\" : \"1226841606\" \n}\nshell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1226841606\n{ \n  \"numbers\" : { \n    \"one\" : 1, \n    \"two\" : 2, \n    \"three\" : 3, \n    \"empty\" : null \n  } \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1227759110\"\nlocation: /_db/_system/_api/document/products/1226841606\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/1226841606\", \n  \"_rev\" : \"1227759110\", \n  \"_key\" : \"1226841606\" \n}\nshell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1226841606\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1227759110\"\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/1226841606\", \n  \"_rev\" : \"1227759110\", \n  \"_key\" : \"1226841606\" \n}\nshell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1226841606?keepNull=false\n{ \n  \"hello\" : null, \n  \"numbers\" : { \n    \"four\" : 4 \n  } \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1228217862\"\nlocation: /_db/_system/_api/document/products/1226841606\n\n{ \n  \"error\" : false, \n  \"_id\" : \"products/1226841606\", \n  \"_rev\" : \"1228217862\", \n  \"_key\" : \"1226841606\" \n}\nshell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1226841606\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1228217862\"\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/1226841606\", \n  \"_rev\" : \"1228217862\", \n  \"_key\" : \"1226841606\" \n}\n

                              @endDocuBlock", + "nickname": "PatchDocument" } ], "path": "/_api/document/{document-handle}" @@ -422,10 +422,10 @@ } ], "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 deleted document, the attribute _rev contains the 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", + "summary": " Deletes document", "httpMethod": "DELETE", - "examples": "

                              Using document handle:



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



                              Unknown document handle:



                              unix> curl -X DELETE --dump - http://localhost:8529/_api/document/products/306266535\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/306266535 not found\", \n  \"code\" : 404, \n  \"errorNum\" : 1202 \n}\n\n



                              Revision conflict:



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

                              ", - "nickname": "deletesADocument" + "examples": "

                              Using document handle:



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



                              Unknown document handle:



                              shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/document/products/1229528582\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/1229528582 not found\", \n  \"code\" : 404, \n  \"errorNum\" : 1202 \n}\n



                              Revision conflict:



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

                              @endDocuBlock", + "nickname": "DeletesDocument" } ], "path": "/_api/document/{document-handle}" diff --git a/js/apps/system/aardvark/api-docs/edge.json b/js/apps/system/aardvark/api-docs/edge.json index e835e63c52..fc800e7e73 100644 --- a/js/apps/system/aardvark/api-docs/edge.json +++ b/js/apps/system/aardvark/api-docs/edge.json @@ -16,7 +16,7 @@ "code": "202" }, { - "reason": "is returned if the body does not contain a valid JSON representation of an edge, or if the collection specified is not an edge collection. The response body contains an error document in this case.

                              ", + "reason": "is returned if the body does not contain a valid JSON representation of an edge, or if the collection specified is not an edge collection. The response body contains an error document in this case.

                              ", "code": "400" }, { @@ -44,7 +44,7 @@ "paramType": "query", "required": "false", "name": "createCollection", - "description": "If this parameter has a value of true or yes, then the collection is created if it does not yet exist. Other values will be ignored so the collection must be present for the operation to succeed.

                              Note: this flag is not supported in a cluster. Using it will result in an error.

                              " + "description": "If this parameter has a value of true or yes, then the collection is created if it does not yet exist. Other values will be ignored so the collection must be present for the operation to succeed.

                              *Note*: This flag is not supported in a cluster. Using it will result in an error.

                              " }, { "dataType": "Boolean", @@ -68,11 +68,11 @@ "description": "The document handle of the end point must be passed in to handle.

                              " } ], - "notes": "Creates a new edge document in the collection named collection. A JSON representation of the document must be passed as the body of the POST request.

                              The from and to handles 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", + "notes": "Creates a new edge document in the collection named collection. A JSON representation of the document must be passed as the body of the POST request.

                              The from and to handles are immutable once the edge has been created.

                              In all other respects the method works like POST /document.

                              ", + "summary": "Create edge", "httpMethod": "POST", - "examples": "

                              Create an edge and read it back:



                              unix> curl -X POST --data-binary @- --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: \"309739943\"\nlocation: /_db/_system/_api/document/edges/309739943\n\n{ \n  \"error\" : false, \n  \"_id\" : \"edges/309739943\", \n  \"_rev\" : \"309739943\", \n  \"_key\" : \"309739943\" \n}\n\nunix> curl --dump - http://localhost:8529/_api/edge/edges/309739943\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"309739943\"\n\n{ \n  \"name\" : \"Emil\", \n  \"_id\" : \"edges/309739943\", \n  \"_rev\" : \"309739943\", \n  \"_key\" : \"309739943\", \n  \"_from\" : \"vertices/1\", \n  \"_to\" : \"vertices/2\" \n}\n\n

                              ", - "nickname": "createsAnEdge" + "examples": "

                              Create an edge and read it back:



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

                              @endDocuBlock", + "nickname": "CreateEdge" } ], "path": "/_api/edge" @@ -86,7 +86,7 @@ "code": "200" }, { - "reason": "is returned if the \"If-None-Match\" header is given and the edge has the same version

                              ", + "reason": "is returned if the \"If-None-Match\" header is given and the edge has the same version

                              ", "code": "304" }, { @@ -94,7 +94,7 @@ "code": "404" }, { - "reason": "is returned if a \"If-Match\" header or rev is given and the found document has a different version. The response will also contain the found document's current revision in the _rev attribute. Additionally, the attributes _id and _key will be returned.", + "reason": "is returned if a \"If-Match\" header or rev is given and the found document has a different version. The response will also contain the found document's current revision in the _rev attribute. Additionally, the attributes _id and _key will be returned. @endDocuBlock", "code": "412" } ], @@ -119,11 +119,11 @@ "description": "If the \"If-Match\" header is given, then it must contain exactly one etag. The edge is returned if it has the same revision ad the given etag. Otherwise a HTTP 412 is returned. As an alternative you can supply the etag in an attribute rev in the URL.

                              " } ], - "notes": "Returns the edge identified by document-handle. The returned edge contains a few special attributes:

                              • _id contains the document handle
                              • _rev contains the revision
                              • _from and to contain the document handles of the connected vertex documents", - "summary": "reads an edge", + "notes": "Returns the edge identified by document-handle. The returned edge contains a few special attributes:

                                • _id contains the document handle
                                • _rev contains the revision
                                • _from and to contain the document handles of the connected vertex documents", + "summary": " Read edge", "httpMethod": "GET", "examples": "", - "nickname": "readsAnEdge" + "nickname": "ReadEdge" } ], "path": "/_api/edge/{document-handle}" @@ -137,7 +137,7 @@ "code": "200" }, { - "reason": "The collection does not exist.", + "reason": "The collection does not exist. @endDocuBlock", "code": "404" } ], @@ -151,10 +151,10 @@ } ], "notes": "Returns a list of all URI for all edges from the collection identified by collection.

                                  ", - "summary": "reads all edges from collection", + "summary": " Read all edges from collection", "httpMethod": "GET", "examples": "", - "nickname": "readsAllEdgesFromCollection" + "nickname": "ReadAllEdgesFromCollection" } ], "path": "/_api/edge" @@ -176,7 +176,7 @@ "code": "404" }, { - "reason": "is returned if a \"If-Match\" header or rev is given and the found document has a different version. The response will also contain the found document's current revision in the etag header.", + "reason": "is returned if a \"If-Match\" header or rev is given and the found document has a different version. The response will also contain the found document's current revision in the etag header. @endDocuBlock", "code": "412" } ], @@ -203,10 +203,10 @@ } ], "notes": "Like GET, but only returns the header fields and not the body. You can use this call to get the current revision of an edge document or check if it was deleted.

                                  ", - "summary": "reads an edge header", + "summary": " Read edge header", "httpMethod": "HEAD", "examples": "", - "nickname": "readsAnEdgeHeader" + "nickname": "ReadEdgeHeader" } ], "path": "/_api/edge/{document-handle}" @@ -224,7 +224,7 @@ "code": "202" }, { - "reason": "is returned if the body does not contain a valid JSON representation of an edge document or if applied to a non-edge collection. The response body contains an error document in this case.

                                  ", + "reason": "is returned if the body does not contain a valid JSON representation of an edge document or if applied to a non-edge collection. The response body contains an error document in this case.

                                  ", "code": "400" }, { @@ -232,7 +232,7 @@ "code": "404" }, { - "reason": "is returned if a \"If-Match\" header or rev is given and the found document has a different version. The response will also contain the found document's current revision in the _rev attribute. Additionally, the attributes _id and _key will be returned.", + "reason": "is returned if a \"If-Match\" header or rev is given and the found document has a different version. The response will also contain the found document's current revision in the _rev attribute. Additionally, the attributes _id and _key will be returned. @endDocuBlock", "code": "412" } ], @@ -279,7 +279,7 @@ "description": "You can conditionally replace an edge document based on a target revision id by using the if-match HTTP header.

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

                                  If the new edge 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. Note that the attributes _from and _to of an edge are immutable and cannot be updated either.

                                  Optionally, the URL parameter waitForSync can be used to force synchronisation of the edge 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 edge document, the attribute _rev contains the new revision of the edge document.

                                  If the edge 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 revision id for conditional replacements (i.e. replacements that will only be executed if the revision id found in the database matches the 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 revision id as returned in the _rev attribute of an edge document or by an HTTP etag header.

                                  For example, to conditionally replace an edge document based on a specific revision id, you can use 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 edge 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.

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

                                  If the new edge 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. *Note*: The attributes _from and _to of an edge are immutable and cannot be updated either.

                                  Optionally, the URL parameter waitForSync can be used to force synchronisation of the edge 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 edge document, the attribute _rev contains the new revision of the edge document.

                                  If the edge 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 revision id for conditional replacements (i.e. replacements that will only be executed if the revision id found in the database matches the 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 revision id as returned in the _rev attribute of an edge document or by an HTTP etag header.

                                  For example, to conditionally replace an edge document based on a specific revision id, you can use 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 edge 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 an edge", "httpMethod": "PUT", "examples": "", @@ -301,7 +301,7 @@ "code": "202" }, { - "reason": "is returned if the body does not contain a valid JSON representation or when applied on an non-edge collection. The response body contains an error document in this case.

                                  ", + "reason": "is returned if the body does not contain a valid JSON representation or when applied on an non-edge collection. The response body contains an error document in this case.

                                  ", "code": "400" }, { @@ -309,7 +309,7 @@ "code": "404" }, { - "reason": "is returned if a \"If-Match\" header or rev is given and the found document has a different version. The response will also contain the found document's current revision in the _rev attribute. Additionally, the attributes _id and _key will be returned.", + "reason": "is returned if a \"If-Match\" header or rev is given and the found document has a different version. The response will also contain the found document's current revision in the _rev attribute. Additionally, the attributes _id and _key will be returned. @endDocuBlock", "code": "412" } ], @@ -333,7 +333,7 @@ "paramType": "query", "required": "false", "name": "keepNull", - "description": "If the intention is to delete existing attributes with the patch command, the URL query 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 edge document that are contained in the patch document with an attribute value of null.

                                  " + "description": "If the intention is to delete existing attributes with the patch command, the URL query 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 edge document that are contained in the patch document with an attribute value of null.

                                  " }, { "dataType": "Boolean", @@ -363,11 +363,11 @@ "description": "You can conditionally patch an edge document based on a target revision id by using the if-match HTTP header.

                                  " } ], - "notes": "Partially updates the edge 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 edge document if they do not yet exist, and overwritten in the existing edge 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.

                                  Note that internal attributes such as _key, _from and _to are immutable once set and cannot be updated.

                                  Optionally, the URL parameter waitForSync can be used to force synchronisation of the edge 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 edge document, the attribute _rev contains the new edge document revision.

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

                                  You can conditionally update an edge 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 edge documents (see replacing documents for details).

                                  ", - "summary": "patches an edge", + "notes": "Partially updates the edge 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 edge document if they do not yet exist, and overwritten in the existing edge 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.

                                  *Note*: Internal attributes such as _key, _from and _to are immutable once set and cannot be updated.

                                  Optionally, the URL parameter waitForSync can be used to force synchronisation of the edge 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 edge document, the attribute _rev contains the new edge document revision.

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

                                  You can conditionally update an edge 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 edge documents (see replacing documents for details).

                                  ", + "summary": " Patches edge", "httpMethod": "PATCH", "examples": "", - "nickname": "patchesAnEdge" + "nickname": "PatchesEdge" } ], "path": "/_api/edge/{document-handle}" @@ -389,7 +389,7 @@ "code": "404" }, { - "reason": "is returned if a \"If-Match\" header or rev is given and the found document has a different version. The response will also contain the found document's current revision in the _rev attribute. Additionally, the attributes _id and _key will be returned.", + "reason": "is returned if a \"If-Match\" header or rev is given and the found document has a different version. The response will also contain the found document's current revision in the _rev attribute. Additionally, the attributes _id and _key will be returned. @endDocuBlock", "code": "412" } ], @@ -399,7 +399,7 @@ "paramType": "path", "required": "true", "name": "document-handle", - "description": "Deletes the edge document identified by document-handle.

                                  " + "description": "Deletes the edge document identified by document-handle.

                                  " }, { "dataType": "String", @@ -430,10 +430,10 @@ } ], "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 deleted edge document, the attribute _rev contains the edge 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 an edge", + "summary": " Deletes edge", "httpMethod": "DELETE", "examples": "", - "nickname": "deletesAnEdge" + "nickname": "DeletesEdge" } ], "path": "/_api/edge/{document-handle}" diff --git a/js/apps/system/aardvark/api-docs/edges.json b/js/apps/system/aardvark/api-docs/edges.json index ac0d36ce59..927d19931f 100644 --- a/js/apps/system/aardvark/api-docs/edges.json +++ b/js/apps/system/aardvark/api-docs/edges.json @@ -31,10 +31,10 @@ } ], "notes": "Returns the list of edges starting or ending in the vertex identified by vertex-handle.

                                  ", - "summary": "reads in- or outbound edges", + "summary": " Read 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\" : \"114049447\", \n      \"_key\" : \"7\", \n      \"_from\" : \"vertices/4\", \n      \"_to\" : \"vertices/1\", \n      \"$label\" : \"v4 -> v1\" \n    }, \n    { \n      \"_id\" : \"edges/5\", \n      \"_rev\" : \"113000871\", \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\" : \"118178215\", \n      \"_key\" : \"6\", \n      \"_from\" : \"vertices/2\", \n      \"_to\" : \"vertices/1\", \n      \"$label\" : \"v2 -> v1\" \n    }, \n    { \n      \"_id\" : \"edges/7\", \n      \"_rev\" : \"118702503\", \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\" : \"122306983\", \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" + "examples": "

                                  Any direction



                                  shell> curl --data-binary @- --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\" : \"906436102\", \n      \"_key\" : \"6\", \n      \"_from\" : \"vertices/2\", \n      \"_to\" : \"vertices/1\", \n      \"$label\" : \"v2 -> v1\" \n    }, \n    { \n      \"_id\" : \"edges/7\", \n      \"_rev\" : \"906960390\", \n      \"_key\" : \"7\", \n      \"_from\" : \"vertices/4\", \n      \"_to\" : \"vertices/1\", \n      \"$label\" : \"v4 -> v1\" \n    }, \n    { \n      \"_id\" : \"edges/5\", \n      \"_rev\" : \"905911814\", \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



                                  In edges



                                  shell> curl --data-binary @- --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\" : \"911220230\", \n      \"_key\" : \"6\", \n      \"_from\" : \"vertices/2\", \n      \"_to\" : \"vertices/1\", \n      \"$label\" : \"v2 -> v1\" \n    }, \n    { \n      \"_id\" : \"edges/7\", \n      \"_rev\" : \"911744518\", \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



                                  Out edges



                                  shell> curl --data-binary @- --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\" : \"915480070\", \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

                                  @endDocuBlock", + "nickname": "ReadIn-OrOutboundEdges" } ], "path": "/_api/edges/{collection-id}" diff --git a/js/apps/system/aardvark/api-docs/endpoint.json b/js/apps/system/aardvark/api-docs/endpoint.json index 2742e07d0c..0da5dbebca 100644 --- a/js/apps/system/aardvark/api-docs/endpoint.json +++ b/js/apps/system/aardvark/api-docs/endpoint.json @@ -21,11 +21,11 @@ } ], "parameters": [], - "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", + "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": " Return 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:35134\", \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" + "examples": "



                                  shell> curl --data-binary @- --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:32357\", \n    \"databases\" : [ ] \n  }, \n  { \n    \"endpoint\" : \"tcp://127.0.0.1:8532\", \n    \"databases\" : [ \n      \"mydb1\", \n      \"mydb2\" \n    ] \n  } \n]\n

                                  @endDocuBlock", + "nickname": "ReturnListOfAllEndpoints" } ], "path": "/_api/endpoint" @@ -56,11 +56,11 @@ "description": "A JSON object describing the endpoint.

                                  " } ], - "notes": "The request body must be JSON hash with the following attributes:

                                  • endpoint: the endpoint specification, e.g. tcp://127.0.0.1:8530
                                  • databases: a list of database names the endpoint is responsible for.
                                  If databases is an empty list, all databases present in the server will become accessible via the endpoint, with the _system database being the default database.

                                  If databases is non-empty, only the specified databases will become available via the endpoint. The first database name in the databases list will also become the default database for the endpoint. The default database will always be used if a request coming in on the endpoint does not specify the database name explicitly.

                                  Note: adding or reconfiguring endpoints is allowed in the system database only. Calling this action in any other database will make the server return an error.

                                  Adding SSL endpoints at runtime is only supported if the server was started with SSL properly configured (e.g. --server.keyfile must have been set).

                                  ", - "summary": "adds a new endpoint or reconfigures an existing endpoint", + "notes": "The request body must be JSON hash with the following attributes:

                                  • endpoint: the endpoint specification, e.g. tcp://127.0.0.1:8530
                                  • databases: a list of database names the endpoint is responsible for.
                                  If databases is an empty list, all databases present in the server will become accessible via the endpoint, with the _system database being the default database.

                                  If databases is non-empty, only the specified databases will become available via the endpoint. The first database name in the databases list will also become the default database for the endpoint. The default database will always be used if a request coming in on the endpoint does not specify the database name explicitly.

                                  *Note*: adding or reconfiguring endpoints is allowed in the system database only. Calling this action in any other database will make the server return an error.

                                  Adding SSL endpoints at runtime is only supported if the server was started with SSL properly configured (e.g. --server.keyfile must have been set).

                                  ", + "summary": " Add new endpoint or reconfigures an existing endpoint", "httpMethod": "POST", - "examples": "Adding an endpoint tcp://127.0.0.1:8532 with two mapped databases (mydb1 and mydb2). mydb1 will become the default database for the endpoint.



                                  unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/endpoint\n{\"endpoint\":\"tcp://127.0.0.1:8532\",\"databases\":[\"mydb1\",\"mydb2\"]}\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



                                  Adding an endpoint tcp://127.0.0.1:8533 with no database names specified. This will allow access to all databases on this endpoint. The _system database will become the default database for requests that come in on this endpoint and do not specify the database name explicitly.



                                  unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/endpoint\n{\"endpoint\":\"tcp://127.0.0.1:8533\",\"databases\":[]}\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



                                  Adding an endpoint tcp://127.0.0.1:8533 without any databases first, and then updating the databases for the endpoint to testdb1, testdb2, and testdb3.



                                  unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/endpoint\n{\"endpoint\":\"tcp://127.0.0.1:8533\",\"databases\":[]}\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\nunix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/endpoint\n{\"endpoint\":\"tcp://127.0.0.1:8533\",\"databases\":[],\"database\":[\"testdb1\",\"testdb2\",\"testdb3\"]}\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

                                  ", - "nickname": "addsANewEndpointOrReconfiguresAnExistingEndpoint" + "examples": "Adding an endpoint tcp://127.0.0.1:8532 with two mapped databases (mydb1 and mydb2). mydb1 will become the default database for the endpoint.



                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/endpoint\n{\"endpoint\":\"tcp://127.0.0.1:8532\",\"databases\":[\"mydb1\",\"mydb2\"]}\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



                                  Adding an endpoint tcp://127.0.0.1:8533 with no database names specified. This will allow access to all databases on this endpoint. The _system database will become the default database for requests that come in on this endpoint and do not specify the database name explicitly.



                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/endpoint\n{\"endpoint\":\"tcp://127.0.0.1:8533\",\"databases\":[]}\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



                                  Adding an endpoint tcp://127.0.0.1:8533 without any databases first, and then updating the databases for the endpoint to testdb1, testdb2, and testdb3.



                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/endpoint\n{\"endpoint\":\"tcp://127.0.0.1:8533\",\"databases\":[]}\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}\nshell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/endpoint\n{\"endpoint\":\"tcp://127.0.0.1:8533\",\"databases\":[],\"database\":[\"testdb1\",\"testdb2\",\"testdb3\"]}\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

                                  @endDocuBlock", + "nickname": "AddNewEndpointOrReconfiguresAnExistingEndpoint" } ], "path": "/_api/endpoint" @@ -95,11 +95,11 @@ "description": "The endpoint to delete, e.g. tcp://127.0.0.1:8529.

                                  " } ], - "notes": "This operation deletes an existing endpoint from the list of all endpoints, and makes the server stop listening on the endpoint.

                                  Note: deleting and disconnecting an endpoint is allowed in the system database only. Calling this action in any other database will make the server return an error.

                                  Futhermore, the last remaining endpoint cannot be deleted as this would make the server kaputt.

                                  ", - "summary": "deletes and disconnects an existing endpoint", + "notes": "This operation deletes an existing endpoint from the list of all endpoints, and makes the server stop listening on the endpoint.

                                  *Note*: deleting and disconnecting an endpoint is allowed in the system database only. Calling this action in any other database will make the server return an error.

                                  Futhermore, the last remaining endpoint cannot be deleted as this would make the server kaputt.

                                  ", + "summary": " Delete and disconnects an existing endpoint", "httpMethod": "DELETE", - "examples": "

                                  Deleting an existing endpoint



                                  unix> curl -X DELETE --dump - http://localhost:8529/_api/endpoint/tcp%3A%2F%2F127.0.0.1%3A8532\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



                                  Deleting a non-existing endpoint



                                  unix> curl -X DELETE --dump - http://localhost:8529/_api/endpoint/tcp%3A%2F%2F127.0.0.1%3A8532\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 404, \n  \"errorNum\" : 1231, \n  \"errorMessage\" : \"endpoint not found\" \n}\n\n

                                  ", - "nickname": "deletesAndDisconnectsAnExistingEndpoint" + "examples": "

                                  Deleting an existing endpoint



                                  shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/endpoint/tcp%3A%2F%2F127.0.0.1%3A8532\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



                                  Deleting a non-existing endpoint



                                  shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/endpoint/tcp%3A%2F%2F127.0.0.1%3A8532\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 404, \n  \"errorNum\" : 1231, \n  \"errorMessage\" : \"endpoint not found\" \n}\n

                                  @endDocuBlock", + "nickname": "DeleteAndDisconnectsAnExistingEndpoint" } ], "path": "/_api/endpoint/{endpoint}" diff --git a/js/apps/system/aardvark/api-docs/explain.json b/js/apps/system/aardvark/api-docs/explain.json index 43bcf2cc35..f4132f0b4f 100644 --- a/js/apps/system/aardvark/api-docs/explain.json +++ b/js/apps/system/aardvark/api-docs/explain.json @@ -30,10 +30,10 @@ } ], "notes": "

                                  To explain how an AQL query would be executed on the server, the query string can be sent to the server via an HTTP POST request. The server will then validate the query and create an execution plan for it, but will not execute it.

                                  The execution plan that is returned by the server can be used to estimate the probable performance of an AQL query. Though the actual performance will depend on many different factors, the execution plan normally can give some good hint on the amount of work the server needs to do in order to actually run the query.

                                  The top-level statements will appear in the result in the same order in which they have been used in the original query. Each result element has at most the following attributes:
                                  • id: the row number of the top-level statement, starting at 1
                                  • type: the type of the top-level statement (e.g. for, return ...)
                                  • loopLevel: the nesting level of the top-level statement, starting at 1
                                  Depending on the type of top-level statement, there might be other attributes providing additional information, for example, if and which indexed will be used. Many top-level statements will provide an expression attribute that contains data about the expression they operate on. This is true for FOR, FILTER, SORT, COLLECT, and RETURN statements. The expression attribute has the following sub-attributes:
                                  • type: the type of the expression. Some possible values are: - collection: an iteration over documents from a collection. The value attribute will then contain the collection name. The extra attribute will contain information about if and which index is used when accessing the documents from the collection. If no index is used, the accessType sub-attribute of the extra attribute will have the value all, otherwise it will be index. - list: a list of dynamic values. The value attribute will contain the list elements. - const list: a list of constant values. The value attribute will contain the list elements. - reference: a reference to another variable. The value attribute will contain the name of the variable that is referenced.
                                  Please note that the structure of the explain result data might change in future versions of ArangoDB without further notice and without maintaining backwards compatibility.

                                  ", - "summary": "explains a query", + "summary": " Explain query", "httpMethod": "POST", - "examples": "

                                  Valid query:



                                  unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/explain\n{ \"query\" : \"FOR p IN products FILTER p.id == @id LIMIT 2 RETURN p.name\", \"bindVars\": { \"id\" : 3 } }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"plan\" : [ \n    { \n      \"id\" : 1, \n      \"loopLevel\" : 1, \n      \"type\" : \"for\", \n      \"resultVariable\" : \"p\", \n      \"limit\" : true, \n      \"expression\" : { \n        \"type\" : \"collection\", \n        \"value\" : \"products\", \n        \"extra\" : { \n          \"accessType\" : \"all\" \n        } \n      } \n    }, \n    { \n      \"id\" : 2, \n      \"loopLevel\" : 1, \n      \"type\" : \"filter\", \n      \"expression\" : { \n        \"type\" : \"expression\", \n        \"value\" : \"p.id == 3\" \n      } \n    }, \n    { \n      \"id\" : 3, \n      \"loopLevel\" : 1, \n      \"type\" : \"return\", \n      \"expression\" : { \n        \"type\" : \"expression\", \n        \"value\" : \"p.name\" \n      } \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n



                                  Invalid query:



                                  unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/explain\n{ \"query\" : \"FOR p IN products FILTER p.id == @id LIMIT 2 RETURN p.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\" : 1551, \n  \"errorMessage\" : \"no value specified for declared bind parameter 'id'\" \n}\n\n



                                  The data returned in the plan attribute of the result contains one element per AQL top-level statement (i.e. FOR, RETURN, FILTER etc.). If the query optimiser removed some unnecessary statements, the result might also contain less elements than there were top-level statements in the AQL query. The following example shows a query with a non-sensible filter condition that the optimiser has removed so that there are less top-level statements:



                                  unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/explain\n{ \"query\" : \"FOR i IN [ 1, 2, 3 ] FILTER 1 == 2 RETURN i\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"plan\" : [ \n    { \n      \"id\" : 1, \n      \"loopLevel\" : 0, \n      \"type\" : \"return (empty)\", \n      \"expression\" : { \n        \"type\" : \"const list\", \n        \"value\" : \"[  ]\" \n      } \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                                  ", - "nickname": "explainsAQuery" + "examples": "

                                  Valid query:



                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/explain\n{ \"query\" : \"FOR p IN products FILTER p.id == @id LIMIT 2 RETURN p.name\", \"bindVars\": { \"id\" : 3 } }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"plan\" : [ \n    { \n      \"id\" : 1, \n      \"loopLevel\" : 1, \n      \"type\" : \"for\", \n      \"resultVariable\" : \"p\", \n      \"limit\" : true, \n      \"expression\" : { \n        \"type\" : \"collection\", \n        \"value\" : \"products\", \n        \"extra\" : { \n          \"accessType\" : \"all\" \n        } \n      } \n    }, \n    { \n      \"id\" : 2, \n      \"loopLevel\" : 1, \n      \"type\" : \"filter\", \n      \"expression\" : { \n        \"type\" : \"expression\", \n        \"value\" : \"p.id == 3\" \n      } \n    }, \n    { \n      \"id\" : 3, \n      \"loopLevel\" : 1, \n      \"type\" : \"return\", \n      \"expression\" : { \n        \"type\" : \"expression\", \n        \"value\" : \"p.name\" \n      } \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n



                                  Invalid query:



                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/explain\n{ \"query\" : \"FOR p IN products FILTER p.id == @id LIMIT 2 RETURN p.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\" : 1551, \n  \"errorMessage\" : \"no value specified for declared bind parameter 'id'\" \n}\n



                                  The data returned in the plan attribute of the result contains one element per AQL top-level statement (i.e. FOR, RETURN, FILTER etc.). If the query optimiser removed some unnecessary statements, the result might also contain less elements than there were top-level statements in the AQL query. The following example shows a query with a non-sensible filter condition that the optimiser has removed so that there are less top-level statements:



                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/explain\n{ \"query\" : \"FOR i IN [ 1, 2, 3 ] FILTER 1 == 2 RETURN i\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"plan\" : [ \n    { \n      \"id\" : 1, \n      \"loopLevel\" : 0, \n      \"type\" : \"return (empty)\", \n      \"expression\" : { \n        \"type\" : \"const list\", \n        \"value\" : \"[  ]\" \n      } \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                                  @endDocuBlock", + "nickname": "ExplainQuery" } ], "path": "/_api/explain" diff --git a/js/apps/system/aardvark/api-docs/graph.json b/js/apps/system/aardvark/api-docs/graph.json index 7cc16f7f63..917fdcfc82 100644 --- a/js/apps/system/aardvark/api-docs/graph.json +++ b/js/apps/system/aardvark/api-docs/graph.json @@ -16,7 +16,7 @@ "code": "202" }, { - "reason": "is returned if it failed. The response body contains an error document in this case.

                                  ", + "reason": "is returned if it failed. The response body contains an error document in this case.

                                  Examples

                                  ", "code": "400" } ], @@ -39,7 +39,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-binary @- --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: 124862887\n\n{ \n  \"graph\" : { \n    \"_id\" : \"_graphs/graph\", \n    \"_rev\" : \"124862887\", \n    \"_key\" : \"graph\", \n    \"edgeDefinitions\" : [ \n      { \n        \"collection\" : \"edges\", \n        \"from\" : [ \n          \"vertices\" \n        ], \n        \"to\" : [ \n          \"vertices\" \n        ] \n      } \n    ] \n  }, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

                                  ", + "examples": "

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

                                  ", "nickname": "createGraph" } ], @@ -62,7 +62,7 @@ "code": "304" }, { - "reason": "\"If-Match\" header or rev is given and the current graph has a different version. This response code may only be returned if graph-name is specified in the request.

                                  ", + "reason": "\"If-Match\" header or rev is given and the current graph has a different version. This response code may only be returned if graph-name is specified in the request.

                                  Examples

                                  get graph by name

                                  ", "code": "412" } ], @@ -90,7 +90,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: 125976999\n\n{ \n  \"graph\" : { \n    \"_id\" : \"_graphs/graph\", \n    \"_rev\" : \"125976999\", \n    \"_key\" : \"graph\", \n    \"edgeDefinitions\" : [ \n      { \n        \"collection\" : \"edges\", \n        \"from\" : [ \n          \"vertices\" \n        ], \n        \"to\" : [ \n          \"vertices\" \n        ] \n      } \n    ] \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/graph1\", \n      \"_rev\" : \"127484327\", \n      \"_key\" : \"graph1\", \n      \"edgeDefinitions\" : [ \n        { \n          \"collection\" : \"edges1\", \n          \"from\" : [ \n            \"vertices1\" \n          ], \n          \"to\" : [ \n            \"vertices1\" \n          ] \n        } \n      ] \n    }, \n    { \n      \"_id\" : \"_graphs/graph2\", \n      \"_rev\" : \"128401831\", \n      \"_key\" : \"graph2\", \n      \"edgeDefinitions\" : [ \n        { \n          \"collection\" : \"edges2\", \n          \"from\" : [ \n            \"vertices2\" \n          ], \n          \"to\" : [ \n            \"vertices2\" \n          ] \n        } \n      ] \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                                  ", + "examples": "

                                  shell> curl --data-binary @- --dump - http://localhost:8529/_api/graph/graph\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 920067590\n\n{ \n  \"graph\" : { \n    \"_id\" : \"_graphs/graph\", \n    \"_rev\" : \"920067590\", \n    \"_key\" : \"graph\", \n    \"edgeDefinitions\" : [ \n      { \n        \"collection\" : \"edges\", \n        \"from\" : [ \n          \"vertices\" \n        ], \n        \"to\" : [ \n          \"vertices\" \n        ] \n      } \n    ] \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n



                                  get all graphs



                                  shell> curl --data-binary @- --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\" : \"922885638\", \n      \"_key\" : \"graph2\", \n      \"edgeDefinitions\" : [ \n        { \n          \"collection\" : \"edges2\", \n          \"from\" : [ \n            \"vertices2\" \n          ], \n          \"to\" : [ \n            \"vertices2\" \n          ] \n        } \n      ] \n    }, \n    { \n      \"_id\" : \"_graphs/graph1\", \n      \"_rev\" : \"921837062\", \n      \"_key\" : \"graph1\", \n      \"edgeDefinitions\" : [ \n        { \n          \"collection\" : \"edges1\", \n          \"from\" : [ \n            \"vertices1\" \n          ], \n          \"to\" : [ \n            \"vertices1\" \n          ] \n        } \n      ] \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                                  ", "nickname": "getThePropertiesOfASpecificOrAllGraphs" } ], @@ -113,7 +113,7 @@ "code": "404" }, { - "reason": "\"If-Match\" header or rev is given and the current graph has a different version

                                  ", + "reason": "\"If-Match\" header or rev is given and the current graph has a different version

                                  Examples

                                  delete graph by name

                                  ", "code": "412" } ], @@ -135,7 +135,7 @@ "notes": "Deletes graph, edges and vertices

                                  ", "summary": "delete graph", "httpMethod": "DELETE", - "examples": "

                                  delete graph by name



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

                                  ", + "examples": "

                                  shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/graph/graph\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"deleted\" : true, \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                                  ", "nickname": "deleteGraph" } ], @@ -150,7 +150,7 @@ "code": "201" }, { - "reason": "is returned if the graph was created successfully and waitForSync was false.

                                  ", + "reason": "is returned if the graph was created successfully and waitForSync was false.

                                  Examples

                                  ", "code": "202" } ], @@ -180,7 +180,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-binary @- --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: 132268455\n\n{ \n  \"vertex\" : { \n    \"_id\" : \"vertices/v1\", \n    \"_rev\" : \"132268455\", \n    \"_key\" : \"v1\", \n    \"optional1\" : \"val1\" \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

                                  ", + "examples": "

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

                                  ", "nickname": "createVertex" } ], @@ -203,7 +203,7 @@ "code": "404" }, { - "reason": "\"If-None-Match\" header or rev is given and the current graph has a different version

                                  ", + "reason": "\"If-None-Match\" header or rev is given and the current graph has a different version

                                  Examples

                                  get vertex properties by name

                                  ", "code": "412" } ], @@ -245,7 +245,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: 133972391\n\n{ \n  \"vertex\" : { \n    \"_id\" : \"vertices/v1\", \n    \"_rev\" : \"133972391\", \n    \"_key\" : \"v1\", \n    \"optional1\" : \"val1\" \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                                  ", + "examples": "

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

                                  ", "nickname": "getVertex" } ], @@ -268,7 +268,7 @@ "code": "404" }, { - "reason": "\"If-Match\" header or rev is given and the current vertex has a different version

                                  ", + "reason": "\"If-Match\" header or rev is given and the current vertex has a different version

                                  Examples

                                  ", "code": "412" } ], @@ -311,7 +311,7 @@ "notes": "Deletes vertex and all in and out edges of the vertex

                                  ", "summary": "delete vertex", "httpMethod": "DELETE", - "examples": "



                                  unix> curl -X DELETE --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"deleted\" : true, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

                                  ", + "examples": "

                                  shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"deleted\" : true, \n  \"error\" : false, \n  \"code\" : 202 \n}\n

                                  ", "nickname": "deleteVertex" } ], @@ -334,7 +334,7 @@ "code": "404" }, { - "reason": "\"If-Match\" header or rev is given and the current vertex has a different version

                                  ", + "reason": "\"If-Match\" header or rev is given and the current vertex has a different version

                                  Examples

                                  ", "code": "412" } ], @@ -384,7 +384,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-binary @- --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: 138494375\n\n{ \n  \"vertex\" : { \n    \"_id\" : \"vertices/v1\", \n    \"_rev\" : \"138494375\", \n    \"_key\" : \"v1\", \n    \"optional1\" : \"val2\" \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

                                  ", + "examples": "

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

                                  ", "nickname": "updateVertex" } ], @@ -407,7 +407,7 @@ "code": "404" }, { - "reason": "\"If-Match\" header or rev is given and the current vertex has a different version

                                  ", + "reason": "\"If-Match\" header or rev is given and the current vertex has a different version

                                  Examples

                                  ", "code": "412" } ], @@ -464,7 +464,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-binary @- --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: 140722599\n\n{ \n  \"vertex\" : { \n    \"_id\" : \"vertices/v1\", \n    \"_rev\" : \"140722599\", \n    \"_key\" : \"v1\", \n    \"optional1\" : \"vertexPatch\" \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\nunix> curl -X PATCH --data-binary @- --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: 141246887\n\n{ \n  \"vertex\" : { \n    \"_id\" : \"vertices/v1\", \n    \"_rev\" : \"141246887\", \n    \"_key\" : \"v1\", \n    \"optional1\" : null \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

                                  ", + "examples": "

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

                                  ", "nickname": "updateVertex" } ], @@ -475,7 +475,7 @@ { "errorResponses": [ { - "reason": "is returned if the cursor was created

                                  ", + "reason": "is returned if the cursor was created

                                  Examples

                                  Select all vertices

                                  ", "code": "201" } ], @@ -498,7 +498,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-binary @- --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\" : \"144523687\", \n      \"_key\" : \"v5\", \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"vertices/v2\", \n      \"_rev\" : \"143344039\", \n      \"_key\" : \"v2\", \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"vertices/v1\", \n      \"_rev\" : \"142950823\", \n      \"_key\" : \"v1\", \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"vertices/v4\", \n      \"_rev\" : \"144130471\", \n      \"_key\" : \"v4\", \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"vertices/v3\", \n      \"_rev\" : \"143737255\", \n      \"_key\" : \"v3\", \n      \"optional1\" : \"val1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

                                    ", + "examples": "

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

                                    ", "nickname": "getVertices" } ], @@ -509,7 +509,7 @@ { "errorResponses": [ { - "reason": "is returned if the cursor was created

                                    ", + "reason": "is returned if the cursor was created

                                    Examples

                                    Select all vertices

                                    ", "code": "201" } ], @@ -521,6 +521,13 @@ "name": "graph-name", "description": "The name of the graph

                                    " }, + { + "dataType": "String", + "paramType": "path", + "required": "true", + "name": "vertex-name", + "description": "The key of the vertex

                                    " + }, { "dataType": "Json", "paramType": "body", @@ -532,11 +539,11 @@ "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-binary @- --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\" : \"146424231\", \n      \"_key\" : \"v1\", \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"vertices/v4\", \n      \"_rev\" : \"147603879\", \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-binary @- --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\" : \"153436583\", \n      \"_key\" : \"v4\", \n      \"optional1\" : \"val2\" \n    }, \n    { \n      \"_id\" : \"vertices/v1\", \n      \"_rev\" : \"152256935\", \n      \"_key\" : \"v1\", \n      \"optional1\" : \"val1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

                                      ", + "examples": "

                                      shell> curl -X POST --data-binary @- --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\" : \"942743046\", \n      \"_key\" : \"v1\", \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"vertices/v4\", \n      \"_rev\" : \"943922694\", \n      \"_key\" : \"v4\", \n      \"optional1\" : \"val1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"error\" : false, \n  \"code\" : 201 \n}\n



                                      Select vertices by direction and property filter



                                      shell> curl -X POST --data-binary @- --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\" : \"949886470\", \n      \"_key\" : \"v4\", \n      \"optional1\" : \"val2\" \n    }, \n    { \n      \"_id\" : \"vertices/v1\", \n      \"_rev\" : \"948706822\", \n      \"_key\" : \"v1\", \n      \"optional1\" : \"val1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"error\" : false, \n  \"code\" : 201 \n}\n

                                      ", "nickname": "getVertices" } ], - "path": "/_api/graph/{graph-name}/vertices/{vertice-name}" + "path": "/_api/graph/{graph-name}/vertices/{vertex-name}" }, { "operations": [ @@ -547,7 +554,7 @@ "code": "201" }, { - "reason": "is returned if the edge was created successfully and waitForSync was false.

                                      ", + "reason": "is returned if the edge was created successfully and waitForSync was false.

                                      Examples

                                      ", "code": "202" } ], @@ -577,7 +584,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 (optional, if edge collection allows user defined keys).
                                      • _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-binary @- --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: 159203751\n\n{ \n  \"edge\" : { \n    \"_id\" : \"edges/edge1\", \n    \"_rev\" : \"159203751\", \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": "

                                      shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edge\n{ \n  \"_key\" : \"edge1\", \n  \"_from\" : \"vert2\", \n  \"_to\" : \"vert1\", \n  \"optional1\" : \"val1\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 955719174\n\n{ \n  \"edge\" : { \n    \"_id\" : \"edges/edge1\", \n    \"_rev\" : \"955719174\", \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

                                      ", "nickname": "createEdge" } ], @@ -600,7 +607,7 @@ "code": "404" }, { - "reason": "\"If-None-Match\" header or rev is given and the current edge has a different version

                                      ", + "reason": "\"If-None-Match\" header or rev is given and the current edge has a different version

                                      Examples

                                      ", "code": "412" } ], @@ -642,7 +649,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: 162021799\n\n{ \n  \"edge\" : { \n    \"_id\" : \"edges/edge1\", \n    \"_rev\" : \"162021799\", \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": "

                                      shell> curl --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 958668294\n\n{ \n  \"edge\" : { \n    \"_id\" : \"edges/edge1\", \n    \"_rev\" : \"958668294\", \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

                                      ", "nickname": "getEdge" } ], @@ -665,7 +672,7 @@ "code": "404" }, { - "reason": "\"If-Match\" header or rev is given and the current edge has a different version

                                      ", + "reason": "\"If-Match\" header or rev is given and the current edge has a different version

                                      Examples

                                      ", "code": "412" } ], @@ -708,7 +715,7 @@ "notes": "Deletes an edge of the graph

                                      ", "summary": "delete edge", "httpMethod": "DELETE", - "examples": "



                                      unix> curl -X DELETE --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"deleted\" : true, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

                                      ", + "examples": "

                                      shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"deleted\" : true, \n  \"error\" : false, \n  \"code\" : 202 \n}\n

                                      ", "nickname": "deleteEdge" } ], @@ -731,7 +738,7 @@ "code": "404" }, { - "reason": "\"If-Match\" header or rev is given and the current edge has a different version

                                      ", + "reason": "\"If-Match\" header or rev is given and the current edge has a different version

                                      Examples

                                      ", "code": "412" } ], @@ -781,7 +788,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-binary @- --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: 168903079\n\n{ \n  \"edge\" : { \n    \"_id\" : \"edges/edge1\", \n    \"_rev\" : \"168903079\", \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": "

                                      shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n{ \n  \"optional1\" : \"val2\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 965811718\n\n{ \n  \"edge\" : { \n    \"_id\" : \"edges/edge1\", \n    \"_rev\" : \"965811718\", \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

                                      ", "nickname": "updateEdge" } ], @@ -804,7 +811,7 @@ "code": "404" }, { - "reason": "\"If-Match\" header or rev is given and the current edge has a different version

                                      ", + "reason": "\"If-Match\" header or rev is given and the current edge has a different version

                                      Examples

                                      ", "code": "412" } ], @@ -861,7 +868,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-binary @- --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: 172376487\n\n{ \n  \"edge\" : { \n    \"_id\" : \"edges/edge1\", \n    \"_rev\" : \"172376487\", \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": "

                                      shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n{ \n  \"optional3\" : \"val3\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 969416198\n\n{ \n  \"edge\" : { \n    \"_id\" : \"edges/edge1\", \n    \"_rev\" : \"969416198\", \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

                                      ", "nickname": "updateEdge" } ], @@ -872,7 +879,7 @@ { "errorResponses": [ { - "reason": "is returned if the cursor was created

                                      ", + "reason": "is returned if the cursor was created

                                      Examples

                                      Select all edges

                                      ", "code": "201" } ], @@ -895,7 +902,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-binary @- --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\" : \"178012583\", \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\" : \"176439719\", \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\" : \"177488295\", \n      \"_key\" : \"edge3\", \n      \"_from\" : \"vertices/v2\", \n      \"_to\" : \"vertices/v4\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"edges/edge2\", \n      \"_rev\" : \"176964007\", \n      \"_key\" : \"edge2\", \n      \"_from\" : \"vertices/v1\", \n      \"_to\" : \"vertices/v3\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

                                        ", + "examples": "

                                        shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edges\n{ \n  \"batchSize\" : 100 \n}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"edges/edge2\", \n      \"_rev\" : \"974134790\", \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\" : \"974659078\", \n      \"_key\" : \"edge3\", \n      \"_from\" : \"vertices/v2\", \n      \"_to\" : \"vertices/v4\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"edges/edge1\", \n      \"_rev\" : \"973610502\", \n      \"_key\" : \"edge1\", \n      \"_from\" : \"vertices/v1\", \n      \"_to\" : \"vertices/v2\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"edges/edge4\", \n      \"_rev\" : \"975183366\", \n      \"_key\" : \"edge4\", \n      \"_from\" : \"vertices/v1\", \n      \"_to\" : \"vertices/v5\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"error\" : false, \n  \"code\" : 201 \n}\n

                                        ", "nickname": "getEdges" } ], @@ -906,7 +913,7 @@ { "errorResponses": [ { - "reason": "is returned if the cursor was created

                                        ", + "reason": "is returned if the cursor was created

                                        Examples

                                        Select all edges

                                        ", "code": "201" } ], @@ -936,7 +943,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-binary @- --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\" : \"182272423\", \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\" : \"183320999\", \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": "

                                          shell> curl -X POST --data-binary @- --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\" : \"979574278\", \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\" : \"980622854\", \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

                                          ", "nickname": "getEdges" } ], diff --git a/js/apps/system/aardvark/api-docs/import.json b/js/apps/system/aardvark/api-docs/import.json index 0c7305f5db..1b0351e7e8 100644 --- a/js/apps/system/aardvark/api-docs/import.json +++ b/js/apps/system/aardvark/api-docs/import.json @@ -12,7 +12,7 @@ "code": "201" }, { - "reason": "is returned if type contains an invalid value, no collection is specified, the documents are incorrectly encoded, or the request is malformed.

                                          ", + "reason": "is returned if type contains an invalid value, no collection is specified, the documents are incorrectly encoded, or the request is malformed.

                                          ", "code": "400" }, { @@ -20,7 +20,7 @@ "code": "404" }, { - "reason": "is returned if the import would trigger a unique key violation and complete is set to true.

                                          ", + "reason": "is returned if the import would trigger a unique key violation and complete is set to true.

                                          ", "code": "409" }, { @@ -41,7 +41,7 @@ "paramType": "query", "required": "true", "name": "type", - "description": "Determines how the body of the request will be interpreted. type can have the following values:
                                          • documents: when this type is used, each line in the request body is expected to be an individual JSON-encoded document. Multiple JSON documents in the request body need to be separated by newlines.
                                          • list: when this type is used, the request body must contain a single JSON-encoded list of individual documents to import.
                                          • auto: if set, this will automatically determine the body type (either documents or list)." + "description": "Determines how the body of the request will be interpreted. type can have the following values:
                                            • documents: when this type is used, each line in the request body is expected to be an individual JSON-encoded document. Multiple JSON documents in the request body need to be separated by newlines.
                                            • list: when this type is used, the request body must contain a single JSON-encoded list of individual documents to import.
                                            • auto: if set, this will automatically determine the body type (either documents or list)." }, { "dataType": "String", @@ -86,10 +86,10 @@ "description": "If set to true or yes, the result will include an attribute details with details about documents that could not be imported.

                                              " } ], - "notes": "Creates documents in the collection identified by collection-name. The JSON representations of the documents must be passed as the body of the POST request. The request body can either consist of multiple lines, with each line being a single stand-alone JSON document, or a JSON list.

                                              The response is a JSON object with the following attributes:

                                              • created: number of documents imported.
                                              • errors: number of documents that were not imported due to an error.
                                              • empty: number of empty lines found in the input (will only contain a value greater zero for types documents or auto).
                                              • details: if URL parameter details is set to true, the result will contain a details attribute which is a list with more detailed information about which documents could not be inserted.", + "notes": "Creates documents in the collection identified by collection-name. The JSON representations of the documents must be passed as the body of the POST request. The request body can either consist of multiple lines, with each line being a single stand-alone JSON document, or a JSON list.

                                                The response is a JSON object with the following attributes:

                                                • created: number of documents imported.
                                                • errors: number of documents that were not imported due to an error.
                                                • empty: number of empty lines found in the input (will only contain a value greater zero for types documents or auto).
                                                • details: if URL parameter details is set to true, the result will contain a details attribute which is a list with more detailed information about which documents could not be inserted.", "summary": "imports documents from JSON", "httpMethod": "POST", - "examples": "

                                                  Importing documents with heterogenous attributes from a JSON list:



                                                  unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&type=list\n[{\"_key\":\"abc\",\"value1\":25,\"value2\":\"test\",\"allowed\":true},{\"_key\":\"foo\",\"name\":\"baz\"},{\"name\":{\"detailed\":\"detailed name\",\"short\":\"short name\"}}]\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 3, \n  \"errors\" : 0, \n  \"empty\" : 0 \n}\n\n



                                                  Importing documents from individual JSON lines:



                                                  unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&type=documents\n{ \"_key\": \"abc\", \"value1\": 25, \"value2\": \"test\", \"allowed\": true }\n{ \"_key\": \"foo\", \"name\": \"baz\" }\n\n{ \"name\": { \"detailed\": \"detailed name\", \"short\": \"short name\" } }\n\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 3, \n  \"errors\" : 0, \n  \"empty\" : 1 \n}\n\n



                                                  Using the auto type detection:



                                                  unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&type=auto\n[{\"_key\":\"abc\",\"value1\":25,\"value2\":\"test\",\"allowed\":true},{\"_key\":\"foo\",\"name\":\"baz\"},{\"name\":{\"detailed\":\"detailed name\",\"short\":\"short name\"}}]\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 3, \n  \"errors\" : 0, \n  \"empty\" : 0 \n}\n\n



                                                  Importing documents into a new collection from a JSON list:



                                                  unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&createCollection=true&type=list\n[{\"id\":\"12553\",\"active\":true},{\"id\":\"4433\",\"active\":false},{\"id\":\"55932\",\"count\":4334}]\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 3, \n  \"errors\" : 0, \n  \"empty\" : 0 \n}\n\n



                                                  Importing into an edge collection, with attributes _from, _to and name:



                                                  unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=links&type=documents\n{ \"_from\": \"products/123\", \"_to\": \"products/234\" }\n{ \"_from\": \"products/332\", \"_to\": \"products/abc\", \"name\": \"other name\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 2, \n  \"errors\" : 0, \n  \"empty\" : 0 \n}\n\n



                                                  Importing into an edge collection, omitting _from or _to:



                                                  unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=links&type=list&details=true\n[{\"name\":\"some name\"}]\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 0, \n  \"errors\" : 1, \n  \"empty\" : 0, \n  \"details\" : [ \n    \"at position 1: missing '_from' or '_to' attribute\" \n  ] \n}\n\n



                                                  Violating a unique constraint, but allow partial imports:



                                                  unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&type=documents&details=true\n{ \"_key\": \"abc\", \"value1\": 25, \"value2\": \"test\" }\n{ \"_key\": \"abc\", \"value1\": \"bar\", \"value2\": \"baz\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 1, \n  \"errors\" : 1, \n  \"empty\" : 0, \n  \"details\" : [ \n    \"at position 2: creating document failed with error 'unique constraint violated',...\" \n  ] \n}\n\n



                                                  Violating a unique constraint, not allowing partial imports:



                                                  unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&type=documents&complete=true\n{ \"_key\": \"abc\", \"value1\": 25, \"value2\": \"test\" }\n{ \"_key\": \"abc\", \"value1\": \"bar\", \"value2\": \"baz\" }\n\nHTTP/1.1 409 Conflict\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"cannot create document, unique constraint violated\", \n  \"code\" : 409, \n  \"errorNum\" : 1210 \n}\n\n



                                                  Using a non-existing collection:



                                                  unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&type=documents\n{ \"name\": \"test\" }\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



                                                  Using a malformed body:



                                                  unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&type=list\n{ }\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"expecting a JSON list in the request\", \n  \"code\" : 400, \n  \"errorNum\" : 400 \n}\n\n

                                                  ", + "examples": "

                                                  Importing documents with heterogenous attributes from a JSON list:



                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&type=list\n[{\"_key\":\"abc\",\"value1\":25,\"value2\":\"test\",\"allowed\":true},{\"_key\":\"foo\",\"name\":\"baz\"},{\"name\":{\"detailed\":\"detailed name\",\"short\":\"short name\"}}]\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 3, \n  \"errors\" : 0, \n  \"empty\" : 0 \n}\n



                                                  Importing documents from individual JSON lines:



                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&type=documents\n{ \"_key\": \"abc\", \"value1\": 25, \"value2\": \"test\", \"allowed\": true }\n{ \"_key\": \"foo\", \"name\": \"baz\" }\n\n{ \"name\": { \"detailed\": \"detailed name\", \"short\": \"short name\" } }\n\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 3, \n  \"errors\" : 0, \n  \"empty\" : 1 \n}\n



                                                  Using the auto type detection:



                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&type=auto\n[{\"_key\":\"abc\",\"value1\":25,\"value2\":\"test\",\"allowed\":true},{\"_key\":\"foo\",\"name\":\"baz\"},{\"name\":{\"detailed\":\"detailed name\",\"short\":\"short name\"}}]\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 3, \n  \"errors\" : 0, \n  \"empty\" : 0 \n}\n



                                                  Importing documents into a new collection from a JSON list:



                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&createCollection=true&type=list\n[{\"id\":\"12553\",\"active\":true},{\"id\":\"4433\",\"active\":false},{\"id\":\"55932\",\"count\":4334}]\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 3, \n  \"errors\" : 0, \n  \"empty\" : 0 \n}\n



                                                  Importing into an edge collection, with attributes _from, _to and name:



                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=links&type=documents\n{ \"_from\": \"products/123\", \"_to\": \"products/234\" }\n{ \"_from\": \"products/332\", \"_to\": \"products/abc\", \"name\": \"other name\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 2, \n  \"errors\" : 0, \n  \"empty\" : 0 \n}\n



                                                  Importing into an edge collection, omitting _from or _to:



                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=links&type=list&details=true\n[{\"name\":\"some name\"}]\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 0, \n  \"errors\" : 1, \n  \"empty\" : 0, \n  \"details\" : [ \n    \"at position 1: missing '_from' or '_to' attribute\" \n  ] \n}\n



                                                  Violating a unique constraint, but allow partial imports:



                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&type=documents&details=true\n{ \"_key\": \"abc\", \"value1\": 25, \"value2\": \"test\" }\n{ \"_key\": \"abc\", \"value1\": \"bar\", \"value2\": \"baz\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 1, \n  \"errors\" : 1, \n  \"empty\" : 0, \n  \"details\" : [ \n    \"at position 2: creating document failed with error 'unique constraint violated', offending document: {\\\"_key\\\":\\\"abc\\\",\\\"value1\\\":\\\"bar\\\",\\\"value2\\\":\\\"baz\\\"}\" \n  ] \n}\n



                                                  Violating a unique constraint, not allowing partial imports:



                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&type=documents&complete=true\n{ \"_key\": \"abc\", \"value1\": 25, \"value2\": \"test\" }\n{ \"_key\": \"abc\", \"value1\": \"bar\", \"value2\": \"baz\" }\n\nHTTP/1.1 409 Conflict\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"cannot create document, unique constraint violated\", \n  \"code\" : 409, \n  \"errorNum\" : 1210 \n}\n



                                                  Using a non-existing collection:



                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&type=documents\n{ \"name\": \"test\" }\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



                                                  Using a malformed body:



                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&type=list\n{ }\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"expecting a JSON list in the request\", \n  \"code\" : 400, \n  \"errorNum\" : 400 \n}\n

                                                  ", "nickname": "importsDocumentsFromJson" } ], @@ -104,7 +104,7 @@ "code": "201" }, { - "reason": "is returned if type contains an invalid value, no collection is specified, the documents are incorrectly encoded, or the request is malformed.

                                                  ", + "reason": "is returned if type contains an invalid value, no collection is specified, the documents are incorrectly encoded, or the request is malformed.

                                                  ", "code": "400" }, { @@ -112,7 +112,7 @@ "code": "404" }, { - "reason": "is returned if the import would trigger a unique key violation and complete is set to true.

                                                  ", + "reason": "is returned if the import would trigger a unique key violation and complete is set to true.

                                                  ", "code": "409" }, { @@ -126,7 +126,7 @@ "paramType": "body", "required": "true", "name": "documents", - "description": "The body must consist of JSON-encoded lists of attribute values, with one line per per document. The first row of the request must be a JSON-encoded list of attribute names. These attribute names are used for the data in the subsequent rows.

                                                  " + "description": "The body must consist of JSON-encoded lists of attribute values, with one line per per document. The first row of the request must be a JSON-encoded list of attribute names. These attribute names are used for the data in the subsequent rows.

                                                  " }, { "dataType": "String", @@ -171,10 +171,10 @@ "description": "If set to true or yes, the result will include an attribute details with details about documents that could not be imported.

                                                  " } ], - "notes": "Creates documents in the collection identified by collection-name. The first line of the request body must contain a JSON-encoded list of attribute names. All following lines in the request body must contain JSON-encoded lists of attribute values. Each line is interpreted as a separate document, and the values specified will be mapped to the list of attribute names specified in the first header line.

                                                  The response is a JSON object with the following attributes:

                                                  • created: number of documents imported.
                                                  • errors: number of documents that were not imported due to an error.
                                                  • empty: number of empty lines found in the input (will only contain a value greater zero for types documents or auto).
                                                  • details: if URL parameter details is set to true, the result will contain a details attribute which is a list with more detailed information about which documents could not be inserted.", + "notes": "Creates documents in the collection identified by collection-name. The first line of the request body must contain a JSON-encoded list of attribute names. All following lines in the request body must contain JSON-encoded lists of attribute values. Each line is interpreted as a separate document, and the values specified will be mapped to the list of attribute names specified in the first header line.

                                                    The response is a JSON object with the following attributes:

                                                    • created: number of documents imported.
                                                    • errors: number of documents that were not imported due to an error.
                                                    • empty: number of empty lines found in the input (will only contain a value greater zero for types documents or auto).
                                                    • details: if URL parameter details is set to true, the result will contain a details attribute which is a list with more detailed information about which documents could not be inserted.", "summary": "imports document values", "httpMethod": "POST", - "examples": "

                                                      Importing two documents, with attributes _key, value1 and value2 each. One line in the import data is empty:



                                                      unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products\n[ \"_key\", \"value1\", \"value2\" ]\n[ \"abc\", 25, \"test\" ]\n\n[ \"foo\", \"bar\", \"baz\" ]\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 2, \n  \"errors\" : 0, \n  \"empty\" : 1 \n}\n\n



                                                      Importing two documents into a new collection:



                                                      unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&createCollection=true\n[ \"value1\", \"value2\" ]\n[ 1234, null ]\n[ \"foo\", \"bar\" ]\n[ 534.55, true ]\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 3, \n  \"errors\" : 0, \n  \"empty\" : 0 \n}\n\n



                                                      Importing into an edge collection, with attributes _from, _to and name:



                                                      unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=links\n[ \"_from\", \"_to\", \"name\" ]\n[ \"products/123\", \"products/234\", \"some name\" ]\n[ \"products/332\", \"products/abc\", \"other name\" ]\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 2, \n  \"errors\" : 0, \n  \"empty\" : 0 \n}\n\n



                                                      Importing into an edge collection, omitting _from or _to:



                                                      unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=links&details=true\n[ \"name\" ]\n[ \"some name\" ]\n[ \"other name\" ]\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 0, \n  \"errors\" : 2, \n  \"empty\" : 0, \n  \"details\" : [ \n    \"at position 1: missing '_from' or '_to' attribute\", \n    \"at position 2: missing '_from' or '_to' attribute\" \n  ] \n}\n\n



                                                      Violating a unique constraint, but allow partial imports:



                                                      unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&details=true\n[ \"_key\", \"value1\", \"value2\" ]\n[ \"abc\", 25, \"test\" ]\n[ \"abc\", \"bar\", \"baz\" ]\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 1, \n  \"errors\" : 1, \n  \"empty\" : 0, \n  \"details\" : [ \n    \"at position 2: creating document failed with error 'unique constraint violated',...\" \n  ] \n}\n\n



                                                      Violating a unique constraint, not allowing partial imports:



                                                      unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&complete=true\n[ \"_key\", \"value1\", \"value2\" ]\n[ \"abc\", 25, \"test\" ]\n[ \"abc\", \"bar\", \"baz\" ]\n\nHTTP/1.1 409 Conflict\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"cannot create document, unique constraint violated\", \n  \"code\" : 409, \n  \"errorNum\" : 1210 \n}\n\n



                                                      Using a non-existing collection:



                                                      unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products\n[ \"_key\", \"value1\", \"value2\" ]\n[ \"abc\", 25, \"test\" ]\n[ \"foo\", \"bar\", \"baz\" ]\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



                                                      Using a malformed body:



                                                      unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products\n{ \"_key\": \"foo\", \"value1\": \"bar\" }\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"no JSON list found in second line\", \n  \"code\" : 400, \n  \"errorNum\" : 400 \n}\n\n

                                                      ", + "examples": "

                                                      Importing two documents, with attributes _key, value1 and value2 each. One line in the import data is empty:



                                                      shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products\n[ \"_key\", \"value1\", \"value2\" ]\n[ \"abc\", 25, \"test\" ]\n\n[ \"foo\", \"bar\", \"baz\" ]\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 2, \n  \"errors\" : 0, \n  \"empty\" : 1 \n}\n



                                                      Importing two documents into a new collection:



                                                      shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&createCollection=true\n[ \"value1\", \"value2\" ]\n[ 1234, null ]\n[ \"foo\", \"bar\" ]\n[ 534.55, true ]\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 3, \n  \"errors\" : 0, \n  \"empty\" : 0 \n}\n



                                                      Importing into an edge collection, with attributes _from, _to and name:



                                                      shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=links\n[ \"_from\", \"_to\", \"name\" ]\n[ \"products/123\", \"products/234\", \"some name\" ]\n[ \"products/332\", \"products/abc\", \"other name\" ]\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 2, \n  \"errors\" : 0, \n  \"empty\" : 0 \n}\n



                                                      Importing into an edge collection, omitting _from or _to:



                                                      shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=links&details=true\n[ \"name\" ]\n[ \"some name\" ]\n[ \"other name\" ]\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 0, \n  \"errors\" : 2, \n  \"empty\" : 0, \n  \"details\" : [ \n    \"at position 1: missing '_from' or '_to' attribute\", \n    \"at position 2: missing '_from' or '_to' attribute\" \n  ] \n}\n



                                                      Violating a unique constraint, but allow partial imports:



                                                      shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&details=true\n[ \"_key\", \"value1\", \"value2\" ]\n[ \"abc\", 25, \"test\" ]\n[ \"abc\", \"bar\", \"baz\" ]\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : false, \n  \"created\" : 1, \n  \"errors\" : 1, \n  \"empty\" : 0, \n  \"details\" : [ \n    \"at position 2: creating document failed with error 'unique constraint violated', offending document: {\\\"_key\\\":\\\"abc\\\",\\\"value1\\\":\\\"bar\\\",\\\"value2\\\":\\\"baz\\\"}\" \n  ] \n}\n



                                                      Violating a unique constraint, not allowing partial imports:



                                                      shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products&complete=true\n[ \"_key\", \"value1\", \"value2\" ]\n[ \"abc\", 25, \"test\" ]\n[ \"abc\", \"bar\", \"baz\" ]\n\nHTTP/1.1 409 Conflict\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"cannot create document, unique constraint violated\", \n  \"code\" : 409, \n  \"errorNum\" : 1210 \n}\n



                                                      Using a non-existing collection:



                                                      shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products\n[ \"_key\", \"value1\", \"value2\" ]\n[ \"abc\", 25, \"test\" ]\n[ \"foo\", \"bar\", \"baz\" ]\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



                                                      Using a malformed body:



                                                      shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/import?collection=products\n{ \"_key\": \"foo\", \"value1\": \"bar\" }\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"errorMessage\" : \"no JSON list found in second line\", \n  \"code\" : 400, \n  \"errorNum\" : 400 \n}\n

                                                      ", "nickname": "importsDocumentValues" } ], diff --git a/js/apps/system/aardvark/api-docs/index.json b/js/apps/system/aardvark/api-docs/index.json index a331e55de4..4862687b2b 100644 --- a/js/apps/system/aardvark/api-docs/index.json +++ b/js/apps/system/aardvark/api-docs/index.json @@ -17,10 +17,10 @@ } ], "notes": "

                                                      Returns an object with an attribute indexes containing a list of all index descriptions for the given collection. The same information is also available in the identifiers as hash map with the index handle as keys.

                                                      ", - "summary": "reads all indexes of a collection", + "summary": " Read all indexes of a collection", "httpMethod": "GET", - "examples": "

                                                      Return information about all indexes:



                                                      unix> curl --dump - http://localhost:8529/_api/index?collection=products\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"indexes\" : [ \n    { \n      \"id\" : \"products/0\", \n      \"type\" : \"primary\", \n      \"unique\" : true, \n      \"fields\" : [ \n        \"_id\" \n      ] \n    } \n  ], \n  \"identifiers\" : { \n    \"products/0\" : { \n      \"id\" : \"products/0\", \n      \"type\" : \"primary\", \n      \"unique\" : true, \n      \"fields\" : [ \n        \"_id\" \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                                                      ", - "nickname": "readsAllIndexesOfACollection" + "examples": "

                                                      Return information about all indexes:



                                                      shell> curl --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"indexes\" : [ \n    { \n      \"id\" : \"products/0\", \n      \"type\" : \"primary\", \n      \"unique\" : true, \n      \"fields\" : [ \n        \"_key\" \n      ] \n    } \n  ], \n  \"identifiers\" : { \n    \"products/0\" : { \n      \"id\" : \"products/0\", \n      \"type\" : \"primary\", \n      \"unique\" : true, \n      \"fields\" : [ \n        \"_key\" \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                                                      @endDocuBlock", + "nickname": "ReadAllIndexesOfACollection" } ], "path": "/_api/index" @@ -48,10 +48,10 @@ } ], "notes": "

                                                      The result is an objects describing the index. It has at least the following attributes:

                                                      • id: The identifier of the index.
                                                      All other attributes are type-dependent.

                                                      ", - "summary": "reads an index", + "summary": "Read index", "httpMethod": "GET", - "examples": "



                                                      unix> curl --dump - http://localhost:8529/_api/index/products/0\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"products/0\", \n  \"type\" : \"primary\", \n  \"unique\" : true, \n  \"fields\" : [ \n    \"_id\" \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                                                      ", - "nickname": "readsAnIndex" + "examples": "



                                                      shell> curl --data-binary @- --dump - http://localhost:8529/_api/index/products/0\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"id\" : \"products/0\", \n  \"type\" : \"primary\", \n  \"unique\" : true, \n  \"fields\" : [ \n    \"_key\" \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                                                      @endDocuBlock", + "nickname": "ReadIndex" } ], "path": "/_api/index/{index-handle}" @@ -93,11 +93,11 @@ "description": "

                                                      " } ], - "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. If specified, the value must be greater than zero.
                                                      • byteSize: The maximal size of the active document data in the collection (in bytes). If specified, the value must be at least 16384.
                                                      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", + "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. If specified, the value must be greater than zero.
                                                      • byteSize: The maximal size of the active document data in the collection (in bytes). If specified, the value must be at least 16384.
                                                      *Note*: 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": " Create cap constraint", "httpMethod": "POST", - "examples": "

                                                      Creating a cap constraint



                                                      unix> curl -X POST --data-binary @- --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/184893863\", \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" + "examples": "

                                                      Creating a cap constraint



                                                      shell> curl -X POST --data-binary @- --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/982720006\", \n  \"type\" : \"cap\", \n  \"unique\" : false, \n  \"size\" : 10, \n  \"byteSize\" : 0, \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n

                                                      @endDocuBlock", + "nickname": "CreateCapConstraint" } ], "path": "/_api/index" @@ -135,11 +135,11 @@ "description": "

                                                      " } ], - "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.
                                                      Note: unique indexes on non-shard keys are not supported in a cluster.

                                                      ", - "summary": "creates a geo-spatial index", + "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*: 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.
                                                      *Note*: Unique indexes on non-shard keys are not supported in a cluster.

                                                      ", + "summary": " Create geo-spatial index", "httpMethod": "POST", - "examples": "

                                                      Creating a geo index with a location attribute:



                                                      unix> curl -X POST --data-binary @- --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/185221543\", \n  \"type\" : \"geo1\", \n  \"unique\" : false, \n  \"geoJson\" : false, \n  \"constraint\" : false, \n  \"ignoreNull\" : 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-binary @- --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/185614759\", \n  \"type\" : \"geo2\", \n  \"unique\" : false, \n  \"constraint\" : false, \n  \"ignoreNull\" : false, \n  \"fields\" : [ \n    \"e\", \n    \"f\" \n  ], \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

                                                      ", - "nickname": "createsAGeo-spatialIndex" + "examples": "

                                                      Creating a geo index with a location attribute:



                                                      shell> curl -X POST --data-binary @- --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/983244294\", \n  \"type\" : \"geo1\", \n  \"unique\" : false, \n  \"geoJson\" : false, \n  \"constraint\" : false, \n  \"ignoreNull\" : false, \n  \"fields\" : [ \n    \"b\" \n  ], \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n



                                                      Creating a geo index with latitude and longitude attributes:



                                                      shell> curl -X POST --data-binary @- --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/983768582\", \n  \"type\" : \"geo2\", \n  \"unique\" : false, \n  \"constraint\" : false, \n  \"ignoreNull\" : false, \n  \"fields\" : [ \n    \"e\", \n    \"f\" \n  ], \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n

                                                      @endDocuBlock", + "nickname": "CreateGeo-spatialIndex" } ], "path": "/_api/index" @@ -181,11 +181,11 @@ "description": "

                                                      " } ], - "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.
                                                      Note: unique indexes on non-shard keys are not supported in a cluster.

                                                      ", - "summary": "creates a hash index", + "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.
                                                      *Note*: unique indexes on non-shard keys are not supported in a cluster.

                                                      ", + "summary": " Create hash index", "httpMethod": "POST", - "examples": "

                                                      Creating an unique constraint:



                                                      unix> curl -X POST --data-binary @- --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/186007975\", \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-binary @- --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/186401191\", \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" + "examples": "

                                                      Creating an unique constraint:



                                                      shell> curl -X POST --data-binary @- --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/984292870\", \n  \"type\" : \"hash\", \n  \"unique\" : true, \n  \"fields\" : [ \n    \"a\", \n    \"b\" \n  ], \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n



                                                      Creating a hash index:



                                                      shell> curl -X POST --data-binary @- --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/984817158\", \n  \"type\" : \"hash\", \n  \"unique\" : false, \n  \"fields\" : [ \n    \"a\", \n    \"b\" \n  ], \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n

                                                      @endDocuBlock", + "nickname": "CreateHashIndex" } ], "path": "/_api/index" @@ -227,11 +227,11 @@ "description": "

                                                      " } ], - "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.
                                                      Note: unique indexes on non-shard keys are not supported in a cluster.

                                                      ", - "summary": "creates a skip list", + "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.
                                                      *Note*: unique indexes on non-shard keys are not supported in a cluster.

                                                      ", + "summary": " Create skip list", "httpMethod": "POST", - "examples": "

                                                      Creating a skiplist:



                                                      unix> curl -X POST --data-binary @- --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/186794407\", \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" + "examples": "

                                                      Creating a skiplist:



                                                      shell> curl -X POST --data-binary @- --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/985341446\", \n  \"type\" : \"skiplist\", \n  \"unique\" : false, \n  \"fields\" : [ \n    \"a\", \n    \"b\" \n  ], \n  \"isNewlyCreated\" : true, \n  \"error\" : false, \n  \"code\" : 201 \n}\n

                                                      @endDocuBlock", + "nickname": "CreateSkipList" } ], "path": "/_api/index" @@ -270,10 +270,10 @@ } ], "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", + "summary": " Create fulltext index", "httpMethod": "POST", - "examples": "

                                                        Creating a fulltext index:



                                                        unix> curl -X POST --data-binary @- --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/187122087\", \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" + "examples": "

                                                        Creating a fulltext index:



                                                        shell> curl -X POST --data-binary @- --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/985800198\", \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

                                                        @endDocuBlock", + "nickname": "CreateFulltextIndex" } ], "path": "/_api/index" @@ -312,10 +312,10 @@ } ], "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", + "summary": " Create bitarray index", "httpMethod": "POST", - "examples": "

                                                          Creating a bitarray index:



                                                          unix> curl -X POST --data-binary @- --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/187515303\", \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" + "examples": "

                                                          Creating a bitarray index:



                                                          shell> curl -X POST --data-binary @- --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/986324486\", \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

                                                          @endDocuBlock", + "nickname": "CreateBitarrayIndex" } ], "path": "/_api/index" @@ -337,7 +337,7 @@ "code": "400" }, { - "reason": "If collection is unknown, then an HTTP 404 is returned.", + "reason": "If collection is unknown, then an HTTP 404 is returned. @endDocuBlock", "code": "404" } ], @@ -357,11 +357,11 @@ "description": "

                                                          " } ], - "notes": "

                                                          Creates a new index in the collection collection. Expects an object containing the index details.

                                                          The type of the index to be created must specified in the type attribute of the index details. Depending on the index type, additional other attributes may need to specified in the request in order to create the index.

                                                          See the manual, the manual, the manual, the manual, and the manual for details.

                                                          Most indexes (a notable exception being the cap constraint) require the list of attributes to be indexed in the fields attribute of the index details. Depending on the index type, a single attribute or multiple attributes may be indexed.

                                                          Indexing system attributes such as _id, _key, _from, and _to is not supported by any index type. Manually creating an index that relies on any of these attributes is unsupported.

                                                          Some indexes can be created as unique or non-unique variants. Uniqueness can be controlled for most indexes by specifying the unique in the index details. Setting it to true will create a unique index. Setting it to false or omitting the unique attribute will create a non-unique index.

                                                          Note that the following index types do not support uniqueness, and using the unique attribute with these types may lead to an error:
                                                          • cap constraints
                                                          • fulltext indexes
                                                          • bitarray indexes
                                                          Note also that unique indexes on non-shard keys are not supported in a cluster.

                                                          ", - "summary": "creates an index", + "notes": "

                                                          Creates a new index in the collection collection. Expects an object containing the index details.

                                                          The type of the index to be created must specified in the type attribute of the index details. Depending on the index type, additional other attributes may need to specified in the request in order to create the index.

                                                          Most indexes (a notable exception being the cap constraint) require the list of attributes to be indexed in the fields attribute of the index details. Depending on the index type, a single attribute or multiple attributes may be indexed.

                                                          Indexing system attributes such as _id, _key, _from, and _to is not supported by any index type. Manually creating an index that relies on any of these attributes is unsupported.

                                                          Some indexes can be created as unique or non-unique variants. Uniqueness can be controlled for most indexes by specifying the unique in the index details. Setting it to true will create a unique index. Setting it to false or omitting the unique attribute will create a non-unique index.

                                                          *Note*: The following index types do not support uniqueness, and using the unique attribute with these types may lead to an error:
                                                          • cap constraints
                                                          • fulltext indexes
                                                          • bitarray indexes
                                                          *Note*: Unique indexes on non-shard keys are not supported in a cluster.

                                                          ", + "summary": " Create index", "httpMethod": "POST", "examples": "", - "nickname": "createsAnIndex" + "nickname": "CreateIndex" } ], "path": "/_api/index" @@ -389,10 +389,10 @@ } ], "notes": "

                                                          Deletes an index with index-handle.

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



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

                                                          ", - "nickname": "deletesAnIndex" + "examples": "



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

                                                          @endDocuBlock", + "nickname": "DeleteIndex" } ], "path": "/_api/index/{index-handle}" diff --git a/js/apps/system/aardvark/api-docs/log.json b/js/apps/system/aardvark/api-docs/log.json index 8d517f892d..b31319248b 100644 --- a/js/apps/system/aardvark/api-docs/log.json +++ b/js/apps/system/aardvark/api-docs/log.json @@ -16,7 +16,7 @@ "code": "403" }, { - "reason": "is returned if the server cannot generate the result due to an out-of-memory error.", + "reason": "is returned if the server cannot generate the result due to an out-of-memory error. @endDocuBlock", "code": "500" } ], @@ -72,10 +72,10 @@ } ], "notes": "Returns fatal, error, warning or info log messages from the server's global log. The result is a JSON object with the following attributes:

                                                          • lid: a list of log entry identifiers. Each log message is uniquely identified by its lid and the identifiers are in ascending order.
                                                          • level: a list of the log-levels for all log entries.
                                                          • timestamp: a list of the timestamps as seconds since 1970-01-01 for all log entries.
                                                          • text a list of the texts of all log entries
                                                          • totalAmount: the total amount of log entries before pagination.", - "summary": "reads the global log from the server", + "summary": " Read global log from the server", "httpMethod": "GET", "examples": "", - "nickname": "readsTheGlobalLogFromTheServer" + "nickname": "ReadGlobalLogFromTheServer" } ], "path": "/_admin/log" diff --git a/js/apps/system/aardvark/api-docs/query.json b/js/apps/system/aardvark/api-docs/query.json index ea24aba452..644aaed546 100644 --- a/js/apps/system/aardvark/api-docs/query.json +++ b/js/apps/system/aardvark/api-docs/query.json @@ -22,14 +22,14 @@ "paramType": "body", "required": "true", "name": "query", - "description": "

                                                            " + "description": "To validate a query string without executing it, the query string can be passed to the server via an HTTP POST request.

                                                            These query string needs to be passed in the attribute query of a JSON object as the body of the POST request.

                                                            " } ], - "notes": "

                                                            To validate a query string without executing it, the query string can be passed to the server via an HTTP POST request.

                                                            These query string needs to be passed in the attribute query of a JSON object as the body of the POST request.

                                                            ", - "summary": "parses a query", + "notes": "", + "summary": " Parse query", "httpMethod": "POST", - "examples": "

                                                            Valid query:



                                                            unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/query\n{ \"query\" : \"FOR p IN products FILTER p.name == @name LIMIT 2 RETURN p.n\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"bindVars\" : [ \n    \"name\" \n  ], \n  \"collections\" : [ \n    \"products\" \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n



                                                            Invalid query:



                                                            unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/query\n{ \"query\" : \"FOR p IN products FILTER p.name = @name LIMIT 2 RETURN p.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\" : 1501, \n  \"errorMessage\" : \"syntax error, unexpected assignment near '= @name LIMIT 2 RETURN p.n' at positio...\" \n}\n\n

                                                            ", - "nickname": "parsesAQuery" + "examples": "

                                                            Valid query:



                                                            shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/query\n{ \"query\" : \"FOR p IN products FILTER p.name == @name LIMIT 2 RETURN p.n\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"bindVars\" : [ \n    \"name\" \n  ], \n  \"collections\" : [ \n    \"products\" \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n



                                                            Invalid query:



                                                            shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/query\n{ \"query\" : \"FOR p IN products FILTER p.name = @name LIMIT 2 RETURN p.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\" : 1501, \n  \"errorMessage\" : \"syntax error, unexpected assignment near '= @name LIMIT 2 RETURN p.n' at position 1:33\" \n}\n

                                                            @endDocuBlock", + "nickname": "ParseQuery" } ], "path": "/_api/query" diff --git a/js/apps/system/aardvark/api-docs/replication.json b/js/apps/system/aardvark/api-docs/replication.json index 53fe8acd12..133c6581ae 100644 --- a/js/apps/system/aardvark/api-docs/replication.json +++ b/js/apps/system/aardvark/api-docs/replication.json @@ -3,68 +3,6 @@ "swaggerVersion": "1.1", "apiVersion": "0.1", "apis": [ - { - "operations": [ - { - "errorResponses": [ - { - "reason": "is returned if the logger was started successfully, or was already running.

                                                            ", - "code": "200" - }, - { - "reason": "is returned when an invalid HTTP method is used.

                                                            ", - "code": "405" - }, - { - "reason": "is returned if the logger could not be started.

                                                            ", - "code": "500" - }, - { - "reason": "is returned when this operation is called on a coordinator in a cluster.

                                                            ", - "code": "501" - } - ], - "parameters": [], - "notes": "Starts the server's replication logger. Will do nothing if the replication logger is already running.

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

                                                            • running: will contain true
                                                            Note: this method is not supported on a coordinator in a cluster.

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

                                                            Starts the replication logger.



                                                            unix> curl -X PUT --dump - http://localhost:8529/_api/replication/logger-start\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"running\" : true \n}\n\n

                                                            ", - "nickname": "startsTheReplicationLogger" - } - ], - "path": "/_api/replication/logger-start" - }, - { - "operations": [ - { - "errorResponses": [ - { - "reason": "is returned if the logger was stopped successfully, or was not running before.

                                                            ", - "code": "200" - }, - { - "reason": "is returned when an invalid HTTP method is used.

                                                            ", - "code": "405" - }, - { - "reason": "is returned if the logger could not be stopped.

                                                            ", - "code": "500" - }, - { - "reason": "is returned when this operation is called on a coordinator in a cluster.

                                                            ", - "code": "501" - } - ], - "parameters": [], - "notes": "Stops the server's replication logger. Will do nothing if the replication logger is not running.

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

                                                            • running: will contain false
                                                            Note: this method is not supported on a coordinator in a cluster.

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

                                                            Starts the replication logger.



                                                            unix> curl -X PUT --dump - http://localhost:8529/_api/replication/logger-stop\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"running\" : false \n}\n\n

                                                            ", - "nickname": "stopsTheReplicationLogger" - } - ], - "path": "/_api/replication/logger-stop" - }, { "operations": [ { @@ -83,81 +21,15 @@ } ], "parameters": [], - "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", + "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", + "summary": " Return 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\" : \"322584999\", \n    \"totalEvents\" : 2, \n    \"time\" : \"2014-06-06T14:07:29Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"2.1.0-devel\", \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\" : \"322912679\", \n    \"totalEvents\" : 3, \n    \"time\" : \"2014-06-06T14:07:29Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"2.1.0-devel\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"clients\" : [ ] \n}\n\n

                                                                ", - "nickname": "returnsTheReplicationLoggerState" + "examples": "

                                                                Returns the state of the replication logger.



                                                                shell> curl --data-binary @- --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\" : \"1247813126\", \n    \"totalEvents\" : 7707, \n    \"time\" : \"2014-08-07T12:53:44Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"2.2.2-rc1\", \n    \"serverId\" : \"133870969021121\" \n  }, \n  \"clients\" : [ ] \n}\n

                                                                @endDocuBlock", + "nickname": "ReturnReplicationLoggerState" } ], "path": "/_api/replication/logger-state" }, - { - "operations": [ - { - "errorResponses": [ - { - "reason": "is returned if the request was executed successfully.

                                                                ", - "code": "200" - }, - { - "reason": "is returned when an invalid HTTP method is used.

                                                                ", - "code": "405" - }, - { - "reason": "is returned if an error occurred while assembling the response.

                                                                ", - "code": "500" - } - ], - "parameters": [], - "notes": "Returns the configuration of the replication logger.

                                                                The body of the response is a JSON hash with the configuration. The following attributes may be present in the configuration:

                                                                • autoStart: whether or not to automatically start the replication logger on server startup
                                                                • logRemoteChanges: whether or not externally created changes should be logged by the local logger
                                                                • maxEvents: the maximum number of log events kept by the replication logger before deleting oldest events. A value of 0 means that the number of events is not restricted.
                                                                • maxEventsSize: the maximum cumulated size of log event data kept by the replication logger before deleting oldest events. A value of 0 means that the cumulated size of events is not restricted.", - "summary": "returns the configuration of the replication logger", - "httpMethod": "GET", - "examples": "



                                                                  unix> curl --dump - http://localhost:8529/_api/replication/logger-config\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"autoStart\" : false, \n  \"logRemoteChanges\" : false, \n  \"maxEvents\" : 1048576, \n  \"maxEventsSize\" : 134217728 \n}\n\n

                                                                  ", - "nickname": "returnsTheConfigurationOfTheReplicationLogger" - } - ], - "path": "/_api/replication/logger-config" - }, - { - "operations": [ - { - "errorResponses": [ - { - "reason": "is returned if the request was executed successfully.

                                                                  ", - "code": "200" - }, - { - "reason": "is returned if the configuration is incomplete or malformed.

                                                                  ", - "code": "400" - }, - { - "reason": "is returned when an invalid HTTP method is used.

                                                                  ", - "code": "405" - }, - { - "reason": "is returned if an error occurred while assembling the response.

                                                                  ", - "code": "500" - } - ], - "parameters": [ - { - "dataType": "Json", - "paramType": "body", - "required": "true", - "name": "configuration", - "description": "A JSON representation of the configuration.

                                                                  " - } - ], - "notes": "Sets the configuration of the replication logger.

                                                                  The body of the request must be JSON hash with the configuration. The following attributes are allowed for the configuration:

                                                                  • autoStart: whether or not to automatically start the replication logger on server startup
                                                                  • logRemoteChanges: whether or not externally created changes should be logged by the local logger
                                                                  • maxEvents: the maximum number of log events kept by the replication logger before deleting oldest events. Use a value of 0 to not restrict the number of events.
                                                                  • maxEventsSize: the maximum cumulated size of log event data kept by the replication logger before deleting oldest events. Use a value of 0 to not restrict the size.
                                                                  Note that when setting both maxEvents and maxEventsSize, reaching either limitation will trigger a deletion of the \"oldest\" log events from the replication log.

                                                                  In case of success, the body of the response is a JSON hash with the updated configuration.

                                                                  ", - "summary": "adjusts the configuration of the replication logger", - "httpMethod": "PUT", - "examples": "



                                                                  unix> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/replication/logger-config\n{\"logRemoteChanges\":true,\"maxEvents\":1048576}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"autoStart\" : false, \n  \"logRemoteChanges\" : true, \n  \"maxEvents\" : 1048576, \n  \"maxEventsSize\" : 134217728 \n}\n\n





                                                                  unix> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/replication/logger-config\n{\"logRemoteChanges\":false,\"maxEvents\":16384,\"maxEventsSize\":16777216}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"autoStart\" : false, \n  \"logRemoteChanges\" : false, \n  \"maxEvents\" : 16384, \n  \"maxEventsSize\" : 16777216 \n}\n\n

                                                                  ", - "nickname": "adjustsTheConfigurationOfTheReplicationLogger" - } - ], - "path": "/_api/replication/logger-config" - }, { "operations": [ { @@ -184,11 +56,11 @@ "description": "A JSON object with the batch configuration.

                                                                  " } ], - "notes": "Creates a new dump batch and returns the batch's id.

                                                                  The body of the request must be a JSON hash with the following attributes:

                                                                  • ttl: the time-to-live for the new batch (in seconds)
                                                                  The response is a JSON hash with the following attributes:

                                                                  • id: the id of the batch
                                                                  Note: on a coordinator, this request must have the URL parameter DBserver which must be an ID of a DBserver. The very same request is forwarded synchronously to that DBserver. It is an error if this attribute is not bound in the coordinator case.

                                                                  ", - "summary": "creates a new dump batch", + "notes": "Creates a new dump batch and returns the batch's id.

                                                                  The body of the request must be a JSON hash with the following attributes:

                                                                  • ttl: the time-to-live for the new batch (in seconds)
                                                                  The response is a JSON hash with the following attributes:

                                                                  • id: the id of the batch
                                                                  *Note*: on a coordinator, this request must have the URL parameter DBserver which must be an ID of a DBserver. The very same request is forwarded synchronously to that DBserver. It is an error if this attribute is not bound in the coordinator case.

                                                                  ", + "summary": " Create new dump batch", "httpMethod": "POST", "examples": "", - "nickname": "createsANewDumpBatch" + "nickname": "CreateNewDumpBatch" } ], "path": "/_api/replication/batch" @@ -226,11 +98,11 @@ "description": "The id of the batch.

                                                                  " } ], - "notes": "Extends the ttl of an existing dump batch, using the batch's id and the provided ttl value.

                                                                  The body of the request must be a JSON hash with the following attributes:

                                                                  • ttl: the time-to-live for the batch (in seconds)
                                                                  If the batch's ttl can be extended successully, the response is empty.

                                                                  Note: on a coordinator, this request must have the URL parameter DBserver which must be an ID of a DBserver. The very same request is forwarded synchronously to that DBserver. It is an error if this attribute is not bound in the coordinator case.

                                                                  ", - "summary": "prolongs an existing dump batch", + "notes": "Extends the ttl of an existing dump batch, using the batch's id and the provided ttl value.

                                                                  The body of the request must be a JSON hash with the following attributes:

                                                                  • ttl: the time-to-live for the batch (in seconds)
                                                                  If the batch's ttl can be extended successully, the response is empty.

                                                                  *Note*: on a coordinator, this request must have the URL parameter DBserver which must be an ID of a DBserver. The very same request is forwarded synchronously to that DBserver. It is an error if this attribute is not bound in the coordinator case.

                                                                  ", + "summary": " Prolong existing dump batch", "httpMethod": "PUT", "examples": "", - "nickname": "prolongsAnExistingDumpBatch" + "nickname": "ProlongExistingDumpBatch" } ], "path": "/_api/replication/batch/{id}" @@ -261,11 +133,11 @@ "description": "The id of the batch.

                                                                  " } ], - "notes": "Deletes the existing dump batch, allowing compaction and cleanup to resume.

                                                                  Note: on a coordinator, this request must have the URL parameter DBserver which must be an ID of a DBserver. The very same request is forwarded synchronously to that DBserver. It is an error if this attribute is not bound in the coordinator case.

                                                                  ", - "summary": "deletes an existing dump batch", + "notes": "Deletes the existing dump batch, allowing compaction and cleanup to resume.

                                                                  *Note*: on a coordinator, this request must have the URL parameter DBserver which must be an ID of a DBserver. The very same request is forwarded synchronously to that DBserver. It is an error if this attribute is not bound in the coordinator case.

                                                                  ", + "summary": " Deletes an existing dump batch", "httpMethod": "DELETE", "examples": "", - "nickname": "deletesAnExistingDumpBatch" + "nickname": "DeletesAnExistingDumpBatch" } ], "path": "/_api/replication/batch/{id}" @@ -322,11 +194,11 @@ "description": "Approximate maximum size of the returned result.

                                                                  " } ], - "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.
                                                                  Note: this method is not supported on a coordinator in a cluster.

                                                                  ", - "summary": "returns recent log entries from the replication log", + "notes": "Returns data from the server's replication log. This method can be called by replication clients after an initial synchronization 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.
                                                                  *Note*: this method is not supported on a coordinator in a cluster.

                                                                  ", + "summary": " Returns log entries", "httpMethod": "GET", - "examples": "

                                                                  No log events available:



                                                                  unix> curl --dump - http://localhost:8529/_api/replication/logger-follow?from=323305895\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: 323305895\n\n



                                                                  A few log events:



                                                                  unix> curl --dump - http://localhost:8529/_api/replication/logger-follow?from=323699111\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: 325665191\nx-arango-replication-lasttick: 325665191\n\n{\"tick\":\"323895719\",\"type\":2000,\"cid\":\"323764647\",\"cname\":\"products\",\"collection\":{\"version\":5,\"type\":2,\"cid\":\"323764647\",\"deleted\":false,\"doCompact\":true,\"maximalSize\":1048576,\"name\":\"products\",\"isVolatile\":false,\"waitForSync\":false}}\n{\"tick\":\"324420007\",\"type\":2300,\"cid\":\"323764647\",\"cname\":\"products\",\"key\":\"p1\",\"rev\":\"324223399\",\"data\":{\"_key\":\"p1\",\"_rev\":\"324223399\",\"name\":\"flux compensator\"}}\n{\"tick\":\"324878759\",\"type\":2300,\"cid\":\"323764647\",\"cname\":\"products\",\"key\":\"p2\",\"rev\":\"324682151\",\"data\":{\"_key\":\"p2\",\"_rev\":\"324682151\",\"hp\":5100,\"name\":\"hybrid hovercraft\"}}\n{\"tick\":\"325206439\",\"type\":2302,\"cid\":\"323764647\",\"cname\":\"products\",\"key\":\"p1\",\"rev\":\"325009831\",\"oldRev\":\"324223399\"}\n{\"tick\":\"325534119\",\"type\":2300,\"cid\":\"323764647\",\"cname\":\"products\",\"key\":\"p2\",\"rev\":\"325337511\",\"oldRev\":\"324682151\",\"data\":{\"_key\":\"p2\",\"_rev\":\"325337511\",\"hp\":5100,\"name\":\"broken hovercraft\"}}\n{\"tick\":\"325665191\",\"type\":2001,\"cid\":\"323764647\",\"cname\":\"products\"}\n\n\n



                                                                  More events than would fit into the response:



                                                                  unix> curl --dump - http://localhost:8529/_api/replication/logger-follow?from=326058407&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: 326779303\nx-arango-replication-lasttick: 328024487\n\n{\"tick\":\"326255015\",\"type\":2000,\"cid\":\"326123943\",\"cname\":\"products\",\"collection\":{\"version\":5,\"type\":2,\"cid\":\"326123943\",\"deleted\":false,\"doCompact\":true,\"maximalSize\":1048576,\"name\":\"products\",\"isVolatile\":false,\"waitForSync\":false}}\n{\"tick\":\"326779303\",\"type\":2300,\"cid\":\"326123943\",\"cname\":\"products\",\"key\":\"p1\",\"rev\":\"326582695\",\"data\":{\"_key\":\"p1\",\"_rev\":\"326582695\",\"name\":\"flux compensator\"}}\n\n\n

                                                                  ", - "nickname": "returnsRecentLogEntriesFromTheReplicationLog" + "examples": "

                                                                  No log events available:



                                                                  shell> curl --data-binary @- --dump - http://localhost:8529/_api/replication/logger-follow?from=1247878662\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: 1247878662\n\n



                                                                  A few log events:



                                                                  shell> curl --data-binary @- --dump - http://localhost:8529/_api/replication/logger-follow?from=1247878662\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: 1249123846\nx-arango-replication-lasttick: 1249123846\n\n\"{\\\"tick\\\":\\\"1248009734\\\",\\\"type\\\":2000,\\\"database\\\":\\\"73222\\\",\\\"cid\\\":\\\"1247944198\\\",\\\"collection\\\":{\\\"version\\\":5,\\\"type\\\":2,\\\"cid\\\":\\\"1247944198\\\",\\\"deleted\\\":false,\\\"doCompact\\\":true,\\\"maximalSize\\\":1048576,\\\"name\\\":\\\"products\\\",\\\"isVolatile\\\":false,\\\"waitForSync\\\":false}}\\n{\\\"tick\\\":\\\"1248337414\\\",\\\"type\\\":2300,\\\"database\\\":\\\"73222\\\",\\\"cid\\\":\\\"1247944198\\\",\\\"tid\\\":\\\"0\\\",\\\"key\\\":\\\"p1\\\",\\\"rev\\\":\\\"1248271878\\\",\\\"data\\\":{\\\"_key\\\":\\\"p1\\\",\\\"_rev\\\":\\\"1248271878\\\",\\\"name\\\":\\\"flux compensator\\\"}}\\n{\\\"tick\\\":\\\"1248665094\\\",\\\"type\\\":2300,\\\"database\\\":\\\"73222\\\",\\\"cid\\\":\\\"1247944198\\\",\\\"tid\\\":\\\"0\\\",\\\"key\\\":\\\"p2\\\",\\\"rev\\\":\\\"1248599558\\\",\\\"data\\\":{\\\"_key\\\":\\\"p2\\\",\\\"_rev\\\":\\\"1248599558\\\",\\\"hp\\\":5100,\\\"name\\\":\\\"hybrid hovercraft\\\"}}\\n{\\\"tick\\\":\\\"1248861702\\\",\\\"type\\\":2302,\\\"database\\\":\\\"73222\\\",\\\"cid\\\":\\\"1247944198\\\",\\\"tid\\\":\\\"0\\\",\\\"key\\\":\\\"p1\\\",\\\"rev\\\":\\\"1248796166\\\"}\\n{\\\"tick\\\":\\\"1249058310\\\",\\\"type\\\":2300,\\\"database\\\":\\\"73222\\\",\\\"cid\\\":\\\"1247944198\\\",\\\"tid\\\":\\\"0\\\",\\\"key\\\":\\\"p2\\\",\\\"rev\\\":\\\"1248992774\\\",\\\"data\\\":{\\\"_key\\\":\\\"p2\\\",\\\"_rev\\\":\\\"1248992774\\\"}}\\n{\\\"tick\\\":\\\"1249123846\\\",\\\"type\\\":2001,\\\"database\\\":\\\"73222\\\",\\\"cid\\\":\\\"1247944198\\\"}\\n\"\n



                                                                  More events than would fit into the response:



                                                                  shell> curl --data-binary @- --dump - http://localhost:8529/_api/replication/logger-follow?from=1249123846&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: 1249582598\nx-arango-replication-lasttick: 1250369030\n\n\"{\\\"tick\\\":\\\"1249254918\\\",\\\"type\\\":2000,\\\"database\\\":\\\"73222\\\",\\\"cid\\\":\\\"1249189382\\\",\\\"collection\\\":{\\\"version\\\":5,\\\"type\\\":2,\\\"cid\\\":\\\"1249189382\\\",\\\"deleted\\\":false,\\\"doCompact\\\":true,\\\"maximalSize\\\":1048576,\\\"name\\\":\\\"products\\\",\\\"isVolatile\\\":false,\\\"waitForSync\\\":false}}\\n{\\\"tick\\\":\\\"1249582598\\\",\\\"type\\\":2300,\\\"database\\\":\\\"73222\\\",\\\"cid\\\":\\\"1249189382\\\",\\\"tid\\\":\\\"0\\\",\\\"key\\\":\\\"p1\\\",\\\"rev\\\":\\\"1249517062\\\",\\\"data\\\":{\\\"_key\\\":\\\"p1\\\",\\\"_rev\\\":\\\"1249517062\\\",\\\"name\\\":\\\"flux compensator\\\"}}\\n\"\n

                                                                  @endDocuBlock", + "nickname": "ReturnsLogEntries" } ], "path": "/_api/replication/logger-follow" @@ -357,11 +229,11 @@ "description": "Include system collections in the result. The default value is false.

                                                                  " } ], - "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.
                                                                  Note: on a coordinator, this request must have the URL parameter DBserver which must be an ID of a DBserver. The very same request is forwarded synchronously to that DBserver. It is an error if this attribute is not bound in the coordinator case.

                                                                  ", - "summary": "returns an inventory of collections and indexes", + "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 and tick 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.
                                                                  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.
                                                                  *Note*: on a coordinator, this request must have the URL parameter DBserver which must be an ID of a DBserver. The very same request is forwarded synchronously to that DBserver. It is an error if this attribute is not bound in the coordinator case.

                                                                  ", + "summary": " Return 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\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"40780199\", \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\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"39928231\", \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\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"29245863\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"female\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"29311399\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"male\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"127025575\", \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\" : 5, \n        \"type\" : 3, \n        \"cid\" : \"128270759\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"edges2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 3, \n        \"cid\" : \"29376935\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"relation\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    } \n  ], \n  \"state\" : { \n    \"running\" : false, \n    \"lastLogTick\" : \"328090023\", \n    \"totalEvents\" : 22, \n    \"time\" : \"2014-06-06T14:07:29Z\" \n  }, \n  \"tick\" : \"328155559\" \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\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"40780199\", \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\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"39928231\", \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\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"29245863\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"female\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"328221095\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"IndexedCollection1\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ \n        { \n          \"id\" : \"328483239\", \n          \"type\" : \"hash\", \n          \"unique\" : false, \n          \"fields\" : [ \n            \"name\" \n          ] \n        }, \n        { \n          \"id\" : \"328745383\", \n          \"type\" : \"skiplist\", \n          \"unique\" : true, \n          \"fields\" : [ \n            \"a\", \n            \"b\" \n          ] \n        }, \n        { \n          \"id\" : \"328876455\", \n          \"type\" : \"cap\", \n          \"unique\" : false, \n          \"size\" : 500, \n          \"byteSize\" : 0 \n        } \n      ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"328941991\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"IndexedCollection2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ \n        { \n          \"id\" : \"329204135\", \n          \"type\" : \"fulltext\", \n          \"unique\" : false, \n          \"minLength\" : 10, \n          \"fields\" : [ \n            \"text\" \n          ] \n        }, \n        { \n          \"id\" : \"329400743\", \n          \"type\" : \"skiplist\", \n          \"unique\" : false, \n          \"fields\" : [ \n            \"a\" \n          ] \n        }, \n        { \n          \"id\" : \"329531815\", \n          \"type\" : \"cap\", \n          \"unique\" : false, \n          \"size\" : 0, \n          \"byteSize\" : 1048576 \n        } \n      ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"29311399\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"male\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"127025575\", \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\" : 5, \n        \"type\" : 3, \n        \"cid\" : \"128270759\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"edges2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 3, \n        \"cid\" : \"29376935\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"relation\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    } \n  ], \n  \"state\" : { \n    \"running\" : false, \n    \"lastLogTick\" : \"328090023\", \n    \"totalEvents\" : 22, \n    \"time\" : \"2014-06-06T14:07:29Z\" \n  }, \n  \"tick\" : \"329531815\" \n}\n\n

                                                                  ", - "nickname": "returnsAnInventoryOfCollectionsAndIndexes" + "examples": "



                                                                  shell> curl --data-binary @- --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\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"807476742\", \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\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"623123974\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"better-example\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"717889030\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"Company\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"717626886\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"Customer\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"806559238\", \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\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"718151174\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"Electronics\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"1212358150\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"female\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"1122115078\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"frenchCity\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"1121852934\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"germanCity\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"718020102\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"Groceries\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"1212489222\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"male\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"1147477510\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"otherVertices\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"921247238\", \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\" : 5, \n        \"type\" : 3, \n        \"cid\" : \"922689030\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"edges2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 3, \n        \"cid\" : \"1122246150\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"frenchHighway\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 3, \n        \"cid\" : \"717757958\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"friend_of\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 3, \n        \"cid\" : \"1121984006\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"germanHighway\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 3, \n        \"cid\" : \"718282246\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"has_bought\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 3, \n        \"cid\" : \"1122377222\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"internationalHighway\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 3, \n        \"cid\" : \"1212620294\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"relation\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    } \n  ], \n  \"state\" : { \n    \"running\" : true, \n    \"lastLogTick\" : \"1250369030\", \n    \"totalEvents\" : 7727, \n    \"time\" : \"2014-08-07T12:53:46Z\" \n  }, \n  \"tick\" : \"1250369030\" \n}\n



                                                                  With some additional indexes:



                                                                  shell> curl --data-binary @- --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\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"807476742\", \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\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"623123974\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"better-example\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"717889030\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"Company\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"717626886\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"Customer\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"806559238\", \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\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"718151174\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"Electronics\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"1212358150\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"female\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"1122115078\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"frenchCity\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"1121852934\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"germanCity\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"718020102\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"Groceries\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"1250434566\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"IndexedCollection1\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ \n        { \n          \"id\" : \"1250696710\", \n          \"type\" : \"hash\", \n          \"unique\" : false, \n          \"fields\" : [ \n            \"name\" \n          ] \n        }, \n        { \n          \"id\" : \"1251024390\", \n          \"type\" : \"skiplist\", \n          \"unique\" : true, \n          \"fields\" : [ \n            \"a\", \n            \"b\" \n          ] \n        }, \n        { \n          \"id\" : \"1251220998\", \n          \"type\" : \"cap\", \n          \"unique\" : false, \n          \"size\" : 500, \n          \"byteSize\" : 0 \n        } \n      ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"1251417606\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"IndexedCollection2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ \n        { \n          \"id\" : \"1251679750\", \n          \"type\" : \"fulltext\", \n          \"unique\" : false, \n          \"minLength\" : 10, \n          \"fields\" : [ \n            \"text\" \n          ] \n        }, \n        { \n          \"id\" : \"1251941894\", \n          \"type\" : \"skiplist\", \n          \"unique\" : false, \n          \"fields\" : [ \n            \"a\" \n          ] \n        }, \n        { \n          \"id\" : \"1252138502\", \n          \"type\" : \"cap\", \n          \"unique\" : false, \n          \"size\" : 0, \n          \"byteSize\" : 1048576 \n        } \n      ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"1212489222\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"male\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"1147477510\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"otherVertices\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 2, \n        \"cid\" : \"921247238\", \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\" : 5, \n        \"type\" : 3, \n        \"cid\" : \"922689030\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"edges2\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 3, \n        \"cid\" : \"1122246150\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"frenchHighway\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 3, \n        \"cid\" : \"717757958\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"friend_of\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 3, \n        \"cid\" : \"1121984006\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"germanHighway\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 3, \n        \"cid\" : \"718282246\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"has_bought\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 3, \n        \"cid\" : \"1122377222\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"internationalHighway\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    }, \n    { \n      \"parameters\" : { \n        \"version\" : 5, \n        \"type\" : 3, \n        \"cid\" : \"1212620294\", \n        \"deleted\" : false, \n        \"doCompact\" : true, \n        \"maximalSize\" : 1048576, \n        \"name\" : \"relation\", \n        \"isVolatile\" : false, \n        \"waitForSync\" : false \n      }, \n      \"indexes\" : [ ] \n    } \n  ], \n  \"state\" : { \n    \"running\" : true, \n    \"lastLogTick\" : \"1251745286\", \n    \"totalEvents\" : 7740, \n    \"time\" : \"2014-08-07T12:53:46Z\" \n  }, \n  \"tick\" : \"1252269574\" \n}\n

                                                                  @endDocuBlock", + "nickname": "ReturnInventoryOfCollectionsAndIndexes" } ], "path": "/_api/replication/inventory" @@ -379,7 +251,7 @@ "code": "405" }, { - "reason": "is returned if an error occurred while assembling the response.", + "reason": "is returned if an error occurred while assembling the response. @endDocuBlock", "code": "500" } ], @@ -392,11 +264,11 @@ "description": "Include system collections in the result. The default value is false.

                                                                  " } ], - "notes": "Returns the list of collections and indexes available on the cluster.

                                                                  The response will be a list of JSON hash array, one for each collection, which contains exactly two keys \"parameters\" and \"indexes\". This information comes from Plan/Collections//* in the agency, just that the indexes attribute there is relocated to adjust it to the data format of arangodump.

                                                                  ", - "summary": "returns an inventory of collections and indexes", + "notes": "Returns the list of collections and indexes available on the cluster.

                                                                  The response will be a list of JSON hash array, one for each collection, which contains exactly two keys \"parameters\" and \"indexes\". This information comes from Plan/Collections//* in the agency, just that the indexes attribute there is relocated to adjust it to the data format of arangodump.

                                                                  ", + "summary": " Return cluster inventory of collections and indexes", "httpMethod": "GET", "examples": "", - "nickname": "returnsAnInventoryOfCollectionsAndIndexes" + "nickname": "ReturnClusterInventoryOfCollectionsAndIndexes" } ], "path": "/_api/replication/clusterInventory" @@ -463,11 +335,11 @@ "description": "Whether or not to include tick values in the dump. Default value is true.

                                                                  " } ], - "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", + "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:

                                                                  • tick: the operation's tick attribute
                                                                  • 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.
                                                                  • type: the type of entry. Possible values for type are: - 2300: document insertion/update - 2301: edge insertion/update - 2302: document/edge deletion
                                                                  *Note*: there will be no distinction between inserts and updates when calling this method.

                                                                  ", + "summary": " Return 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: 331497895\n\n{\"tick\":\"330121639\",\"type\":2300,\"key\":\"abcdef\",\"rev\":\"330056103\",\"data\":{\"_key\":\"abcdef\",\"_rev\":\"330056103\",\"test\":true,\"a\":\"abc\"}}\n{\"tick\":\"330514855\",\"type\":2300,\"key\":\"123456\",\"rev\":\"330449319\",\"data\":{\"_key\":\"123456\",\"_rev\":\"330449319\",\"c\":false,\"b\":1}}\n{\"tick\":\"330842535\",\"type\":2300,\"key\":\"123456\",\"rev\":\"330776999\",\"data\":{\"_key\":\"123456\",\"_rev\":\"330776999\",\"c\":false,\"b\":1,\"d\":\"additional value\"}}\n{\"tick\":\"331104679\",\"type\":2300,\"key\":\"foobar\",\"rev\":\"331039143\",\"data\":{\"_key\":\"foobar\",\"_rev\":\"331039143\"}}\n{\"tick\":\"331301287\",\"type\":2302,\"key\":\"foobar\",\"rev\":\"331235751\"}\n{\"tick\":\"331497895\",\"type\":2302,\"key\":\"abcdef\",\"rev\":\"331432359\"}\n\n\n

                                                                  ", - "nickname": "returnsTheDataOfACollection" + "examples": "

                                                                  Empty collection:



                                                                  shell> curl --data-binary @- --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:



                                                                  shell> curl --data-binary @- --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: 1254694406\n\n\"{\\\"tick\\\":\\\"1254039046\\\",\\\"type\\\":2300,\\\"key\\\":\\\"123456\\\",\\\"rev\\\":\\\"1253973510\\\",\\\"data\\\":{\\\"_key\\\":\\\"123456\\\",\\\"_rev\\\":\\\"1253973510\\\",\\\"c\\\":false,\\\"b\\\":1,\\\"d\\\":\\\"additional value\\\"}}\\n{\\\"tick\\\":\\\"1254497798\\\",\\\"type\\\":2302,\\\"key\\\":\\\"foobar\\\",\\\"rev\\\":\\\"1254432262\\\"}\\n{\\\"tick\\\":\\\"1254694406\\\",\\\"type\\\":2302,\\\"key\\\":\\\"abcdef\\\",\\\"rev\\\":\\\"1254628870\\\"}\\n\"\n

                                                                  @endDocuBlock", + "nickname": "ReturnDataOfACollection" } ], "path": "/_api/replication/dump" @@ -493,7 +365,7 @@ "code": "500" }, { - "reason": "is returned when this operation is called on a coordinator in a cluster.", + "reason": "is returned when this operation is called on a coordinator in a cluster. @endDocuBlock", "code": "501" } ], @@ -506,11 +378,11 @@ "description": "A JSON representation of the configuration.

                                                                  " } ], - "notes": "Starts a full data synchronisation from a remote endpoint into the local ArangoDB database.

                                                                  The body of the request must be JSON hash with the configuration. The following attributes are allowed for the configuration:

                                                                  • endpoint: the endpoint to connect to (e.g. \"tcp://192.168.173.13:8529\").
                                                                  • database: the database name on the master (if not specified, defaults to the name of the local current database).
                                                                  • username: an optional ArangoDB username to use when connecting to the endpoint.
                                                                  • password: the password to use when connecting to the endpoint.
                                                                  • restrictType: an optional string value for collection filtering. When specified, the allowed values are include or exclude.
                                                                  • restrictCollections: an optional list of collections for use with restrictType. If restrictType is include, only the specified collections will be sychronised. If restrictType is exclude, all but the specified collections will be synchronised.
                                                                  In case of success, the body of the response is a JSON hash with the following attributes:

                                                                  • collections: a list of collections that were transferred from the endpoint
                                                                  • lastLogTick: the last log tick on the endpoint at the time the transfer was started. Use this value as the from value when starting the continuous synchronisation later.
                                                                  WARNING: calling this method will sychronise data from the collections found on the remote endpoint to the local ArangoDB database. All data in the local collections will be purged and replaced with data from the endpoint.

                                                                  Use with caution!

                                                                  Note: this method is not supported on a coordinator in a cluster.

                                                                  ", - "summary": "synchronises data from a remote endpoint", + "notes": "Starts a full data synchronization from a remote endpoint into the local ArangoDB database.

                                                                  The sync method can be used by replication clients to connect an ArangoDB database to a remote endpoint, fetch the remote list of collections and indexes, and collection data. It will thus create a local backup of the state of data at the remote ArangoDB database. sync works on a per-database level.

                                                                  sync will first fetch the list of collections and indexes from the remote endpoint. It does so by calling the inventory API of the remote database. It will then purge data in the local ArangoDB database, and after start will transfer collection data from the remote database to the local ArangoDB database. It will extract data from the remote database by calling the remote database's dump API until all data are fetched.

                                                                  The body of the request must be JSON hash with the configuration. The following attributes are allowed for the configuration:

                                                                  • endpoint: the endpoint to connect to (e.g. \"tcp://192.168.173.13:8529\").
                                                                  • database: the database name on the master (if not specified, defaults to the name of the local current database).
                                                                  • username: an optional ArangoDB username to use when connecting to the endpoint.
                                                                  • password: the password to use when connecting to the endpoint.
                                                                  • restrictType: an optional string value for collection filtering. When specified, the allowed values are include or exclude.
                                                                  • restrictCollections: an optional list of collections for use with restrictType. If restrictType is include, only the specified collections will be sychronised. If restrictType is exclude, all but the specified collections will be synchronized.
                                                                  In case of success, the body of the response is a JSON hash with the following attributes:

                                                                  • collections: a list of collections that were transferred from the endpoint
                                                                  • lastLogTick: the last log tick on the endpoint at the time the transfer was started. Use this value as the from value when starting the continuous synchronization later.
                                                                  WARNING: calling this method will sychronise data from the collections found on the remote endpoint to the local ArangoDB database. All data in the local collections will be purged and replaced with data from the endpoint.

                                                                  Use with caution!

                                                                  *Note*: this method is not supported on a coordinator in a cluster.

                                                                  ", + "summary": " Synchronize data from a remote endpoint", "httpMethod": "PUT", "examples": "", - "nickname": "synchronisesDataFromARemoteEndpoint" + "nickname": "SynchronizeDataFromARemoteEndpoint" } ], "path": "/_api/replication/sync" @@ -534,10 +406,10 @@ ], "parameters": [], "notes": "Returns the servers id. The id is also returned by other replication API methods, and this method is an easy means of determining a server's id.

                                                                  The body of the response is a JSON hash with the attribute serverId. The server id is returned as a string.

                                                                  ", - "summary": "returns the servers id", + "summary": " Return server id", "httpMethod": "GET", - "examples": "



                                                                  unix> curl --dump - http://localhost:8529/_api/replication/server-id\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"serverId\" : \"190048212006786\" \n}\n\n

                                                                  ", - "nickname": "returnsTheServersId" + "examples": "



                                                                  shell> curl --data-binary @- --dump - http://localhost:8529/_api/replication/server-id\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"serverId\" : \"133870969021121\" \n}\n

                                                                  @endDocuBlock", + "nickname": "ReturnServerId" } ], "path": "/_api/replication/server-id" @@ -561,10 +433,10 @@ ], "parameters": [], "notes": "Returns the configuration of the replication applier.

                                                                  The body of the response is a JSON hash with the configuration. The following attributes may be present in the configuration:

                                                                  • endpoint: the logger server to connect to (e.g. \"tcp://192.168.173.13:8529\").
                                                                  • database: the name of the database to connect to (e.g. \"_system\").
                                                                  • username: an optional ArangoDB username to use when connecting to the endpoint.
                                                                  • password: the password to use when connecting to the endpoint.
                                                                  • maxConnectRetries: the maximum number of connection attempts the applier will make in a row. If the applier cannot establish a connection to the endpoint in this number of attempts, it will stop itself.
                                                                  • connectTimeout: the timeout (in seconds) when attempting to connect to the endpoint. This value is used for each connection attempt.
                                                                  • requestTimeout: the timeout (in seconds) for individual requests to the endpoint.
                                                                  • chunkSize: the requested maximum size for log transfer packets that is used when the endpoint is contacted.
                                                                  • autoStart: whether or not to auto-start the replication applier on (next and following) server starts
                                                                  • adaptivePolling: whether or not the replication applier will use adaptive polling.", - "summary": "returns the configuration of the replication applier", + "summary": " Return configuration of replication applier", "httpMethod": "GET", - "examples": "



                                                                    unix> curl --dump - http://localhost:8529/_api/replication/applier-config\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"requestTimeout\" : 300, \n  \"connectTimeout\" : 10, \n  \"maxConnectRetries\" : 100, \n  \"sslProtocol\" : 0, \n  \"chunkSize\" : 0, \n  \"autoStart\" : false, \n  \"adaptivePolling\" : true \n}\n\n

                                                                    ", - "nickname": "returnsTheConfigurationOfTheReplicationApplier" + "examples": "



                                                                    shell> curl --data-binary @- --dump - http://localhost:8529/_api/replication/applier-config\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"requestTimeout\" : 300, \n  \"connectTimeout\" : 10, \n  \"maxConnectRetries\" : 100, \n  \"sslProtocol\" : 0, \n  \"chunkSize\" : 0, \n  \"autoStart\" : false, \n  \"adaptivePolling\" : true \n}\n

                                                                    @endDocuBlock", + "nickname": "ReturnConfigurationOfReplicationApplier" } ], "path": "/_api/replication/applier-config" @@ -600,10 +472,10 @@ } ], "notes": "Sets the configuration of the replication applier. The configuration can only be changed while the applier is not running. The updated configuration will be saved immediately but only become active with the next start of the applier.

                                                                    The body of the request must be JSON hash with the configuration. The following attributes are allowed for the configuration:

                                                                    • endpoint: the logger server to connect to (e.g. \"tcp://192.168.173.13:8529\"). The endpoint must be specified.
                                                                    • database: the name of the database on the endpoint. If not specified, defaults to the current local database name.
                                                                    • username: an optional ArangoDB username to use when connecting to the endpoint.
                                                                    • password: the password to use when connecting to the endpoint.
                                                                    • maxConnectRetries: the maximum number of connection attempts the applier will make in a row. If the applier cannot establish a connection to the endpoint in this number of attempts, it will stop itself.
                                                                    • connectTimeout: the timeout (in seconds) when attempting to connect to the endpoint. This value is used for each connection attempt.
                                                                    • requestTimeout: the timeout (in seconds) for individual requests to the endpoint.
                                                                    • chunkSize: the requested maximum size for log transfer packets that is used when the endpoint is contacted.
                                                                    • autoStart: whether or not to auto-start the replication applier on (next and following) server starts
                                                                    • adaptivePolling: if set to true, the replication applier will fall to sleep for an increasingly long period in case the logger server at the endpoint does not have any more replication events to apply. Using adaptive polling is thus useful to reduce the amount of work for both the applier and the logger server for cases when there are only infrequent changes. The downside is that when using adaptive polling, it might take longer for the replication applier to detect that there are new replication events on the logger server. Setting adaptivePolling to false will make the replication applier contact the logger server in a constant interval, regardless of whether the logger server provides updates frequently or seldomly.
                                                                    In case of success, the body of the response is a JSON hash with the updated configuration.

                                                                    ", - "summary": "adjusts the configuration of the replication applier", + "summary": " Adjust configuration of replication applier", "httpMethod": "PUT", - "examples": "



                                                                    unix> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/replication/applier-config\n{\"endpoint\":\"tcp://127.0.0.1:8529\",\"username\":\"replicationApplier\",\"password\":\"applier1234@foxx\",\"chunkSize\":4194304,\"autoStart\":false,\"adaptivePolling\":true}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\", \n  \"username\" : \"replicationApplier\", \n  \"requestTimeout\" : 300, \n  \"connectTimeout\" : 10, \n  \"maxConnectRetries\" : 100, \n  \"sslProtocol\" : 0, \n  \"chunkSize\" : 4194304, \n  \"autoStart\" : false, \n  \"adaptivePolling\" : true \n}\n\n

                                                                    ", - "nickname": "adjustsTheConfigurationOfTheReplicationApplier" + "examples": "



                                                                    shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/replication/applier-config\n{\"endpoint\":\"tcp://127.0.0.1:8529\",\"username\":\"replicationApplier\",\"password\":\"applier1234@foxx\",\"chunkSize\":4194304,\"autoStart\":false,\"adaptivePolling\":true}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\", \n  \"username\" : \"replicationApplier\", \n  \"requestTimeout\" : 300, \n  \"connectTimeout\" : 10, \n  \"maxConnectRetries\" : 100, \n  \"sslProtocol\" : 0, \n  \"chunkSize\" : 4194304, \n  \"autoStart\" : false, \n  \"adaptivePolling\" : true \n}\n

                                                                    @endDocuBlock", + "nickname": "AdjustConfigurationOfReplicationApplier" } ], "path": "/_api/replication/applier-config" @@ -639,10 +511,10 @@ } ], "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", + "summary": " Start 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\" : \"2014-06-06T14:07:09Z\", \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\" : \"2014-06-06T14:07:29Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"2.1.0-devel\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

                                                                    ", - "nickname": "startsTheReplicationApplier" + "examples": "



                                                                    shell> 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\" : \"2014-08-07T12:53:21Z\", \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\" : \"2014-08-07T12:53:48Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"2.2.2-rc1\", \n    \"serverId\" : \"133870969021121\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n

                                                                    @endDocuBlock", + "nickname": "StartReplicationApplier" } ], "path": "/_api/replication/applier-start" @@ -666,10 +538,10 @@ ], "parameters": [], "notes": "Stops the replication applier. This will return immediately if the replication applier is not running.

                                                                    ", - "summary": "stops the replication applier", + "summary": " Stop 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\" : \"2014-06-06T14:07:29Z\", \n      \"message\" : \"fetching master state information\", \n      \"failedConnects\" : 1 \n    }, \n    \"totalRequests\" : 2, \n    \"totalFailedConnects\" : 2, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"time\" : \"2014-06-06T14:07:29Z\", \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\" : \"2014-06-06T14:07:29Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"2.1.0-devel\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

                                                                    ", - "nickname": "stopsTheReplicationApplier" + "examples": "



                                                                    shell> 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\" : \"2014-08-07T12:53:48Z\", \n      \"message\" : \"applier shut down\", \n      \"failedConnects\" : 1 \n    }, \n    \"totalRequests\" : 2, \n    \"totalFailedConnects\" : 2, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"time\" : \"2014-08-07T12:53:48Z\", \n      \"errorMessage\" : \"could not connect to master at tcp://127.0.0.1:8529: Could not connect\", \n      \"errorNum\" : 1412 \n    }, \n    \"time\" : \"2014-08-07T12:53:48Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"2.2.2-rc1\", \n    \"serverId\" : \"133870969021121\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n

                                                                    @endDocuBlock", + "nickname": "StopReplicationApplier" } ], "path": "/_api/replication/applier-stop" @@ -693,10 +565,10 @@ ], "parameters": [], "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", + "summary": " 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\" : \"2014-06-06T14:07:29Z\", \n      \"message\" : \"fetching master state information\", \n      \"failedConnects\" : 1 \n    }, \n    \"totalRequests\" : 2, \n    \"totalFailedConnects\" : 2, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"time\" : \"2014-06-06T14:07:29Z\", \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\" : \"2014-06-06T14:07:29Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"2.1.0-devel\", \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\" : \"2014-06-06T14:07:29Z\", \n      \"message\" : \"fetching master state information\", \n      \"failedConnects\" : 1 \n    }, \n    \"totalRequests\" : 2, \n    \"totalFailedConnects\" : 2, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"errorNum\" : 0 \n    }, \n    \"time\" : \"2014-06-06T14:07:29Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"2.1.0-devel\", \n    \"serverId\" : \"190048212006786\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n\n

                                                                      ", - "nickname": "returnsTheStateOfTheReplicationApplier" + "examples": "

                                                                      Fetching the state of an inactive applier:



                                                                      shell> curl --data-binary @- --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\" : \"2014-08-07T12:53:48Z\", \n      \"message\" : \"applier shut down\", \n      \"failedConnects\" : 1 \n    }, \n    \"totalRequests\" : 2, \n    \"totalFailedConnects\" : 2, \n    \"totalEvents\" : 0, \n    \"lastError\" : { \n      \"time\" : \"2014-08-07T12:53:48Z\", \n      \"errorMessage\" : \"could not connect to master at tcp://127.0.0.1:8529: Could not connect\", \n      \"errorNum\" : 1412 \n    }, \n    \"time\" : \"2014-08-07T12:53:48Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"2.2.2-rc1\", \n    \"serverId\" : \"133870969021121\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n



                                                                      Fetching the state of an active applier:



                                                                      shell> curl --data-binary @- --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\" : \"2014-08-07T12:53:48Z\", \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\" : \"2014-08-07T12:53:48Z\" \n  }, \n  \"server\" : { \n    \"version\" : \"2.2.2-rc1\", \n    \"serverId\" : \"133870969021121\" \n  }, \n  \"endpoint\" : \"tcp://127.0.0.1:8529\", \n  \"database\" : \"_system\" \n}\n

                                                                      @endDocuBlock", + "nickname": "StateOfTheReplicationApplier" } ], "path": "/_api/replication/applier-state" diff --git a/js/apps/system/aardvark/api-docs/simple.json b/js/apps/system/aardvark/api-docs/simple.json index 84992fa192..f2c4985a4a 100644 --- a/js/apps/system/aardvark/api-docs/simple.json +++ b/js/apps/system/aardvark/api-docs/simple.json @@ -16,7 +16,7 @@ "code": "400" }, { - "reason": "is returned if the collection specified by collection is unknown. The response body contains an error document in this case. The same error code is also returned if an invalid index id or type is used.

                                                                      ", + "reason": "is returned if the collection specified by collection is unknown. The response body contains an error document in this case. The same error code is also returned if an invalid index id or type is used. @endDocuBlock", "code": "404" } ], @@ -29,11 +29,11 @@ "description": "Contains the query specification.

                                                                      " } ], - "notes": "

                                                                      This will find all documents matching a given example, using the specified hash index.

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

                                                                      • collection: The name of the collection to query.
                                                                      • index: The id of the index to be used for the query. The index must exist and must be of type hash.
                                                                      • example: an example document. The example must contain a value for each attribute in the index.
                                                                      • skip: The number of documents to skip in the query. (optional)
                                                                      • limit: The maximal number of documents to return. (optional)
                                                                      Returns a cursor containing the result, see the manual for details.

                                                                      ", - "summary": "executes query by-example using a hash index", + "notes": "

                                                                      This will find all documents matching a given example, using the specified hash index.

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

                                                                      • collection: The name of the collection to query.
                                                                      • index: The id of the index to be used for the query. The index must exist and must be of type hash.
                                                                      • example: an example document. The example must contain a value for each attribute in the index.
                                                                      • skip: The number of documents to skip in the query. (optional)
                                                                      • limit: The maximal number of documents to return. (optional)
                                                                      Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details.

                                                                      ", + "summary": " Hash index", "httpMethod": "PUT", "examples": "", - "nickname": "executesQueryBy-exampleUsingAHashIndex" + "nickname": "HashIndex" } ], "path": "/_api/simple/by-example-hash" @@ -51,7 +51,7 @@ "code": "400" }, { - "reason": "is returned if the collection specified by collection is unknown. The response body contains an error document in this case. The same error code is also returned if an invalid index id or type is used.

                                                                      ", + "reason": "is returned if the collection specified by collection is unknown. The response body contains an error document in this case. The same error code is also returned if an invalid index id or type is used. @endDocuBlock", "code": "404" } ], @@ -64,11 +64,11 @@ "description": "Contains the query specification.

                                                                      " } ], - "notes": "

                                                                      This will find all documents matching a given example, using the specified skiplist index.

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

                                                                      • collection: The name of the collection to query.
                                                                      • index: The id of the index to be used for the query. The index must exist and must be of type skiplist.
                                                                      • example: an example document. The example must contain a value for each attribute in the index.
                                                                      • skip: The number of documents to skip in the query. (optional)
                                                                      • limit: The maximal number of documents to return. (optional)
                                                                      Returns a cursor containing the result, see the manual for details.

                                                                      ", - "summary": "executes query by-example using a skiplist index", + "notes": "

                                                                      This will find all documents matching a given example, using the specified skiplist index.

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

                                                                      • collection: The name of the collection to query.
                                                                      • index: The id of the index to be used for the query. The index must exist and must be of type skiplist.
                                                                      • example: an example document. The example must contain a value for each attribute in the index.
                                                                      • skip: The number of documents to skip in the query. (optional)
                                                                      • limit: The maximal number of documents to return. (optional)
                                                                      Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details.

                                                                      ", + "summary": " Skiplist index", "httpMethod": "PUT", "examples": "", - "nickname": "executesQueryBy-exampleUsingASkiplistIndex" + "nickname": "SkiplistIndex" } ], "path": "/_api/simple/by-example-skiplist" @@ -86,7 +86,7 @@ "code": "400" }, { - "reason": "is returned if the collection specified by collection is unknown. The response body contains an error document in this case. The same error code is also returned if an invalid index id or type is used.

                                                                      ", + "reason": "is returned if the collection specified by collection is unknown. The response body contains an error document in this case. The same error code is also returned if an invalid index id or type is used. @endDocuBlock", "code": "404" } ], @@ -99,11 +99,11 @@ "description": "Contains the query specification.

                                                                      " } ], - "notes": "

                                                                      This will find all documents matching a given example, using the specified skiplist index.

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

                                                                      • collection: The name of the collection to query.
                                                                      • index: The id of the index to be used for the query. The index must exist and must be of type bitarray.
                                                                      • example: an example document. The example must contain a value for each attribute in the index.
                                                                      • skip: The number of documents to skip in the query. (optional)
                                                                      • limit: The maximal number of documents to return. (optional)
                                                                      Returns a cursor containing the result, see the manual for details.

                                                                      ", - "summary": "executes query by-example using a bitarray index", + "notes": "

                                                                      This will find all documents matching a given example, using the specified skiplist index.

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

                                                                      • collection: The name of the collection to query.
                                                                      • index: The id of the index to be used for the query. The index must exist and must be of type bitarray.
                                                                      • example: an example document. The example must contain a value for each attribute in the index.
                                                                      • skip: The number of documents to skip in the query. (optional)
                                                                      • limit: The maximal number of documents to return. (optional)
                                                                      Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details.

                                                                      ", + "summary": " Bitarray index", "httpMethod": "PUT", "examples": "", - "nickname": "executesQueryBy-exampleUsingABitarrayIndex" + "nickname": "BitarrayIndex" } ], "path": "/_api/simple/by-example-bitarray" @@ -121,7 +121,7 @@ "code": "400" }, { - "reason": "is returned if the collection specified by collection is unknown. The response body contains an error document in this case. The same error code is also returned if an invalid index id or type is used.

                                                                      ", + "reason": "is returned if the collection specified by collection is unknown. The response body contains an error document in this case. The same error code is also returned if an invalid index id or type is used. @endDocuBlock", "code": "404" } ], @@ -134,11 +134,11 @@ "description": "Contains the query specification.

                                                                      " } ], - "notes": "

                                                                      This will find all documents matching a given condition, using the specified skiplist index.

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

                                                                      • collection: The name of the collection to query.
                                                                      • index: The id of the index to be used for the query. The index must exist and must be of type skiplist.
                                                                      • condition: the condition which all returned documents shall satisfy. Conditions must be specified for all indexed attributes.
                                                                      • skip: The number of documents to skip in the query. (optional)
                                                                      • limit: The maximal number of documents to return. (optional)
                                                                      Returns a cursor containing the result, see the manual for details.

                                                                      ", - "summary": "executes query by-condition using a skiplist index", + "notes": "

                                                                      This will find all documents matching a given condition, using the specified skiplist index.

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

                                                                      • collection: The name of the collection to query.
                                                                      • index: The id of the index to be used for the query. The index must exist and must be of type skiplist.
                                                                      • condition: the condition which all returned documents shall satisfy. Conditions must be specified for all indexed attributes.
                                                                      • skip: The number of documents to skip in the query. (optional)
                                                                      • limit: The maximal number of documents to return. (optional)
                                                                      Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details.

                                                                      ", + "summary": "Query by-condition using Skiplist index", "httpMethod": "PUT", "examples": "", - "nickname": "executesQueryBy-conditionUsingASkiplistIndex" + "nickname": "QueryBy-conditionUsingSkiplistIndex" } ], "path": "/_api/simple/by-condition-skiplist" @@ -156,7 +156,7 @@ "code": "400" }, { - "reason": "is returned if the collection specified by collection is unknown. The response body contains an error document in this case. The same error code is also returned if an invalid index id or type is used.

                                                                      ", + "reason": "is returned if the collection specified by collection is unknown. The response body contains an error document in this case. The same error code is also returned if an invalid index id or type is used.

                                                                      @endDocuBlock", "code": "404" } ], @@ -169,11 +169,11 @@ "description": "Contains the query specification.

                                                                      " } ], - "notes": "

                                                                      This will find all documents matching a given condition, using the specified skiplist index.

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

                                                                      • collection: The name of the collection to query.
                                                                      • index: The id of the index to be used for the query. The index must exist and must be of type bitarray.
                                                                      • condition: the condition which all returned documents shall satisfy. Conditions must be specified for all indexed attributes.
                                                                      • skip: The number of documents to skip in the query. (optional)
                                                                      • limit: The maximal number of documents to return. (optional)
                                                                      Returns a cursor containing the result, see the manual for details.

                                                                      ", - "summary": "executes query by-condition using a bitarray index", + "notes": "

                                                                      This will find all documents matching a given condition, using the specified skiplist index.

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

                                                                      • collection: The name of the collection to query.
                                                                      • index: The id of the index to be used for the query. The index must exist and must be of type bitarray.
                                                                      • condition: the condition which all returned documents shall satisfy. Conditions must be specified for all indexed attributes.
                                                                      • skip: The number of documents to skip in the query. (optional)
                                                                      • limit: The maximal number of documents to return. (optional)
                                                                      Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details.

                                                                      ", + "summary": " Query by-condition using bitarray index", "httpMethod": "PUT", "examples": "", - "nickname": "executesQueryBy-conditionUsingABitarrayIndex" + "nickname": "QueryBy-conditionUsingBitarrayIndex" } ], "path": "/_api/simple/by-condition-bitarray" @@ -204,11 +204,11 @@ "description": "Contains the query.

                                                                      " } ], - "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", + "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 [Http Cursor](../HttpAqlQueryCursor/README.md) for details.

                                                                      ", + "summary": " Return all", "httpMethod": "PUT", - "examples": "

                                                                      Limit the amount of documents using limit



                                                                      unix> curl -X PUT --data-binary @- --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/188694951\", \n      \"_rev\" : \"188694951\", \n      \"_key\" : \"188694951\", \n      \"Hello2\" : \"World2\" \n    }, \n    { \n      \"_id\" : \"products/188367271\", \n      \"_rev\" : \"188367271\", \n      \"_key\" : \"188367271\", \n      \"Hello1\" : \"World1\" \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-binary @- --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/190595495\", \n      \"_rev\" : \"190595495\", \n      \"_key\" : \"190595495\", \n      \"Hello2\" : \"World2\" \n    }, \n    { \n      \"_id\" : \"products/191578535\", \n      \"_rev\" : \"191578535\", \n      \"_key\" : \"191578535\", \n      \"Hello5\" : \"World5\" \n    }, \n    { \n      \"_id\" : \"products/190267815\", \n      \"_rev\" : \"190267815\", \n      \"_key\" : \"190267815\", \n      \"Hello1\" : \"World1\" \n    } \n  ], \n  \"hasMore\" : true, \n  \"id\" : \"191775143\", \n  \"count\" : 5, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

                                                                      ", - "nickname": "executesSimpleQueryAll" + "examples": "

                                                                      Limit the amount of documents using limit



                                                                      shell> curl -X PUT --data-binary @- --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/987504134\", \n      \"_rev\" : \"987504134\", \n      \"_key\" : \"987504134\", \n      \"Hello1\" : \"World1\" \n    }, \n    { \n      \"_id\" : \"products/988814854\", \n      \"_rev\" : \"988814854\", \n      \"_key\" : \"988814854\", \n      \"Hello5\" : \"World5\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 2, \n  \"error\" : false, \n  \"code\" : 201 \n}\n



                                                                      Using a batchSize value



                                                                      shell> curl -X PUT --data-binary @- --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/990453254\", \n      \"_rev\" : \"990453254\", \n      \"_key\" : \"990453254\", \n      \"Hello4\" : \"World4\" \n    }, \n    { \n      \"_id\" : \"products/990125574\", \n      \"_rev\" : \"990125574\", \n      \"_key\" : \"990125574\", \n      \"Hello3\" : \"World3\" \n    }, \n    { \n      \"_id\" : \"products/989470214\", \n      \"_rev\" : \"989470214\", \n      \"_key\" : \"989470214\", \n      \"Hello1\" : \"World1\" \n    } \n  ], \n  \"hasMore\" : true, \n  \"id\" : \"990977542\", \n  \"count\" : 5, \n  \"error\" : false, \n  \"code\" : 201 \n}\n

                                                                      @endDocuBlock", + "nickname": "ReturnAll" } ], "path": "/_api/simple/all" @@ -240,10 +240,10 @@ } ], "notes": "

                                                                      Returns a random document from 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 document attrbute contains null.

                                                                      ", - "summary": "returns a random document from a collection", + "summary": " Random document", "httpMethod": "PUT", - "examples": "



                                                                      unix> curl -X PUT --data-binary @- --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/192168359\", \n    \"_rev\" : \"192168359\", \n    \"_key\" : \"192168359\", \n    \"Hello1\" : \"World1\" \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                                                                      ", - "nickname": "returnsARandomDocumentFromACollection" + "examples": "



                                                                      shell> curl -X PUT --data-binary @- --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/992747014\", \n    \"_rev\" : \"992747014\", \n    \"_key\" : \"992747014\", \n    \"Hello5\" : \"World5\" \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                                                                      @endDocuBlock", + "nickname": "RandomDocument" } ], "path": "/_api/simple/any" @@ -274,11 +274,11 @@ "description": "Contains the query.

                                                                      " } ], - "notes": "

                                                                      The default will find at most 100 documents near the given coordinate. The returned list is sorted according to the distance, with the nearest document being first in the list. 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 return the distance to the given coordinate. (optional). If specified, distances are returned in meters.
                                                                      • 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 a near query", + "notes": "

                                                                      The default will find at most 100 documents near the given coordinate. The returned list is sorted according to the distance, with the nearest document being first in the list. 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 return the distance to the given coordinate. (optional). If specified, distances are returned in meters.
                                                                      • 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 [Http Cursor](../HttpAqlQueryCursor/README.md) for details.

                                                                      ", + "summary": " Near query", "httpMethod": "PUT", - "examples": "

                                                                      Without distance:



                                                                      unix> curl -X PUT --data-binary @- --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/195445159\", \n      \"_rev\" : \"195445159\", \n      \"_key\" : \"195445159\", \n      \"name\" : \"Name/0.002/\", \n      \"loc\" : [ \n        0.002, \n        0 \n      ] \n    }, \n    { \n      \"_id\" : \"products/195051943\", \n      \"_rev\" : \"195051943\", \n      \"_key\" : \"195051943\", \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-binary @- --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/197935527\", \n      \"_rev\" : \"197935527\", \n      \"_key\" : \"197935527\", \n      \"distance\" : 222.38985328911744, \n      \"name\" : \"Name/-0.002/\", \n      \"loc\" : [ \n        -0.002, \n        0 \n      ] \n    }, \n    { \n      \"_id\" : \"products/198328743\", \n      \"_rev\" : \"198328743\", \n      \"_key\" : \"198328743\", \n      \"distance\" : 222.38985328911744, \n      \"name\" : \"Name/0.002/\", \n      \"loc\" : [ \n        0.002, \n        0 \n      ] \n    }, \n    { \n      \"_id\" : \"products/197738919\", \n      \"_rev\" : \"197738919\", \n      \"_key\" : \"197738919\", \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": "executesANearQuery" + "examples": "

                                                                      Without distance:



                                                                      shell> curl -X PUT --data-binary @- --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/994844166\", \n      \"_rev\" : \"994844166\", \n      \"_key\" : \"994844166\", \n      \"name\" : \"Name/0.002/\", \n      \"loc\" : [ \n        0.002, \n        0 \n      ] \n    }, \n    { \n      \"_id\" : \"products/994450950\", \n      \"_rev\" : \"994450950\", \n      \"_key\" : \"994450950\", \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



                                                                      With distance:



                                                                      shell> curl -X PUT --data-binary @- --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/997465606\", \n      \"_rev\" : \"997465606\", \n      \"_key\" : \"997465606\", \n      \"name\" : \"Name/-0.002/\", \n      \"loc\" : [ \n        -0.002, \n        0 \n      ], \n      \"distance\" : 222.38985328911744 \n    }, \n    { \n      \"_id\" : \"products/997858822\", \n      \"_rev\" : \"997858822\", \n      \"_key\" : \"997858822\", \n      \"name\" : \"Name/0.002/\", \n      \"loc\" : [ \n        0.002, \n        0 \n      ], \n      \"distance\" : 222.38985328911744 \n    }, \n    { \n      \"_id\" : \"products/997268998\", \n      \"_rev\" : \"997268998\", \n      \"_key\" : \"997268998\", \n      \"name\" : \"Name/-0.004/\", \n      \"loc\" : [ \n        -0.004, \n        0 \n      ], \n      \"distance\" : 444.779706578235 \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 3, \n  \"error\" : false, \n  \"code\" : 201 \n}\n

                                                                      @endDocuBlock", + "nickname": "NearQuery" } ], "path": "/_api/simple/near" @@ -309,11 +309,11 @@ "description": "Contains the query.

                                                                      " } ], - "notes": "

                                                                      This will find all documents within 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 attribute key used to return the distance to the given coordinate. (optional). If specified, distances are returned in meters.
                                                                      • 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 a within query", + "notes": "

                                                                      This will find all documents within 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 attribute key used to return the distance to the given coordinate. (optional). If specified, distances are returned in meters.
                                                                      • 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 [Http Cursor](../HttpAqlQueryCursor/README.md) for details.

                                                                      ", + "summary": " Within query", "httpMethod": "PUT", - "examples": "

                                                                      Without distance:



                                                                      unix> curl -X PUT --data-binary @- --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/201212327\", \n      \"_rev\" : \"201212327\", \n      \"_key\" : \"201212327\", \n      \"name\" : \"Name/0.002/\", \n      \"loc\" : [ \n        0.002, \n        0 \n      ] \n    }, \n    { \n      \"_id\" : \"products/200819111\", \n      \"_rev\" : \"200819111\", \n      \"_key\" : \"200819111\", \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-binary @- --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/203702695\", \n      \"_rev\" : \"203702695\", \n      \"_key\" : \"203702695\", \n      \"distance\" : 222.38985328911744, \n      \"name\" : \"Name/-0.002/\", \n      \"loc\" : [ \n        -0.002, \n        0 \n      ] \n    }, \n    { \n      \"_id\" : \"products/204095911\", \n      \"_rev\" : \"204095911\", \n      \"_key\" : \"204095911\", \n      \"distance\" : 222.38985328911744, \n      \"name\" : \"Name/0.002/\", \n      \"loc\" : [ \n        0.002, \n        0 \n      ] \n    }, \n    { \n      \"_id\" : \"products/203506087\", \n      \"_rev\" : \"203506087\", \n      \"_key\" : \"203506087\", \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": "executesAWithinQuery" + "examples": "

                                                                      Without distance:



                                                                      shell> curl -X PUT --data-binary @- --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/1000873478\", \n      \"_rev\" : \"1000873478\", \n      \"_key\" : \"1000873478\", \n      \"name\" : \"Name/0.002/\", \n      \"loc\" : [ \n        0.002, \n        0 \n      ] \n    }, \n    { \n      \"_id\" : \"products/1000480262\", \n      \"_rev\" : \"1000480262\", \n      \"_key\" : \"1000480262\", \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



                                                                      With distance:



                                                                      shell> curl -X PUT --data-binary @- --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/1003494918\", \n      \"_rev\" : \"1003494918\", \n      \"_key\" : \"1003494918\", \n      \"name\" : \"Name/-0.002/\", \n      \"loc\" : [ \n        -0.002, \n        0 \n      ], \n      \"distance\" : 222.38985328911744 \n    }, \n    { \n      \"_id\" : \"products/1004346886\", \n      \"_rev\" : \"1004346886\", \n      \"_key\" : \"1004346886\", \n      \"name\" : \"Name/0.002/\", \n      \"loc\" : [ \n        0.002, \n        0 \n      ], \n      \"distance\" : 222.38985328911744 \n    }, \n    { \n      \"_id\" : \"products/1003298310\", \n      \"_rev\" : \"1003298310\", \n      \"_key\" : \"1003298310\", \n      \"name\" : \"Name/-0.004/\", \n      \"loc\" : [ \n        -0.004, \n        0 \n      ], \n      \"distance\" : 444.779706578235 \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 3, \n  \"error\" : false, \n  \"code\" : 201 \n}\n

                                                                      @endDocuBlock", + "nickname": "WithinQuery" } ], "path": "/_api/simple/within" @@ -344,11 +344,11 @@ "description": "Contains the query.

                                                                      " } ], - "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 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)
                                                                      • index: The identifier of the fulltext-index to use.
                                                                      Returns a cursor containing the result, see the manual for details.

                                                                      ", - "summary": "executes a fulltext index query", + "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 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)
                                                                      • index: The identifier of the fulltext-index to use.
                                                                      Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details.

                                                                      ", + "summary": " Fulltext index query", "httpMethod": "PUT", - "examples": "



                                                                      unix> curl -X PUT --data-binary @- --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/205734311\", \n      \"_rev\" : \"205734311\", \n      \"_key\" : \"205734311\", \n      \"text\" : \"this text also has a word\" \n    }, \n    { \n      \"_id\" : \"products/205537703\", \n      \"_rev\" : \"205537703\", \n      \"_key\" : \"205537703\", \n      \"text\" : \"this text contains word\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 2, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

                                                                      ", - "nickname": "executesAFulltextIndexQuery" + "examples": "



                                                                      shell> curl -X PUT --data-binary @- --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/1009196550\", \n      \"_rev\" : \"1009196550\", \n      \"_key\" : \"1009196550\", \n      \"text\" : \"this text also has a word\" \n    }, \n    { \n      \"_id\" : \"products/1008999942\", \n      \"_rev\" : \"1008999942\", \n      \"_key\" : \"1008999942\", \n      \"text\" : \"this text contains word\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 2, \n  \"error\" : false, \n  \"code\" : 201 \n}\n

                                                                      @endDocuBlock", + "nickname": "FulltextIndexQuery" } ], "path": "/_api/simple/fulltext" @@ -379,11 +379,11 @@ "description": "Contains the query.

                                                                      " } ], - "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 document.
                                                                      • 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 by-example", + "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 document.
                                                                      • 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 [Http Cursor](../HttpAqlQueryCursor/README.md) for details.

                                                                      ", + "summary": " Simple query by-example", "httpMethod": "PUT", - "examples": "

                                                                      Matching an attribute:



                                                                      unix> curl -X PUT --data-binary @- --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/207307175\", \n      \"_rev\" : \"207307175\", \n      \"_key\" : \"207307175\", \n      \"i\" : 1, \n      \"a\" : { \n        \"j\" : 1 \n      } \n    }, \n    { \n      \"_id\" : \"products/207765927\", \n      \"_rev\" : \"207765927\", \n      \"_key\" : \"207765927\", \n      \"i\" : 1, \n      \"a\" : { \n        \"k\" : 2, \n        \"j\" : 2 \n      } \n    }, \n    { \n      \"_id\" : \"products/206979495\", \n      \"_rev\" : \"206979495\", \n      \"_key\" : \"206979495\", \n      \"i\" : 1, \n      \"a\" : { \n        \"k\" : 1, \n        \"j\" : 1 \n      } \n    }, \n    { \n      \"_id\" : \"products/207569319\", \n      \"_rev\" : \"207569319\", \n      \"_key\" : \"207569319\", \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-binary @- --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/209273255\", \n      \"_rev\" : \"209273255\", \n      \"_key\" : \"209273255\", \n      \"i\" : 1, \n      \"a\" : { \n        \"j\" : 1 \n      } \n    }, \n    { \n      \"_id\" : \"products/208945575\", \n      \"_rev\" : \"208945575\", \n      \"_key\" : \"208945575\", \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-binary @- --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/211239335\", \n      \"_rev\" : \"211239335\", \n      \"_key\" : \"211239335\", \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" + "examples": "

                                                                      Matching an attribute:



                                                                      shell> curl -X PUT --data-binary @- --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/1010900486\", \n      \"_rev\" : \"1010900486\", \n      \"_key\" : \"1010900486\", \n      \"i\" : 1, \n      \"a\" : { \n        \"j\" : 1 \n      } \n    }, \n    { \n      \"_id\" : \"products/1011162630\", \n      \"_rev\" : \"1011162630\", \n      \"_key\" : \"1011162630\", \n      \"i\" : 1 \n    }, \n    { \n      \"_id\" : \"products/1011359238\", \n      \"_rev\" : \"1011359238\", \n      \"_key\" : \"1011359238\", \n      \"i\" : 1, \n      \"a\" : { \n        \"k\" : 2, \n        \"j\" : 2 \n      } \n    }, \n    { \n      \"_id\" : \"products/1010572806\", \n      \"_rev\" : \"1010572806\", \n      \"_key\" : \"1010572806\", \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



                                                                      Matching an attribute which is a sub-document:



                                                                      shell> curl -X PUT --data-binary @- --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/1012604422\", \n      \"_rev\" : \"1012604422\", \n      \"_key\" : \"1012604422\", \n      \"i\" : 1, \n      \"a\" : { \n        \"k\" : 1, \n        \"j\" : 1 \n      } \n    }, \n    { \n      \"_id\" : \"products/1012932102\", \n      \"_rev\" : \"1012932102\", \n      \"_key\" : \"1012932102\", \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



                                                                      Matching an attribute within a sub-document:



                                                                      shell> curl -X PUT --data-binary @- --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/1014963718\", \n      \"_rev\" : \"1014963718\", \n      \"_key\" : \"1014963718\", \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

                                                                      @endDocuBlock", + "nickname": "SimpleQueryBy-example" } ], "path": "/_api/simple/by-example" @@ -415,10 +415,10 @@ } ], "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 document.
                                                                      Returns a result containing the document or HTTP 404 if no document matched the example.

                                                                      If more than one document in the collection matches the specified example, only one of these documents will be returned, and it is undefined which of the matching documents is returned.

                                                                      ", - "summary": "returns a document matching an example", + "summary": " Document matching an example", "httpMethod": "PUT", - "examples": "

                                                                      If a matching document was found:



                                                                      unix> curl -X PUT --data-binary @- --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/212877735\", \n    \"_rev\" : \"212877735\", \n    \"_key\" : \"212877735\", \n    \"i\" : 1, \n    \"a\" : { \n      \"k\" : 1, \n      \"j\" : 1 \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n



                                                                      If no document was found:



                                                                      unix> curl -X PUT --data-binary @- --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": "returnsADocumentMatchingAnExample" + "examples": "

                                                                      If a matching document was found:



                                                                      shell> curl -X PUT --data-binary @- --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/1017257478\", \n    \"_rev\" : \"1017257478\", \n    \"_key\" : \"1017257478\", \n    \"i\" : 1 \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n



                                                                      If no document was found:



                                                                      shell> curl -X PUT --data-binary @- --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

                                                                      @endDocuBlock", + "nickname": "DocumentMatchingAnExample" } ], "path": "/_api/simple/first-example" @@ -450,10 +450,10 @@ } ], "notes": "

                                                                      This will return the first document(s) 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.

                                                                      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.
                                                                      Note: this method is not supported for sharded collections with more than one shard.

                                                                      ", - "summary": "returns the first document(s) of a collection", + "summary": " First document of a collection", "httpMethod": "PUT", - "examples": "

                                                                      Retrieving the first n documents:



                                                                      unix> curl -X PUT --data-binary @- --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/216678823\", \n      \"_rev\" : \"216678823\", \n      \"_key\" : \"216678823\", \n      \"i\" : 1, \n      \"a\" : { \n        \"k\" : 1, \n        \"j\" : 1 \n      } \n    }, \n    { \n      \"_id\" : \"products/217006503\", \n      \"_rev\" : \"217006503\", \n      \"_key\" : \"217006503\", \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-binary @- --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/218251687\", \n    \"_rev\" : \"218251687\", \n    \"_key\" : \"218251687\", \n    \"i\" : 1, \n    \"a\" : { \n      \"k\" : 1, \n      \"j\" : 1 \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                                                                      ", - "nickname": "returnsTheFirstDocument(s)OfACollection" + "examples": "

                                                                      Retrieving the first n documents:



                                                                      shell> curl -X PUT --data-binary @- --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/1020599814\", \n      \"_rev\" : \"1020599814\", \n      \"_key\" : \"1020599814\", \n      \"i\" : 1, \n      \"a\" : { \n        \"k\" : 1, \n        \"j\" : 1 \n      } \n    }, \n    { \n      \"_id\" : \"products/1020927494\", \n      \"_rev\" : \"1020927494\", \n      \"_key\" : \"1020927494\", \n      \"i\" : 1, \n      \"a\" : { \n        \"j\" : 1 \n      } \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n



                                                                      Retrieving the first document:



                                                                      shell> curl -X PUT --data-binary @- --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/1022238214\", \n    \"_rev\" : \"1022238214\", \n    \"_key\" : \"1022238214\", \n    \"i\" : 1, \n    \"a\" : { \n      \"k\" : 1, \n      \"j\" : 1 \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                                                                      @endDocuBlock", + "nickname": "FirstDocumentOfACollection" } ], "path": "/_api/simple/first" @@ -485,10 +485,10 @@ } ], "notes": "

                                                                      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.

                                                                      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.
                                                                      If the count argument is not supplied, the result is the \"latest\" document of the collection, or null if the collection is empty.

                                                                      Note: this method is not supported for sharded collections with more than one shard.

                                                                      ", - "summary": "returns the last document(s) of a collection", + "summary": " Last document of a collection", "httpMethod": "PUT", - "examples": "

                                                                      Retrieving the last n documents:



                                                                      unix> curl -X PUT --data-binary @- --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/220610983\", \n      \"_rev\" : \"220610983\", \n      \"_key\" : \"220610983\", \n      \"i\" : 1, \n      \"a\" : { \n        \"k\" : 2, \n        \"j\" : 2 \n      } \n    }, \n    { \n      \"_id\" : \"products/220414375\", \n      \"_rev\" : \"220414375\", \n      \"_key\" : \"220414375\", \n      \"i\" : 1 \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n



                                                                      Retrieving the first document:



                                                                      unix> curl -X PUT --data-binary @- --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/222183847\", \n    \"_rev\" : \"222183847\", \n    \"_key\" : \"222183847\", \n    \"i\" : 1, \n    \"a\" : { \n      \"k\" : 2, \n      \"j\" : 2 \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                                                                      ", - "nickname": "returnsTheLastDocument(s)OfACollection" + "examples": "

                                                                      Retrieving the last n documents:



                                                                      shell> curl -X PUT --data-binary @- --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/1024663046\", \n      \"_rev\" : \"1024663046\", \n      \"_key\" : \"1024663046\", \n      \"i\" : 1, \n      \"a\" : { \n        \"k\" : 2, \n        \"j\" : 2 \n      } \n    }, \n    { \n      \"_id\" : \"products/1024466438\", \n      \"_rev\" : \"1024466438\", \n      \"_key\" : \"1024466438\", \n      \"i\" : 1 \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n



                                                                      Retrieving the first document:



                                                                      shell> curl -X PUT --data-binary @- --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/1026301446\", \n    \"_rev\" : \"1026301446\", \n    \"_key\" : \"1026301446\", \n    \"i\" : 1, \n    \"a\" : { \n      \"k\" : 2, \n      \"j\" : 2 \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                                                                      @endDocuBlock", + "nickname": "LastDocumentOfACollection" } ], "path": "/_api/simple/last" @@ -519,11 +519,11 @@ "description": "Contains the query.

                                                                      " } ], - "notes": "

                                                                      This will find all documents within a given range. In order to execute a range query, a skip-list index on the queried attribute must be present.

                                                                      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 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 range query", + "notes": "

                                                                      This will find all documents within a given range. In order to execute a range query, a skip-list index on the queried attribute must be present.

                                                                      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 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 [Http Cursor](../HttpAqlQueryCursor/README.md) for details.

                                                                      ", + "summary": " Simple range query", "httpMethod": "PUT", - "examples": "



                                                                      unix> curl -X PUT --data-binary @- --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/223035815\", \n      \"_rev\" : \"223035815\", \n      \"_key\" : \"223035815\", \n      \"i\" : 2 \n    }, \n    { \n      \"_id\" : \"products/223232423\", \n      \"_rev\" : \"223232423\", \n      \"_key\" : \"223232423\", \n      \"i\" : 3 \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 2, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

                                                                      ", - "nickname": "executesSimpleRangeQuery" + "examples": "



                                                                      shell> curl -X PUT --data-binary @- --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/1027284486\", \n      \"_rev\" : \"1027284486\", \n      \"_key\" : \"1027284486\", \n      \"i\" : 2 \n    }, \n    { \n      \"_id\" : \"products/1027481094\", \n      \"_rev\" : \"1027481094\", \n      \"_key\" : \"1027481094\", \n      \"i\" : 3 \n    } \n  ], \n  \"hasMore\" : false, \n  \"count\" : 2, \n  \"error\" : false, \n  \"code\" : 201 \n}\n

                                                                      @endDocuBlock", + "nickname": "SimpleRangeQuery" } ], "path": "/_api/simple/range" @@ -555,10 +555,10 @@ } ], "notes": "

                                                                      This will find all documents in the collection that match the specified example object.

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

                                                                      • collection: The name of the collection to remove from.
                                                                      • example: An example document that all collection documents are compared against.
                                                                      • options: an json object which can contains following attributes:
                                                                      • waitForSync: if set to true, then all removal operations will instantly be synchronised to disk. If this is not specified, then the collection's default sync behavior will be applied.
                                                                      • limit: an optional value that determines how many documents to delete at most. If limit is specified but is less than the number of documents in the collection, it is undefined which of the documents will be deleted.
                                                                      Note: the limit attribute is not supported on sharded collections. Using it will result in an error. The options attributes waitForSync and limit can given yet without an ecapsulation into a json object. but this may be deprecated in future versions of arango

                                                                      Returns the number of documents that were deleted.

                                                                      ", - "summary": "removes documents by example", + "summary": " Remove documents by example", "httpMethod": "PUT", - "examples": "



                                                                      unix> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/remove-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } } }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"deleted\" : 1, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                                                                      Using Parameter: waitForSync and limit

                                                                      unix> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/remove-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } },\"waitForSync\": true, \"limit\": 2 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"deleted\" : 1, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                                                                      Using Parameter: waitForSync and limit with new signature

                                                                      unix> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/remove-by-example\n{\"collection\": \"products\",\"example\" : { \"a\" : { \"j\" : 1 } },\"options\": {\"waitForSync\": true, \"limit\": 2} }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"deleted\" : 1, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                                                                      ", - "nickname": "removesDocumentsByExample" + "examples": "



                                                                      shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/remove-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } } }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"deleted\" : 1, \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                                                                      Using Parameter: waitForSync and limit

                                                                      shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/remove-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } },\"waitForSync\": true, \"limit\": 2 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"deleted\" : 1, \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                                                                      Using Parameter: waitForSync and limit with new signature

                                                                      shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/remove-by-example\n{\"collection\": \"products\",\"example\" : { \"a\" : { \"j\" : 1 } },\"options\": {\"waitForSync\": true, \"limit\": 2} }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"deleted\" : 1, \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                                                                      @endDocuBlock", + "nickname": "RemoveDocumentsByExample" } ], "path": "/_api/simple/remove-by-example" @@ -590,10 +590,10 @@ } ], "notes": "

                                                                      This will find all documents in the collection that match the specified example object, and replace the entire document body with the new value specified. Note that document meta-attributes such as _id, _key, _from, _to etc. cannot be replaced.

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

                                                                      • collection: The name of the collection to replace within.
                                                                      • example: An example document that all collection documents are compared against.
                                                                      • newValue: The replacement document that will get inserted in place of the \"old\" documents.
                                                                      • options: an json object which can contain following attributes
                                                                      • waitForSync: if set to true, then all removal operations will instantly be synchronised to disk. If this is not specified, then the collection's default sync behavior will be applied.
                                                                      • limit: an optional value that determines how many documents to replace at most. If limit is specified but is less than the number of documents in the collection, it is undefined which of the documents will be replaced.
                                                                      Note: the limit attribute is not supported on sharded collections. Using it will result in an error. The options attributes waitForSync and limit can given yet without an ecapsulation into a json object. but this may be deprecated in future versions of arango

                                                                      Returns the number of documents that were replaced.

                                                                      ", - "summary": "replaces documents by example", + "summary": " Replace documents by example", "httpMethod": "PUT", - "examples": "



                                                                      unix> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/replace-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } }, \"newValue\" : {\"foo\" : \"bar\"}, \"options\": {\"limit\" : 3,  \"waitForSync\": true  }}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"replaced\" : 1, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                                                                      Using new Signature for attributes WaitForSync and limit

                                                                      unix> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/replace-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } }, \"newValue\" : {\"foo\" : \"bar\"}, \"options\": {\"limit\" : 3,  \"waitForSync\": true  }}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"replaced\" : 1, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                                                                      ", - "nickname": "replacesDocumentsByExample" + "examples": "



                                                                      shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/replace-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } }, \"newValue\" : {\"foo\" : \"bar\"}, \"limit\" : 3 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"replaced\" : 1, \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                                                                      Using new Signature for attributes WaitForSync and limit

                                                                      shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/replace-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } }, \"newValue\" : {\"foo\" : \"bar\"}, \"options\": {\"limit\" : 3,  \"waitForSync\": true  }}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"replaced\" : 1, \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                                                                      @endDocuBlock", + "nickname": "ReplaceDocumentsByExample" } ], "path": "/_api/simple/replace-by-example" @@ -625,10 +625,10 @@ } ], "notes": "

                                                                      This will find all documents in the collection that match the specified example object, and partially update the document body with the new value specified. Note that document meta-attributes such as _id, _key, _from, _to etc. cannot be replaced.

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

                                                                      • collection: The name of the collection to update within.
                                                                      • example: An example document that all collection documents are compared against.
                                                                      • newValue: A document containing all the attributes to update in the found documents.
                                                                      • options: a json object wich can contains following attributes:
                                                                      • keepNull: This parameter can be used to modify the behavior when handling null values. Normally, null values are stored in the database. By setting the keepNull parameter to false, this behavior can be changed so that all attributes in data with null values will be removed from the updated document.
                                                                      • waitForSync: if set to true, then all removal operations will instantly be synchronised to disk. If this is not specified, then the collection's default sync behavior will be applied.
                                                                      • limit: an optional value that determines how many documents to update at most. If limit is specified but is less than the number of documents in the collection, it is undefined which of the documents will be updated.
                                                                      Note: the limit attribute is not supported on sharded collections. Using it will result in an error.

                                                                      Returns the number of documents that were updated.



                                                                      ", - "summary": "updates documents by example", + "summary": " Update documents by example", "httpMethod": "PUT", - "examples": "using old syntax for options

                                                                      unix> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/update-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } }, \"newValue\" : { \"a\" : { \"j\" : 22 } }, \"limit\" : 3 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"updated\" : 1, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                                                                      using new signature for options

                                                                      unix> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/update-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } }, \"newValue\" : { \"a\" : { \"j\" : 22 } }, \"options\" :  { \"limit\" : 3, \"waitForSync\": true }  }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"updated\" : 1, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                                                                      ", - "nickname": "updatesDocumentsByExample" + "examples": "using old syntax for options

                                                                      shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/update-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } }, \"newValue\" : { \"a\" : { \"j\" : 22 } }, \"limit\" : 3 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"updated\" : 1, \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                                                                      using new signature for options

                                                                      shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/update-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } }, \"newValue\" : { \"a\" : { \"j\" : 22 } }, \"options\" :  { \"limit\" : 3, \"waitForSync\": true }  }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"updated\" : 1, \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                                                                      @endDocuBlock", + "nickname": "UpdateDocumentsByExample" } ], "path": "/_api/simple/update-by-example" diff --git a/js/apps/system/aardvark/api-docs/system.json b/js/apps/system/aardvark/api-docs/system.json index f1bb6db6a3..a922857106 100644 --- a/js/apps/system/aardvark/api-docs/system.json +++ b/js/apps/system/aardvark/api-docs/system.json @@ -8,16 +8,16 @@ { "errorResponses": [ { - "reason": "Is returned in all cases.", + "reason": "Is returned in all cases. @endDocuBlock", "code": "200" } ], "parameters": [], "notes": "

                                                                      Returns the role of a server in a cluster. The role is returned in the role attribute of the result. Possible return values for role are:
                                                                      • COORDINATOR: the server is a coordinator in a cluster
                                                                      • PRIMARY: the server is a primary database server in a cluster
                                                                      • SECONDARY: the server is a secondary database server in a cluster
                                                                      • UNDEFINED: in a cluster, UNDEFINED is returned if the server role cannot be determined. On a single server, UNDEFINED is the only possible return value.", - "summary": "returns the role of a server in a cluster", + "summary": " Return role of a server in a cluster", "httpMethod": "GET", "examples": "", - "nickname": "returnsTheRoleOfAServerInACluster" + "nickname": "ReturnRoleOfAServerInACluster" } ], "path": "/_admin/server/role" @@ -27,16 +27,100 @@ { "errorResponses": [ { - "reason": "Routing information was reloaded successfully.

                                                                        ", + "reason": "Is returned if the operation succeeds.

                                                                        ", + "code": "200" + }, + { + "reason": "is returned when an invalid HTTP method is used. @endDocuBlock", + "code": "405" + } + ], + "parameters": [ + { + "dataType": "Boolean", + "paramType": "path", + "required": "false", + "name": "waitForSync", + "description": "Whether or not the operation should block until the not-yet synchronized data in the write-ahead log was synchronized to disk.

                                                                        " + }, + { + "dataType": "Boolean", + "paramType": "path", + "required": "false", + "name": "waitForCollector", + "description": "Whether or not the operation should block until the data in the flushed log has been collected by the write-ahead log garbage collector. Note that setting this option to true might block for a long time if there are long-running transactions and the write-ahead log garbage collector cannot finish garbage collection.

                                                                        " + } + ], + "notes": "

                                                                        Flushes the write-ahead log. By flushing the currently active write-ahead logfile, the data in it can be transferred to collection journals and datafiles. This is useful to ensure that all data for a collection is present in the collection journals and datafiles, for example, when dumping the data of a collection.

                                                                        ", + "summary": " Flushes the write-ahead log", + "httpMethod": "PUT", + "examples": "", + "nickname": "FlushesTheWrite-aheadLog" + } + ], + "path": "/_admin/wal/flush" + }, + { + "operations": [ + { + "errorResponses": [ + { + "reason": "Is returned if the operation succeeds.

                                                                        ", + "code": "200" + }, + { + "reason": "is returned when an invalid HTTP method is used. @endDocuBlock

                                                                        ", + "code": "405" + } + ], + "parameters": [], + "notes": "

                                                                        Configures the behavior of the write-ahead log. The body of the request must be a JSON object with the following attributes:
                                                                        • allowOversizeEntries: whether or not operations that are bigger than a single logfile can be executed and stored
                                                                        • logfileSize: the size of each write-ahead logfile
                                                                        • historicLogfiles: the maximum number of historic logfiles to keep
                                                                        • reserveLogfiles: the maximum number of reserve logfiles that ArangoDB allocates in the background
                                                                        • throttleWait: the maximum wait time that operations will wait before they get aborted if case of write-throttling (in milliseconds)
                                                                        • throttleWhenPending: the number of unprocessed garbage-collection operations that, when reached, will activate write-throttling. A value of 0 means that write-throttling will not be triggered.
                                                                        Specifying any of the above attributes is optional. Not specified attributes will be ignored and the configuration for them will not be modified.

                                                                        ", + "summary": " Configures the write-ahead log", + "httpMethod": "PUT", + "examples": "



                                                                        shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_admin/wal/properties\n{\"logfileSize\":33554432,\"allowOversizeEntries\":true}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"allowOversizeEntries\" : true, \n  \"logfileSize\" : 33554432, \n  \"historicLogfiles\" : 10, \n  \"reserveLogfiles\" : 1, \n  \"syncInterval\" : 100, \n  \"throttleWait\" : 15000, \n  \"throttleWhenPending\" : 0, \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                                                                        @endDocuBlock", + "nickname": "ConfiguresTheWrite-aheadLog" + } + ], + "path": "/_admin/wal/properties" + }, + { + "operations": [ + { + "errorResponses": [ + { + "reason": "Is returned if the operation succeeds.

                                                                        ", + "code": "200" + }, + { + "reason": "is returned when an invalid HTTP method is used. @endDocuBlock

                                                                        ", + "code": "405" + } + ], + "parameters": [], + "notes": "

                                                                        Retrieves the configuration of the write-ahead log. The result is a JSON array with the following attributes:
                                                                        • allowOversizeEntries: whether or not operations that are bigger than a single logfile can be executed and stored
                                                                        • logfileSize: the size of each write-ahead logfile
                                                                        • historicLogfiles: the maximum number of historic logfiles to keep
                                                                        • reserveLogfiles: the maximum number of reserve logfiles that ArangoDB allocates in the background
                                                                        • syncInterval: the interval for automatic synchronization of not-yet synchronized write-ahead log data (in milliseconds)
                                                                        • throttleWait: the maximum wait time that operations will wait before they get aborted if case of write-throttling (in milliseconds)
                                                                        • throttleWhenPending: the number of unprocessed garbage-collection operations that, when reached, will activate write-throttling. A value of 0 means that write-throttling will not be triggered.", + "summary": " Retrieves the configuration of the write-ahead log", + "httpMethod": "GET", + "examples": "



                                                                          shell> curl --data-binary @- --dump - http://localhost:8529/_admin/wal/properties\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"allowOversizeEntries\" : true, \n  \"logfileSize\" : 33554432, \n  \"historicLogfiles\" : 10, \n  \"reserveLogfiles\" : 1, \n  \"syncInterval\" : 100, \n  \"throttleWait\" : 15000, \n  \"throttleWhenPending\" : 0, \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                                                                          @endDocuBlock", + "nickname": "RetrievesTheConfigurationOfTheWrite-aheadLog" + } + ], + "path": "/_admin/wal/properties" + }, + { + "operations": [ + { + "errorResponses": [ + { + "reason": "Routing information was reloaded successfully. @endDocuBlock", "code": "200" } ], "parameters": [], "notes": "

                                                                          Reloads the routing information from the collection routing.

                                                                          ", - "summary": "reloads the routing collection", + "summary": " Reloads the routing information", "httpMethod": "POST", "examples": "", - "nickname": "reloadsTheRoutingCollection" + "nickname": "ReloadsTheRoutingInformation" } ], "path": "/_admin/routing/reload" @@ -46,16 +130,16 @@ { "errorResponses": [ { - "reason": "Module cache was flushed successfully.

                                                                          ", + "reason": "Module cache was flushed successfully. @endDocuBlock", "code": "200" } ], "parameters": [], "notes": "

                                                                          The call flushes the modules cache on the server. See JSModulesCache for details about this cache.

                                                                          ", - "summary": "flushs the module cache", + "summary": " Flushes the modules cache", "httpMethod": "POST", "examples": "", - "nickname": "flushsTheModuleCache" + "nickname": "FlushesTheModulesCache" } ], "path": "/_admin/modules/flush" @@ -65,16 +149,16 @@ { "errorResponses": [ { - "reason": "Time was returned successfully.

                                                                          ", + "reason": "Time was returned successfully. @endDocuBlock", "code": "200" } ], "parameters": [], "notes": "

                                                                          The call returns an object with the attribute time. This contains the current system time as a Unix timestamp with microsecond precision.

                                                                          ", - "summary": "returns the system time", + "summary": " Return system time", "httpMethod": "GET", "examples": "", - "nickname": "returnsTheSystemTime" + "nickname": "ReturnSystemTime" } ], "path": "/_admin/time" @@ -84,16 +168,16 @@ { "errorResponses": [ { - "reason": "Sleep was conducted successfully.

                                                                          ", + "reason": "Sleep was conducted successfully. @DendocuBlock", "code": "200" } ], "parameters": [], "notes": "

                                                                          The call returns an object with the attribute duration. This takes as many seconds as the duration argument says.

                                                                          ", - "summary": "sleeps for 5 seconds", + "summary": " Sleep for 5 seconds", "httpMethod": "GET", "examples": "", - "nickname": "sleepsFor5Seconds" + "nickname": "SleepFor5Seconds" } ], "path": "/_admin/sleep?duration=5" @@ -103,16 +187,16 @@ { "errorResponses": [ { - "reason": "Echo was returned successfully.

                                                                          ", + "reason": "Echo was returned successfully. @endDocuBlock", "code": "200" } ], "parameters": [], "notes": "

                                                                          The call returns an object with the following attributes:

                                                                          • headers: a list of HTTP headers received
                                                                          • requestType: the HTTP request method (e.g. GET)
                                                                          • parameters: list of URL parameters received", - "summary": "returns the current request", + "summary": " Return current request", "httpMethod": "GET", "examples": "", - "nickname": "returnsTheCurrentRequest" + "nickname": "ReturnCurrentRequest" } ], "path": "/_admin/echo" @@ -128,10 +212,10 @@ ], "parameters": [], "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", + "summary": " Read 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  \"time\" : 1402063638.583291, \n  \"system\" : { \n    \"minorPageFaults\" : 48240, \n    \"majorPageFaults\" : 120, \n    \"userTime\" : 1.923745, \n    \"systemTime\" : 0.967268, \n    \"numberOfThreads\" : 16, \n    \"residentSize\" : 130588672, \n    \"residentSizePercent\" : 0.015202522277832031, \n    \"virtualSize\" : 5005524992 \n  }, \n  \"client\" : { \n    \"httpConnections\" : 1, \n    \"connectionTime\" : { \n      \"sum\" : 0.0004611015319824219, \n      \"count\" : 1, \n      \"counts\" : [ \n        1, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"totalTime\" : { \n      \"sum\" : 3.9668657779693604, \n      \"count\" : 1208, \n      \"counts\" : [ \n        1154, \n        50, \n        1, \n        3, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"requestTime\" : { \n      \"sum\" : 3.815099000930786, \n      \"count\" : 1208, \n      \"counts\" : [ \n        1157, \n        47, \n        1, \n        3, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"queueTime\" : { \n      \"sum\" : 0.023754596710205078, \n      \"count\" : 1208, \n      \"counts\" : [ \n        1208, \n        0, \n        0, \n        0, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"ioTime\" : { \n      \"sum\" : 0.12801218032836914, \n      \"count\" : 1208, \n      \"counts\" : [ \n        1208, \n        0, \n        0, \n        0, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"bytesSent\" : { \n      \"sum\" : 635000, \n      \"count\" : 1208, \n      \"counts\" : [ \n        293, \n        795, \n        2, \n        118, \n        0, \n        0 \n      ] \n    }, \n    \"bytesReceived\" : { \n      \"sum\" : 283749, \n      \"count\" : 1208, \n      \"counts\" : [ \n        924, \n        284, \n        0, \n        0, \n        0, \n        0 \n      ] \n    } \n  }, \n  \"http\" : { \n    \"requestsTotal\" : 1208, \n    \"requestsAsync\" : 0, \n    \"requestsGet\" : 465, \n    \"requestsHead\" : 39, \n    \"requestsPost\" : 516, \n    \"requestsPut\" : 39, \n    \"requestsPatch\" : 3, \n    \"requestsDelete\" : 146, \n    \"requestsOptions\" : 0, \n    \"requestsOther\" : 0 \n  }, \n  \"server\" : { \n    \"uptime\" : 8.598921060562134, \n    \"physicalMemory\" : 8589934592 \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                                                                            ", - "nickname": "readsTheStatistics" + "examples": "



                                                                            shell> curl --data-binary @- --dump - http://localhost:8529/_admin/statistics\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"time\" : 1407416021.632177, \n  \"system\" : { \n    \"minorPageFaults\" : 101251, \n    \"majorPageFaults\" : 1978, \n    \"userTime\" : 5.425714, \n    \"systemTime\" : 3.729994, \n    \"numberOfThreads\" : 19, \n    \"residentSize\" : 167153664, \n    \"residentSizePercent\" : 0.019459247589111328, \n    \"virtualSize\" : 5199130624 \n  }, \n  \"client\" : { \n    \"httpConnections\" : 1, \n    \"connectionTime\" : { \n      \"sum\" : 0.0004930496215820312, \n      \"count\" : 1, \n      \"counts\" : [ \n        1, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"totalTime\" : { \n      \"sum\" : 13.033031702041626, \n      \"count\" : 8827, \n      \"counts\" : [ \n        8726, \n        90, \n        4, \n        3, \n        1, \n        2, \n        1 \n      ] \n    }, \n    \"requestTime\" : { \n      \"sum\" : 12.078540563583374, \n      \"count\" : 8827, \n      \"counts\" : [ \n        8730, \n        86, \n        4, \n        3, \n        1, \n        2, \n        1 \n      ] \n    }, \n    \"queueTime\" : { \n      \"sum\" : 0.15947556495666504, \n      \"count\" : 8827, \n      \"counts\" : [ \n        8827, \n        0, \n        0, \n        0, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"ioTime\" : { \n      \"sum\" : 0.7950155735015869, \n      \"count\" : 8827, \n      \"counts\" : [ \n        8827, \n        0, \n        0, \n        0, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"bytesSent\" : { \n      \"sum\" : 3222414, \n      \"count\" : 8827, \n      \"counts\" : [ \n        2674, \n        6014, \n        9, \n        65, \n        65, \n        0 \n      ] \n    }, \n    \"bytesReceived\" : { \n      \"sum\" : 2088297, \n      \"count\" : 8827, \n      \"counts\" : [ \n        6604, \n        2223, \n        0, \n        0, \n        0, \n        0 \n      ] \n    } \n  }, \n  \"http\" : { \n    \"requestsTotal\" : 8827, \n    \"requestsAsync\" : 0, \n    \"requestsGet\" : 3681, \n    \"requestsHead\" : 295, \n    \"requestsPost\" : 3170, \n    \"requestsPut\" : 688, \n    \"requestsPatch\" : 31, \n    \"requestsDelete\" : 962, \n    \"requestsOptions\" : 0, \n    \"requestsOther\" : 0 \n  }, \n  \"server\" : { \n    \"uptime\" : 19.867691040039062, \n    \"physicalMemory\" : 8589934592 \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                                                                            @endDocuBlock", + "nickname": "ReadTheStatistics" } ], "path": "/_admin/statistics" @@ -147,10 +231,10 @@ ], "parameters": [], "notes": "

                                                                            Returns a description of the statistics returned by /_admin/statistics. The returned objects contains a list of statistics groups in the attribute groups and a list of statistics figures in the attribute figures.

                                                                            A statistics group is described by

                                                                            • group: The identifier of the group.
                                                                            • name: The name of the group.
                                                                            • description: A description of the group.
                                                                            A statistics figure is described by

                                                                            • group: The identifier of the group to which this figure belongs.
                                                                            • identifier: The identifier of the figure. It is unique within the group.
                                                                            • name: The name of the figure.
                                                                            • description: A description of the figure.
                                                                            • type: Either current, accumulated, or distribution.
                                                                            • cuts: The distribution vector.
                                                                            • units: Units in which the figure is measured.", - "summary": "statistics description", + "summary": " Statistics description", "httpMethod": "GET", - "examples": "



                                                                              unix> curl --dump - http://localhost:8529/_admin/statistics-description\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"groups\" : [ \n    { \n      \"group\" : \"system\", \n      \"name\" : \"Process Statistics\", \n      \"description\" : \"Statistics about the ArangoDB process\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"name\" : \"Client Connection Statistics\", \n      \"description\" : \"Statistics about the connections.\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"name\" : \"HTTP Request Statistics\", \n      \"description\" : \"Statistics about the HTTP requests.\" \n    }, \n    { \n      \"group\" : \"server\", \n      \"name\" : \"Server Statistics\", \n      \"description\" : \"Statistics about the ArangoDB server\" \n    } \n  ], \n  \"figures\" : [ \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"userTime\", \n      \"name\" : \"User Time\", \n      \"description\" : \"Amount of time that this process has been scheduled in user mode, measured in se...\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"seconds\" \n    }, \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"systemTime\", \n      \"name\" : \"System Time\", \n      \"description\" : \"Amount of time that this process has been scheduled in kernel mode, measured in ...\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"seconds\" \n    }, \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"numberOfThreads\", \n      \"name\" : \"Number of Threads\", \n      \"description\" : \"Number of threads in the arangod process.\", \n      \"type\" : \"current\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"residentSize\", \n      \"name\" : \"Resident Set Size\", \n      \"description\" : \"The total size of the number of pages the process has in real memory. This is ju...\", \n      \"type\" : \"current\", \n      \"units\" : \"bytes\" \n    }, \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"residentSizePercent\", \n      \"name\" : \"Resident Set Size\", \n      \"description\" : \"The percentage of physical memory used by the process as resident set size.\", \n      \"type\" : \"current\", \n      \"units\" : \"percent\" \n    }, \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"virtualSize\", \n      \"name\" : \"Virtual Memory Size\", \n      \"description\" : \"On Windows, this figure contains the total amount of memory that the memory mana...\", \n      \"type\" : \"current\", \n      \"units\" : \"bytes\" \n    }, \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"minorPageFaults\", \n      \"name\" : \"Minor Page Faults\", \n      \"description\" : \"The number of minor faults the process has made which have not required loading ...\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"majorPageFaults\", \n      \"name\" : \"Major Page Faults\", \n      \"description\" : \"On Windows, this figure contains the total number of page faults. On other syste...\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"identifier\" : \"httpConnections\", \n      \"name\" : \"Client Connections\", \n      \"description\" : \"The number of connections that are currently open.\", \n      \"type\" : \"current\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"identifier\" : \"totalTime\", \n      \"name\" : \"Total Time\", \n      \"description\" : \"Total time needed to answer a request.\", \n      \"type\" : \"distribution\", \n      \"cuts\" : [ \n        0.01, \n        0.05, \n        0.1, \n        0.2, \n        0.5, \n        1 \n      ], \n      \"units\" : \"seconds\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"identifier\" : \"requestTime\", \n      \"name\" : \"Request Time\", \n      \"description\" : \"Request time needed to answer a request.\", \n      \"type\" : \"distribution\", \n      \"cuts\" : [ \n        0.01, \n        0.05, \n        0.1, \n        0.2, \n        0.5, \n        1 \n      ], \n      \"units\" : \"seconds\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"identifier\" : \"queueTime\", \n      \"name\" : \"Queue Time\", \n      \"description\" : \"Queue time needed to answer a request.\", \n      \"type\" : \"distribution\", \n      \"cuts\" : [ \n        0.01, \n        0.05, \n        0.1, \n        0.2, \n        0.5, \n        1 \n      ], \n      \"units\" : \"seconds\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"identifier\" : \"bytesSent\", \n      \"name\" : \"Bytes Sent\", \n      \"description\" : \"Bytes sents for a request.\", \n      \"type\" : \"distribution\", \n      \"cuts\" : [ \n        250, \n        1000, \n        2000, \n        5000, \n        10000 \n      ], \n      \"units\" : \"bytes\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"identifier\" : \"bytesReceived\", \n      \"name\" : \"Bytes Received\", \n      \"description\" : \"Bytes receiveds for a request.\", \n      \"type\" : \"distribution\", \n      \"cuts\" : [ \n        250, \n        1000, \n        2000, \n        5000, \n        10000 \n      ], \n      \"units\" : \"bytes\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"identifier\" : \"connectionTime\", \n      \"name\" : \"Connection Time\", \n      \"description\" : \"Total connection time of a client.\", \n      \"type\" : \"distribution\", \n      \"cuts\" : [ \n        0.1, \n        1, \n        60 \n      ], \n      \"units\" : \"seconds\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"identifier\" : \"requestsTotal\", \n      \"name\" : \"Total requests\", \n      \"description\" : \"Total number of HTTP requests.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"identifier\" : \"requestsAsync\", \n      \"name\" : \"Async requests\", \n      \"description\" : \"Number of asynchronously executed HTTP requests.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"identifier\" : \"requestsGet\", \n      \"name\" : \"HTTP GET requests\", \n      \"description\" : \"Number of HTTP GET requests.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"identifier\" : \"requestsHead\", \n      \"name\" : \"HTTP HEAD requests\", \n      \"description\" : \"Number of HTTP HEAD requests.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"identifier\" : \"requestsPost\", \n      \"name\" : \"HTTP POST requests\", \n      \"description\" : \"Number of HTTP POST requests.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"identifier\" : \"requestsPut\", \n      \"name\" : \"HTTP PUT requests\", \n      \"description\" : \"Number of HTTP PUT requests.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"identifier\" : \"requestsPatch\", \n      \"name\" : \"HTTP PATCH requests\", \n      \"description\" : \"Number of HTTP PATCH requests.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"identifier\" : \"requestsDelete\", \n      \"name\" : \"HTTP DELETE requests\", \n      \"description\" : \"Number of HTTP DELETE requests.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"identifier\" : \"requestsOptions\", \n      \"name\" : \"HTTP OPTIONS requests\", \n      \"description\" : \"Number of HTTP OPTIONS requests.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"identifier\" : \"requestsOther\", \n      \"name\" : \"other HTTP requests\", \n      \"description\" : \"Number of other HTTP requests.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"server\", \n      \"identifier\" : \"uptime\", \n      \"name\" : \"Server Uptime\", \n      \"description\" : \"Number of seconds elapsed since server start.\", \n      \"type\" : \"current\", \n      \"units\" : \"seconds\" \n    }, \n    { \n      \"group\" : \"server\", \n      \"identifier\" : \"physicalMemory\", \n      \"name\" : \"Physical Memory\", \n      \"description\" : \"Physical memory in bytes.\", \n      \"type\" : \"current\", \n      \"units\" : \"bytes\" \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

                                                                              ", - "nickname": "statisticsDescription" + "examples": "



                                                                              shell> curl --data-binary @- --dump - http://localhost:8529/_admin/statistics-description\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"groups\" : [ \n    { \n      \"group\" : \"system\", \n      \"name\" : \"Process Statistics\", \n      \"description\" : \"Statistics about the ArangoDB process\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"name\" : \"Client Connection Statistics\", \n      \"description\" : \"Statistics about the connections.\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"name\" : \"HTTP Request Statistics\", \n      \"description\" : \"Statistics about the HTTP requests.\" \n    }, \n    { \n      \"group\" : \"server\", \n      \"name\" : \"Server Statistics\", \n      \"description\" : \"Statistics about the ArangoDB server\" \n    } \n  ], \n  \"figures\" : [ \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"userTime\", \n      \"name\" : \"User Time\", \n      \"description\" : \"Amount of time that this process has been scheduled in user mode, measured in seconds.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"seconds\" \n    }, \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"systemTime\", \n      \"name\" : \"System Time\", \n      \"description\" : \"Amount of time that this process has been scheduled in kernel mode, measured in seconds.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"seconds\" \n    }, \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"numberOfThreads\", \n      \"name\" : \"Number of Threads\", \n      \"description\" : \"Number of threads in the arangod process.\", \n      \"type\" : \"current\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"residentSize\", \n      \"name\" : \"Resident Set Size\", \n      \"description\" : \"The total size of the number of pages the process has in real memory. This is just the pages which count toward text, data, or stack space. This does not include pages which have not been demand-loaded in, or which are swapped out. The resident set size is reported in bytes.\", \n      \"type\" : \"current\", \n      \"units\" : \"bytes\" \n    }, \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"residentSizePercent\", \n      \"name\" : \"Resident Set Size\", \n      \"description\" : \"The percentage of physical memory used by the process as resident set size.\", \n      \"type\" : \"current\", \n      \"units\" : \"percent\" \n    }, \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"virtualSize\", \n      \"name\" : \"Virtual Memory Size\", \n      \"description\" : \"On Windows, this figure contains the total amount of memory that the memory manager has committed for the arangod process. On other systems, this figure contains The size of the virtual memory the process is using.\", \n      \"type\" : \"current\", \n      \"units\" : \"bytes\" \n    }, \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"minorPageFaults\", \n      \"name\" : \"Minor Page Faults\", \n      \"description\" : \"The number of minor faults the process has made which have not required loading a memory page from disk. This figure is not reported on Windows.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"majorPageFaults\", \n      \"name\" : \"Major Page Faults\", \n      \"description\" : \"On Windows, this figure contains the total number of page faults. On other system, this figure contains the number of major faults the process has made which have required loading a memory page from disk.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"identifier\" : \"httpConnections\", \n      \"name\" : \"Client Connections\", \n      \"description\" : \"The number of connections that are currently open.\", \n      \"type\" : \"current\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"identifier\" : \"totalTime\", \n      \"name\" : \"Total Time\", \n      \"description\" : \"Total time needed to answer a request.\", \n      \"type\" : \"distribution\", \n      \"cuts\" : [ \n        0.01, \n        0.05, \n        0.1, \n        0.2, \n        0.5, \n        1 \n      ], \n      \"units\" : \"seconds\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"identifier\" : \"requestTime\", \n      \"name\" : \"Request Time\", \n      \"description\" : \"Request time needed to answer a request.\", \n      \"type\" : \"distribution\", \n      \"cuts\" : [ \n        0.01, \n        0.05, \n        0.1, \n        0.2, \n        0.5, \n        1 \n      ], \n      \"units\" : \"seconds\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"identifier\" : \"queueTime\", \n      \"name\" : \"Queue Time\", \n      \"description\" : \"Queue time needed to answer a request.\", \n      \"type\" : \"distribution\", \n      \"cuts\" : [ \n        0.01, \n        0.05, \n        0.1, \n        0.2, \n        0.5, \n        1 \n      ], \n      \"units\" : \"seconds\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"identifier\" : \"bytesSent\", \n      \"name\" : \"Bytes Sent\", \n      \"description\" : \"Bytes sents for a request.\", \n      \"type\" : \"distribution\", \n      \"cuts\" : [ \n        250, \n        1000, \n        2000, \n        5000, \n        10000 \n      ], \n      \"units\" : \"bytes\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"identifier\" : \"bytesReceived\", \n      \"name\" : \"Bytes Received\", \n      \"description\" : \"Bytes receiveds for a request.\", \n      \"type\" : \"distribution\", \n      \"cuts\" : [ \n        250, \n        1000, \n        2000, \n        5000, \n        10000 \n      ], \n      \"units\" : \"bytes\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"identifier\" : \"connectionTime\", \n      \"name\" : \"Connection Time\", \n      \"description\" : \"Total connection time of a client.\", \n      \"type\" : \"distribution\", \n      \"cuts\" : [ \n        0.1, \n        1, \n        60 \n      ], \n      \"units\" : \"seconds\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"identifier\" : \"requestsTotal\", \n      \"name\" : \"Total requests\", \n      \"description\" : \"Total number of HTTP requests.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"identifier\" : \"requestsAsync\", \n      \"name\" : \"Async requests\", \n      \"description\" : \"Number of asynchronously executed HTTP requests.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"identifier\" : \"requestsGet\", \n      \"name\" : \"HTTP GET requests\", \n      \"description\" : \"Number of HTTP GET requests.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"identifier\" : \"requestsHead\", \n      \"name\" : \"HTTP HEAD requests\", \n      \"description\" : \"Number of HTTP HEAD requests.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"identifier\" : \"requestsPost\", \n      \"name\" : \"HTTP POST requests\", \n      \"description\" : \"Number of HTTP POST requests.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"identifier\" : \"requestsPut\", \n      \"name\" : \"HTTP PUT requests\", \n      \"description\" : \"Number of HTTP PUT requests.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"identifier\" : \"requestsPatch\", \n      \"name\" : \"HTTP PATCH requests\", \n      \"description\" : \"Number of HTTP PATCH requests.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"identifier\" : \"requestsDelete\", \n      \"name\" : \"HTTP DELETE requests\", \n      \"description\" : \"Number of HTTP DELETE requests.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"identifier\" : \"requestsOptions\", \n      \"name\" : \"HTTP OPTIONS requests\", \n      \"description\" : \"Number of HTTP OPTIONS requests.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"http\", \n      \"identifier\" : \"requestsOther\", \n      \"name\" : \"other HTTP requests\", \n      \"description\" : \"Number of other HTTP requests.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"server\", \n      \"identifier\" : \"uptime\", \n      \"name\" : \"Server Uptime\", \n      \"description\" : \"Number of seconds elapsed since server start.\", \n      \"type\" : \"current\", \n      \"units\" : \"seconds\" \n    }, \n    { \n      \"group\" : \"server\", \n      \"identifier\" : \"physicalMemory\", \n      \"name\" : \"Physical Memory\", \n      \"description\" : \"Physical memory in bytes.\", \n      \"type\" : \"current\", \n      \"units\" : \"bytes\" \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n

                                                                              @endDocuBlock", + "nickname": "StatisticsDescription" } ], "path": "/_admin/statistics-description" @@ -168,11 +252,11 @@ "description": "A JSON body containing an attribute \"tests\" which lists the files containing the test suites.

                                                                              " } ], - "notes": "

                                                                              Executes the specified tests on the server and returns an object with the test results. The object has an attribute \"error\" which states whether any error occurred. The object also has an attribute \"passed\" which indicates which tests passed and which did not.", - "summary": "runs tests on the server", + "notes": "

                                                                              Executes the specified tests on the server and returns an object with the test results. The object has an attribute \"error\" which states whether any error occurred. The object also has an attribute \"passed\" which indicates which tests passed and which did not. @endDocuBlock", + "summary": " Runs tests on server", "httpMethod": "POST", "examples": "", - "nickname": "runsTestsOnTheServer" + "nickname": "RunsTestsOnServer" } ], "path": "/_admin/test" @@ -190,11 +274,11 @@ "description": "The body to be executed.

                                                                              " } ], - "notes": "

                                                                              Executes the javascript code in the body on the server as the body of a function with no arguments. If you have a return statement then the return value you produce will be returned as content type application/json. If the parameter returnAsJSON is set to true, the result will be a JSON object describing the return value directly, otherwise a string produced by JSON.stringify will be returned.", - "summary": "executes a program", + "notes": "

                                                                              Executes the javascript code in the body on the server as the body of a function with no arguments. If you have a return statement then the return value you produce will be returned as content type application/json. If the parameter returnAsJSON is set to true, the result will be a JSON object describing the return value directly, otherwise a string produced by JSON.stringify will be returned. @endDocuBlock", + "summary": " Execute program", "httpMethod": "POST", "examples": "", - "nickname": "executesAProgram" + "nickname": "ExecuteProgram" } ], "path": "/_admin/execute" diff --git a/js/apps/system/aardvark/api-docs/transaction.json b/js/apps/system/aardvark/api-docs/transaction.json index 0a1693396a..8b418be1d9 100644 --- a/js/apps/system/aardvark/api-docs/transaction.json +++ b/js/apps/system/aardvark/api-docs/transaction.json @@ -33,11 +33,11 @@ "description": "Contains the collections and action.

                                                                              " } ], - "notes": "

                                                                              The transaction description must be passed in the body of the POST request.

                                                                              The following attributes must be specified inside the JSON object:

                                                                              • collections: contains the list of collections to be used in the transaction (mandatory). collections must be a JSON array that can have the optional sub-attributes read and write. read and write must each be either lists of collections names or strings with a single collection name.
                                                                              • action: the actual transaction operations to be executed, in the form of stringified Javascript code. The code will be executed on server side, with late binding. It is thus critical that the code specified in action properly sets up all the variables it needs. If the code specified in action ends with a return statement, the value returned will also be returned by the REST API in the result attribute if the transaction committed successfully.
                                                                              The following optional attributes may also be specified in the request:

                                                                              • waitForSync: an optional boolean flag that, if set, will force the transaction to write all data to disk before returning.
                                                                              • lockTimeout: an optional numeric value that can be used to set a timeout for waiting on collection locks. If not specified, a default value will be used. Setting lockTimeout to 0 will make ArangoDB not time out waiting for a lock.
                                                                              • replicate: whether or not to replicate the operations from this transaction. If not specified, the default value is true.
                                                                              • params: optional arguments passed to action.
                                                                              If the transaction is fully executed and committed on the server, HTTP 200 will be returned. Additionally, the return value of the code defined in action will be returned in the result attribute.

                                                                              For successfully committed transactions, 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 transaction
                                                                              If the transaction 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
                                                                              If a transaction fails to commit, either by an exception thrown in the action code, or by an internal error, the server will respond with an error. Any other errors will be returned with any of the return codes HTTP 400, HTTP 409, or HTTP 500.

                                                                              ", - "summary": "executes a transaction", + "notes": "

                                                                              The transaction description must be passed in the body of the POST request.

                                                                              The following attributes must be specified inside the JSON object:

                                                                              • collections: contains the list of collections to be used in the transaction (mandatory). collections must be a JSON array that can have the optional sub-attributes read and write. read and write must each be either lists of collections names or strings with a single collection name.
                                                                              • action: the actual transaction operations to be executed, in the form of stringified Javascript code. The code will be executed on server side, with late binding. It is thus critical that the code specified in action properly sets up all the variables it needs. If the code specified in action ends with a return statement, the value returned will also be returned by the REST API in the result attribute if the transaction committed successfully.
                                                                              The following optional attributes may also be specified in the request:

                                                                              • waitForSync: an optional boolean flag that, if set, will force the transaction to write all data to disk before returning.
                                                                              • lockTimeout: an optional numeric value that can be used to set a timeout for waiting on collection locks. If not specified, a default value will be used. Setting lockTimeout to 0 will make ArangoDB not time out waiting for a lock.
                                                                              • params: optional arguments passed to action.
                                                                              If the transaction is fully executed and committed on the server, HTTP 200 will be returned. Additionally, the return value of the code defined in action will be returned in the result attribute.

                                                                              For successfully committed transactions, 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 transaction
                                                                              If the transaction 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
                                                                              If a transaction fails to commit, either by an exception thrown in the action code, or by an internal error, the server will respond with an error. Any other errors will be returned with any of the return codes HTTP 400, HTTP 409, or HTTP 500.

                                                                              ", + "summary": " Execute transaction", "httpMethod": "POST", - "examples": "

                                                                              Executing a transaction on a single collection:



                                                                              unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{\"collections\":{\"write\":\"products\"},\"action\":\"function () { var db = require('internal').db; db.products.save({}); return db.products.count(); }\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : 1, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n



                                                                              Executing a transaction using multiple collections:



                                                                              unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{\"collections\":{\"write\":[\"products\",\"materials\"]},\"action\":\"function () { var db = require('internal').db; db.products.save({}); db.materials.save({}); return 'worked!'; }\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : \"worked!\", \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n



                                                                              Aborting a transaction due to an internal error:



                                                                              unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{\"collections\":{\"write\":\"products\"},\"action\":\"function () { var db = require('internal').db; db.products.save({ _key: 'abc'}); db.products.save({ _key: 'abc'}); }\"}\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 400, \n  \"errorNum\" : 1210, \n  \"errorMessage\" : \"unique constraint violated\" \n}\n\n



                                                                              Aborting a transaction by explicitly throwing an exception:



                                                                              unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{\"collections\":{\"read\":\"products\"},\"action\":\"function () { throw 'doh!'; }\"}\n\nHTTP/1.1 500 Internal Error\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 500, \n  \"errorNum\" : 500, \n  \"errorMessage\" : \"doh!\" \n}\n\n



                                                                              Referring to a non-existing collection:



                                                                              unix> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{\"collections\":{\"read\":\"products\"},\"action\":\"function () { return true; }\"}\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\" : \"collection not found\" \n}\n\n

                                                                              ", - "nickname": "executesATransaction" + "examples": "

                                                                              Executing a transaction on a single collection:



                                                                              shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n  \"collections\" : { \n    \"write\" : \"products\" \n  }, \n  \"action\" : \"function () { var db = require('internal').db; db.products.save({});  return db.products.count(); }\" \n}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : 1, \n  \"error\" : false, \n  \"code\" : 200 \n}\n



                                                                              Executing a transaction using multiple collections:



                                                                              shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n  \"collections\" : { \n    \"write\" : [ \n      \"products\", \n      \"materials\" \n    ] \n  }, \n  \"action\" : \"function () { var db = require('internal').db; db.products.save({}); db.materials.save({}); return 'worked!'; }\" \n}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : \"worked!\", \n  \"error\" : false, \n  \"code\" : 200 \n}\n



                                                                              Aborting a transaction due to an internal error:



                                                                              shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n  \"collections\" : { \n    \"write\" : \"products\" \n  }, \n  \"action\" : \"function () { var db = require('internal').db; db.products.save({ _key: 'abc'}); db.products.save({ _key: 'abc'}); }\" \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\" : 1210, \n  \"errorMessage\" : \"unique constraint violated\" \n}\n



                                                                              Aborting a transaction by explicitly throwing an exception:



                                                                              shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n  \"collections\" : { \n    \"read\" : \"products\" \n  }, \n  \"action\" : \"function () { throw 'doh!'; }\" \n}\n\nHTTP/1.1 500 Internal Error\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 500, \n  \"errorNum\" : 500, \n  \"errorMessage\" : \"doh!\" \n}\n



                                                                              Referring to a non-existing collection:



                                                                              shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n  \"collections\" : { \n    \"read\" : \"products\" \n  }, \n  \"action\" : \"function () { return true; }\" \n}\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\" : \"collection not found\" \n}\n

                                                                              @endDocuBlock", + "nickname": "ExecuteTransaction" } ], "path": "/_api/transaction" diff --git a/js/apps/system/aardvark/api-docs/traversal.json b/js/apps/system/aardvark/api-docs/traversal.json index b90ec535c3..6980820bfd 100644 --- a/js/apps/system/aardvark/api-docs/traversal.json +++ b/js/apps/system/aardvark/api-docs/traversal.json @@ -16,11 +16,11 @@ "code": "400" }, { - "reason": "The server will responded with HTTP 404 if the specified edge collection does not exist, or the specified start vertex cannot be found.

                                                                              ", + "reason": "The server will responded with HTTP 404 if the specified edge collection does not exist, or the specified start vertex cannot be found.

                                                                              ", "code": "404" }, { - "reason": "The server will responded with HTTP 500 when an error occurs inside the traversal or if a traversal performs more than maxIterations iterations.

                                                                              ", + "reason": "The server will responded with HTTP 500 when an error occurs inside the traversal or if a traversal performs more than maxIterations iterations.

                                                                              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:

                                                                              ", "code": "500" } ], @@ -33,10 +33,10 @@ "description": "

                                                                              " } ], - "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
                                                                              • sort (optional): body (JavaScript) code of a custom comparison function for the edges. The signature of this function is (l, r) -> integer (where l and r are edges) and must return -1 if l is smaller than, +1 if l is greater than, and 0 if l and r are equal. The reason for this is the following: The order of edges returned for a certain vertex is undefined. This is because there is no natural order of edges for a vertex with multiple connected edges. To explicitly define the order in which edges on the vertex are followed, you can specify an edge comparator function with this attribute. Note that the value here has to be a string to conform to the JSON standard, which in turn is parsed as function body on the server side. Furthermore note that this attribute is only used for the standard expanders. If you use your custom expander you have to do the sorting yourself within the expander code.
                                                                              • 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", + "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: *Deprecated* name of the collection that contains the edges.
                                                                                • graphName: name of the graph 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
                                                                                • sort (optional): body (JavaScript) code of a custom comparison function for the edges. The signature of this function is (l, r) -> integer (where l and r are edges) and must return -1 if l is smaller than, +1 if l is greater than, and 0 if l and r are equal. The reason for this is the following: The order of edges returned for a certain vertex is undefined. This is because there is no natural order of edges for a vertex with multiple connected edges. To explicitly define the order in which edges on the vertex are followed, you can specify an edge comparator function with this attribute. Note that the value here has to be a string to conform to the JSON standard, which in turn is parsed as function body on the server side. Furthermore note that this attribute is only used for the standard expanders. If you use your custom expander you have to do the sorting yourself within the expander code.
                                                                                • 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-binary @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/241058215\", \"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/241058215\", \n          \"_rev\" : \"241058215\", \n          \"_key\" : \"241058215\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/241254823\", \n          \"_rev\" : \"241254823\", \n          \"_key\" : \"241254823\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/241516967\", \n          \"_rev\" : \"241516967\", \n          \"_key\" : \"241516967\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/241713575\", \n          \"_rev\" : \"241713575\", \n          \"_key\" : \"241713575\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/241058215\", \n              \"_rev\" : \"241058215\", \n              \"_key\" : \"241058215\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/242237863\", \n              \"_rev\" : \"242237863\", \n              \"_key\" : \"242237863\", \n              \"_from\" : \"persons/241058215\", \n              \"_to\" : \"persons/241254823\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/241058215\", \n              \"_rev\" : \"241058215\", \n              \"_key\" : \"241058215\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/241254823\", \n              \"_rev\" : \"241254823\", \n              \"_key\" : \"241254823\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/242237863\", \n              \"_rev\" : \"242237863\", \n              \"_key\" : \"242237863\", \n              \"_from\" : \"persons/241058215\", \n              \"_to\" : \"persons/241254823\" \n            }, \n            { \n              \"_id\" : \"knows/242434471\", \n              \"_rev\" : \"242434471\", \n              \"_key\" : \"242434471\", \n              \"_from\" : \"persons/241254823\", \n              \"_to\" : \"persons/241516967\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/241058215\", \n              \"_rev\" : \"241058215\", \n              \"_key\" : \"241058215\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/241254823\", \n              \"_rev\" : \"241254823\", \n              \"_key\" : \"241254823\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/241516967\", \n              \"_rev\" : \"241516967\", \n              \"_key\" : \"241516967\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/242237863\", \n              \"_rev\" : \"242237863\", \n              \"_key\" : \"242237863\", \n              \"_from\" : \"persons/241058215\", \n              \"_to\" : \"persons/241254823\" \n            }, \n            { \n              \"_id\" : \"knows/242631079\", \n              \"_rev\" : \"242631079\", \n              \"_key\" : \"242631079\", \n              \"_from\" : \"persons/241254823\", \n              \"_to\" : \"persons/241713575\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/241058215\", \n              \"_rev\" : \"241058215\", \n              \"_key\" : \"241058215\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/241254823\", \n              \"_rev\" : \"241254823\", \n              \"_key\" : \"241254823\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/241713575\", \n              \"_rev\" : \"241713575\", \n              \"_key\" : \"241713575\", \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-binary @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/244072871\", \"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/244072871\", \n          \"_rev\" : \"244072871\", \n          \"_key\" : \"244072871\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/244924839\", \n          \"_rev\" : \"244924839\", \n          \"_key\" : \"244924839\", \n          \"name\" : \"Eve\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/244072871\", \n              \"_rev\" : \"244072871\", \n              \"_key\" : \"244072871\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/245842343\", \n              \"_rev\" : \"245842343\", \n              \"_key\" : \"245842343\", \n              \"_from\" : \"persons/244924839\", \n              \"_to\" : \"persons/244072871\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/244072871\", \n              \"_rev\" : \"244072871\", \n              \"_key\" : \"244072871\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/244924839\", \n              \"_rev\" : \"244924839\", \n              \"_key\" : \"244924839\", \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-binary @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/246825383\",\"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/246825383\", \n          \"_rev\" : \"246825383\", \n          \"_key\" : \"246825383\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/247677351\", \n          \"_rev\" : \"247677351\", \n          \"_key\" : \"247677351\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/247021991\", \n          \"_rev\" : \"247021991\", \n          \"_key\" : \"247021991\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/246825383\", \n          \"_rev\" : \"246825383\", \n          \"_key\" : \"246825383\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/247284135\", \n          \"_rev\" : \"247284135\", \n          \"_key\" : \"247284135\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/247480743\", \n          \"_rev\" : \"247480743\", \n          \"_key\" : \"247480743\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/246825383\", \n              \"_rev\" : \"246825383\", \n              \"_key\" : \"246825383\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/248594855\", \n              \"_rev\" : \"248594855\", \n              \"_key\" : \"248594855\", \n              \"_from\" : \"persons/247677351\", \n              \"_to\" : \"persons/246825383\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/246825383\", \n              \"_rev\" : \"246825383\", \n              \"_key\" : \"246825383\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/247677351\", \n              \"_rev\" : \"247677351\", \n              \"_key\" : \"247677351\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/248594855\", \n              \"_rev\" : \"248594855\", \n              \"_key\" : \"248594855\", \n              \"_from\" : \"persons/247677351\", \n              \"_to\" : \"persons/246825383\" \n            }, \n            { \n              \"_id\" : \"knows/248791463\", \n              \"_rev\" : \"248791463\", \n              \"_key\" : \"248791463\", \n              \"_from\" : \"persons/247677351\", \n              \"_to\" : \"persons/247021991\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/246825383\", \n              \"_rev\" : \"246825383\", \n              \"_key\" : \"246825383\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/247677351\", \n              \"_rev\" : \"247677351\", \n              \"_key\" : \"247677351\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/247021991\", \n              \"_rev\" : \"247021991\", \n              \"_key\" : \"247021991\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/248594855\", \n              \"_rev\" : \"248594855\", \n              \"_key\" : \"248594855\", \n              \"_from\" : \"persons/247677351\", \n              \"_to\" : \"persons/246825383\" \n            }, \n            { \n              \"_id\" : \"knows/248791463\", \n              \"_rev\" : \"248791463\", \n              \"_key\" : \"248791463\", \n              \"_from\" : \"persons/247677351\", \n              \"_to\" : \"persons/247021991\" \n            }, \n            { \n              \"_id\" : \"knows/248005031\", \n              \"_rev\" : \"248005031\", \n              \"_key\" : \"248005031\", \n              \"_from\" : \"persons/246825383\", \n              \"_to\" : \"persons/247021991\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/246825383\", \n              \"_rev\" : \"246825383\", \n              \"_key\" : \"246825383\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/247677351\", \n              \"_rev\" : \"247677351\", \n              \"_key\" : \"247677351\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/247021991\", \n              \"_rev\" : \"247021991\", \n              \"_key\" : \"247021991\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/246825383\", \n              \"_rev\" : \"246825383\", \n              \"_key\" : \"246825383\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/248594855\", \n              \"_rev\" : \"248594855\", \n              \"_key\" : \"248594855\", \n              \"_from\" : \"persons/247677351\", \n              \"_to\" : \"persons/246825383\" \n            }, \n            { \n              \"_id\" : \"knows/248791463\", \n              \"_rev\" : \"248791463\", \n              \"_key\" : \"248791463\", \n              \"_from\" : \"persons/247677351\", \n              \"_to\" : \"persons/247021991\" \n            }, \n            { \n              \"_id\" : \"knows/248201639\", \n              \"_rev\" : \"248201639\", \n              \"_key\" : \"248201639\", \n              \"_from\" : \"persons/247021991\", \n              \"_to\" : \"persons/247284135\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/246825383\", \n              \"_rev\" : \"246825383\", \n              \"_key\" : \"246825383\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/247677351\", \n              \"_rev\" : \"247677351\", \n              \"_key\" : \"247677351\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/247021991\", \n              \"_rev\" : \"247021991\", \n              \"_key\" : \"247021991\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/247284135\", \n              \"_rev\" : \"247284135\", \n              \"_key\" : \"247284135\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/248594855\", \n              \"_rev\" : \"248594855\", \n              \"_key\" : \"248594855\", \n              \"_from\" : \"persons/247677351\", \n              \"_to\" : \"persons/246825383\" \n            }, \n            { \n              \"_id\" : \"knows/248791463\", \n              \"_rev\" : \"248791463\", \n              \"_key\" : \"248791463\", \n              \"_from\" : \"persons/247677351\", \n              \"_to\" : \"persons/247021991\" \n            }, \n            { \n              \"_id\" : \"knows/248398247\", \n              \"_rev\" : \"248398247\", \n              \"_key\" : \"248398247\", \n              \"_from\" : \"persons/247021991\", \n              \"_to\" : \"persons/247480743\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/246825383\", \n              \"_rev\" : \"246825383\", \n              \"_key\" : \"246825383\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/247677351\", \n              \"_rev\" : \"247677351\", \n              \"_key\" : \"247677351\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/247021991\", \n              \"_rev\" : \"247021991\", \n              \"_key\" : \"247021991\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/247480743\", \n              \"_rev\" : \"247480743\", \n              \"_key\" : \"247480743\", \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-binary @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/250560935\", \"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/250560935\", \n          \"_rev\" : \"250560935\", \n          \"_key\" : \"250560935\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/251216295\", \n          \"_rev\" : \"251216295\", \n          \"_key\" : \"251216295\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/250560935\", \n              \"_rev\" : \"250560935\", \n              \"_key\" : \"250560935\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/251740583\", \n              \"_rev\" : \"251740583\", \n              \"_key\" : \"251740583\", \n              \"_from\" : \"persons/250560935\", \n              \"_to\" : \"persons/250757543\" \n            }, \n            { \n              \"_id\" : \"knows/252133799\", \n              \"_rev\" : \"252133799\", \n              \"_key\" : \"252133799\", \n              \"_from\" : \"persons/250757543\", \n              \"_to\" : \"persons/251216295\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/250560935\", \n              \"_rev\" : \"250560935\", \n              \"_key\" : \"250560935\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/250757543\", \n              \"_rev\" : \"250757543\", \n              \"_key\" : \"250757543\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/251216295\", \n              \"_rev\" : \"251216295\", \n              \"_key\" : \"251216295\", \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-binary @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/253575591\", \"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/253575591\", \n          \"_rev\" : \"253575591\", \n          \"_key\" : \"253575591\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/253772199\", \n          \"_rev\" : \"253772199\", \n          \"_key\" : \"253772199\", \n          \"name\" : \"Bob\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/253575591\", \n              \"_rev\" : \"253575591\", \n              \"_key\" : \"253575591\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/254755239\", \n              \"_rev\" : \"254755239\", \n              \"_key\" : \"254755239\", \n              \"_from\" : \"persons/253575591\", \n              \"_to\" : \"persons/253772199\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/253575591\", \n              \"_rev\" : \"253575591\", \n              \"_key\" : \"253575591\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/253772199\", \n              \"_rev\" : \"253772199\", \n              \"_key\" : \"253772199\", \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-binary @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/256262567\", \"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/256721319\", \n          \"_rev\" : \"256721319\", \n          \"_key\" : \"256721319\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/256917927\", \n          \"_rev\" : \"256917927\", \n          \"_key\" : \"256917927\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/257442215\", \n              \"_rev\" : \"257442215\", \n              \"_key\" : \"257442215\", \n              \"_from\" : \"persons/256262567\", \n              \"_to\" : \"persons/256459175\" \n            }, \n            { \n              \"_id\" : \"knows/257638823\", \n              \"_rev\" : \"257638823\", \n              \"_key\" : \"257638823\", \n              \"_from\" : \"persons/256459175\", \n              \"_to\" : \"persons/256721319\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/256262567\", \n              \"_rev\" : \"256262567\", \n              \"_key\" : \"256262567\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/256459175\", \n              \"_rev\" : \"256459175\", \n              \"_key\" : \"256459175\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/256721319\", \n              \"_rev\" : \"256721319\", \n              \"_key\" : \"256721319\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/257442215\", \n              \"_rev\" : \"257442215\", \n              \"_key\" : \"257442215\", \n              \"_from\" : \"persons/256262567\", \n              \"_to\" : \"persons/256459175\" \n            }, \n            { \n              \"_id\" : \"knows/257835431\", \n              \"_rev\" : \"257835431\", \n              \"_key\" : \"257835431\", \n              \"_from\" : \"persons/256459175\", \n              \"_to\" : \"persons/256917927\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/256262567\", \n              \"_rev\" : \"256262567\", \n              \"_key\" : \"256262567\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/256459175\", \n              \"_rev\" : \"256459175\", \n              \"_key\" : \"256459175\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/256917927\", \n              \"_rev\" : \"256917927\", \n              \"_key\" : \"256917927\", \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-binary @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/259277223\", \"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/259277223\", \n          \"_rev\" : \"259277223\", \n          \"_key\" : \"259277223\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/259473831\", \n          \"_rev\" : \"259473831\", \n          \"_key\" : \"259473831\", \n          \"name\" : \"Bob\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/259277223\", \n              \"_rev\" : \"259277223\", \n              \"_key\" : \"259277223\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/260456871\", \n              \"_rev\" : \"260456871\", \n              \"_key\" : \"260456871\", \n              \"_from\" : \"persons/259277223\", \n              \"_to\" : \"persons/259473831\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/259277223\", \n              \"_rev\" : \"259277223\", \n              \"_key\" : \"259277223\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/259473831\", \n              \"_rev\" : \"259473831\", \n              \"_key\" : \"259473831\", \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-binary @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/261964199\", \"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/261964199\", \n        \"_rev\" : \"261964199\", \n        \"_key\" : \"261964199\", \n        \"name\" : \"Alice\" \n      }, \n      { \n        \"_id\" : \"persons/262160807\", \n        \"_rev\" : \"262160807\", \n        \"_key\" : \"262160807\", \n        \"name\" : \"Bob\" \n      }, \n      { \n        \"_id\" : \"persons/262422951\", \n        \"_rev\" : \"262422951\", \n        \"_key\" : \"262422951\", \n        \"name\" : \"Charlie\" \n      }, \n      { \n        \"_id\" : \"persons/262619559\", \n        \"_rev\" : \"262619559\", \n        \"_key\" : \"262619559\", \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-binary @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/264978855\",\"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/264978855\", \n          \"_rev\" : \"264978855\", \n          \"_key\" : \"264978855\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/265830823\", \n          \"_rev\" : \"265830823\", \n          \"_key\" : \"265830823\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/265175463\", \n          \"_rev\" : \"265175463\", \n          \"_key\" : \"265175463\", \n          \"name\" : \"Bob\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/264978855\", \n              \"_rev\" : \"264978855\", \n              \"_key\" : \"264978855\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/266748327\", \n              \"_rev\" : \"266748327\", \n              \"_key\" : \"266748327\", \n              \"_from\" : \"persons/265830823\", \n              \"_to\" : \"persons/264978855\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/264978855\", \n              \"_rev\" : \"264978855\", \n              \"_key\" : \"264978855\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/265830823\", \n              \"_rev\" : \"265830823\", \n              \"_key\" : \"265830823\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/266748327\", \n              \"_rev\" : \"266748327\", \n              \"_key\" : \"266748327\", \n              \"_from\" : \"persons/265830823\", \n              \"_to\" : \"persons/264978855\" \n            }, \n            { \n              \"_id\" : \"knows/266944935\", \n              \"_rev\" : \"266944935\", \n              \"_key\" : \"266944935\", \n              \"_from\" : \"persons/265830823\", \n              \"_to\" : \"persons/265175463\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/264978855\", \n              \"_rev\" : \"264978855\", \n              \"_key\" : \"264978855\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/265830823\", \n              \"_rev\" : \"265830823\", \n              \"_key\" : \"265830823\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/265175463\", \n              \"_rev\" : \"265175463\", \n              \"_key\" : \"265175463\", \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-binary @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/267862439\",\"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/267862439\", \n          \"_rev\" : \"267862439\", \n          \"_key\" : \"267862439\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/268714407\", \n          \"_rev\" : \"268714407\", \n          \"_key\" : \"268714407\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/268059047\", \n          \"_rev\" : \"268059047\", \n          \"_key\" : \"268059047\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/267862439\", \n          \"_rev\" : \"267862439\", \n          \"_key\" : \"267862439\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/268321191\", \n          \"_rev\" : \"268321191\", \n          \"_key\" : \"268321191\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/268517799\", \n          \"_rev\" : \"268517799\", \n          \"_key\" : \"268517799\", \n          \"name\" : \"Dave\" \n        }, \n        { \n          \"_id\" : \"persons/268059047\", \n          \"_rev\" : \"268059047\", \n          \"_key\" : \"268059047\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/268714407\", \n          \"_rev\" : \"268714407\", \n          \"_key\" : \"268714407\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/267862439\", \n          \"_rev\" : \"267862439\", \n          \"_key\" : \"267862439\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/268321191\", \n          \"_rev\" : \"268321191\", \n          \"_key\" : \"268321191\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/268517799\", \n          \"_rev\" : \"268517799\", \n          \"_key\" : \"268517799\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/267862439\", \n              \"_rev\" : \"267862439\", \n              \"_key\" : \"267862439\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/269631911\", \n              \"_rev\" : \"269631911\", \n              \"_key\" : \"269631911\", \n              \"_from\" : \"persons/268714407\", \n              \"_to\" : \"persons/267862439\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/267862439\", \n              \"_rev\" : \"267862439\", \n              \"_key\" : \"267862439\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/268714407\", \n              \"_rev\" : \"268714407\", \n              \"_key\" : \"268714407\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/269631911\", \n              \"_rev\" : \"269631911\", \n              \"_key\" : \"269631911\", \n              \"_from\" : \"persons/268714407\", \n              \"_to\" : \"persons/267862439\" \n            }, \n            { \n              \"_id\" : \"knows/269828519\", \n              \"_rev\" : \"269828519\", \n              \"_key\" : \"269828519\", \n              \"_from\" : \"persons/268714407\", \n              \"_to\" : \"persons/268059047\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/267862439\", \n              \"_rev\" : \"267862439\", \n              \"_key\" : \"267862439\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/268714407\", \n              \"_rev\" : \"268714407\", \n              \"_key\" : \"268714407\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/268059047\", \n              \"_rev\" : \"268059047\", \n              \"_key\" : \"268059047\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/269631911\", \n              \"_rev\" : \"269631911\", \n              \"_key\" : \"269631911\", \n              \"_from\" : \"persons/268714407\", \n              \"_to\" : \"persons/267862439\" \n            }, \n            { \n              \"_id\" : \"knows/269828519\", \n              \"_rev\" : \"269828519\", \n              \"_key\" : \"269828519\", \n              \"_from\" : \"persons/268714407\", \n              \"_to\" : \"persons/268059047\" \n            }, \n            { \n              \"_id\" : \"knows/269042087\", \n              \"_rev\" : \"269042087\", \n              \"_key\" : \"269042087\", \n              \"_from\" : \"persons/267862439\", \n              \"_to\" : \"persons/268059047\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/267862439\", \n              \"_rev\" : \"267862439\", \n              \"_key\" : \"267862439\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/268714407\", \n              \"_rev\" : \"268714407\", \n              \"_key\" : \"268714407\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/268059047\", \n              \"_rev\" : \"268059047\", \n              \"_key\" : \"268059047\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/267862439\", \n              \"_rev\" : \"267862439\", \n              \"_key\" : \"267862439\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/269631911\", \n              \"_rev\" : \"269631911\", \n              \"_key\" : \"269631911\", \n              \"_from\" : \"persons/268714407\", \n              \"_to\" : \"persons/267862439\" \n            }, \n            { \n              \"_id\" : \"knows/269828519\", \n              \"_rev\" : \"269828519\", \n              \"_key\" : \"269828519\", \n              \"_from\" : \"persons/268714407\", \n              \"_to\" : \"persons/268059047\" \n            }, \n            { \n              \"_id\" : \"knows/269238695\", \n              \"_rev\" : \"269238695\", \n              \"_key\" : \"269238695\", \n              \"_from\" : \"persons/268059047\", \n              \"_to\" : \"persons/268321191\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/267862439\", \n              \"_rev\" : \"267862439\", \n              \"_key\" : \"267862439\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/268714407\", \n              \"_rev\" : \"268714407\", \n              \"_key\" : \"268714407\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/268059047\", \n              \"_rev\" : \"268059047\", \n              \"_key\" : \"268059047\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/268321191\", \n              \"_rev\" : \"268321191\", \n              \"_key\" : \"268321191\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/269631911\", \n              \"_rev\" : \"269631911\", \n              \"_key\" : \"269631911\", \n              \"_from\" : \"persons/268714407\", \n              \"_to\" : \"persons/267862439\" \n            }, \n            { \n              \"_id\" : \"knows/269828519\", \n              \"_rev\" : \"269828519\", \n              \"_key\" : \"269828519\", \n              \"_from\" : \"persons/268714407\", \n              \"_to\" : \"persons/268059047\" \n            }, \n            { \n              \"_id\" : \"knows/269435303\", \n              \"_rev\" : \"269435303\", \n              \"_key\" : \"269435303\", \n              \"_from\" : \"persons/268059047\", \n              \"_to\" : \"persons/268517799\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/267862439\", \n              \"_rev\" : \"267862439\", \n              \"_key\" : \"267862439\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/268714407\", \n              \"_rev\" : \"268714407\", \n              \"_key\" : \"268714407\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/268059047\", \n              \"_rev\" : \"268059047\", \n              \"_key\" : \"268059047\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/268517799\", \n              \"_rev\" : \"268517799\", \n              \"_key\" : \"268517799\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/269042087\", \n              \"_rev\" : \"269042087\", \n              \"_key\" : \"269042087\", \n              \"_from\" : \"persons/267862439\", \n              \"_to\" : \"persons/268059047\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/267862439\", \n              \"_rev\" : \"267862439\", \n              \"_key\" : \"267862439\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/268059047\", \n              \"_rev\" : \"268059047\", \n              \"_key\" : \"268059047\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/269042087\", \n              \"_rev\" : \"269042087\", \n              \"_key\" : \"269042087\", \n              \"_from\" : \"persons/267862439\", \n              \"_to\" : \"persons/268059047\" \n            }, \n            { \n              \"_id\" : \"knows/269828519\", \n              \"_rev\" : \"269828519\", \n              \"_key\" : \"269828519\", \n              \"_from\" : \"persons/268714407\", \n              \"_to\" : \"persons/268059047\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/267862439\", \n              \"_rev\" : \"267862439\", \n              \"_key\" : \"267862439\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/268059047\", \n              \"_rev\" : \"268059047\", \n              \"_key\" : \"268059047\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/268714407\", \n              \"_rev\" : \"268714407\", \n              \"_key\" : \"268714407\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/269042087\", \n              \"_rev\" : \"269042087\", \n              \"_key\" : \"269042087\", \n              \"_from\" : \"persons/267862439\", \n              \"_to\" : \"persons/268059047\" \n            }, \n            { \n              \"_id\" : \"knows/269828519\", \n              \"_rev\" : \"269828519\", \n              \"_key\" : \"269828519\", \n              \"_from\" : \"persons/268714407\", \n              \"_to\" : \"persons/268059047\" \n            }, \n            { \n              \"_id\" : \"knows/269631911\", \n              \"_rev\" : \"269631911\", \n              \"_key\" : \"269631911\", \n              \"_from\" : \"persons/268714407\", \n              \"_to\" : \"persons/267862439\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/267862439\", \n              \"_rev\" : \"267862439\", \n              \"_key\" : \"267862439\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/268059047\", \n              \"_rev\" : \"268059047\", \n              \"_key\" : \"268059047\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/268714407\", \n              \"_rev\" : \"268714407\", \n              \"_key\" : \"268714407\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/267862439\", \n              \"_rev\" : \"267862439\", \n              \"_key\" : \"267862439\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/269042087\", \n              \"_rev\" : \"269042087\", \n              \"_key\" : \"269042087\", \n              \"_from\" : \"persons/267862439\", \n              \"_to\" : \"persons/268059047\" \n            }, \n            { \n              \"_id\" : \"knows/269238695\", \n              \"_rev\" : \"269238695\", \n              \"_key\" : \"269238695\", \n              \"_from\" : \"persons/268059047\", \n              \"_to\" : \"persons/268321191\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/267862439\", \n              \"_rev\" : \"267862439\", \n              \"_key\" : \"267862439\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/268059047\", \n              \"_rev\" : \"268059047\", \n              \"_key\" : \"268059047\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/268321191\", \n              \"_rev\" : \"268321191\", \n              \"_key\" : \"268321191\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/269042087\", \n              \"_rev\" : \"269042087\", \n              \"_key\" : \"269042087\", \n              \"_from\" : \"persons/267862439\", \n              \"_to\" : \"persons/268059047\" \n            }, \n            { \n              \"_id\" : \"knows/269435303\", \n              \"_rev\" : \"269435303\", \n              \"_key\" : \"269435303\", \n              \"_from\" : \"persons/268059047\", \n              \"_to\" : \"persons/268517799\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/267862439\", \n              \"_rev\" : \"267862439\", \n              \"_key\" : \"267862439\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/268059047\", \n              \"_rev\" : \"268059047\", \n              \"_key\" : \"268059047\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/268517799\", \n              \"_rev\" : \"268517799\", \n              \"_key\" : \"268517799\", \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-binary @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/272581031\",\"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/272581031\", \n          \"_rev\" : \"272581031\", \n          \"_key\" : \"272581031\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/273039783\", \n          \"_rev\" : \"273039783\", \n          \"_key\" : \"273039783\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/273236391\", \n          \"_rev\" : \"273236391\", \n          \"_key\" : \"273236391\", \n          \"name\" : \"Dave\" \n        }, \n        { \n          \"_id\" : \"persons/272777639\", \n          \"_rev\" : \"272777639\", \n          \"_key\" : \"272777639\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/273432999\", \n          \"_rev\" : \"273432999\", \n          \"_key\" : \"273432999\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/272581031\", \n          \"_rev\" : \"272581031\", \n          \"_key\" : \"272581031\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/273432999\", \n          \"_rev\" : \"273432999\", \n          \"_key\" : \"273432999\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/273039783\", \n          \"_rev\" : \"273039783\", \n          \"_key\" : \"273039783\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/273236391\", \n          \"_rev\" : \"273236391\", \n          \"_key\" : \"273236391\", \n          \"name\" : \"Dave\" \n        }, \n        { \n          \"_id\" : \"persons/272777639\", \n          \"_rev\" : \"272777639\", \n          \"_key\" : \"272777639\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/272581031\", \n          \"_rev\" : \"272581031\", \n          \"_key\" : \"272581031\", \n          \"name\" : \"Alice\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/274350503\", \n              \"_rev\" : \"274350503\", \n              \"_key\" : \"274350503\", \n              \"_from\" : \"persons/273432999\", \n              \"_to\" : \"persons/272581031\" \n            }, \n            { \n              \"_id\" : \"knows/274547111\", \n              \"_rev\" : \"274547111\", \n              \"_key\" : \"274547111\", \n              \"_from\" : \"persons/273432999\", \n              \"_to\" : \"persons/272777639\" \n            }, \n            { \n              \"_id\" : \"knows/273760679\", \n              \"_rev\" : \"273760679\", \n              \"_key\" : \"273760679\", \n              \"_from\" : \"persons/272581031\", \n              \"_to\" : \"persons/272777639\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/272581031\", \n              \"_rev\" : \"272581031\", \n              \"_key\" : \"272581031\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/273432999\", \n              \"_rev\" : \"273432999\", \n              \"_key\" : \"273432999\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/272777639\", \n              \"_rev\" : \"272777639\", \n              \"_key\" : \"272777639\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/272581031\", \n              \"_rev\" : \"272581031\", \n              \"_key\" : \"272581031\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/274350503\", \n              \"_rev\" : \"274350503\", \n              \"_key\" : \"274350503\", \n              \"_from\" : \"persons/273432999\", \n              \"_to\" : \"persons/272581031\" \n            }, \n            { \n              \"_id\" : \"knows/274547111\", \n              \"_rev\" : \"274547111\", \n              \"_key\" : \"274547111\", \n              \"_from\" : \"persons/273432999\", \n              \"_to\" : \"persons/272777639\" \n            }, \n            { \n              \"_id\" : \"knows/273957287\", \n              \"_rev\" : \"273957287\", \n              \"_key\" : \"273957287\", \n              \"_from\" : \"persons/272777639\", \n              \"_to\" : \"persons/273039783\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/272581031\", \n              \"_rev\" : \"272581031\", \n              \"_key\" : \"272581031\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/273432999\", \n              \"_rev\" : \"273432999\", \n              \"_key\" : \"273432999\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/272777639\", \n              \"_rev\" : \"272777639\", \n              \"_key\" : \"272777639\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/273039783\", \n              \"_rev\" : \"273039783\", \n              \"_key\" : \"273039783\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/274350503\", \n              \"_rev\" : \"274350503\", \n              \"_key\" : \"274350503\", \n              \"_from\" : \"persons/273432999\", \n              \"_to\" : \"persons/272581031\" \n            }, \n            { \n              \"_id\" : \"knows/274547111\", \n              \"_rev\" : \"274547111\", \n              \"_key\" : \"274547111\", \n              \"_from\" : \"persons/273432999\", \n              \"_to\" : \"persons/272777639\" \n            }, \n            { \n              \"_id\" : \"knows/274153895\", \n              \"_rev\" : \"274153895\", \n              \"_key\" : \"274153895\", \n              \"_from\" : \"persons/272777639\", \n              \"_to\" : \"persons/273236391\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/272581031\", \n              \"_rev\" : \"272581031\", \n              \"_key\" : \"272581031\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/273432999\", \n              \"_rev\" : \"273432999\", \n              \"_key\" : \"273432999\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/272777639\", \n              \"_rev\" : \"272777639\", \n              \"_key\" : \"272777639\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/273236391\", \n              \"_rev\" : \"273236391\", \n              \"_key\" : \"273236391\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/274350503\", \n              \"_rev\" : \"274350503\", \n              \"_key\" : \"274350503\", \n              \"_from\" : \"persons/273432999\", \n              \"_to\" : \"persons/272581031\" \n            }, \n            { \n              \"_id\" : \"knows/274547111\", \n              \"_rev\" : \"274547111\", \n              \"_key\" : \"274547111\", \n              \"_from\" : \"persons/273432999\", \n              \"_to\" : \"persons/272777639\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/272581031\", \n              \"_rev\" : \"272581031\", \n              \"_key\" : \"272581031\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/273432999\", \n              \"_rev\" : \"273432999\", \n              \"_key\" : \"273432999\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/272777639\", \n              \"_rev\" : \"272777639\", \n              \"_key\" : \"272777639\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/274350503\", \n              \"_rev\" : \"274350503\", \n              \"_key\" : \"274350503\", \n              \"_from\" : \"persons/273432999\", \n              \"_to\" : \"persons/272581031\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/272581031\", \n              \"_rev\" : \"272581031\", \n              \"_key\" : \"272581031\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/273432999\", \n              \"_rev\" : \"273432999\", \n              \"_key\" : \"273432999\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/273760679\", \n              \"_rev\" : \"273760679\", \n              \"_key\" : \"273760679\", \n              \"_from\" : \"persons/272581031\", \n              \"_to\" : \"persons/272777639\" \n            }, \n            { \n              \"_id\" : \"knows/274547111\", \n              \"_rev\" : \"274547111\", \n              \"_key\" : \"274547111\", \n              \"_from\" : \"persons/273432999\", \n              \"_to\" : \"persons/272777639\" \n            }, \n            { \n              \"_id\" : \"knows/274350503\", \n              \"_rev\" : \"274350503\", \n              \"_key\" : \"274350503\", \n              \"_from\" : \"persons/273432999\", \n              \"_to\" : \"persons/272581031\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/272581031\", \n              \"_rev\" : \"272581031\", \n              \"_key\" : \"272581031\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/272777639\", \n              \"_rev\" : \"272777639\", \n              \"_key\" : \"272777639\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/273432999\", \n              \"_rev\" : \"273432999\", \n              \"_key\" : \"273432999\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/272581031\", \n              \"_rev\" : \"272581031\", \n              \"_key\" : \"272581031\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/273760679\", \n              \"_rev\" : \"273760679\", \n              \"_key\" : \"273760679\", \n              \"_from\" : \"persons/272581031\", \n              \"_to\" : \"persons/272777639\" \n            }, \n            { \n              \"_id\" : \"knows/274547111\", \n              \"_rev\" : \"274547111\", \n              \"_key\" : \"274547111\", \n              \"_from\" : \"persons/273432999\", \n              \"_to\" : \"persons/272777639\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/272581031\", \n              \"_rev\" : \"272581031\", \n              \"_key\" : \"272581031\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/272777639\", \n              \"_rev\" : \"272777639\", \n              \"_key\" : \"272777639\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/273432999\", \n              \"_rev\" : \"273432999\", \n              \"_key\" : \"273432999\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/273760679\", \n              \"_rev\" : \"273760679\", \n              \"_key\" : \"273760679\", \n              \"_from\" : \"persons/272581031\", \n              \"_to\" : \"persons/272777639\" \n            }, \n            { \n              \"_id\" : \"knows/273957287\", \n              \"_rev\" : \"273957287\", \n              \"_key\" : \"273957287\", \n              \"_from\" : \"persons/272777639\", \n              \"_to\" : \"persons/273039783\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/272581031\", \n              \"_rev\" : \"272581031\", \n              \"_key\" : \"272581031\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/272777639\", \n              \"_rev\" : \"272777639\", \n              \"_key\" : \"272777639\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/273039783\", \n              \"_rev\" : \"273039783\", \n              \"_key\" : \"273039783\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/273760679\", \n              \"_rev\" : \"273760679\", \n              \"_key\" : \"273760679\", \n              \"_from\" : \"persons/272581031\", \n              \"_to\" : \"persons/272777639\" \n            }, \n            { \n              \"_id\" : \"knows/274153895\", \n              \"_rev\" : \"274153895\", \n              \"_key\" : \"274153895\", \n              \"_from\" : \"persons/272777639\", \n              \"_to\" : \"persons/273236391\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/272581031\", \n              \"_rev\" : \"272581031\", \n              \"_key\" : \"272581031\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/272777639\", \n              \"_rev\" : \"272777639\", \n              \"_key\" : \"272777639\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/273236391\", \n              \"_rev\" : \"273236391\", \n              \"_key\" : \"273236391\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/273760679\", \n              \"_rev\" : \"273760679\", \n              \"_key\" : \"273760679\", \n              \"_from\" : \"persons/272581031\", \n              \"_to\" : \"persons/272777639\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/272581031\", \n              \"_rev\" : \"272581031\", \n              \"_key\" : \"272581031\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/272777639\", \n              \"_rev\" : \"272777639\", \n              \"_key\" : \"272777639\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/272581031\", \n              \"_rev\" : \"272581031\", \n              \"_key\" : \"272581031\", \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-binary @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/277299623\",\"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/277299623\", \n          \"_rev\" : \"277299623\", \n          \"_key\" : \"277299623\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/277496231\", \n          \"_rev\" : \"277496231\", \n          \"_key\" : \"277496231\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/277954983\", \n          \"_rev\" : \"277954983\", \n          \"_key\" : \"277954983\", \n          \"name\" : \"Dave\" \n        }, \n        { \n          \"_id\" : \"persons/277758375\", \n          \"_rev\" : \"277758375\", \n          \"_key\" : \"277758375\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/278151591\", \n          \"_rev\" : \"278151591\", \n          \"_key\" : \"278151591\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/277299623\", \n          \"_rev\" : \"277299623\", \n          \"_key\" : \"277299623\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/278151591\", \n          \"_rev\" : \"278151591\", \n          \"_key\" : \"278151591\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/277496231\", \n          \"_rev\" : \"277496231\", \n          \"_key\" : \"277496231\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/277954983\", \n          \"_rev\" : \"277954983\", \n          \"_key\" : \"277954983\", \n          \"name\" : \"Dave\" \n        }, \n        { \n          \"_id\" : \"persons/277758375\", \n          \"_rev\" : \"277758375\", \n          \"_key\" : \"277758375\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/277299623\", \n          \"_rev\" : \"277299623\", \n          \"_key\" : \"277299623\", \n          \"name\" : \"Alice\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/277299623\", \n              \"_rev\" : \"277299623\", \n              \"_key\" : \"277299623\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/278479271\", \n              \"_rev\" : \"278479271\", \n              \"_key\" : \"278479271\", \n              \"_from\" : \"persons/277299623\", \n              \"_to\" : \"persons/277496231\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/277299623\", \n              \"_rev\" : \"277299623\", \n              \"_key\" : \"277299623\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/277496231\", \n              \"_rev\" : \"277496231\", \n              \"_key\" : \"277496231\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/278479271\", \n              \"_rev\" : \"278479271\", \n              \"_key\" : \"278479271\", \n              \"_from\" : \"persons/277299623\", \n              \"_to\" : \"persons/277496231\" \n            }, \n            { \n              \"_id\" : \"knows/278872487\", \n              \"_rev\" : \"278872487\", \n              \"_key\" : \"278872487\", \n              \"_from\" : \"persons/277496231\", \n              \"_to\" : \"persons/277954983\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/277299623\", \n              \"_rev\" : \"277299623\", \n              \"_key\" : \"277299623\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/277496231\", \n              \"_rev\" : \"277496231\", \n              \"_key\" : \"277496231\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/277954983\", \n              \"_rev\" : \"277954983\", \n              \"_key\" : \"277954983\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/278479271\", \n              \"_rev\" : \"278479271\", \n              \"_key\" : \"278479271\", \n              \"_from\" : \"persons/277299623\", \n              \"_to\" : \"persons/277496231\" \n            }, \n            { \n              \"_id\" : \"knows/278675879\", \n              \"_rev\" : \"278675879\", \n              \"_key\" : \"278675879\", \n              \"_from\" : \"persons/277496231\", \n              \"_to\" : \"persons/277758375\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/277299623\", \n              \"_rev\" : \"277299623\", \n              \"_key\" : \"277299623\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/277496231\", \n              \"_rev\" : \"277496231\", \n              \"_key\" : \"277496231\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/277758375\", \n              \"_rev\" : \"277758375\", \n              \"_key\" : \"277758375\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/278479271\", \n              \"_rev\" : \"278479271\", \n              \"_key\" : \"278479271\", \n              \"_from\" : \"persons/277299623\", \n              \"_to\" : \"persons/277496231\" \n            }, \n            { \n              \"_id\" : \"knows/279265703\", \n              \"_rev\" : \"279265703\", \n              \"_key\" : \"279265703\", \n              \"_from\" : \"persons/278151591\", \n              \"_to\" : \"persons/277496231\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/277299623\", \n              \"_rev\" : \"277299623\", \n              \"_key\" : \"277299623\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/277496231\", \n              \"_rev\" : \"277496231\", \n              \"_key\" : \"277496231\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/278151591\", \n              \"_rev\" : \"278151591\", \n              \"_key\" : \"278151591\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/278479271\", \n              \"_rev\" : \"278479271\", \n              \"_key\" : \"278479271\", \n              \"_from\" : \"persons/277299623\", \n              \"_to\" : \"persons/277496231\" \n            }, \n            { \n              \"_id\" : \"knows/279265703\", \n              \"_rev\" : \"279265703\", \n              \"_key\" : \"279265703\", \n              \"_from\" : \"persons/278151591\", \n              \"_to\" : \"persons/277496231\" \n            }, \n            { \n              \"_id\" : \"knows/279069095\", \n              \"_rev\" : \"279069095\", \n              \"_key\" : \"279069095\", \n              \"_from\" : \"persons/278151591\", \n              \"_to\" : \"persons/277299623\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/277299623\", \n              \"_rev\" : \"277299623\", \n              \"_key\" : \"277299623\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/277496231\", \n              \"_rev\" : \"277496231\", \n              \"_key\" : \"277496231\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/278151591\", \n              \"_rev\" : \"278151591\", \n              \"_key\" : \"278151591\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/277299623\", \n              \"_rev\" : \"277299623\", \n              \"_key\" : \"277299623\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/279069095\", \n              \"_rev\" : \"279069095\", \n              \"_key\" : \"279069095\", \n              \"_from\" : \"persons/278151591\", \n              \"_to\" : \"persons/277299623\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/277299623\", \n              \"_rev\" : \"277299623\", \n              \"_key\" : \"277299623\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/278151591\", \n              \"_rev\" : \"278151591\", \n              \"_key\" : \"278151591\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/279069095\", \n              \"_rev\" : \"279069095\", \n              \"_key\" : \"279069095\", \n              \"_from\" : \"persons/278151591\", \n              \"_to\" : \"persons/277299623\" \n            }, \n            { \n              \"_id\" : \"knows/279265703\", \n              \"_rev\" : \"279265703\", \n              \"_key\" : \"279265703\", \n              \"_from\" : \"persons/278151591\", \n              \"_to\" : \"persons/277496231\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/277299623\", \n              \"_rev\" : \"277299623\", \n              \"_key\" : \"277299623\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/278151591\", \n              \"_rev\" : \"278151591\", \n              \"_key\" : \"278151591\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/277496231\", \n              \"_rev\" : \"277496231\", \n              \"_key\" : \"277496231\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/279069095\", \n              \"_rev\" : \"279069095\", \n              \"_key\" : \"279069095\", \n              \"_from\" : \"persons/278151591\", \n              \"_to\" : \"persons/277299623\" \n            }, \n            { \n              \"_id\" : \"knows/279265703\", \n              \"_rev\" : \"279265703\", \n              \"_key\" : \"279265703\", \n              \"_from\" : \"persons/278151591\", \n              \"_to\" : \"persons/277496231\" \n            }, \n            { \n              \"_id\" : \"knows/278872487\", \n              \"_rev\" : \"278872487\", \n              \"_key\" : \"278872487\", \n              \"_from\" : \"persons/277496231\", \n              \"_to\" : \"persons/277954983\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/277299623\", \n              \"_rev\" : \"277299623\", \n              \"_key\" : \"277299623\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/278151591\", \n              \"_rev\" : \"278151591\", \n              \"_key\" : \"278151591\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/277496231\", \n              \"_rev\" : \"277496231\", \n              \"_key\" : \"277496231\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/277954983\", \n              \"_rev\" : \"277954983\", \n              \"_key\" : \"277954983\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/279069095\", \n              \"_rev\" : \"279069095\", \n              \"_key\" : \"279069095\", \n              \"_from\" : \"persons/278151591\", \n              \"_to\" : \"persons/277299623\" \n            }, \n            { \n              \"_id\" : \"knows/279265703\", \n              \"_rev\" : \"279265703\", \n              \"_key\" : \"279265703\", \n              \"_from\" : \"persons/278151591\", \n              \"_to\" : \"persons/277496231\" \n            }, \n            { \n              \"_id\" : \"knows/278675879\", \n              \"_rev\" : \"278675879\", \n              \"_key\" : \"278675879\", \n              \"_from\" : \"persons/277496231\", \n              \"_to\" : \"persons/277758375\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/277299623\", \n              \"_rev\" : \"277299623\", \n              \"_key\" : \"277299623\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/278151591\", \n              \"_rev\" : \"278151591\", \n              \"_key\" : \"278151591\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/277496231\", \n              \"_rev\" : \"277496231\", \n              \"_key\" : \"277496231\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/277758375\", \n              \"_rev\" : \"277758375\", \n              \"_key\" : \"277758375\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/279069095\", \n              \"_rev\" : \"279069095\", \n              \"_key\" : \"279069095\", \n              \"_from\" : \"persons/278151591\", \n              \"_to\" : \"persons/277299623\" \n            }, \n            { \n              \"_id\" : \"knows/279265703\", \n              \"_rev\" : \"279265703\", \n              \"_key\" : \"279265703\", \n              \"_from\" : \"persons/278151591\", \n              \"_to\" : \"persons/277496231\" \n            }, \n            { \n              \"_id\" : \"knows/278479271\", \n              \"_rev\" : \"278479271\", \n              \"_key\" : \"278479271\", \n              \"_from\" : \"persons/277299623\", \n              \"_to\" : \"persons/277496231\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/277299623\", \n              \"_rev\" : \"277299623\", \n              \"_key\" : \"277299623\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/278151591\", \n              \"_rev\" : \"278151591\", \n              \"_key\" : \"278151591\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/277496231\", \n              \"_rev\" : \"277496231\", \n              \"_key\" : \"277496231\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/277299623\", \n              \"_rev\" : \"277299623\", \n              \"_key\" : \"277299623\", \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-binary @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/282018215\",\"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/282018215\", \n          \"_rev\" : \"282018215\", \n          \"_key\" : \"282018215\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/282870183\", \n          \"_rev\" : \"282870183\", \n          \"_key\" : \"282870183\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/282214823\", \n          \"_rev\" : \"282214823\", \n          \"_key\" : \"282214823\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/282018215\", \n          \"_rev\" : \"282018215\", \n          \"_key\" : \"282018215\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/282476967\", \n          \"_rev\" : \"282476967\", \n          \"_key\" : \"282476967\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/282673575\", \n          \"_rev\" : \"282673575\", \n          \"_key\" : \"282673575\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/282018215\", \n              \"_rev\" : \"282018215\", \n              \"_key\" : \"282018215\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/283787687\", \n              \"_rev\" : \"283787687\", \n              \"_key\" : \"283787687\", \n              \"_from\" : \"persons/282870183\", \n              \"_to\" : \"persons/282018215\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/282018215\", \n              \"_rev\" : \"282018215\", \n              \"_key\" : \"282018215\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/282870183\", \n              \"_rev\" : \"282870183\", \n              \"_key\" : \"282870183\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/283787687\", \n              \"_rev\" : \"283787687\", \n              \"_key\" : \"283787687\", \n              \"_from\" : \"persons/282870183\", \n              \"_to\" : \"persons/282018215\" \n            }, \n            { \n              \"_id\" : \"knows/283984295\", \n              \"_rev\" : \"283984295\", \n              \"_key\" : \"283984295\", \n              \"_from\" : \"persons/282870183\", \n              \"_to\" : \"persons/282214823\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/282018215\", \n              \"_rev\" : \"282018215\", \n              \"_key\" : \"282018215\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/282870183\", \n              \"_rev\" : \"282870183\", \n              \"_key\" : \"282870183\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/282214823\", \n              \"_rev\" : \"282214823\", \n              \"_key\" : \"282214823\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/283787687\", \n              \"_rev\" : \"283787687\", \n              \"_key\" : \"283787687\", \n              \"_from\" : \"persons/282870183\", \n              \"_to\" : \"persons/282018215\" \n            }, \n            { \n              \"_id\" : \"knows/283984295\", \n              \"_rev\" : \"283984295\", \n              \"_key\" : \"283984295\", \n              \"_from\" : \"persons/282870183\", \n              \"_to\" : \"persons/282214823\" \n            }, \n            { \n              \"_id\" : \"knows/283197863\", \n              \"_rev\" : \"283197863\", \n              \"_key\" : \"283197863\", \n              \"_from\" : \"persons/282018215\", \n              \"_to\" : \"persons/282214823\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/282018215\", \n              \"_rev\" : \"282018215\", \n              \"_key\" : \"282018215\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/282870183\", \n              \"_rev\" : \"282870183\", \n              \"_key\" : \"282870183\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/282214823\", \n              \"_rev\" : \"282214823\", \n              \"_key\" : \"282214823\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/282018215\", \n              \"_rev\" : \"282018215\", \n              \"_key\" : \"282018215\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/283787687\", \n              \"_rev\" : \"283787687\", \n              \"_key\" : \"283787687\", \n              \"_from\" : \"persons/282870183\", \n              \"_to\" : \"persons/282018215\" \n            }, \n            { \n              \"_id\" : \"knows/283984295\", \n              \"_rev\" : \"283984295\", \n              \"_key\" : \"283984295\", \n              \"_from\" : \"persons/282870183\", \n              \"_to\" : \"persons/282214823\" \n            }, \n            { \n              \"_id\" : \"knows/283394471\", \n              \"_rev\" : \"283394471\", \n              \"_key\" : \"283394471\", \n              \"_from\" : \"persons/282214823\", \n              \"_to\" : \"persons/282476967\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/282018215\", \n              \"_rev\" : \"282018215\", \n              \"_key\" : \"282018215\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/282870183\", \n              \"_rev\" : \"282870183\", \n              \"_key\" : \"282870183\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/282214823\", \n              \"_rev\" : \"282214823\", \n              \"_key\" : \"282214823\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/282476967\", \n              \"_rev\" : \"282476967\", \n              \"_key\" : \"282476967\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/283787687\", \n              \"_rev\" : \"283787687\", \n              \"_key\" : \"283787687\", \n              \"_from\" : \"persons/282870183\", \n              \"_to\" : \"persons/282018215\" \n            }, \n            { \n              \"_id\" : \"knows/283984295\", \n              \"_rev\" : \"283984295\", \n              \"_key\" : \"283984295\", \n              \"_from\" : \"persons/282870183\", \n              \"_to\" : \"persons/282214823\" \n            }, \n            { \n              \"_id\" : \"knows/283591079\", \n              \"_rev\" : \"283591079\", \n              \"_key\" : \"283591079\", \n              \"_from\" : \"persons/282214823\", \n              \"_to\" : \"persons/282673575\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/282018215\", \n              \"_rev\" : \"282018215\", \n              \"_key\" : \"282018215\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/282870183\", \n              \"_rev\" : \"282870183\", \n              \"_key\" : \"282870183\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/282214823\", \n              \"_rev\" : \"282214823\", \n              \"_key\" : \"282214823\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/282673575\", \n              \"_rev\" : \"282673575\", \n              \"_key\" : \"282673575\", \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-binary @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/285753767\",\"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": "

                                                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/alice\", \"graphName\" : \"knows_graph\", \"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/alice\", \n          \"_rev\" : \"1046355462\", \n          \"_key\" : \"alice\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/bob\", \n          \"_rev\" : \"1046552070\", \n          \"_key\" : \"bob\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/charlie\", \n          \"_rev\" : \"1046814214\", \n          \"_key\" : \"charlie\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/dave\", \n          \"_rev\" : \"1047010822\", \n          \"_key\" : \"dave\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1046355462\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1047469574\", \n              \"_rev\" : \"1047469574\", \n              \"_key\" : \"1047469574\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1046355462\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1046552070\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1047469574\", \n              \"_rev\" : \"1047469574\", \n              \"_key\" : \"1047469574\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1047666182\", \n              \"_rev\" : \"1047666182\", \n              \"_key\" : \"1047666182\", \n              \"_from\" : \"persons/bob\", \n              \"_to\" : \"persons/charlie\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1046355462\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1046552070\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/charlie\", \n              \"_rev\" : \"1046814214\", \n              \"_key\" : \"charlie\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1047469574\", \n              \"_rev\" : \"1047469574\", \n              \"_key\" : \"1047469574\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1047862790\", \n              \"_rev\" : \"1047862790\", \n              \"_key\" : \"1047862790\", \n              \"_from\" : \"persons/bob\", \n              \"_to\" : \"persons/dave\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1046355462\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1046552070\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/dave\", \n              \"_rev\" : \"1047010822\", \n              \"_key\" : \"dave\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n



                                                                                  Follow only inbound edges:



                                                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/alice\", \"graphName\" : \"knows_graph\", \"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/alice\", \n          \"_rev\" : \"1050811910\", \n          \"_key\" : \"alice\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/eve\", \n          \"_rev\" : \"1051663878\", \n          \"_key\" : \"eve\", \n          \"name\" : \"Eve\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1050811910\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1052515846\", \n              \"_rev\" : \"1052515846\", \n              \"_key\" : \"1052515846\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1050811910\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1051663878\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n



                                                                                  Follow any direction of edges:



                                                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/alice\",\"graphName\":\"knows_graph\",\"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/alice\", \n          \"_rev\" : \"1055006214\", \n          \"_key\" : \"alice\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/eve\", \n          \"_rev\" : \"1055858182\", \n          \"_key\" : \"eve\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/bob\", \n          \"_rev\" : \"1055202822\", \n          \"_key\" : \"bob\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/alice\", \n          \"_rev\" : \"1055006214\", \n          \"_key\" : \"alice\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/charlie\", \n          \"_rev\" : \"1055464966\", \n          \"_key\" : \"charlie\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/dave\", \n          \"_rev\" : \"1055661574\", \n          \"_key\" : \"dave\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1055006214\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1056710150\", \n              \"_rev\" : \"1056710150\", \n              \"_key\" : \"1056710150\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1055006214\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1055858182\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1056710150\", \n              \"_rev\" : \"1056710150\", \n              \"_key\" : \"1056710150\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            }, \n            { \n              \"_id\" : \"knows/1056906758\", \n              \"_rev\" : \"1056906758\", \n              \"_key\" : \"1056906758\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1055006214\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1055858182\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1055202822\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1056710150\", \n              \"_rev\" : \"1056710150\", \n              \"_key\" : \"1056710150\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            }, \n            { \n              \"_id\" : \"knows/1056906758\", \n              \"_rev\" : \"1056906758\", \n              \"_key\" : \"1056906758\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1056120326\", \n              \"_rev\" : \"1056120326\", \n              \"_key\" : \"1056120326\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1055006214\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1055858182\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1055202822\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1055006214\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1056710150\", \n              \"_rev\" : \"1056710150\", \n              \"_key\" : \"1056710150\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            }, \n            { \n              \"_id\" : \"knows/1056906758\", \n              \"_rev\" : \"1056906758\", \n              \"_key\" : \"1056906758\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1056316934\", \n              \"_rev\" : \"1056316934\", \n              \"_key\" : \"1056316934\", \n              \"_from\" : \"persons/bob\", \n              \"_to\" : \"persons/charlie\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1055006214\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1055858182\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1055202822\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/charlie\", \n              \"_rev\" : \"1055464966\", \n              \"_key\" : \"charlie\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1056710150\", \n              \"_rev\" : \"1056710150\", \n              \"_key\" : \"1056710150\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            }, \n            { \n              \"_id\" : \"knows/1056906758\", \n              \"_rev\" : \"1056906758\", \n              \"_key\" : \"1056906758\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1056513542\", \n              \"_rev\" : \"1056513542\", \n              \"_key\" : \"1056513542\", \n              \"_from\" : \"persons/bob\", \n              \"_to\" : \"persons/dave\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1055006214\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1055858182\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1055202822\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/dave\", \n              \"_rev\" : \"1055661574\", \n              \"_key\" : \"dave\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n



                                                                                  Excluding Charlie and Bob:



                                                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/alice\", \"graphName\" : \"knows_graph\", \"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/alice\", \n          \"_rev\" : \"1060183558\", \n          \"_key\" : \"alice\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/dave\", \n          \"_rev\" : \"1060838918\", \n          \"_key\" : \"dave\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1060183558\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1061297670\", \n              \"_rev\" : \"1061297670\", \n              \"_key\" : \"1061297670\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1061690886\", \n              \"_rev\" : \"1061690886\", \n              \"_key\" : \"1061690886\", \n              \"_from\" : \"persons/bob\", \n              \"_to\" : \"persons/dave\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1060183558\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1060380166\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/dave\", \n              \"_rev\" : \"1060838918\", \n              \"_key\" : \"dave\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n



                                                                                  Do not follow edges from Bob:



                                                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/alice\", \"graphName\" : \"knows_graph\", \"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/alice\", \n          \"_rev\" : \"1064640006\", \n          \"_key\" : \"alice\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/bob\", \n          \"_rev\" : \"1064836614\", \n          \"_key\" : \"bob\", \n          \"name\" : \"Bob\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1064640006\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1065754118\", \n              \"_rev\" : \"1065754118\", \n              \"_key\" : \"1065754118\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1064640006\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1064836614\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n



                                                                                  Visit only nodes in a depth of at least 2:



                                                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/alice\", \"graphName\" : \"knows_graph\", \"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/charlie\", \n          \"_rev\" : \"1069227526\", \n          \"_key\" : \"charlie\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/dave\", \n          \"_rev\" : \"1069424134\", \n          \"_key\" : \"dave\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1069882886\", \n              \"_rev\" : \"1069882886\", \n              \"_key\" : \"1069882886\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1070079494\", \n              \"_rev\" : \"1070079494\", \n              \"_key\" : \"1070079494\", \n              \"_from\" : \"persons/bob\", \n              \"_to\" : \"persons/charlie\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1068768774\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1068965382\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/charlie\", \n              \"_rev\" : \"1069227526\", \n              \"_key\" : \"charlie\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1069882886\", \n              \"_rev\" : \"1069882886\", \n              \"_key\" : \"1069882886\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1070276102\", \n              \"_rev\" : \"1070276102\", \n              \"_key\" : \"1070276102\", \n              \"_from\" : \"persons/bob\", \n              \"_to\" : \"persons/dave\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1068768774\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1068965382\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/dave\", \n              \"_rev\" : \"1069424134\", \n              \"_key\" : \"dave\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n



                                                                                  Visit only nodes in a depth of at most 1:



                                                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/alice\", \"graphName\" : \"knows_graph\", \"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/alice\", \n          \"_rev\" : \"1073225222\", \n          \"_key\" : \"alice\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/bob\", \n          \"_rev\" : \"1073421830\", \n          \"_key\" : \"bob\", \n          \"name\" : \"Bob\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1073225222\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1074339334\", \n              \"_rev\" : \"1074339334\", \n              \"_key\" : \"1074339334\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1073225222\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1073421830\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n



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



                                                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/traversal\n{ \"startVertex\": \"persons/alice\", \"graphName\" : \"knows_graph\", \"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/alice\", \n        \"_rev\" : \"1077353990\", \n        \"_key\" : \"alice\", \n        \"name\" : \"Alice\" \n      }, \n      { \n        \"_id\" : \"persons/bob\", \n        \"_rev\" : \"1077550598\", \n        \"_key\" : \"bob\", \n        \"name\" : \"Bob\" \n      }, \n      { \n        \"_id\" : \"persons/charlie\", \n        \"_rev\" : \"1077812742\", \n        \"_key\" : \"charlie\", \n        \"name\" : \"Charlie\" \n      }, \n      { \n        \"_id\" : \"persons/dave\", \n        \"_rev\" : \"1078009350\", \n        \"_key\" : \"dave\", \n        \"name\" : \"Dave\" \n      } \n    ] \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n



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



                                                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/alice\",\"graphName\":\"knows_graph\",\"expander\":\"var connections = [ ];if (vertex.name === \\\"Alice\\\") {config.datasource.getInEdges(vertex).forEach(function (e) {connections.push({ vertex: require(\\\"internal\\\").db._document(e._from), edge: e});});}if (vertex.name === \\\"Eve\\\") {config.datasource.getOutEdges(vertex).forEach(function (e) {connections.push({vertex: require(\\\"internal\\\").db._document(e._to), edge: e});});}return connections;\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : { \n    \"visited\" : { \n      \"vertices\" : [ \n        { \n          \"_id\" : \"persons/alice\", \n          \"_rev\" : \"1081810438\", \n          \"_key\" : \"alice\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/eve\", \n          \"_rev\" : \"1082662406\", \n          \"_key\" : \"eve\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/bob\", \n          \"_rev\" : \"1082007046\", \n          \"_key\" : \"bob\", \n          \"name\" : \"Bob\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1081810438\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1083514374\", \n              \"_rev\" : \"1083514374\", \n              \"_key\" : \"1083514374\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1081810438\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1082662406\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1083514374\", \n              \"_rev\" : \"1083514374\", \n              \"_key\" : \"1083514374\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            }, \n            { \n              \"_id\" : \"knows/1083710982\", \n              \"_rev\" : \"1083710982\", \n              \"_key\" : \"1083710982\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1081810438\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1082662406\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1082007046\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n



                                                                                  Follow the depthfirst strategy:



                                                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/alice\",\"graphName\":\"knows_graph\",\"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/alice\", \n          \"_rev\" : \"1086135814\", \n          \"_key\" : \"alice\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/eve\", \n          \"_rev\" : \"1086987782\", \n          \"_key\" : \"eve\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/bob\", \n          \"_rev\" : \"1086332422\", \n          \"_key\" : \"bob\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/alice\", \n          \"_rev\" : \"1086135814\", \n          \"_key\" : \"alice\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/charlie\", \n          \"_rev\" : \"1086594566\", \n          \"_key\" : \"charlie\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/dave\", \n          \"_rev\" : \"1086791174\", \n          \"_key\" : \"dave\", \n          \"name\" : \"Dave\" \n        }, \n        { \n          \"_id\" : \"persons/bob\", \n          \"_rev\" : \"1086332422\", \n          \"_key\" : \"bob\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/eve\", \n          \"_rev\" : \"1086987782\", \n          \"_key\" : \"eve\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/alice\", \n          \"_rev\" : \"1086135814\", \n          \"_key\" : \"alice\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/charlie\", \n          \"_rev\" : \"1086594566\", \n          \"_key\" : \"charlie\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/dave\", \n          \"_rev\" : \"1086791174\", \n          \"_key\" : \"dave\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1086135814\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1087839750\", \n              \"_rev\" : \"1087839750\", \n              \"_key\" : \"1087839750\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1086135814\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1086987782\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1087839750\", \n              \"_rev\" : \"1087839750\", \n              \"_key\" : \"1087839750\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            }, \n            { \n              \"_id\" : \"knows/1088036358\", \n              \"_rev\" : \"1088036358\", \n              \"_key\" : \"1088036358\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1086135814\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1086987782\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1086332422\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1087839750\", \n              \"_rev\" : \"1087839750\", \n              \"_key\" : \"1087839750\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            }, \n            { \n              \"_id\" : \"knows/1088036358\", \n              \"_rev\" : \"1088036358\", \n              \"_key\" : \"1088036358\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1087249926\", \n              \"_rev\" : \"1087249926\", \n              \"_key\" : \"1087249926\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1086135814\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1086987782\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1086332422\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1086135814\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1087839750\", \n              \"_rev\" : \"1087839750\", \n              \"_key\" : \"1087839750\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            }, \n            { \n              \"_id\" : \"knows/1088036358\", \n              \"_rev\" : \"1088036358\", \n              \"_key\" : \"1088036358\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1087446534\", \n              \"_rev\" : \"1087446534\", \n              \"_key\" : \"1087446534\", \n              \"_from\" : \"persons/bob\", \n              \"_to\" : \"persons/charlie\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1086135814\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1086987782\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1086332422\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/charlie\", \n              \"_rev\" : \"1086594566\", \n              \"_key\" : \"charlie\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1087839750\", \n              \"_rev\" : \"1087839750\", \n              \"_key\" : \"1087839750\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            }, \n            { \n              \"_id\" : \"knows/1088036358\", \n              \"_rev\" : \"1088036358\", \n              \"_key\" : \"1088036358\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1087643142\", \n              \"_rev\" : \"1087643142\", \n              \"_key\" : \"1087643142\", \n              \"_from\" : \"persons/bob\", \n              \"_to\" : \"persons/dave\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1086135814\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1086987782\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1086332422\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/dave\", \n              \"_rev\" : \"1086791174\", \n              \"_key\" : \"dave\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1087249926\", \n              \"_rev\" : \"1087249926\", \n              \"_key\" : \"1087249926\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1086135814\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1086332422\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1087249926\", \n              \"_rev\" : \"1087249926\", \n              \"_key\" : \"1087249926\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1088036358\", \n              \"_rev\" : \"1088036358\", \n              \"_key\" : \"1088036358\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1086135814\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1086332422\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1086987782\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1087249926\", \n              \"_rev\" : \"1087249926\", \n              \"_key\" : \"1087249926\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1088036358\", \n              \"_rev\" : \"1088036358\", \n              \"_key\" : \"1088036358\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1087839750\", \n              \"_rev\" : \"1087839750\", \n              \"_key\" : \"1087839750\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1086135814\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1086332422\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1086987782\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1086135814\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1087249926\", \n              \"_rev\" : \"1087249926\", \n              \"_key\" : \"1087249926\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1087446534\", \n              \"_rev\" : \"1087446534\", \n              \"_key\" : \"1087446534\", \n              \"_from\" : \"persons/bob\", \n              \"_to\" : \"persons/charlie\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1086135814\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1086332422\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/charlie\", \n              \"_rev\" : \"1086594566\", \n              \"_key\" : \"charlie\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1087249926\", \n              \"_rev\" : \"1087249926\", \n              \"_key\" : \"1087249926\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1087643142\", \n              \"_rev\" : \"1087643142\", \n              \"_key\" : \"1087643142\", \n              \"_from\" : \"persons/bob\", \n              \"_to\" : \"persons/dave\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1086135814\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1086332422\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/dave\", \n              \"_rev\" : \"1086791174\", \n              \"_key\" : \"dave\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n



                                                                                  Using postorder ordering:



                                                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/alice\",\"graphName\":\"knows_graph\",\"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/alice\", \n          \"_rev\" : \"1093672454\", \n          \"_key\" : \"alice\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/charlie\", \n          \"_rev\" : \"1094131206\", \n          \"_key\" : \"charlie\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/dave\", \n          \"_rev\" : \"1094327814\", \n          \"_key\" : \"dave\", \n          \"name\" : \"Dave\" \n        }, \n        { \n          \"_id\" : \"persons/bob\", \n          \"_rev\" : \"1093869062\", \n          \"_key\" : \"bob\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/eve\", \n          \"_rev\" : \"1094524422\", \n          \"_key\" : \"eve\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/alice\", \n          \"_rev\" : \"1093672454\", \n          \"_key\" : \"alice\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/eve\", \n          \"_rev\" : \"1094524422\", \n          \"_key\" : \"eve\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/charlie\", \n          \"_rev\" : \"1094131206\", \n          \"_key\" : \"charlie\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/dave\", \n          \"_rev\" : \"1094327814\", \n          \"_key\" : \"dave\", \n          \"name\" : \"Dave\" \n        }, \n        { \n          \"_id\" : \"persons/bob\", \n          \"_rev\" : \"1093869062\", \n          \"_key\" : \"bob\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/alice\", \n          \"_rev\" : \"1093672454\", \n          \"_key\" : \"alice\", \n          \"name\" : \"Alice\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1095376390\", \n              \"_rev\" : \"1095376390\", \n              \"_key\" : \"1095376390\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            }, \n            { \n              \"_id\" : \"knows/1095572998\", \n              \"_rev\" : \"1095572998\", \n              \"_key\" : \"1095572998\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1094786566\", \n              \"_rev\" : \"1094786566\", \n              \"_key\" : \"1094786566\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1093672454\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1094524422\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1093869062\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1093672454\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1095376390\", \n              \"_rev\" : \"1095376390\", \n              \"_key\" : \"1095376390\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            }, \n            { \n              \"_id\" : \"knows/1095572998\", \n              \"_rev\" : \"1095572998\", \n              \"_key\" : \"1095572998\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1094983174\", \n              \"_rev\" : \"1094983174\", \n              \"_key\" : \"1094983174\", \n              \"_from\" : \"persons/bob\", \n              \"_to\" : \"persons/charlie\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1093672454\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1094524422\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1093869062\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/charlie\", \n              \"_rev\" : \"1094131206\", \n              \"_key\" : \"charlie\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1095376390\", \n              \"_rev\" : \"1095376390\", \n              \"_key\" : \"1095376390\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            }, \n            { \n              \"_id\" : \"knows/1095572998\", \n              \"_rev\" : \"1095572998\", \n              \"_key\" : \"1095572998\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1095179782\", \n              \"_rev\" : \"1095179782\", \n              \"_key\" : \"1095179782\", \n              \"_from\" : \"persons/bob\", \n              \"_to\" : \"persons/dave\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1093672454\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1094524422\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1093869062\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/dave\", \n              \"_rev\" : \"1094327814\", \n              \"_key\" : \"dave\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1095376390\", \n              \"_rev\" : \"1095376390\", \n              \"_key\" : \"1095376390\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            }, \n            { \n              \"_id\" : \"knows/1095572998\", \n              \"_rev\" : \"1095572998\", \n              \"_key\" : \"1095572998\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1093672454\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1094524422\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1093869062\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1095376390\", \n              \"_rev\" : \"1095376390\", \n              \"_key\" : \"1095376390\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1093672454\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1094524422\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1094786566\", \n              \"_rev\" : \"1094786566\", \n              \"_key\" : \"1094786566\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1095572998\", \n              \"_rev\" : \"1095572998\", \n              \"_key\" : \"1095572998\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1095376390\", \n              \"_rev\" : \"1095376390\", \n              \"_key\" : \"1095376390\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1093672454\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1093869062\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1094524422\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1093672454\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1094786566\", \n              \"_rev\" : \"1094786566\", \n              \"_key\" : \"1094786566\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1095572998\", \n              \"_rev\" : \"1095572998\", \n              \"_key\" : \"1095572998\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1093672454\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1093869062\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1094524422\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1094786566\", \n              \"_rev\" : \"1094786566\", \n              \"_key\" : \"1094786566\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1094983174\", \n              \"_rev\" : \"1094983174\", \n              \"_key\" : \"1094983174\", \n              \"_from\" : \"persons/bob\", \n              \"_to\" : \"persons/charlie\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1093672454\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1093869062\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/charlie\", \n              \"_rev\" : \"1094131206\", \n              \"_key\" : \"charlie\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1094786566\", \n              \"_rev\" : \"1094786566\", \n              \"_key\" : \"1094786566\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1095179782\", \n              \"_rev\" : \"1095179782\", \n              \"_key\" : \"1095179782\", \n              \"_from\" : \"persons/bob\", \n              \"_to\" : \"persons/dave\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1093672454\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1093869062\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/dave\", \n              \"_rev\" : \"1094327814\", \n              \"_key\" : \"dave\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1094786566\", \n              \"_rev\" : \"1094786566\", \n              \"_key\" : \"1094786566\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1093672454\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1093869062\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1093672454\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n



                                                                                  Using backward item-ordering:



                                                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/alice\",\"graphName\":\"knows_graph\",\"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/alice\", \n          \"_rev\" : \"1099832838\", \n          \"_key\" : \"alice\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/bob\", \n          \"_rev\" : \"1100029446\", \n          \"_key\" : \"bob\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/dave\", \n          \"_rev\" : \"1100488198\", \n          \"_key\" : \"dave\", \n          \"name\" : \"Dave\" \n        }, \n        { \n          \"_id\" : \"persons/charlie\", \n          \"_rev\" : \"1100291590\", \n          \"_key\" : \"charlie\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/eve\", \n          \"_rev\" : \"1100684806\", \n          \"_key\" : \"eve\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/alice\", \n          \"_rev\" : \"1099832838\", \n          \"_key\" : \"alice\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/eve\", \n          \"_rev\" : \"1100684806\", \n          \"_key\" : \"eve\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/bob\", \n          \"_rev\" : \"1100029446\", \n          \"_key\" : \"bob\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/dave\", \n          \"_rev\" : \"1100488198\", \n          \"_key\" : \"dave\", \n          \"name\" : \"Dave\" \n        }, \n        { \n          \"_id\" : \"persons/charlie\", \n          \"_rev\" : \"1100291590\", \n          \"_key\" : \"charlie\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/alice\", \n          \"_rev\" : \"1099832838\", \n          \"_key\" : \"alice\", \n          \"name\" : \"Alice\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1099832838\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1100946950\", \n              \"_rev\" : \"1100946950\", \n              \"_key\" : \"1100946950\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1099832838\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1100029446\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1100946950\", \n              \"_rev\" : \"1100946950\", \n              \"_key\" : \"1100946950\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1101340166\", \n              \"_rev\" : \"1101340166\", \n              \"_key\" : \"1101340166\", \n              \"_from\" : \"persons/bob\", \n              \"_to\" : \"persons/dave\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1099832838\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1100029446\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/dave\", \n              \"_rev\" : \"1100488198\", \n              \"_key\" : \"dave\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1100946950\", \n              \"_rev\" : \"1100946950\", \n              \"_key\" : \"1100946950\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1101143558\", \n              \"_rev\" : \"1101143558\", \n              \"_key\" : \"1101143558\", \n              \"_from\" : \"persons/bob\", \n              \"_to\" : \"persons/charlie\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1099832838\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1100029446\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/charlie\", \n              \"_rev\" : \"1100291590\", \n              \"_key\" : \"charlie\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1100946950\", \n              \"_rev\" : \"1100946950\", \n              \"_key\" : \"1100946950\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1101733382\", \n              \"_rev\" : \"1101733382\", \n              \"_key\" : \"1101733382\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1099832838\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1100029446\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1100684806\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1100946950\", \n              \"_rev\" : \"1100946950\", \n              \"_key\" : \"1100946950\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1101733382\", \n              \"_rev\" : \"1101733382\", \n              \"_key\" : \"1101733382\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1101536774\", \n              \"_rev\" : \"1101536774\", \n              \"_key\" : \"1101536774\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1099832838\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1100029446\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1100684806\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1099832838\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1101536774\", \n              \"_rev\" : \"1101536774\", \n              \"_key\" : \"1101536774\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1099832838\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1100684806\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1101536774\", \n              \"_rev\" : \"1101536774\", \n              \"_key\" : \"1101536774\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            }, \n            { \n              \"_id\" : \"knows/1101733382\", \n              \"_rev\" : \"1101733382\", \n              \"_key\" : \"1101733382\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1099832838\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1100684806\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1100029446\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1101536774\", \n              \"_rev\" : \"1101536774\", \n              \"_key\" : \"1101536774\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            }, \n            { \n              \"_id\" : \"knows/1101733382\", \n              \"_rev\" : \"1101733382\", \n              \"_key\" : \"1101733382\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1101340166\", \n              \"_rev\" : \"1101340166\", \n              \"_key\" : \"1101340166\", \n              \"_from\" : \"persons/bob\", \n              \"_to\" : \"persons/dave\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1099832838\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1100684806\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1100029446\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/dave\", \n              \"_rev\" : \"1100488198\", \n              \"_key\" : \"dave\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1101536774\", \n              \"_rev\" : \"1101536774\", \n              \"_key\" : \"1101536774\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            }, \n            { \n              \"_id\" : \"knows/1101733382\", \n              \"_rev\" : \"1101733382\", \n              \"_key\" : \"1101733382\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1101143558\", \n              \"_rev\" : \"1101143558\", \n              \"_key\" : \"1101143558\", \n              \"_from\" : \"persons/bob\", \n              \"_to\" : \"persons/charlie\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1099832838\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1100684806\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1100029446\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/charlie\", \n              \"_rev\" : \"1100291590\", \n              \"_key\" : \"charlie\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1101536774\", \n              \"_rev\" : \"1101536774\", \n              \"_key\" : \"1101536774\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            }, \n            { \n              \"_id\" : \"knows/1101733382\", \n              \"_rev\" : \"1101733382\", \n              \"_key\" : \"1101733382\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1100946950\", \n              \"_rev\" : \"1100946950\", \n              \"_key\" : \"1100946950\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1099832838\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1100684806\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1100029446\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1099832838\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n



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



                                                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/alice\",\"graphName\":\"knows_graph\",\"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/alice\", \n          \"_rev\" : \"1105993222\", \n          \"_key\" : \"alice\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/eve\", \n          \"_rev\" : \"1106845190\", \n          \"_key\" : \"eve\", \n          \"name\" : \"Eve\" \n        }, \n        { \n          \"_id\" : \"persons/bob\", \n          \"_rev\" : \"1106189830\", \n          \"_key\" : \"bob\", \n          \"name\" : \"Bob\" \n        }, \n        { \n          \"_id\" : \"persons/alice\", \n          \"_rev\" : \"1105993222\", \n          \"_key\" : \"alice\", \n          \"name\" : \"Alice\" \n        }, \n        { \n          \"_id\" : \"persons/charlie\", \n          \"_rev\" : \"1106451974\", \n          \"_key\" : \"charlie\", \n          \"name\" : \"Charlie\" \n        }, \n        { \n          \"_id\" : \"persons/dave\", \n          \"_rev\" : \"1106648582\", \n          \"_key\" : \"dave\", \n          \"name\" : \"Dave\" \n        } \n      ], \n      \"paths\" : [ \n        { \n          \"edges\" : [ ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1105993222\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1107697158\", \n              \"_rev\" : \"1107697158\", \n              \"_key\" : \"1107697158\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1105993222\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1106845190\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1107697158\", \n              \"_rev\" : \"1107697158\", \n              \"_key\" : \"1107697158\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            }, \n            { \n              \"_id\" : \"knows/1107893766\", \n              \"_rev\" : \"1107893766\", \n              \"_key\" : \"1107893766\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1105993222\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1106845190\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1106189830\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1107697158\", \n              \"_rev\" : \"1107697158\", \n              \"_key\" : \"1107697158\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            }, \n            { \n              \"_id\" : \"knows/1107893766\", \n              \"_rev\" : \"1107893766\", \n              \"_key\" : \"1107893766\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1107107334\", \n              \"_rev\" : \"1107107334\", \n              \"_key\" : \"1107107334\", \n              \"_from\" : \"persons/alice\", \n              \"_to\" : \"persons/bob\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1105993222\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1106845190\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1106189830\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1105993222\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1107697158\", \n              \"_rev\" : \"1107697158\", \n              \"_key\" : \"1107697158\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            }, \n            { \n              \"_id\" : \"knows/1107893766\", \n              \"_rev\" : \"1107893766\", \n              \"_key\" : \"1107893766\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1107303942\", \n              \"_rev\" : \"1107303942\", \n              \"_key\" : \"1107303942\", \n              \"_from\" : \"persons/bob\", \n              \"_to\" : \"persons/charlie\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1105993222\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1106845190\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1106189830\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/charlie\", \n              \"_rev\" : \"1106451974\", \n              \"_key\" : \"charlie\", \n              \"name\" : \"Charlie\" \n            } \n          ] \n        }, \n        { \n          \"edges\" : [ \n            { \n              \"_id\" : \"knows/1107697158\", \n              \"_rev\" : \"1107697158\", \n              \"_key\" : \"1107697158\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/alice\" \n            }, \n            { \n              \"_id\" : \"knows/1107893766\", \n              \"_rev\" : \"1107893766\", \n              \"_key\" : \"1107893766\", \n              \"_from\" : \"persons/eve\", \n              \"_to\" : \"persons/bob\" \n            }, \n            { \n              \"_id\" : \"knows/1107500550\", \n              \"_rev\" : \"1107500550\", \n              \"_key\" : \"1107500550\", \n              \"_from\" : \"persons/bob\", \n              \"_to\" : \"persons/dave\" \n            } \n          ], \n          \"vertices\" : [ \n            { \n              \"_id\" : \"persons/alice\", \n              \"_rev\" : \"1105993222\", \n              \"_key\" : \"alice\", \n              \"name\" : \"Alice\" \n            }, \n            { \n              \"_id\" : \"persons/eve\", \n              \"_rev\" : \"1106845190\", \n              \"_key\" : \"eve\", \n              \"name\" : \"Eve\" \n            }, \n            { \n              \"_id\" : \"persons/bob\", \n              \"_rev\" : \"1106189830\", \n              \"_key\" : \"bob\", \n              \"name\" : \"Bob\" \n            }, \n            { \n              \"_id\" : \"persons/dave\", \n              \"_rev\" : \"1106648582\", \n              \"_key\" : \"dave\", \n              \"name\" : \"Dave\" \n            } \n          ] \n        } \n      ] \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \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





                                                                                  shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/traversal\n{\"startVertex\":\"persons/alice\",\"graphName\":\"knows_graph\",\"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



                                                                                  @endDocuBlock", "nickname": "executesATraversal" } ], diff --git a/js/apps/system/aardvark/api-docs/user.json b/js/apps/system/aardvark/api-docs/user.json index 77a6aa325b..e6f3f4a913 100644 --- a/js/apps/system/aardvark/api-docs/user.json +++ b/js/apps/system/aardvark/api-docs/user.json @@ -8,28 +8,43 @@ { "errorResponses": [ { - "reason": "returned if the user can be added by the server.

                                                                                  ", + "reason": "The user was found

                                                                                  ", + "code": "200" + }, + { + "reason": "The user with user does not exist

                                                                                  @endDocuBlock", + "code": "404" + } + ], + "parameters": [], + "notes": "

                                                                                  Fetches data about the specified user.

                                                                                  The call will return a JSON document with at least the following attributes on success:

                                                                                  *user: The name of the user as a string. *active: An optional flag that specifies whether the user is active. *extra: An optional JSON object with arbitrary extra data about the user. *changePassword: An optional flag that specifies whether the user must change the password or not.

                                                                                  ", + "summary": " Fetch User", + "httpMethod": "GET", + "examples": "", + "nickname": "FetchUser" + } + ], + "path": "/_api/user/{user}" + }, + { + "operations": [ + { + "errorResponses": [ + { + "reason": "Returned if the user can be added by the server

                                                                                  ", "code": "201" }, { - "reason": "If the JSON representation is malformed or mandatory data is missing from the request.

                                                                                  ", + "reason": "If the JSON representation is malformed or mandatory data is missing from the request.

                                                                                  @endDocuBlock", "code": "400" } ], - "parameters": [ - { - "dataType": "Json", - "paramType": "body", - "required": "true", - "name": "body", - "description": "

                                                                                  " - } - ], - "notes": "

                                                                                  The following data need to be passed in a JSON representation in the body of the POST request:

                                                                                  • user: The name of the user as a string. This is mandatory.
                                                                                  • passwd: The user password as a string. If no password is specified, the empty string will be used.
                                                                                  • active: an optional flag that specifies whether the user is active. If not specified, this will default to true.
                                                                                  • extra: an optional JSON object with arbitrary extra data about the user.
                                                                                  • changePassword: an optional flag that specifies whethers the user must change the password or not. If not specified, this will default to false. If set to true, the only operations allowed are PUT /_api/user or PATCH /_api/user. All other operations will result in a HTTP 403.
                                                                                  If the user can be added by the server, the server will respond with HTTP 201.

                                                                                  In case of success, 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
                                                                                  If the JSON representation is malformed or mandatory data 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", - "summary": "creates user", + "parameters": [], + "notes": "

                                                                                    The following data need to be passed in a JSON representation in the body of the POST request:

                                                                                    *user: The name of the user as a string. This is mandatory *passwd: The user password as a string. If no password is specified, the empty string will be used *active: An optional flag that specifies whether the user is active. If not specified, this will default to true *extra: An optional JSON object with arbitrary extra data about the user *changePassword: An optional flag that specifies whethers the user must change the password or not. If not specified, this will default to false

                                                                                    If set to true, the only operations allowed are PUT /_api/user or PATCH /_api/user. All other operations will result in a HTTP 403. If the user can be added by the server, the server will respond with HTTP 201. In case of success, 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

                                                                                    If the JSON representation is malformed or mandatory data 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

                                                                                    ", + "summary": " Create User", "httpMethod": "POST", "examples": "", - "nickname": "createsUser" + "nickname": "CreateUser" } ], "path": "/_api/user" @@ -39,39 +54,24 @@ { "errorResponses": [ { - "reason": "Is returned if the user data can be replaced by the server.

                                                                                    ", + "reason": "Is returned if the user data can be replaced by the server

                                                                                    ", "code": "200" }, { - "reason": "The JSON representation is malformed or mandatory data is missing from the request.

                                                                                    ", + "reason": "The JSON representation is malformed or mandatory data is missing from the request

                                                                                    ", "code": "400" }, { - "reason": "The specified user does not exist.

                                                                                    ", + "reason": "The specified user does not exist

                                                                                    @endDocuBlock", "code": "404" } ], - "parameters": [ - { - "dataType": "String", - "paramType": "path", - "required": "true", - "name": "user", - "description": "The name of the user.

                                                                                    " - }, - { - "dataType": "Json", - "paramType": "body", - "required": "true", - "name": "body", - "description": "

                                                                                    " - } - ], - "notes": "

                                                                                    Replaces the data of an existing user. The name of an existing user must be specified in user.

                                                                                    The following data can to be passed in a JSON representation in the body of the POST request:

                                                                                    • passwd: The user password as a string. Specifying a password is mandatory, but the empty string is allowed for passwords.
                                                                                    • active: an optional flag that specifies whether the user is active. If not specified, this will default to true.
                                                                                    • extra: an optional JSON object with arbitrary extra data about the user.
                                                                                    • changePassword: an optional flag that specifies whether the user must change the password or not. If not specified, this will default to false.
                                                                                    If the user can be replaced by the server, the server will respond with `HTTP 200`.

                                                                                    In case of success, 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
                                                                                    If the JSON representation is malformed or mandatory data is missing from the request, the server will respond with HTTP 400. If the specified user does not exist, the server will respond with HTTP 404.

                                                                                    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", - "summary": "replaces user", + "parameters": [], + "notes": "

                                                                                      Replaces the data of an existing user. The name of an existing user must be specified in user.

                                                                                      The following data can to be passed in a JSON representation in the body of the POST request:

                                                                                      *passwd: The user password as a string. Specifying a password is mandatory, but the empty string is allowed for passwords *active: An optional flag that specifies whether the user is active. If not specified, this will default to true *extra: An optional JSON object with arbitrary extra data about the user *changePassword: An optional flag that specifies whether the user must change the password or not. If not specified, this will default to false

                                                                                      If the user can be replaced by the server, the server will respond with HTTP 200.

                                                                                      In case of success, 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

                                                                                      If the JSON representation is malformed or mandatory data is missing from the request, the server will respond with HTTP 400. If the specified user does not exist, the server will respond with HTTP 404.

                                                                                      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

                                                                                      ", + "summary": " Replace User", "httpMethod": "PUT", "examples": "", - "nickname": "replacesUser" + "nickname": "ReplaceUser" } ], "path": "/_api/user/{user}" @@ -81,39 +81,24 @@ { "errorResponses": [ { - "reason": "Is returned if the user data can be replaced by the server.

                                                                                      ", + "reason": "Is returned if the user data can be replaced by the server

                                                                                      ", "code": "200" }, { - "reason": "The JSON representation is malformed or mandatory data is missing from the request.

                                                                                      ", + "reason": "The JSON representation is malformed or mandatory data is missing from the request

                                                                                      ", "code": "400" }, { - "reason": "The specified user does not exist.

                                                                                      ", + "reason": "The specified user does not exist

                                                                                      @endDocuBlock", "code": "404" } ], - "parameters": [ - { - "dataType": "String", - "paramType": "path", - "required": "true", - "name": "user", - "description": "The name of the user.

                                                                                      " - }, - { - "dataType": "Json", - "paramType": "body", - "required": "true", - "name": "body", - "description": "

                                                                                      " - } - ], - "notes": "

                                                                                      Partially updates the data of an existing user. The name of an existing user must be specified in user.

                                                                                      The following data can be passed in a JSON representation in the body of the POST request:

                                                                                      • passwd: The user password as a string. Specifying a password is optional. If not specified, the previously existing value will not be modified.
                                                                                      • active: an optional flag that specifies whether the user is active. If not specified, the previously existing value will not be modified.
                                                                                      • extra: an optional JSON object with arbitrary extra data about the user. If not specified, the previously existing value will not be modified.
                                                                                      • changePassword: an optional flag that specifies whether the user must change the password or not. If not specified, the previously existing value will not be modified.
                                                                                      If the user can be updated by the server, the server will respond with `HTTP 200`.

                                                                                      In case of success, 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
                                                                                      If the JSON representation is malformed or mandatory data is missing from the request, the server will respond with HTTP 400. If the specified user does not exist, the server will respond with HTTP 404.

                                                                                      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", - "summary": "updates user", + "parameters": [], + "notes": "

                                                                                        Partially updates the data of an existing user. The name of an existing user must be specified in user.

                                                                                        The following data can be passed in a JSON representation in the body of the POST request:

                                                                                        *passwd: The user password as a string. Specifying a password is optional. If not specified, the previously existing value will not be modified. *active: An optional flag that specifies whether the user is active. If not specified, the previously existing value will not be modified. *extra: An optional JSON object with arbitrary extra data about the user. If not specified, the previously existing value will not be modified. *changePassword: An optional flag that specifies whether the user must change the password or not. If not specified, the previously existing value will not be modified.

                                                                                        If the user can be updated by the server, the server will respond with HTTP 200.

                                                                                        In case of success, 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

                                                                                        If the JSON representation is malformed or mandatory data is missing from the request, the server will respond with HTTP 400. If the specified user does not exist, the server will respond with HTTP 404.

                                                                                        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

                                                                                        ", + "summary": " Update User", "httpMethod": "PATCH", "examples": "", - "nickname": "updatesUser" + "nickname": "UpdateUser" } ], "path": "/_api/user/{user}" @@ -123,59 +108,20 @@ { "errorResponses": [ { - "reason": "Is returned if the user was removed by the server.

                                                                                        ", + "reason": "Is returned if the user was removed by the server

                                                                                        ", "code": "202" }, { - "reason": "The specified user does not exist.

                                                                                        ", + "reason": "The specified user does not exist

                                                                                        @endDocuBlock", "code": "404" } ], - "parameters": [ - { - "dataType": "String", - "paramType": "path", - "required": "true", - "name": "user", - "description": "The name of the user.

                                                                                        " - } - ], - "notes": "

                                                                                        Removes an existing user, identified by user.

                                                                                        If the user can be removed, the server will respond with HTTP 202.

                                                                                        In case of success, 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
                                                                                        If the specified user does not exist, the server will respond with HTTP 404.

                                                                                        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", - "summary": "removes a user", + "parameters": [], + "notes": "

                                                                                          Removes an existing user, identified by user.

                                                                                          If the user can be removed, the server will respond with HTTP 202. In case of success, 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

                                                                                          If the specified user does not exist, the server will respond with HTTP 404.

                                                                                          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

                                                                                          ", + "summary": " Remove User", "httpMethod": "DELETE", "examples": "", - "nickname": "removesAUser" - } - ], - "path": "/_api/user/{user}" - }, - { - "operations": [ - { - "errorResponses": [ - { - "reason": "The user was found.

                                                                                          ", - "code": "200" - }, - { - "reason": "The user with user does not exist.

                                                                                          ", - "code": "404" - } - ], - "parameters": [ - { - "dataType": "String", - "paramType": "path", - "required": "true", - "name": "user", - "description": "The name of the user.

                                                                                          " - } - ], - "notes": "

                                                                                          Fetches data about the specified user.

                                                                                          The call will return a JSON document with at least the following attributes on success:

                                                                                          • user: The name of the user as a string.
                                                                                          • active: an optional flag that specifies whether the user is active.
                                                                                          • extra: an optional JSON object with arbitrary extra data about the user.
                                                                                          • changePassword: an optional flag that specifies whether the user must change the password or not.", - "summary": "fetches a user", - "httpMethod": "GET", - "examples": "", - "nickname": "fetchesAUser" + "nickname": "RemoveUser" } ], "path": "/_api/user/{user}" diff --git a/js/apps/system/aardvark/api-docs/version.json b/js/apps/system/aardvark/api-docs/version.json index adcbc22ef5..562f3d21cc 100644 --- a/js/apps/system/aardvark/api-docs/version.json +++ b/js/apps/system/aardvark/api-docs/version.json @@ -21,11 +21,11 @@ "description": "If set to true, the response will contain a details attribute with additional information about included components and their versions. The attribute names and internals of the details object may vary depending on platform and ArangoDB version.

                                                                                            " } ], - "notes": "Returns the server name and version number. The response is a JSON object with the following attributes:

                                                                                            • server: will always contain arango
                                                                                            • version: the server version string. The string has the format \"major.`minor.`sub\". major and minor will be numeric, and sub may contain a number or a textual version.
                                                                                            • details: an optional JSON object with additional details. This is returned only if the details URL parameter is set to true in the request.", - "summary": "returns the server version", + "notes": "Returns the server name and version number. The response is a JSON object with the following attributes:

                                                                                              • server: will always contain arango
                                                                                              • version: the server version string. The string has the format \"major.*minor.*sub\". major and minor will be numeric, and sub may contain a number or a textual version.
                                                                                              • details: an optional JSON object with additional details. This is returned only if the details URL parameter is set to true in the request.", + "summary": " Return server version", "httpMethod": "GET", - "examples": "

                                                                                                Returns the version information.



                                                                                                unix> curl --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"server\" : \"arango\", \n  \"version\" : \"2.1.0-devel\" \n}\n\n



                                                                                                Returns the version information with details.



                                                                                                unix> curl --dump - http://localhost:8529/_api/version?details=true\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"server\" : \"arango\", \n  \"version\" : \"2.1.0-devel\", \n  \"details\" : { \n    \"build-date\" : \"Jun  6 2014 15:25:47\", \n    \"configure\" : \"'./configure' '--enable-all-in-one-icu'\", \n    \"icu-version\" : \"49.1.2\", \n    \"libev-version\" : \"4.11\", \n    \"openssl-version\" : \"OpenSSL 0.9.8y 5 Feb 2013\", \n    \"repository-version\" : \"heads/devel-0-gf5bbf94b043745ab45c9fe14bc8429b502bcfa3d-dirty\", \n    \"server-version\" : \"2.1.0-devel\", \n    \"sizeof int\" : \"4\", \n    \"sizeof void*\" : \"8\", \n    \"v8-version\" : \"3.16.14\" \n  } \n}\n\n

                                                                                                ", - "nickname": "returnsTheServerVersion" + "examples": "

                                                                                                Returns the version information.



                                                                                                shell> curl --data-binary @- --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"server\" : \"arango\", \n  \"version\" : \"2.2.2-rc1\" \n}\n



                                                                                                Returns the version information with details.



                                                                                                shell> curl --data-binary @- --dump - http://localhost:8529/_api/version?details=true\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"server\" : \"arango\", \n  \"version\" : \"2.2.2-rc1\", \n  \"details\" : { \n    \"build-date\" : \"Aug  6 2014 16:32:54\", \n    \"configure\" : \"'./configure' '--enable-all-in-one-icu' '--enable-relative' '--enable-maintainer-mode'\", \n    \"icu-version\" : \"52.1\", \n    \"libev-version\" : \"4.11\", \n    \"openssl-version\" : \"OpenSSL 0.9.8y 5 Feb 2013\", \n    \"repository-version\" : \"tags/v2.2.2-rc1-0-gb8df91e175fba53212b464304531234b7559636b\", \n    \"server-version\" : \"2.2.2-rc1\", \n    \"sizeof int\" : \"4\", \n    \"sizeof void*\" : \"8\", \n    \"v8-version\" : \"3.16.14\" \n  } \n}\n

                                                                                                @endDocuBlock", + "nickname": "ReturnServerVersion" } ], "path": "/_api/version" diff --git a/js/apps/system/aardvark/clusterFrontend/js/collections/_automaticRetryCollection.js b/js/apps/system/aardvark/clusterFrontend/js/collections/_automaticRetryCollection.js index e3cde44721..2a0159f094 100644 --- a/js/apps/system/aardvark/clusterFrontend/js/collections/_automaticRetryCollection.js +++ b/js/apps/system/aardvark/clusterFrontend/js/collections/_automaticRetryCollection.js @@ -25,7 +25,7 @@ this._retryCount = 0; }, - failureTry: function(retry, err) { + failureTry: function(retry, ignore, err) { if (err.status === 401) { window.App.requestAuth(); } else { diff --git a/js/common/tests/shell-attributes.js b/js/common/tests/shell-attributes.js index 7f7198e401..8c6faabdf3 100644 --- a/js/common/tests/shell-attributes.js +++ b/js/common/tests/shell-attributes.js @@ -151,7 +151,7 @@ function AttributesSuite () { //////////////////////////////////////////////////////////////////////////////// testReservedAttributes : function () { - var doc = { "_id" : "foo", "_rev": "99", "_key" : "meow", "_from" : "33", "_to": "99", "_test" : false }; + var doc = { "_id" : "foo", "_rev": "99", "_key" : "meow", "_from" : "33", "_to": "99", "_test" : false, "_boom" : "bang" }; var d1 = c.save(doc); var d2 = c.document(d1._id); @@ -161,17 +161,33 @@ function AttributesSuite () { assertEqual(cn + "/meow", d1._id); assertEqual(cn + "/meow", d2._id); assertEqual(d1._rev, d2._rev); + assertFalse(d2._test); + assertEqual("bang", d2._boom); + assertFalse(d2.hasOwnProperty("_from")); + assertFalse(d2.hasOwnProperty("_to")); // user specified _rev value must have been ignored assertTrue(d1._rev !== "99"); - - // test attributes - var i; - for (i in d2) { - if (d2.hasOwnProperty(i)) { - assertTrue(i !== "_from" && i !== "_to" && i !== "_test"); - } - } + }, + +//////////////////////////////////////////////////////////////////////////////// +/// @brief reserved attribute names +//////////////////////////////////////////////////////////////////////////////// + + testEmbeddedReservedAttributes : function () { + var doc = { "_id" : "foo", "_rev": "99", "_key" : "meow", "_from" : "33", "_to": "99", "_test" : false }; + + c.save({ _key: "mydoc", _embedded: doc }); + var d = c.document("mydoc"); + + assertEqual(cn + "/mydoc", d._id); + assertEqual("mydoc", d._key); + assertEqual("foo", d._embedded._id); + assertEqual("99", d._embedded._rev); + assertEqual("meow", d._embedded._key); + assertEqual("33", d._embedded._from); + assertEqual("99", d._embedded._to); + assertFalse(d._embedded._test); }, //////////////////////////////////////////////////////////////////////////////// diff --git a/lib/ShapedJson/shaped-json.cpp b/lib/ShapedJson/shaped-json.cpp index 325c197f27..59d34ed60b 100644 --- a/lib/ShapedJson/shaped-json.cpp +++ b/lib/ShapedJson/shaped-json.cpp @@ -44,7 +44,7 @@ // --SECTION-- forward declarations // ----------------------------------------------------------------------------- -static bool FillShapeValueJson (TRI_shaper_t* shaper, TRI_shape_value_t* dst, TRI_json_t const* json, bool, bool); +static bool FillShapeValueJson (TRI_shaper_t* shaper, TRI_shape_value_t* dst, TRI_json_t const* json, size_t, bool, bool); static TRI_json_t* JsonShapeData (TRI_shaper_t* shaper, TRI_shape_t const* shape, char const* data, uint64_t size); static bool StringifyJsonShapeData (TRI_shaper_t* shaper, TRI_string_buffer_t* buffer, TRI_shape_t const* shape, char const* data, uint64_t size); @@ -470,6 +470,7 @@ static bool FillShapeValueString (TRI_shaper_t* shaper, TRI_shape_value_t* dst, static bool FillShapeValueList (TRI_shaper_t* shaper, TRI_shape_value_t* dst, TRI_json_t const* json, + size_t level, bool create, bool isLocked) { size_t i, n; @@ -506,7 +507,7 @@ static bool FillShapeValueList (TRI_shaper_t* shaper, dst->_size = sizeof(TRI_shape_length_list_t); dst->_value = (ptr = static_cast(TRI_Allocate(shaper->_memoryZone, dst->_size, false))); - if (dst->_value == NULL) { + if (dst->_value == nullptr) { return false; } @@ -518,7 +519,7 @@ static bool FillShapeValueList (TRI_shaper_t* shaper, // convert into TRI_shape_value_t array p = (values = static_cast(TRI_Allocate(shaper->_memoryZone, sizeof(TRI_shape_value_t) * n, true))); - if (p == NULL) { + if (p == nullptr) { return false; } @@ -526,12 +527,12 @@ static bool FillShapeValueList (TRI_shaper_t* shaper, e = values + n; for (i = 0; i < n; ++i, ++p) { - TRI_json_t const* el = (TRI_json_t const*) TRI_AtVector(&json->_value._objects, i); - bool ok = FillShapeValueJson(shaper, p, el, create, isLocked); + TRI_json_t const* el = static_cast(TRI_AtVector(&json->_value._objects, i)); + bool ok = FillShapeValueJson(shaper, p, el, level + 1, create, isLocked); if (! ok) { for (e = p, p = values; p < e; ++p) { - if (p->_value != NULL) { + if (p->_value != nullptr) { TRI_Free(shaper->_memoryZone, p->_value); } } @@ -774,6 +775,7 @@ static bool FillShapeValueList (TRI_shaper_t* shaper, static bool FillShapeValueArray (TRI_shaper_t* shaper, TRI_shape_value_t* dst, TRI_json_t const* json, + size_t level, bool create, bool isLocked) { size_t i, n; @@ -808,7 +810,7 @@ static bool FillShapeValueArray (TRI_shaper_t* shaper, // convert into TRI_shape_value_t array p = (values = static_cast(TRI_Allocate(shaper->_memoryZone, n * sizeof(TRI_shape_value_t), true))); - if (p == NULL) { + if (p == nullptr) { return false; } @@ -817,36 +819,49 @@ static bool FillShapeValueArray (TRI_shaper_t* shaper, v = 0; for (i = 0; i < n; ++i, ++p) { - bool ok; + TRI_json_t const* key = static_cast(TRI_AtVector(&json->_value._objects, 2 * i)); + TRI_ASSERT(key != nullptr); - TRI_json_t* key = static_cast(TRI_AtVector(&json->_value._objects, 2 * i)); - TRI_json_t* val = static_cast(TRI_AtVector(&json->_value._objects, 2 * i + 1)); + char const* k = key->_value._string.data; - TRI_ASSERT(key != NULL); - TRI_ASSERT(val != NULL); - - if (key->_value._string.data == NULL || - key->_value._string.length == 1 || - key->_value._string.data[0] == '_') { - // empty or reserved attribute name + if (k == nullptr || + key->_value._string.length == 1) { + // empty attribute name p--; continue; } + if (*k == '_' && level == 0) { + // on top level, strip reserved attributes before shaping + if (strcmp(k, "_key") == 0 || + strcmp(k, "_rev") == 0 || + strcmp(k, "_id") == 0 || + strcmp(k, "_from") == 0 || + strcmp(k, "_to") == 0) { + // found a reserved attribute - discard it + --p; + continue; + } + } + // first find an identifier for the name - p->_aid = shaper->findOrCreateAttributeByName(shaper, key->_value._string.data); + p->_aid = shaper->findOrCreateAttributeByName(shaper, k); // convert value + bool ok; if (p->_aid == 0) { ok = false; } else { - ok = FillShapeValueJson(shaper, p, val, create, isLocked); + TRI_json_t const* val = static_cast(TRI_AtVector(&json->_value._objects, 2 * i + 1)); + TRI_ASSERT(val != nullptr); + + ok = FillShapeValueJson(shaper, p, val, level + 1, create, isLocked); } if (! ok) { for (e = p, p = values; p < e; ++p) { - if (p->_value != NULL) { + if (p->_value != nullptr) { TRI_Free(shaper->_memoryZone, p->_value); } } @@ -893,13 +908,13 @@ static bool FillShapeValueArray (TRI_shaper_t* shaper, + n * sizeof(TRI_shape_aid_t) + (f + 1) * sizeof(TRI_shape_size_t); - a = (TRI_array_shape_t*) (ptr = static_cast(TRI_Allocate(shaper->_memoryZone, i, true))); + a = reinterpret_cast(ptr = static_cast(TRI_Allocate(shaper->_memoryZone, i, true))); - if (ptr == NULL) { + if (ptr == nullptr) { e = values + n; for (p = values; p < e; ++p) { - if (p->_value != NULL) { + if (p->_value != nullptr) { TRI_Free(shaper->_memoryZone, p->_value); } } @@ -937,11 +952,11 @@ static bool FillShapeValueArray (TRI_shaper_t* shaper, dst->_size = total; dst->_value = (ptr = static_cast(TRI_Allocate(shaper->_memoryZone, dst->_size, true))); - if (ptr == NULL) { + if (ptr == nullptr) { e = values + n; for (p = values; p < e; ++p) { - if (p->_value != NULL) { + if (p->_value != nullptr) { TRI_Free(shaper->_memoryZone, p->_value); } } @@ -982,7 +997,7 @@ static bool FillShapeValueArray (TRI_shaper_t* shaper, // free TRI_shape_value_t array for (p = values; p < e; ++p) { - if (p->_value != NULL) { + if (p->_value != nullptr) { TRI_Free(shaper->_memoryZone, p->_value); } } @@ -992,7 +1007,7 @@ static bool FillShapeValueArray (TRI_shaper_t* shaper, // lookup this shape found = shaper->findShape(shaper, &a->base, create); - if (found == NULL) { + if (found == nullptr) { TRI_Free(shaper->_memoryZone, a); return false; } @@ -1009,6 +1024,7 @@ static bool FillShapeValueArray (TRI_shaper_t* shaper, static bool FillShapeValueJson (TRI_shaper_t* shaper, TRI_shape_value_t* dst, TRI_json_t const* json, + size_t level, bool create, bool isLocked) { switch (json->_type) { @@ -1029,10 +1045,10 @@ static bool FillShapeValueJson (TRI_shaper_t* shaper, return FillShapeValueString(shaper, dst, json); case TRI_JSON_ARRAY: - return FillShapeValueArray(shaper, dst, json, create, isLocked); + return FillShapeValueArray(shaper, dst, json, level, create, isLocked); case TRI_JSON_LIST: - return FillShapeValueList(shaper, dst, json, create, isLocked); + return FillShapeValueList(shaper, dst, json, level, create, isLocked); } return false; @@ -1143,8 +1159,8 @@ static TRI_json_t* JsonShapeDataArray (TRI_shaper_t* shaper, // create an array with the appropriate size array = TRI_CreateArray2Json(shaper->_memoryZone, (size_t) n); - if (array == NULL) { - return NULL; + if (array == nullptr) { + return nullptr; } qtr = (char const*) shape; @@ -1159,7 +1175,7 @@ static TRI_json_t* JsonShapeDataArray (TRI_shaper_t* shaper, offsetsF = (TRI_shape_size_t const*) qtr; shapeCache._sid = 0; - shapeCache._shape = NULL; + shapeCache._shape = nullptr; for (i = 0; i < f; ++i, ++sids, ++aids, ++offsetsF) { TRI_shape_sid_t sid = *sids; @@ -1180,21 +1196,21 @@ static TRI_json_t* JsonShapeDataArray (TRI_shaper_t* shaper, shapeCache._sid = sid; } - if (subshape == NULL) { + if (subshape == nullptr) { LOG_WARNING("cannot find shape #%u", (unsigned int) sid); continue; } name = shaper->lookupAttributeId(shaper, aid); - if (name == NULL) { + if (name == nullptr) { LOG_WARNING("cannot find attribute #%u", (unsigned int) aid); continue; } element = JsonShapeData(shaper, subshape, data + offset, offsetsF[1] - offset); - if (element == NULL) { + if (element == nullptr) { LOG_WARNING("cannot decode element for shape #%u", (unsigned int) sid); continue; } @@ -1224,21 +1240,21 @@ static TRI_json_t* JsonShapeDataArray (TRI_shaper_t* shaper, shapeCache._sid = sid; } - if (subshape == NULL) { + if (subshape == nullptr) { LOG_WARNING("cannot find shape #%u", (unsigned int) sid); continue; } name = shaper->lookupAttributeId(shaper, aid); - if (name == NULL) { + if (name == nullptr) { LOG_WARNING("cannot find attribute #%u", (unsigned int) aid); continue; } element = JsonShapeData(shaper, subshape, data + offset, offsetsV[1] - offset); - if (element == NULL) { + if (element == nullptr) { LOG_WARNING("cannot decode element for shape #%u", (unsigned int) sid); continue; } @@ -1250,7 +1266,7 @@ static TRI_json_t* JsonShapeDataArray (TRI_shaper_t* shaper, if (shaper->_memoryZone->_failed) { TRI_FreeJson(shaper->_memoryZone, array); - return NULL; + return nullptr; } return array; @@ -1265,7 +1281,6 @@ static TRI_json_t* JsonShapeDataList (TRI_shaper_t* shaper, char const* data, uint64_t size) { char const* ptr; - TRI_json_t* list; TRI_shape_sid_t const* sids; TRI_shape_size_t const* offsets; TRI_shape_length_list_t l; @@ -1276,10 +1291,10 @@ static TRI_json_t* JsonShapeDataList (TRI_shaper_t* shaper, l = * (TRI_shape_length_list_t const*) ptr; // create a list with the appropriate size - list = TRI_CreateList2Json(shaper->_memoryZone, (size_t) l); + TRI_json_t* list = TRI_CreateList2Json(shaper->_memoryZone, (size_t) l); - if (list == NULL) { - return NULL; + if (list == nullptr) { + return nullptr; } ptr += sizeof(TRI_shape_length_list_t); @@ -1289,7 +1304,7 @@ static TRI_json_t* JsonShapeDataList (TRI_shaper_t* shaper, offsets = (TRI_shape_size_t const*) ptr; shapeCache._sid = 0; - shapeCache._shape = NULL; + shapeCache._shape = nullptr; for (i = 0; i < l; ++i, ++sids, ++offsets) { TRI_shape_sid_t sid = *sids; @@ -1308,14 +1323,14 @@ static TRI_json_t* JsonShapeDataList (TRI_shaper_t* shaper, shapeCache._sid = sid; } - if (subshape == NULL) { + if (subshape == nullptr) { LOG_WARNING("cannot find shape #%u", (unsigned int) sid); continue; } element = JsonShapeData(shaper, subshape, data + offset, offsets[1] - offset); - if (element == NULL) { + if (element == nullptr) { LOG_WARNING("cannot decode element for shape #%u", (unsigned int) sid); continue; } @@ -1327,7 +1342,7 @@ static TRI_json_t* JsonShapeDataList (TRI_shaper_t* shaper, if (shaper->_memoryZone->_failed) { TRI_FreeJson(shaper->_memoryZone, list); - return NULL; + return nullptr; } return list; @@ -1342,33 +1357,31 @@ static TRI_json_t* JsonShapeDataHomogeneousList (TRI_shaper_t* shaper, char const* data, uint64_t size) { TRI_homogeneous_list_shape_t const* s; - TRI_json_t* list; TRI_shape_length_list_t i; TRI_shape_length_list_t l; TRI_shape_sid_t sid; TRI_shape_size_t const* offsets; - TRI_shape_t const* subshape; char const* ptr; s = (TRI_homogeneous_list_shape_t const*) shape; sid = s->_sidEntry; - subshape = shaper->lookupShapeId(shaper, sid); + TRI_shape_t const* subshape = shaper->lookupShapeId(shaper, sid); - if (subshape == NULL) { + if (subshape == nullptr) { LOG_WARNING("cannot find shape #%u", (unsigned int) sid); - return NULL; + return nullptr; } ptr = data; l = * (TRI_shape_length_list_t const*) ptr; // create a list with the appropriate size - list = TRI_CreateList2Json(shaper->_memoryZone, (size_t) l); + TRI_json_t* list = TRI_CreateList2Json(shaper->_memoryZone, (size_t) l); - if (list == NULL) { - return NULL; + if (list == nullptr) { + return nullptr; } ptr += sizeof(TRI_shape_length_list_t); @@ -1382,7 +1395,7 @@ static TRI_json_t* JsonShapeDataHomogeneousList (TRI_shaper_t* shaper, element = JsonShapeData(shaper, subshape, data + offset, offsets[1] - offset); - if (element == NULL) { + if (element == nullptr) { LOG_WARNING("cannot decode element for shape #%u", (unsigned int) sid); continue; } @@ -1394,7 +1407,7 @@ static TRI_json_t* JsonShapeDataHomogeneousList (TRI_shaper_t* shaper, if (shaper->_memoryZone->_failed) { TRI_FreeJson(shaper->_memoryZone, list); - return NULL; + return nullptr; } return list; @@ -1409,34 +1422,32 @@ static TRI_json_t* JsonShapeDataHomogeneousSizedList (TRI_shaper_t* shaper, char const* data, uint64_t size) { TRI_homogeneous_sized_list_shape_t const* s; - TRI_json_t* list; TRI_shape_length_list_t i; TRI_shape_length_list_t l; TRI_shape_sid_t sid; TRI_shape_size_t length; TRI_shape_size_t offset; - TRI_shape_t const* subshape; char const* ptr; s = (TRI_homogeneous_sized_list_shape_t const*) shape; sid = s->_sidEntry; - subshape = shaper->lookupShapeId(shaper, sid); + TRI_shape_t const* subshape = shaper->lookupShapeId(shaper, sid); - if (subshape == NULL) { + if (subshape == nullptr) { LOG_WARNING("cannot find shape #%u", (unsigned int) sid); - return NULL; + return nullptr; } ptr = data; l = * (TRI_shape_length_list_t const*) ptr; // create a list with the appropriate size - list = TRI_CreateList2Json(shaper->_memoryZone, (size_t) l); + TRI_json_t* list = TRI_CreateList2Json(shaper->_memoryZone, (size_t) l); - if (list == NULL) { - return NULL; + if (list == nullptr) { + return nullptr; } length = s->_sizeEntry; @@ -1447,7 +1458,7 @@ static TRI_json_t* JsonShapeDataHomogeneousSizedList (TRI_shaper_t* shaper, element = JsonShapeData(shaper, subshape, data + offset, length); - if (element == NULL) { + if (element == nullptr) { LOG_WARNING("cannot decode element for shape #%u", (unsigned int) sid); continue; } @@ -1467,8 +1478,8 @@ static TRI_json_t* JsonShapeData (TRI_shaper_t* shaper, TRI_shape_t const* shape, char const* data, uint64_t size) { - if (shape == NULL) { - return NULL; + if (shape == nullptr) { + return nullptr; } switch (shape->_type) { @@ -2226,13 +2237,12 @@ TRI_shaped_json_t* TRI_ShapedJsonJson (TRI_shaper_t* shaper, bool create, bool isLocked) { TRI_shape_value_t dst; - bool ok; dst._value = 0; - ok = FillShapeValueJson(shaper, &dst, json, create, isLocked); + bool ok = FillShapeValueJson(shaper, &dst, json, 0, create, isLocked); if (! ok) { - return NULL; + return nullptr; } #ifdef DEBUG_JSON_SHAPER @@ -2244,9 +2254,9 @@ TRI_shaped_json_t* TRI_ShapedJsonJson (TRI_shaper_t* shaper, // no need to prefill shaped with 0's as all attributes are set directly afterwards TRI_shaped_json_t* shaped = static_cast(TRI_Allocate(shaper->_memoryZone, sizeof(TRI_shaped_json_t), false)); - if (shaped == NULL) { + if (shaped == nullptr) { TRI_Free(shaper->_memoryZone, dst._value); - return NULL; + return nullptr; } shaped->_sid = dst._sid; diff --git a/lib/V8/v8-conv.cpp b/lib/V8/v8-conv.cpp index 82af42d6e9..fd0af2ffda 100644 --- a/lib/V8/v8-conv.cpp +++ b/lib/V8/v8-conv.cpp @@ -51,6 +51,7 @@ using namespace triagens::basics; static int FillShapeValueJson (TRI_shaper_t* shaper, TRI_shape_value_t* dst, v8::Handle const json, + size_t level, set& seenHashes, vector< v8::Handle >& seenObjects, bool create); @@ -261,6 +262,7 @@ static int FillShapeValueString (TRI_shaper_t* shaper, static int FillShapeValueList (TRI_shaper_t* shaper, TRI_shape_value_t* dst, v8::Handle const json, + size_t level, set& seenHashes, vector< v8::Handle >& seenObjects, bool create) { @@ -292,9 +294,9 @@ static int FillShapeValueList (TRI_shaper_t* shaper, dst->_fixedSized = false; dst->_size = sizeof(TRI_shape_length_list_t); - dst->_value = (ptr = (char*) TRI_Allocate(shaper->_memoryZone, dst->_size, false)); + dst->_value = (ptr = static_cast(TRI_Allocate(shaper->_memoryZone, dst->_size, false))); - if (dst->_value == 0) { + if (dst->_value == nullptr) { return TRI_ERROR_OUT_OF_MEMORY; } @@ -304,9 +306,9 @@ static int FillShapeValueList (TRI_shaper_t* shaper, } // convert into TRI_shape_value_t array - p = (values = (TRI_shape_value_t*) TRI_Allocate(shaper->_memoryZone, sizeof(TRI_shape_value_t) * n, true)); + p = (values = static_cast(TRI_Allocate(shaper->_memoryZone, sizeof(TRI_shape_value_t) * n, true))); - if (p == 0) { + if (p == nullptr) { return TRI_ERROR_OUT_OF_MEMORY; } @@ -315,11 +317,11 @@ static int FillShapeValueList (TRI_shaper_t* shaper, for (uint32_t i = 0; i < n; ++i, ++p) { v8::Handle el = json->Get(i); - int res = FillShapeValueJson(shaper, p, el, seenHashes, seenObjects, create); + int res = FillShapeValueJson(shaper, p, el, level + 1, seenHashes, seenObjects, create); if (res != TRI_ERROR_NO_ERROR) { for (e = p, p = values; p < e; ++p) { - if (p->_value != 0) { + if (p->_value != nullptr) { TRI_Free(shaper->_memoryZone, p->_value); } } @@ -356,9 +358,9 @@ static int FillShapeValueList (TRI_shaper_t* shaper, shape = (TRI_homogeneous_sized_list_shape_t*) TRI_Allocate(shaper->_memoryZone, sizeof(TRI_homogeneous_sized_list_shape_t), true); - if (shape == 0) { + if (shape == nullptr) { for (p = values; p < e; ++p) { - if (p->_value != 0) { + if (p->_value != nullptr) { TRI_Free(shaper->_memoryZone, p->_value); } } @@ -375,9 +377,9 @@ static int FillShapeValueList (TRI_shaper_t* shaper, found = shaper->findShape(shaper, &shape->base, create); - if (found == 0) { + if (found == nullptr) { for (p = values; p < e; ++p) { - if (p->_value != 0) { + if (p->_value != nullptr) { TRI_Free(shaper->_memoryZone, p->_value); } } @@ -394,18 +396,18 @@ static int FillShapeValueList (TRI_shaper_t* shaper, return TRI_ERROR_INTERNAL; } - TRI_ASSERT(found != 0); + TRI_ASSERT(found != nullptr); dst->_type = found->_type; dst->_sid = found->_sid; dst->_fixedSized = false; dst->_size = sizeof(TRI_shape_length_list_t) + total; - dst->_value = (ptr = (char*) TRI_Allocate(shaper->_memoryZone, dst->_size, false)); + dst->_value = (ptr = static_cast(TRI_Allocate(shaper->_memoryZone, dst->_size, false))); if (dst->_value == NULL) { for (p = values; p < e; ++p) { - if (p->_value != 0) { + if (p->_value != nullptr) { TRI_Free(shaper->_memoryZone, p->_value); } } @@ -431,9 +433,9 @@ static int FillShapeValueList (TRI_shaper_t* shaper, shape = (TRI_homogeneous_list_shape_t*) TRI_Allocate(shaper->_memoryZone, sizeof(TRI_homogeneous_list_shape_t), true); - if (shape == NULL) { + if (shape == nullptr) { for (p = values; p < e; ++p) { - if (p->_value != 0) { + if (p->_value != nullptr) { TRI_Free(shaper->_memoryZone, p->_value); } } @@ -451,9 +453,9 @@ static int FillShapeValueList (TRI_shaper_t* shaper, // if found returns non-NULL, it will free the shape!! found = shaper->findShape(shaper, &shape->base, create); - if (found == 0) { + if (found == nullptr) { for (p = values; p < e; ++p) { - if (p->_value != 0) { + if (p->_value != nullptr) { TRI_Free(shaper->_memoryZone, p->_value); } } @@ -470,7 +472,7 @@ static int FillShapeValueList (TRI_shaper_t* shaper, return TRI_ERROR_INTERNAL; } - TRI_ASSERT(found != 0); + TRI_ASSERT(found != nullptr); dst->_type = found->_type; dst->_sid = found->_sid; @@ -479,11 +481,11 @@ static int FillShapeValueList (TRI_shaper_t* shaper, dst->_fixedSized = false; dst->_size = offset + total; - dst->_value = (ptr = (char*) TRI_Allocate(shaper->_memoryZone, dst->_size, true)); + dst->_value = (ptr = static_cast(TRI_Allocate(shaper->_memoryZone, dst->_size, true))); - if (dst->_value == 0) { + if (dst->_value == nullptr) { for (p = values; p < e; ++p) { - if (p->_value != 0) { + if (p->_value != nullptr) { TRI_Free(shaper->_memoryZone, p->_value); } } @@ -525,9 +527,9 @@ static int FillShapeValueList (TRI_shaper_t* shaper, dst->_size = offset + total; dst->_value = (ptr = (char*) TRI_Allocate(shaper->_memoryZone, dst->_size, true)); - if (dst->_value == NULL) { + if (dst->_value == nullptr) { for (p = values; p < e; ++p) { - if (p->_value != 0) { + if (p->_value != nullptr) { TRI_Free(shaper->_memoryZone, p->_value); } } @@ -561,7 +563,7 @@ static int FillShapeValueList (TRI_shaper_t* shaper, // free TRI_shape_value_t array for (p = values; p < e; ++p) { - if (p->_value != 0) { + if (p->_value != nullptr) { TRI_Free(shaper->_memoryZone, p->_value); } } @@ -577,14 +579,10 @@ static int FillShapeValueList (TRI_shaper_t* shaper, static int FillShapeValueArray (TRI_shaper_t* shaper, TRI_shape_value_t* dst, v8::Handle const json, + size_t level, set& seenHashes, vector< v8::Handle >& seenObjects, bool create) { - size_t total; - - size_t f; - size_t v; - TRI_shape_value_t* values; TRI_shape_value_t* p; TRI_shape_value_t* e; @@ -606,19 +604,19 @@ static int FillShapeValueArray (TRI_shaper_t* shaper, uint32_t n = names->Length(); // convert into TRI_shape_value_t array - p = (values = (TRI_shape_value_t*) TRI_Allocate(shaper->_memoryZone, n * sizeof(TRI_shape_value_t), true)); + p = (values = static_cast(TRI_Allocate(shaper->_memoryZone, n * sizeof(TRI_shape_value_t), true))); - if (p == 0) { + if (p == nullptr) { return TRI_ERROR_OUT_OF_MEMORY; } + + size_t total = 0; - total = 0; - f = 0; - v = 0; + size_t f = 0; + size_t v = 0; for (uint32_t i = 0; i < n; ++i, ++p) { v8::Handle key = names->Get(i); - v8::Handle val = json->Get(key); // first find an identifier for the name TRI_Utf8ValueNFC keyStr(TRI_UNKNOWN_MEM_ZONE, key); @@ -628,9 +626,18 @@ static int FillShapeValueArray (TRI_shaper_t* shaper, continue; } - if ((*keyStr)[0] == '_') { - --p; - continue; + if ((*keyStr)[0] == '_' && level == 0) { + // on top level, strip reserved attributes before shaping + char const* k = (*keyStr); + if (strcmp(k, "_key") == 0 || + strcmp(k, "_rev") == 0 || + strcmp(k, "_id") == 0 || + strcmp(k, "_from") == 0 || + strcmp(k, "_to") == 0) { + // found a reserved attribute - discard it + --p; + continue; + } } if (create) { @@ -652,12 +659,13 @@ static int FillShapeValueArray (TRI_shaper_t* shaper, } } else { - res = FillShapeValueJson(shaper, p, val, seenHashes, seenObjects, create); + v8::Handle val = json->Get(key); + res = FillShapeValueJson(shaper, p, val, level + 1, seenHashes, seenObjects, create); } if (res != TRI_ERROR_NO_ERROR) { for (e = p, p = values; p < e; ++p) { - if (p->_value != 0) { + if (p->_value != nullptr) { TRI_Free(shaper->_memoryZone, p->_value); } } @@ -706,11 +714,11 @@ static int FillShapeValueArray (TRI_shaper_t* shaper, a = (TRI_array_shape_t*) (ptr = (char*) TRI_Allocate(shaper->_memoryZone, totalSize, true)); - if (ptr == NULL) { + if (ptr == nullptr) { e = values + n; for (p = values; p < e; ++p) { - if (p->_value != NULL) { + if (p->_value != nullptr) { TRI_Free(shaper->_memoryZone, p->_value); } } @@ -746,13 +754,13 @@ static int FillShapeValueArray (TRI_shaper_t* shaper, dst->_fixedSized = true; dst->_size = total; - dst->_value = (ptr = (char*) TRI_Allocate(shaper->_memoryZone, dst->_size, true)); + dst->_value = (ptr = static_cast(TRI_Allocate(shaper->_memoryZone, dst->_size, true))); - if (ptr == 0) { + if (ptr == nullptr) { e = values + n; for (p = values; p < e; ++p) { - if (p->_value != 0) { + if (p->_value != nullptr) { TRI_Free(shaper->_memoryZone, p->_value); } } @@ -793,7 +801,7 @@ static int FillShapeValueArray (TRI_shaper_t* shaper, // free TRI_shape_value_t array for (p = values; p < e; ++p) { - if (p->_value != 0) { + if (p->_value != nullptr) { TRI_Free(shaper->_memoryZone, p->_value); } } @@ -803,7 +811,7 @@ static int FillShapeValueArray (TRI_shaper_t* shaper, // lookup this shape found = shaper->findShape(shaper, &a->base, create); - if (found == 0) { + if (found == nullptr) { LOG_TRACE("shaper failed to find shape %d", (int) a->base._type); TRI_Free(shaper->_memoryZone, a); @@ -826,6 +834,7 @@ static int FillShapeValueArray (TRI_shaper_t* shaper, static int FillShapeValueJson (TRI_shaper_t* shaper, TRI_shape_value_t* dst, v8::Handle const json, + size_t level, set& seenHashes, vector< v8::Handle >& seenObjects, bool create) { @@ -885,11 +894,11 @@ static int FillShapeValueJson (TRI_shaper_t* shaper, } else if (json->IsArray()) { - return FillShapeValueList(shaper, dst, v8::Handle::Cast(json), seenHashes, seenObjects, create); + return FillShapeValueList(shaper, dst, v8::Handle::Cast(json), level, seenHashes, seenObjects, create); } else if (json->IsObject()) { - int res = FillShapeValueArray(shaper, dst, json->ToObject(), seenHashes, seenObjects, create); + int res = FillShapeValueArray(shaper, dst, json->ToObject(), level, seenHashes, seenObjects, create); seenObjects.pop_back(); return res; } @@ -1436,7 +1445,7 @@ TRI_shaped_json_t* TRI_ShapedJsonV8Object (v8::Handle const object, set seenHashes; vector< v8::Handle > seenObjects; - int res = FillShapeValueJson(shaper, &dst, object, seenHashes, seenObjects, create); + int res = FillShapeValueJson(shaper, &dst, object, 0, seenHashes, seenObjects, create); if (res != TRI_ERROR_NO_ERROR) { if (res == TRI_RESULT_ELEMENT_NOT_FOUND) { @@ -1473,7 +1482,7 @@ int TRI_FillShapedJsonV8Object (v8::Handle const object, set seenHashes; vector< v8::Handle > seenObjects; - int res = FillShapeValueJson(shaper, &dst, object, seenHashes, seenObjects, create); + int res = FillShapeValueJson(shaper, &dst, object, 0, seenHashes, seenObjects, create); if (res != TRI_ERROR_NO_ERROR) { if (res != TRI_RESULT_ELEMENT_NOT_FOUND) { @@ -1501,6 +1510,11 @@ static TRI_json_t* ObjectToJson (v8::Handle const parameter, return TRI_CreateBooleanJson(TRI_UNKNOWN_MEM_ZONE, booleanParameter->Value()); } + if (parameter->IsBooleanObject()) { + v8::Handle bo = v8::Handle::Cast(parameter); + return TRI_CreateBooleanJson(TRI_UNKNOWN_MEM_ZONE, bo->BooleanValue()); + } + if (parameter->IsNull()) { return TRI_CreateNullJson(TRI_UNKNOWN_MEM_ZONE); } @@ -1509,8 +1523,13 @@ static TRI_json_t* ObjectToJson (v8::Handle const parameter, v8::Handle numberParameter = parameter->ToNumber(); return TRI_CreateNumberJson(TRI_UNKNOWN_MEM_ZONE, numberParameter->Value()); } + + if (parameter->IsNumberObject()) { + v8::Handle no = v8::Handle::Cast(parameter); + return TRI_CreateNumberJson(TRI_UNKNOWN_MEM_ZONE, no->NumberValue()); + } - if (parameter->IsString()) { + if (parameter->IsString() || parameter->IsStringObject()) { v8::Handle stringParameter= parameter->ToString(); TRI_Utf8ValueNFC str(TRI_UNKNOWN_MEM_ZONE, stringParameter); // move the string pointer into the JSON object @@ -1523,9 +1542,9 @@ static TRI_json_t* ObjectToJson (v8::Handle const parameter, return j; } - return 0; + return nullptr; } - + if (parameter->IsArray()) { v8::Handle arrayParameter = v8::Handle::Cast(parameter); const uint32_t n = arrayParameter->Length(); @@ -1544,6 +1563,13 @@ static TRI_json_t* ObjectToJson (v8::Handle const parameter, } return listJson; } + + if (parameter->IsRegExp() || + parameter->IsFunction() || + parameter->IsExternal() || + parameter->IsDate()) { + return nullptr; + } if (parameter->IsObject()) { v8::Handle o = parameter->ToObject(); @@ -1597,7 +1623,7 @@ static TRI_json_t* ObjectToJson (v8::Handle const parameter, return arrayJson; } - return 0; + return nullptr; } ////////////////////////////////////////////////////////////////////////////////