1
0
Fork 0

release version 2.3.0-beta1

This commit is contained in:
Frank Celler 2014-11-01 23:05:50 +01:00
parent 0fdeced78f
commit 7e7262aa7f
21 changed files with 84 additions and 84 deletions

View File

@ -1,4 +1,4 @@
v2.3.0-alpha7 (XXXX-XX-XX)
v2.3.0-beta1 (2014-11-01)
-------------------
* added command-line option `--javascript.v8-contexts` to control the number of

View File

@ -1 +1 @@
2.3.0-alpha7
2.3.0-beta1

View File

@ -1 +1 @@
#define TRI_VERSION "2.3.0-alpha7"
#define TRI_VERSION "2.3.0-beta1"

20
configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for triAGENS ArangoDB 2.3.0-alpha7.
# Generated by GNU Autoconf 2.69 for triAGENS ArangoDB 2.3.0-beta1.
#
# Report bugs to <info@triagens.de>.
#
@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='triAGENS ArangoDB'
PACKAGE_TARNAME='arangodb'
PACKAGE_VERSION='2.3.0-alpha7'
PACKAGE_STRING='triAGENS ArangoDB 2.3.0-alpha7'
PACKAGE_VERSION='2.3.0-beta1'
PACKAGE_STRING='triAGENS ArangoDB 2.3.0-beta1'
PACKAGE_BUGREPORT='info@triagens.de'
PACKAGE_URL='http://www.arangodb.org'
@ -1420,7 +1420,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures triAGENS ArangoDB 2.3.0-alpha7 to adapt to many kinds of systems.
\`configure' configures triAGENS ArangoDB 2.3.0-beta1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1491,7 +1491,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of triAGENS ArangoDB 2.3.0-alpha7:";;
short | recursive ) echo "Configuration of triAGENS ArangoDB 2.3.0-beta1:";;
esac
cat <<\_ACEOF
@ -1631,7 +1631,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
triAGENS ArangoDB configure 2.3.0-alpha7
triAGENS ArangoDB configure 2.3.0-beta1
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@ -2163,7 +2163,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by triAGENS ArangoDB $as_me 2.3.0-alpha7, which was
It was created by triAGENS ArangoDB $as_me 2.3.0-beta1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@ -3455,7 +3455,7 @@ fi
# Define the identity of the package.
PACKAGE='arangodb'
VERSION='2.3.0-alpha7'
VERSION='2.3.0-beta1'
cat >>confdefs.h <<_ACEOF
@ -9623,7 +9623,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by triAGENS ArangoDB $as_me 2.3.0-alpha7, which was
This file was extended by triAGENS ArangoDB $as_me 2.3.0-beta1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -9690,7 +9690,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
triAGENS ArangoDB config.status 2.3.0-alpha7
triAGENS ArangoDB config.status 2.3.0-beta1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

View File

@ -6,7 +6,7 @@ dnl ============================================================================
dnl --SECTION-- triAGENS GmbH Build Environment
dnl ============================================================================
AC_INIT([triAGENS ArangoDB], [2.3.0-alpha7], [info@triagens.de], [arangodb], [http://www.arangodb.org])
AC_INIT([triAGENS ArangoDB], [2.3.0-beta1], [info@triagens.de], [arangodb], [http://www.arangodb.org])
dnl ----------------------------------------------------------------------------
dnl auxillary directory for install-sh and missing

View File

@ -1,6 +1,6 @@
{
"swaggerVersion": "1.1",
"apiVersion": "2.3.0-alpha7",
"apiVersion": "2.3.0-beta1",
"apis": [
{
"path": "api-docs/aqlfunction.{format}",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -74,7 +74,7 @@
"notes": "Retrieves information about the current database <br><br> The response is a JSON object with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>name</em>: the name of the current database <li><em>id</em>: the id of the current database <li><em>path</em>: the filesystem path of the current database <li><em>isSystem</em>: whether or not the current database is the <em>_system</em> database",
"summary": " Information of the database",
"httpMethod": "GET",
"examples": "<br><br><br><br><pre><code class=\"json\">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\" : \"110945\", \n \"path\" : \"/tmp/vocdir.83694/databases/database-110945\", \n \"isSystem\" : true \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"examples": "<br><br><br><br><pre><code class=\"json\">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\" : \"70249\", \n \"path\" : \"/tmp/vocdir.93391/databases/database-70249\", \n \"isSystem\" : true \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "InformationOfTheDatabase"
}
],

View File

@ -57,7 +57,7 @@
"notes": "Creates a new document in the collection named <em>collection</em>. A JSON representation of the document must be passed as the body of the POST request. <br><br> 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. <br><br> The body of the response contains a JSON object with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>_id</em> contains the document handle of the newly created document <li><em>_key</em> contains the document key <li><em>_rev</em> contains the document revision </ul> If the collection parameter <em>waitForSync</em> is <em>false</em>, then the call returns as soon as the document has been accepted. It will not wait until the document has been synced to disk. <br><br> Optionally, the URL parameter <em>waitForSync</em> can be used to force synchronisation of the document creation operation to disk even in case that the <em>waitForSync</em> flag had been disabled for the entire collection. Thus, the <em>waitForSync</em> URL parameter can be used to force synchronisation of just this specific operations. To use this, set the <em>waitForSync</em> parameter to <em>true</em>. If the <em>waitForSync</em> parameter is not specified or set to <em>false</em>, then the collection's default <em>waitForSync</em> behavior is applied. The <em>waitForSync</em> URL parameter cannot be used to disable synchronisation for collections that have a default <em>waitForSync</em> value of <em>true</em>. <br><br>",
"summary": "Create document",
"httpMethod": "POST",
"examples": "<br><br> Create a document given a collection named <em>products</em>. Note that the revision identifier might or might not by equal to the auto-generated key. <br><br><br><br><pre><code class=\"json\">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: \"1370599777\"\nlocation: /_db/_system/_api/document/products/1370599777\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1370599777\", \n \"_rev\" : \"1370599777\", \n \"_key\" : \"1370599777\" \n}\n</code></pre><br><br><br> Create a document in a collection named <em>products</em> with a collection-level <em>waitForSync</em> value of <em>false</em>. <br><br><br><br><pre><code class=\"json\">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: \"1371124065\"\nlocation: /_db/_system/_api/document/products/1371124065\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1371124065\", \n \"_rev\" : \"1371124065\", \n \"_key\" : \"1371124065\" \n}\n</code></pre><br><br><br> Create a document in a collection with a collection-level <em>waitForSync</em> value of <em>false</em>, but using the <em>waitForSync</em> URL parameter. <br><br><br><br><pre><code class=\"json\">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: \"1371648353\"\nlocation: /_db/_system/_api/document/products/1371648353\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1371648353\", \n \"_rev\" : \"1371648353\", \n \"_key\" : \"1371648353\" \n}\n</code></pre><br><br><br> Create a document in a new, named collection <br><br><br><br><pre><code class=\"json\">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: \"1372172641\"\nlocation: /_db/_system/_api/document/products/1372172641\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1372172641\", \n \"_rev\" : \"1372172641\", \n \"_key\" : \"1372172641\" \n}\n</code></pre><br><br><br> Unknown collection name: <br><br><br><br><pre><code class=\"json\">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</code></pre><br><br><br> Illegal document: <br><br><br><br><pre><code class=\"json\">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</code></pre><br><br><br>",
"examples": "<br><br> Create a document given a collection named <em>products</em>. Note that the revision identifier might or might not by equal to the auto-generated key. <br><br><br><br><pre><code class=\"json\">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: \"1412108905\"\nlocation: /_db/_system/_api/document/products/1412108905\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1412108905\", \n \"_rev\" : \"1412108905\", \n \"_key\" : \"1412108905\" \n}\n</code></pre><br><br><br> Create a document in a collection named <em>products</em> with a collection-level <em>waitForSync</em> value of <em>false</em>. <br><br><br><br><pre><code class=\"json\">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: \"1412633193\"\nlocation: /_db/_system/_api/document/products/1412633193\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1412633193\", \n \"_rev\" : \"1412633193\", \n \"_key\" : \"1412633193\" \n}\n</code></pre><br><br><br> Create a document in a collection with a collection-level <em>waitForSync</em> value of <em>false</em>, but using the <em>waitForSync</em> URL parameter. <br><br><br><br><pre><code class=\"json\">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: \"1413157481\"\nlocation: /_db/_system/_api/document/products/1413157481\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1413157481\", \n \"_rev\" : \"1413157481\", \n \"_key\" : \"1413157481\" \n}\n</code></pre><br><br><br> Create a document in a new, named collection <br><br><br><br><pre><code class=\"json\">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: \"1413681769\"\nlocation: /_db/_system/_api/document/products/1413681769\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1413681769\", \n \"_rev\" : \"1413681769\", \n \"_key\" : \"1413681769\" \n}\n</code></pre><br><br><br> Unknown collection name: <br><br><br><br><pre><code class=\"json\">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</code></pre><br><br><br> Illegal document: <br><br><br><br><pre><code class=\"json\">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</code></pre><br><br><br>",
"nickname": "CreateDocument"
}
],
@ -108,7 +108,7 @@
"notes": "Returns the document identified by <em>document-handle</em>. The returned document contains two special attributes: <em>_id</em> containing the document handle and <em>_rev</em> containing the revision. <br><br>",
"summary": "Read document",
"httpMethod": "GET",
"examples": "<br><br> Use a document handle: <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1372696929\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1372696929\"\n\n{ \n \"hello\" : \"world\", \n \"_id\" : \"products/1372696929\", \n \"_rev\" : \"1372696929\", \n \"_key\" : \"1372696929\" \n}\n</code></pre><br><br><br> Use a document handle and an etag: <br><br><br><br><pre><code class=\"json\">shell> curl --header 'If-None-Match: \"1373286753\"' --dump - http://localhost:8529/_api/document/products/1373286753\n\n</code></pre><br><br><br> Unknown document handle: <br><br><br><br><pre><code class=\"json\">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</code></pre><br><br><br>",
"examples": "<br><br> Use a document handle: <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1414206057\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1414206057\"\n\n{ \n \"hello\" : \"world\", \n \"_id\" : \"products/1414206057\", \n \"_rev\" : \"1414206057\", \n \"_key\" : \"1414206057\" \n}\n</code></pre><br><br><br> Use a document handle and an etag: <br><br><br><br><pre><code class=\"json\">shell> curl --header 'If-None-Match: \"1414795881\"' --dump - http://localhost:8529/_api/document/products/1414795881\n\n</code></pre><br><br><br> Unknown document handle: <br><br><br><br><pre><code class=\"json\">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</code></pre><br><br><br>",
"nickname": "ReadDocument"
}
],
@ -146,7 +146,7 @@
"notes": "Returns a list of all keys, ids, or URI paths for all documents in the collection identified by <em>collection</em>. The type of the result list is determined by the <em>type</em> attribute. <br><br> Note that the results have no defined order and thus the order should not be relied on. <br><br>",
"summary": "Read all documents",
"httpMethod": "GET",
"examples": "<br><br> Returns all document paths <br><br><br><br><pre><code class=\"json\">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/1374794081\", \n \"/_api/document/products/1374138721\", \n \"/_api/document/products/1374466401\" \n ] \n}\n</code></pre><br><br><br> Returns all document keys <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/?collection=products&type=key\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"documents\" : [ \n \"1375383905\", \n \"1376039265\", \n \"1375711585\" \n ] \n}\n</code></pre><br><br><br> Collection does not exist. <br><br><br><br><pre><code class=\"json\">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</code></pre><br><br><br>",
"examples": "<br><br> Returns all document paths <br><br><br><br><pre><code class=\"json\">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/1415778921\", \n \"/_api/document/products/1416106601\", \n \"/_api/document/products/1415451241\" \n ] \n}\n</code></pre><br><br><br> Returns all document keys <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/?collection=products&type=key\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"documents\" : [ \n \"1417024105\", \n \"1416696425\", \n \"1417351785\" \n ] \n}\n</code></pre><br><br><br> Collection does not exist. <br><br><br><br><pre><code class=\"json\">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</code></pre><br><br><br>",
"nickname": "ReadAllDocuments"
}
],
@ -204,7 +204,7 @@
"notes": "Like <em>GET</em>, 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. <br><br>",
"summary": "Read document header",
"httpMethod": "HEAD",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X HEAD --data-binary @- --dump - http://localhost:8529/_api/document/products/1376629089\n\n</code></pre><br><br><br> <br><br>",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X HEAD --data-binary @- --dump - http://localhost:8529/_api/document/products/1418138217\n\n</code></pre><br><br><br> <br><br>",
"nickname": "ReadDocumentHeader"
}
],
@ -281,7 +281,7 @@
"notes": "Completely updates (i.e. replaces) the document identified by <em>document-handle</em>. If the document exists and can be updated, then a <em>HTTP 201</em> is returned and the \"ETag\" header field contains the new revision of the document. <br><br> If the new document passed in the body of the request contains the <em>document-handle</em> in the attribute <em>_id</em> and the revision in <em>_rev</em>, these attributes will be ignored. Only the URI and the \"ETag\" header are relevant in order to avoid confusion when using proxies. <br><br> Optionally, the URL parameter <em>waitForSync</em> can be used to force synchronisation of the document replacement operation to disk even in case that the <em>waitForSync</em> flag had been disabled for the entire collection. Thus, the <em>waitForSync</em> URL parameter can be used to force synchronisation of just specific operations. To use this, set the <em>waitForSync</em> parameter to <em>true</em>. If the <em>waitForSync</em> parameter is not specified or set to <em>false</em>, then the collection's default <em>waitForSync</em> behavior is applied. The <em>waitForSync</em> URL parameter cannot be used to disable synchronisation for collections that have a default <em>waitForSync</em> value of <em>true</em>. <br><br> The body of the response contains a JSON object with the information about the handle and the revision. The attribute <em>_id</em> contains the known <em>document-handle</em> of the updated document, the attribute <em>_rev</em> contains the new document revision. <br><br> If the document does not exist, then a <em>HTTP 404</em> is returned and the body of the response contains an error document. <br><br> 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): <ul class=\"swagger-list\"><li>specifying the target revision in the <em>rev</em> URL query parameter <li>specifying the target revision in the <em>if-match</em> HTTP header </ul> Specifying a target revision is optional, however, if done, only one of the described mechanisms must be used (either the <em>rev</em> URL parameter or the <em>if-match</em> HTTP header). Regardless which mechanism is used, the parameter needs to contain the target document revision id as returned in the <em>_rev</em> attribute of a document or by an HTTP <em>etag</em> header. <br><br> For example, to conditionally replace a document based on a specific revision id, you can use the following request: <br><br> <em>PUT /_api/document/document-handle?rev=etag</em> <br><br> If a target revision id is provided in the request (e.g. via the <em>etag</em> value in the <em>rev</em> 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 <em>HTTP 412</em> conflict is returned and no replacement is performed. <br><br> The conditional update behavior can be overriden with the <em>policy</em> URL query parameter: <br><br> <em>PUT /_api/document/document-handle?policy=policy</em> <br><br> If <em>policy</em> is set to <em>error</em>, 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. <br><br> If <em>policy</em> is set to <em>last</em>, 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 <em>last</em> *policy* to force replacements. <br><br>",
"summary": "Replace document",
"httpMethod": "PUT",
"examples": "<br><br> Using document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1377218913\n{\"Hello\": \"you\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1377546593\"\nlocation: /_db/_system/_api/document/products/1377218913\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1377218913\", \n \"_rev\" : \"1377546593\", \n \"_key\" : \"1377218913\" \n}\n</code></pre><br><br><br> Unknown document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1378070881\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/1378070881 not found\", \n \"code\" : 404, \n \"errorNum\" : 1202 \n}\n</code></pre><br><br><br> Produce a revision conflict: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --header 'If-Match: \"1379316065\"' --data-binary @- --dump - http://localhost:8529/_api/document/products/1378988385\n{\"other\":\"content\"}\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\netag: \"1378988385\"\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/1378988385\", \n \"_rev\" : \"1378988385\", \n \"_key\" : \"1378988385\" \n}\n</code></pre><br><br><br> Last write wins: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --header 'If-Match: \"1380430177\"' --data-binary @- --dump - http://localhost:8529/_api/document/products/1380102497?policy=last\n{}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1380692321\"\nlocation: /_db/_system/_api/document/products/1380102497\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1380102497\", \n \"_rev\" : \"1380692321\", \n \"_key\" : \"1380102497\" \n}\n</code></pre><br><br><br> Alternative to header field: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1381216609?rev=1381544289\n{\"other\":\"content\"}\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\netag: \"1381216609\"\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/1381216609\", \n \"_rev\" : \"1381216609\", \n \"_key\" : \"1381216609\" \n}\n</code></pre><br><br><br>",
"examples": "<br><br> Using document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1418728041\n{\"Hello\": \"you\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1419055721\"\nlocation: /_db/_system/_api/document/products/1418728041\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1418728041\", \n \"_rev\" : \"1419055721\", \n \"_key\" : \"1418728041\" \n}\n</code></pre><br><br><br> Unknown document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1419580009\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/1419580009 not found\", \n \"code\" : 404, \n \"errorNum\" : 1202 \n}\n</code></pre><br><br><br> Produce a revision conflict: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --header 'If-Match: \"1420825193\"' --data-binary @- --dump - http://localhost:8529/_api/document/products/1420497513\n{\"other\":\"content\"}\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\netag: \"1420497513\"\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/1420497513\", \n \"_rev\" : \"1420497513\", \n \"_key\" : \"1420497513\" \n}\n</code></pre><br><br><br> Last write wins: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --header 'If-Match: \"1421939305\"' --data-binary @- --dump - http://localhost:8529/_api/document/products/1421611625?policy=last\n{}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1422201449\"\nlocation: /_db/_system/_api/document/products/1421611625\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1421611625\", \n \"_rev\" : \"1422201449\", \n \"_key\" : \"1421611625\" \n}\n</code></pre><br><br><br> Alternative to header field: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1422725737?rev=1423053417\n{\"other\":\"content\"}\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\netag: \"1422725737\"\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/1422725737\", \n \"_rev\" : \"1422725737\", \n \"_key\" : \"1422725737\" \n}\n</code></pre><br><br><br>",
"nickname": "ReplaceDocument"
}
],
@ -365,7 +365,7 @@
"notes": "Partially updates the document identified by <em>document-handle</em>. 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. <br><br> Setting an attribute value to <em>null</em> in the patch document will cause a value of <em>null</em> be saved for the attribute by default. <br><br> Optionally, the URL parameter <em>waitForSync</em> can be used to force synchronisation of the document update operation to disk even in case that the <em>waitForSync</em> flag had been disabled for the entire collection. Thus, the <em>waitForSync</em> URL parameter can be used to force synchronisation of just specific operations. To use this, set the <em>waitForSync</em> parameter to <em>true</em>. If the <em>waitForSync</em> parameter is not specified or set to <em>false</em>, then the collection's default <em>waitForSync</em> behavior is applied. The <em>waitForSync</em> URL parameter cannot be used to disable synchronisation for collections that have a default <em>waitForSync</em> value of <em>true</em>. <br><br> The body of the response contains a JSON object with the information about the handle and the revision. The attribute <em>_id</em> contains the known <em>document-handle</em> of the updated document, the attribute <em>_rev</em> contains the new document revision. <br><br> If the document does not exist, then a <em>HTTP 404</em> is returned and the body of the response contains an error document. <br><br> You can conditionally update a document based on a target revision id by using either the <em>rev</em> URL parameter or the <em>if-match</em> HTTP header. To control the update behavior in case there is a revision mismatch, you can use the <em>policy</em> parameter. This is the same as when replacing documents (see replacing documents for details). <br><br>",
"summary": " Patch document",
"httpMethod": "PATCH",
"examples": "<br><br> patches an existing document with new content. <br><br><br><br><pre><code class=\"json\">shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1382330721\n{ \n \"hello\" : \"world\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1382658401\"\nlocation: /_db/_system/_api/document/products/1382330721\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1382330721\", \n \"_rev\" : \"1382658401\", \n \"_key\" : \"1382330721\" \n}\nshell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1382330721\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: \"1383248225\"\nlocation: /_db/_system/_api/document/products/1382330721\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1382330721\", \n \"_rev\" : \"1383248225\", \n \"_key\" : \"1382330721\" \n}\nshell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1382330721\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1383248225\"\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/1382330721\", \n \"_rev\" : \"1383248225\", \n \"_key\" : \"1382330721\" \n}\nshell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1382330721?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: \"1383706977\"\nlocation: /_db/_system/_api/document/products/1382330721\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1382330721\", \n \"_rev\" : \"1383706977\", \n \"_key\" : \"1382330721\" \n}\nshell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1382330721\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1383706977\"\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/1382330721\", \n \"_rev\" : \"1383706977\", \n \"_key\" : \"1382330721\" \n}\n</code></pre><br><br><br>",
"examples": "<br><br> patches an existing document with new content. <br><br><br><br><pre><code class=\"json\">shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1423839849\n{ \n \"hello\" : \"world\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1424167529\"\nlocation: /_db/_system/_api/document/products/1423839849\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1423839849\", \n \"_rev\" : \"1424167529\", \n \"_key\" : \"1423839849\" \n}\nshell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1423839849\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: \"1424757353\"\nlocation: /_db/_system/_api/document/products/1423839849\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1423839849\", \n \"_rev\" : \"1424757353\", \n \"_key\" : \"1423839849\" \n}\nshell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1423839849\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1424757353\"\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/1423839849\", \n \"_rev\" : \"1424757353\", \n \"_key\" : \"1423839849\" \n}\nshell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1423839849?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: \"1425216105\"\nlocation: /_db/_system/_api/document/products/1423839849\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1423839849\", \n \"_rev\" : \"1425216105\", \n \"_key\" : \"1423839849\" \n}\nshell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1423839849\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1425216105\"\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/1423839849\", \n \"_rev\" : \"1425216105\", \n \"_key\" : \"1423839849\" \n}\n</code></pre><br><br><br>",
"nickname": "PatchDocument"
}
],
@ -431,7 +431,7 @@
"notes": "The body of the response contains a JSON object with the information about the handle and the revision. The attribute <em>_id</em> contains the known <em>document-handle</em> of the deleted document, the attribute <em>_rev</em> contains the document revision. <br><br> If the <em>waitForSync</em> parameter is not specified or set to <em>false</em>, then the collection's default <em>waitForSync</em> behavior is applied. The <em>waitForSync</em> URL parameter cannot be used to disable synchronisation for collections that have a default <em>waitForSync</em> value of <em>true</em>. <br><br>",
"summary": " Deletes document",
"httpMethod": "DELETE",
"examples": "<br><br> Using document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/document/products/1384296801\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1384296801\", \n \"_rev\" : \"1384296801\", \n \"_key\" : \"1384296801\" \n}\n</code></pre><br><br><br> Unknown document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/document/products/1385017697\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/1385017697 not found\", \n \"code\" : 404, \n \"errorNum\" : 1202 \n}\n</code></pre><br><br><br> Revision conflict: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --header 'If-Match: \"1386197345\"' --dump - http://localhost:8529/_api/document/products/1385869665\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\netag: \"1385869665\"\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/1385869665\", \n \"_rev\" : \"1385869665\", \n \"_key\" : \"1385869665\" \n}\n</code></pre><br><br><br>",
"examples": "<br><br> Using document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/document/products/1425805929\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1425805929\", \n \"_rev\" : \"1425805929\", \n \"_key\" : \"1425805929\" \n}\n</code></pre><br><br><br> Unknown document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/document/products/1426526825\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/1426526825 not found\", \n \"code\" : 404, \n \"errorNum\" : 1202 \n}\n</code></pre><br><br><br> Revision conflict: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --header 'If-Match: \"1427706473\"' --dump - http://localhost:8529/_api/document/products/1427378793\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\netag: \"1427378793\"\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/1427378793\", \n \"_rev\" : \"1427378793\", \n \"_key\" : \"1427378793\" \n}\n</code></pre><br><br><br>",
"nickname": "DeletesDocument"
}
],

View File

@ -71,7 +71,7 @@
"notes": "Creates a new edge document in the collection named <em>collection</em>. A JSON representation of the document must be passed as the body of the POST request. <br><br> The <em>from</em> and <em>to</em> handles are immutable once the edge has been created. <br><br> In all other respects the method works like <em>POST /document</em>. <br><br>",
"summary": "Create edge",
"httpMethod": "POST",
"examples": "<br><br> Create an edge and read it back: <br><br><br><br><pre><code class=\"json\">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: \"1388491105\"\nlocation: /_db/_system/_api/document/edges/1388491105\n\n{ \n \"error\" : false, \n \"_id\" : \"edges/1388491105\", \n \"_rev\" : \"1388491105\", \n \"_key\" : \"1388491105\" \n}\nshell> curl --data-binary @- --dump - http://localhost:8529/_api/edge/edges/1388491105\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1388491105\"\n\n{ \n \"name\" : \"Emil\", \n \"_id\" : \"edges/1388491105\", \n \"_rev\" : \"1388491105\", \n \"_key\" : \"1388491105\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/2\" \n}\n</code></pre><br><br><br>",
"examples": "<br><br> Create an edge and read it back: <br><br><br><br><pre><code class=\"json\">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: \"1430196841\"\nlocation: /_db/_system/_api/document/edges/1430196841\n\n{ \n \"error\" : false, \n \"_id\" : \"edges/1430196841\", \n \"_rev\" : \"1430196841\", \n \"_key\" : \"1430196841\" \n}\nshell> curl --data-binary @- --dump - http://localhost:8529/_api/edge/edges/1430196841\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1430196841\"\n\n{ \n \"name\" : \"Emil\", \n \"_id\" : \"edges/1430196841\", \n \"_rev\" : \"1430196841\", \n \"_key\" : \"1430196841\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/2\" \n}\n</code></pre><br><br><br>",
"nickname": "CreateEdge"
}
],

View File

@ -33,7 +33,7 @@
"notes": "Returns the list of edges starting or ending in the vertex identified by <em>vertex-handle</em>. <br><br>",
"summary": " Read in- or outbound edges",
"httpMethod": "GET",
"examples": "<br><br> Any direction <br><br><br><br><pre><code class=\"json\">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 \"_key\" : \"6\", \n \"_rev\" : \"1058386273\", \n \"_from\" : \"vertices/2\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v2 -> v1\" \n }, \n { \n \"_id\" : \"edges/7\", \n \"_key\" : \"7\", \n \"_rev\" : \"1058910561\", \n \"_from\" : \"vertices/4\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v4 -> v1\" \n }, \n { \n \"_id\" : \"edges/5\", \n \"_key\" : \"5\", \n \"_rev\" : \"1057861985\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/3\", \n \"$label\" : \"v1 -> v3\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> In edges <br><br><br><br><pre><code class=\"json\">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 \"_key\" : \"6\", \n \"_rev\" : \"1063104865\", \n \"_from\" : \"vertices/2\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v2 -> v1\" \n }, \n { \n \"_id\" : \"edges/7\", \n \"_key\" : \"7\", \n \"_rev\" : \"1063629153\", \n \"_from\" : \"vertices/4\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v4 -> v1\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Out edges <br><br><br><br><pre><code class=\"json\">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 \"_key\" : \"5\", \n \"_rev\" : \"1076080993\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/3\", \n \"$label\" : \"v1 -> v3\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"examples": "<br><br> Any direction <br><br><br><br><pre><code class=\"json\">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 \"_key\" : \"6\", \n \"_rev\" : \"1105269353\", \n \"_from\" : \"vertices/2\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v2 -> v1\" \n }, \n { \n \"_id\" : \"edges/7\", \n \"_key\" : \"7\", \n \"_rev\" : \"1105793641\", \n \"_from\" : \"vertices/4\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v4 -> v1\" \n }, \n { \n \"_id\" : \"edges/5\", \n \"_key\" : \"5\", \n \"_rev\" : \"1104745065\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/3\", \n \"$label\" : \"v1 -> v3\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> In edges <br><br><br><br><pre><code class=\"json\">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 \"_key\" : \"6\", \n \"_rev\" : \"1109987945\", \n \"_from\" : \"vertices/2\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v2 -> v1\" \n }, \n { \n \"_id\" : \"edges/7\", \n \"_key\" : \"7\", \n \"_rev\" : \"1110512233\", \n \"_from\" : \"vertices/4\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v4 -> v1\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Out edges <br><br><br><br><pre><code class=\"json\">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 \"_key\" : \"5\", \n \"_rev\" : \"1114182249\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/3\", \n \"$label\" : \"v1 -> v3\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "ReadIn-OrOutboundEdges"
}
],

View File

@ -24,7 +24,7 @@
"notes": "Returns a list of all configured endpoints the server is listening on. For each endpoint, the list of allowed databases is returned too if set. <br><br> The result is a JSON hash which has the endpoints as keys, and the list of mapped database names as values for each endpoint. <br><br> 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. <br><br> <em>Note</em>: 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. <br><br>",
"summary": " Return list of all endpoints",
"httpMethod": "GET",
"examples": "<br><br><br><br><pre><code class=\"json\">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:33694\", \n \"databases\" : [ ] \n }, \n { \n \"endpoint\" : \"tcp://127.0.0.1:8532\", \n \"databases\" : [ \n \"mydb1\", \n \"mydb2\" \n ] \n } \n]\n</code></pre><br><br><br>",
"examples": "<br><br><br><br><pre><code class=\"json\">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:33391\", \n \"databases\" : [ ] \n }, \n { \n \"endpoint\" : \"tcp://127.0.0.1:8532\", \n \"databases\" : [ \n \"mydb1\", \n \"mydb2\" \n ] \n } \n]\n</code></pre><br><br><br>",
"nickname": "ReturnListOfAllEndpoints"
}
],

View File

@ -39,7 +39,7 @@
"notes": "Creates a new graph. <br><br> Returns an object with an attribute <em>graph</em> containing a list of all graph properties. <br><br>",
"summary": "create graph",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\">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: 1079226721\n\n{ \n \"graph\" : { \n \"_id\" : \"_graphs/graph\", \n \"_key\" : \"graph\", \n \"_rev\" : \"1079226721\", \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</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">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: 1117721193\n\n{ \n \"graph\" : { \n \"_id\" : \"_graphs/graph\", \n \"_key\" : \"graph\", \n \"_rev\" : \"1117721193\", \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</code></pre><br>",
"nickname": "createGraph"
}
],
@ -90,7 +90,7 @@
"notes": "<br><br> If <em>graph-name</em> is specified, returns an object with an attribute <em>graph</em> containing a JSON hash with all properties of the specified graph. <br><br> If <em>graph-name</em> is not specified, returns a list of graph objects. <br><br>",
"summary": "get the properties of a specific or all graphs",
"httpMethod": "GET",
"examples": "<br><br><pre><code class=\"json\">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: 1080537441\n\n{ \n \"graph\" : { \n \"_id\" : \"_graphs/graph\", \n \"_key\" : \"graph\", \n \"_rev\" : \"1080537441\", \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</code></pre><br><br><br> get all graphs <br><br><br><br><pre><code class=\"json\">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 \"_key\" : \"graph2\", \n \"_rev\" : \"1083421025\", \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 \"_key\" : \"graph1\", \n \"_rev\" : \"1082241377\", \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</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">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: 1119031913\n\n{ \n \"graph\" : { \n \"_id\" : \"_graphs/graph\", \n \"_key\" : \"graph\", \n \"_rev\" : \"1119031913\", \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</code></pre><br><br><br> get all graphs <br><br><br><br><pre><code class=\"json\">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 \"_key\" : \"graph2\", \n \"_rev\" : \"1121718889\", \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 \"_key\" : \"graph1\", \n \"_rev\" : \"1120735849\", \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</code></pre><br>",
"nickname": "getThePropertiesOfASpecificOrAllGraphs"
}
],
@ -180,7 +180,7 @@
"notes": "Creates a vertex in a graph. <br><br> Returns an object with an attribute <em>vertex</em> containing a list of all vertex properties. <br><br>",
"summary": "create vertex",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\">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: 1087811937\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1087811937\", \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">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: 1126306409\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1126306409\", \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"nickname": "createVertex"
}
],
@ -245,7 +245,7 @@
"notes": "Returns an object with an attribute <em>vertex</em> containing a list of all vertex properties. <br><br>",
"summary": "get vertex",
"httpMethod": "GET",
"examples": "<br><br><pre><code class=\"json\">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: 1089646945\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1089646945\", \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">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: 1128141417\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1128141417\", \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>",
"nickname": "getVertex"
}
],
@ -384,7 +384,7 @@
"notes": "Replaces the vertex properties. <br><br> Returns an object with an attribute <em>vertex</em> containing a list of all vertex properties. <br><br>",
"summary": "update vertex",
"httpMethod": "PUT",
"examples": "<br><br><pre><code class=\"json\">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: 1094431073\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1094431073\", \n \"optional1\" : \"val2\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">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: 1132925545\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1132925545\", \n \"optional1\" : \"val2\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"nickname": "updateVertex"
}
],
@ -464,7 +464,7 @@
"notes": "Partially updates the vertex properties. <br><br> Setting an attribute value to <em>null</em> in the patch document will cause a value of <em>null</em> be saved for the attribute by default. If the intention is to delete existing attributes with the patch command, the URL parameter <em>keepNull</em> can be used with a value of <em>false</em>. 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 <em>null</em>. <br><br> Returns an object with an attribute <em>vertex</em> containing a list of all vertex properties. <br><br>",
"summary": "update vertex",
"httpMethod": "PATCH",
"examples": "<br><br><pre><code class=\"json\">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: 1096790369\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1096790369\", \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: 1097314657\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1097314657\", \n \"optional1\" : null \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">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: 1135284841\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1135284841\", \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: 1135809129\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1135809129\", \n \"optional1\" : null \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"nickname": "updateVertex"
}
],
@ -498,7 +498,7 @@
"notes": "Returns a cursor. <br><br> The call expects a JSON hash array as body to filter the result: <br><br> <ul class=\"swagger-list\"><li><em>batchSize</em>: the batch size of the returned cursor <li><em>limit</em>: limit the result size <li><em>count</em>: return the total number of results (default \"false\") <li><em>filter</em>: a optional filter </ul> The attributes of filter <ul class=\"swagger-list\"><li><em>properties</em>: filter by an array of vertex properties </ul> The attributes of a property filter <ul class=\"swagger-list\"><li><em>key</em>: filter the result vertices by a key value pair <li><em>value</em>: the value of the <em>key</em> <li><em>compare</em>: a compare operator",
"summary": "get vertices",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\">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 \"optional1\" : \"val1\", \n \"_id\" : \"vertices/v3\", \n \"_rev\" : \"1099936097\", \n \"_key\" : \"v3\" \n }, \n { \n \"optional1\" : \"val1\", \n \"_id\" : \"vertices/v2\", \n \"_rev\" : \"1099542881\", \n \"_key\" : \"v2\" \n }, \n { \n \"optional1\" : \"val1\", \n \"_id\" : \"vertices/v5\", \n \"_rev\" : \"1100722529\", \n \"_key\" : \"v5\" \n }, \n { \n \"optional1\" : \"val1\", \n \"_id\" : \"vertices/v4\", \n \"_rev\" : \"1100329313\", \n \"_key\" : \"v4\" \n }, \n { \n \"optional1\" : \"val1\", \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"1099149665\", \n \"_key\" : \"v1\" \n } \n ], \n \"hasMore\" : false, \n \"extra\" : { \n \"stats\" : { \n \"writesExecuted\" : 0, \n \"writesIgnored\" : 0, \n \"scannedFull\" : 5, \n \"scannedIndex\" : 0 \n }, \n \"warnings\" : [ ] \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">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 \"optional1\" : \"val1\", \n \"_id\" : \"vertices/v3\", \n \"_rev\" : \"1138627177\", \n \"_key\" : \"v3\" \n }, \n { \n \"optional1\" : \"val1\", \n \"_id\" : \"vertices/v2\", \n \"_rev\" : \"1138233961\", \n \"_key\" : \"v2\" \n }, \n { \n \"optional1\" : \"val1\", \n \"_id\" : \"vertices/v5\", \n \"_rev\" : \"1139413609\", \n \"_key\" : \"v5\" \n }, \n { \n \"optional1\" : \"val1\", \n \"_id\" : \"vertices/v4\", \n \"_rev\" : \"1139020393\", \n \"_key\" : \"v4\" \n }, \n { \n \"optional1\" : \"val1\", \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"1137840745\", \n \"_key\" : \"v1\" \n } \n ], \n \"hasMore\" : false, \n \"extra\" : { \n \"stats\" : { \n \"writesExecuted\" : 0, \n \"writesIgnored\" : 0, \n \"scannedFull\" : 5, \n \"scannedIndex\" : 0 \n }, \n \"warnings\" : [ ] \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"nickname": "getVertices"
}
],
@ -539,7 +539,7 @@
"notes": "Returns a cursor. <br><br> The call expects a JSON hash array as body to filter the result: <br><br> <ul class=\"swagger-list\"><li><em>batchSize</em>: the batch size of the returned cursor <li><em>limit</em>: limit the result size <li><em>count</em>: return the total number of results (default \"false\") <li><em>filter</em>: a optional filter </ul> The attributes of filter <ul class=\"swagger-list\"><li><em>direction</em>: Filter for inbound (value \"in\") or outbound (value \"out\") neighbors. Default value is \"any\". <li><em>labels</em>: filter by an array of edge labels (empty array means no restriction) <li><em>properties</em>: filter neighbors by an array of edge properties </ul> The attributes of a property filter <ul class=\"swagger-list\"><li><em>key</em>: filter the result vertices by a key value pair <li><em>value</em>: the value of the <em>key</em> <li><em>compare</em>: a compare operator",
"summary": "get vertices",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\">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 \"_key\" : \"v1\", \n \"_rev\" : \"1102754145\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v4\", \n \"_key\" : \"v4\", \n \"_rev\" : \"1103933793\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"extra\" : { \n \"stats\" : { \n \"writesExecuted\" : 0, \n \"writesIgnored\" : 0, \n \"scannedFull\" : 0, \n \"scannedIndex\" : 0 \n }, \n \"warnings\" : [ ] \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Select vertices by direction and property filter <br><br><br><br><pre><code class=\"json\">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 \"_key\" : \"v4\", \n \"_rev\" : \"1109832033\", \n \"optional1\" : \"val2\" \n }, \n { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1108652385\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"extra\" : { \n \"stats\" : { \n \"writesExecuted\" : 0, \n \"writesIgnored\" : 0, \n \"scannedFull\" : 0, \n \"scannedIndex\" : 0 \n }, \n \"warnings\" : [ ] \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">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 \"_key\" : \"v1\", \n \"_rev\" : \"1141445225\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v4\", \n \"_key\" : \"v4\", \n \"_rev\" : \"1142624873\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"extra\" : { \n \"stats\" : { \n \"writesExecuted\" : 0, \n \"writesIgnored\" : 0, \n \"scannedFull\" : 0, \n \"scannedIndex\" : 0 \n }, \n \"warnings\" : [ ] \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Select vertices by direction and property filter <br><br><br><br><pre><code class=\"json\">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 \"_key\" : \"v4\", \n \"_rev\" : \"1149768297\", \n \"optional1\" : \"val2\" \n }, \n { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1148588649\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"extra\" : { \n \"stats\" : { \n \"writesExecuted\" : 0, \n \"writesIgnored\" : 0, \n \"scannedFull\" : 0, \n \"scannedIndex\" : 0 \n }, \n \"warnings\" : [ ] \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"nickname": "getVertices"
}
],
@ -584,7 +584,7 @@
"notes": "Creates an edge in a graph. <br><br> The call expects a JSON hash array as body with the edge properties: <br><br> <ul class=\"swagger-list\"><li><em>_key</em>: The name of the edge (optional, if edge collection allows user defined keys). <li><em>_from</em>: The name of the from vertex. <li><em>_to</em>: The name of the to vertex. <li><em>$label</em>: A label for the edge (optional). <li>further optional attributes. </ul> Returns an object with an attribute <em>edge</em> containing the list of all edge properties. <br><br>",
"summary": "create edge",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\">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: 1115599201\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_key\" : \"edge1\", \n \"_rev\" : \"1115599201\", \n \"_from\" : \"vertices/vert2\", \n \"_to\" : \"vertices/vert1\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">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: 1155535465\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_key\" : \"edge1\", \n \"_rev\" : \"1155535465\", \n \"_from\" : \"vertices/vert2\", \n \"_to\" : \"vertices/vert1\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"nickname": "createEdge"
}
],
@ -649,7 +649,7 @@
"notes": "Returns an object with an attribute <em>edge</em> containing a list of all edge properties. <br><br>",
"summary": "get edge",
"httpMethod": "GET",
"examples": "<br><br><pre><code class=\"json\">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: 1118679393\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_key\" : \"edge1\", \n \"_rev\" : \"1118679393\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">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: 1158419049\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_key\" : \"edge1\", \n \"_rev\" : \"1158419049\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>",
"nickname": "getEdge"
}
],
@ -788,7 +788,7 @@
"notes": "Replaces the optional edge properties. <br><br> The call expects a JSON hash array as body with the new edge properties. <br><br> Returns an object with an attribute <em>edge</em> containing a list of all edge properties. <br><br>",
"summary": "update edge",
"httpMethod": "PUT",
"examples": "<br><br><pre><code class=\"json\">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: 1125691745\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_key\" : \"edge1\", \n \"_rev\" : \"1125691745\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val2\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">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: 1165628009\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_key\" : \"edge1\", \n \"_rev\" : \"1165628009\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val2\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"nickname": "updateEdge"
}
],
@ -868,7 +868,7 @@
"notes": "Partially updates the edge properties. <br><br> Setting an attribute value to <em>null</em> in the patch document will cause a value of <em>null</em> be saved for the attribute by default. If the intention is to delete existing attributes with the patch command, the URL parameter <em>keepNull</em> can be used with a value of <em>false</em>. 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 <em>null</em>. <br><br> Returns an object with an attribute <em>edge</em> containing a list of all edge properties. <br><br>",
"summary": "update edge",
"httpMethod": "PATCH",
"examples": "<br><br><pre><code class=\"json\">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: 1129230689\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_key\" : \"edge1\", \n \"_rev\" : \"1129230689\", \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</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">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: 1169166953\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_key\" : \"edge1\", \n \"_rev\" : \"1169166953\", \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</code></pre><br>",
"nickname": "updateEdge"
}
],
@ -902,7 +902,7 @@
"notes": "Returns a cursor. <br><br> The call expects a JSON hash array as body to filter the result: <br><br> <ul class=\"swagger-list\"><li><em>batchSize</em>: the batch size of the returned cursor <li><em>limit</em>: limit the result size <li><em>count</em>: return the total number of results (default \"false\") <li><em>filter</em>: a optional filter </ul> The attributes of filter <ul class=\"swagger-list\"><li><em>labels</em>: filter by an array of edge labels <li><em>properties</em>: filter by an array of edge properties </ul> The attributes of a property filter <ul class=\"swagger-list\"><li><em>key</em>: filter the result edges by a key value pair <li><em>value</em>: the value of the <em>key</em> <li><em>compare</em>: a compare operator",
"summary": "get edges",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\">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 \"$label\" : null, \n \"optional1\" : \"val1\", \n \"_id\" : \"edges/edge2\", \n \"_rev\" : \"1133883745\", \n \"_key\" : \"edge2\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v3\" \n }, \n { \n \"$label\" : null, \n \"optional1\" : \"val1\", \n \"_id\" : \"edges/edge3\", \n \"_rev\" : \"1134408033\", \n \"_key\" : \"edge3\", \n \"_from\" : \"vertices/v2\", \n \"_to\" : \"vertices/v4\" \n }, \n { \n \"$label\" : null, \n \"optional1\" : \"val1\", \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"1133359457\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v2\" \n }, \n { \n \"$label\" : null, \n \"optional1\" : \"val1\", \n \"_id\" : \"edges/edge4\", \n \"_rev\" : \"1134932321\", \n \"_key\" : \"edge4\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v5\" \n } \n ], \n \"hasMore\" : false, \n \"extra\" : { \n \"stats\" : { \n \"writesExecuted\" : 0, \n \"writesIgnored\" : 0, \n \"scannedFull\" : 4, \n \"scannedIndex\" : 0 \n }, \n \"warnings\" : [ ] \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">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 \"$label\" : null, \n \"optional1\" : \"val1\", \n \"_id\" : \"edges/edge2\", \n \"_rev\" : \"1173820009\", \n \"_key\" : \"edge2\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v3\" \n }, \n { \n \"$label\" : null, \n \"optional1\" : \"val1\", \n \"_id\" : \"edges/edge3\", \n \"_rev\" : \"1174344297\", \n \"_key\" : \"edge3\", \n \"_from\" : \"vertices/v2\", \n \"_to\" : \"vertices/v4\" \n }, \n { \n \"$label\" : null, \n \"optional1\" : \"val1\", \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"1173295721\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v2\" \n }, \n { \n \"$label\" : null, \n \"optional1\" : \"val1\", \n \"_id\" : \"edges/edge4\", \n \"_rev\" : \"1174868585\", \n \"_key\" : \"edge4\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v5\" \n } \n ], \n \"hasMore\" : false, \n \"extra\" : { \n \"stats\" : { \n \"writesExecuted\" : 0, \n \"writesIgnored\" : 0, \n \"scannedFull\" : 4, \n \"scannedIndex\" : 0 \n }, \n \"warnings\" : [ ] \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"nickname": "getEdges"
}
],
@ -943,7 +943,7 @@
"notes": "<br><br> Returns a cursor. <br><br> The call expects a JSON hash array as body to filter the result: <br><br> <ul class=\"swagger-list\"><li><em>batchSize</em>: the batch size of the returned cursor <li><em>limit</em>: limit the result size <li><em>count</em>: return the total number of results (default \"false\") <li><em>filter</em>: a optional filter </ul> The attributes of filter <ul class=\"swagger-list\"><li><em>direction</em>: Filter for inbound (value \"in\") or outbound (value \"out\") neighbors. Default value is \"any\". <li><em>labels</em>: filter by an array of edge labels <li><em>properties</em>: filter neighbors by an array of properties </ul> The attributes of a property filter <ul class=\"swagger-list\"><li><em>key</em>: filter the result vertices by a key value pair <li><em>value</em>: the value of the <em>key</em> <li><em>compare</em>: a compare operator",
"summary": "get edges",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\">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 \"_key\" : \"edge1\", \n \"_rev\" : \"1139257697\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge3\", \n \"_key\" : \"edge3\", \n \"_rev\" : \"1140306273\", \n \"_from\" : \"vertices/v2\", \n \"_to\" : \"vertices/v4\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"extra\" : { \n \"stats\" : { \n \"writesExecuted\" : 0, \n \"writesIgnored\" : 0, \n \"scannedFull\" : 0, \n \"scannedIndex\" : 0 \n }, \n \"warnings\" : [ ] \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">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 \"_key\" : \"edge1\", \n \"_rev\" : \"1179193961\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge3\", \n \"_key\" : \"edge3\", \n \"_rev\" : \"1180242537\", \n \"_from\" : \"vertices/v2\", \n \"_to\" : \"vertices/v4\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"extra\" : { \n \"stats\" : { \n \"writesExecuted\" : 0, \n \"writesIgnored\" : 0, \n \"scannedFull\" : 0, \n \"scannedIndex\" : 0 \n }, \n \"warnings\" : [ ] \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"nickname": "getEdges"
}
],

View File

@ -96,7 +96,7 @@
"notes": "<br><br> Creates a cap constraint for the collection <em>collection-name</em>, if it does not already exist. Expects an object containing the index details. <br><br> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"cap\"</em>. <li><em>size</em>: The maximal number of documents for the collection. If specified, the value must be greater than zero. <li><em>byteSize</em>: The maximal size of the active document data in the collection (in bytes). If specified, the value must be at least 16384. </ul> <em>Note</em>: 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 <em>fields</em> attribute nor uniqueness of any kind via the <em>unique</em> attribute. <br><br> It is allowed to specify either <em>size</em> or <em>byteSize</em>, or both at the same time. If both are specified, then the automatic document removal will be triggered by the first non-met constraint. <br><br>",
"summary": " Create cap constraint",
"httpMethod": "POST",
"examples": "<br><br> Creating a cap constraint <br><br><br><br><pre><code class=\"json\">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/1142403425\", \n \"type\" : \"cap\", \n \"unique\" : false, \n \"size\" : 10, \n \"byteSize\" : 0, \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"examples": "<br><br> Creating a cap constraint <br><br><br><br><pre><code class=\"json\">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/1182339689\", \n \"type\" : \"cap\", \n \"unique\" : false, \n \"size\" : 10, \n \"byteSize\" : 0, \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"nickname": "CreateCapConstraint"
}
],
@ -138,7 +138,7 @@
"notes": "<br><br> Creates a geo-spatial index in the collection <em>collection-name</em>, if it does not already exist. Expects an object containing the index details. <br><br> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"geo\"</em>. <li><em>fields</em>: A list with one or two attribute paths. If it is a list with one attribute path <em>location</em>, then a geo-spatial index on all documents is created using <em>location</em> 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 <em>latitude</em> and <em>longitude</em>, then a geo-spatial index on all documents is created using <em>latitude</em> and <em>longitude</em> as paths the latitude and the longitude. The value of the attribute <em>latitude</em> and of the attribute <em>longitude</em> must a double. All documents, which do not have the attribute paths or which values are not suitable, are ignored. <li><em>geoJson</em>: If a geo-spatial index on a <em>location</em> is constructed and <em>geoJson</em> is <em>true</em>, 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 <li><em>constraint</em>: If <em>constraint</em> is <em>true</em>, then a geo-spatial constraint is created. The constraint is a non-unique variant of the index. <em>Note</em>: It is also possible to set the <em>unique</em> attribute instead of the <em>constraint</em> attribute. <li><em>ignoreNull</em>: If a geo-spatial constraint is created and <em>ignoreNull</em> is true, then documents with a null in <em>location</em> or at least one null in <em>latitude</em> or <em>longitude</em> are ignored. </ul> <em>Note</em>: Unique indexes on non-shard keys are not supported in a cluster. <br><br>",
"summary": " Create geo-spatial index",
"httpMethod": "POST",
"examples": "<br><br> Creating a geo index with a location attribute: <br><br><br><br><pre><code class=\"json\">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/1142927713\", \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</code></pre><br><br><br> Creating a geo index with latitude and longitude attributes: <br><br><br><br><pre><code class=\"json\">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/1143452001\", \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</code></pre><br><br><br>",
"examples": "<br><br> Creating a geo index with a location attribute: <br><br><br><br><pre><code class=\"json\">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/1182863977\", \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</code></pre><br><br><br> Creating a geo index with latitude and longitude attributes: <br><br><br><br><pre><code class=\"json\">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/1183584873\", \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</code></pre><br><br><br>",
"nickname": "CreateGeo-spatialIndex"
}
],
@ -184,7 +184,7 @@
"notes": "<br><br> Creates a hash index for the collection <em>collection-name</em>, if it does not already exist. The call expects an object containing the index details. <br><br> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"hash\"</em>. <li><em>fields</em>: A list of attribute paths. <li><em>unique</em>: If <em>true</em>, then create a unique index. </ul> <em>Note</em>: unique indexes on non-shard keys are not supported in a cluster. <br><br>",
"summary": " Create hash index",
"httpMethod": "POST",
"examples": "<br><br> Creating an unique constraint: <br><br><br><br><pre><code class=\"json\">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/1143976289\", \n \"type\" : \"hash\", \n \"unique\" : true, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Creating a hash index: <br><br><br><br><pre><code class=\"json\">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/1144500577\", \n \"type\" : \"hash\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"examples": "<br><br> Creating an unique constraint: <br><br><br><br><pre><code class=\"json\">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/1184109161\", \n \"type\" : \"hash\", \n \"unique\" : true, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Creating a hash index: <br><br><br><br><pre><code class=\"json\">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/1184633449\", \n \"type\" : \"hash\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"nickname": "CreateHashIndex"
}
],
@ -230,7 +230,7 @@
"notes": "<br><br> Creates a skip-list index for the collection <em>collection-name</em>, if it does not already exist. The call expects an object containing the index details. <br><br> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"skiplist\"</em>. <li><em>fields</em>: A list of attribute paths. <li><em>unique</em>: If <em>true</em>, then create a unique index. </ul> <em>Note</em>: unique indexes on non-shard keys are not supported in a cluster. <br><br>",
"summary": " Create skip list",
"httpMethod": "POST",
"examples": "<br><br> Creating a skiplist: <br><br><br><br><pre><code class=\"json\">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/1145024865\", \n \"type\" : \"skiplist\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"examples": "<br><br> Creating a skiplist: <br><br><br><br><pre><code class=\"json\">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/1185157737\", \n \"type\" : \"skiplist\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"nickname": "CreateSkipList"
}
],
@ -272,7 +272,7 @@
"notes": "<br><br> Creates a fulltext index for the collection <em>collection-name</em>, if it does not already exist. The call expects an object containing the index details. <br><br> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"fulltext\"</em>. <li><em>fields</em>: A list of attribute names. Currently, the list is limited to exactly one attribute, so the value of <em>fields</em> should look like this for example: <em>[ \"text\" ]</em>. <li><em>minLength</em>: 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": " Create fulltext index",
"httpMethod": "POST",
"examples": "<br><br> Creating a fulltext index: <br><br><br><br><pre><code class=\"json\">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/1145483617\", \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</code></pre><br><br><br>",
"examples": "<br><br> Creating a fulltext index: <br><br><br><br><pre><code class=\"json\">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/1185616489\", \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</code></pre><br><br><br>",
"nickname": "CreateFulltextIndex"
}
],
@ -349,7 +349,7 @@
"notes": "<br><br> Deletes an index with <em>index-handle</em>. <br><br>",
"summary": " Delete index",
"httpMethod": "DELETE",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/index/products/1146007905\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1146007905\", \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/index/products/1186140777\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1186140777\", \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "DeleteIndex"
}
],

File diff suppressed because one or more lines are too long

View File

@ -102,7 +102,7 @@
"notes": "<br><br> Returns all documents of a collections. The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>skip</em>: The number of documents to skip in the query (optional). <li><em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is applied before the <em>limit</em> restriction. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": " Return all",
"httpMethod": "PUT",
"examples": "<br><br> Limit the amount of documents using <em>limit</em> <br><br><br><br><pre><code class=\"json\">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/1148170593\", \n \"_key\" : \"1148170593\", \n \"_rev\" : \"1148170593\", \n \"Hello5\" : \"World5\" \n }, \n { \n \"_id\" : \"products/1147187553\", \n \"_key\" : \"1147187553\", \n \"_rev\" : \"1147187553\", \n \"Hello2\" : \"World2\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Using a <em>batchSize</em> value <br><br><br><br><pre><code class=\"json\">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/1148825953\", \n \"_key\" : \"1148825953\", \n \"_rev\" : \"1148825953\", \n \"Hello1\" : \"World1\" \n }, \n { \n \"_id\" : \"products/1150136673\", \n \"_key\" : \"1150136673\", \n \"_rev\" : \"1150136673\", \n \"Hello5\" : \"World5\" \n }, \n { \n \"_id\" : \"products/1149153633\", \n \"_key\" : \"1149153633\", \n \"_rev\" : \"1149153633\", \n \"Hello2\" : \"World2\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"1150333281\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"examples": "<br><br> Limit the amount of documents using <em>limit</em> <br><br><br><br><pre><code class=\"json\">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/1188106857\", \n \"_key\" : \"1188106857\", \n \"_rev\" : \"1188106857\", \n \"Hello5\" : \"World5\" \n }, \n { \n \"_id\" : \"products/1187123817\", \n \"_key\" : \"1187123817\", \n \"_rev\" : \"1187123817\", \n \"Hello2\" : \"World2\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Using a <em>batchSize</em> value <br><br><br><br><pre><code class=\"json\">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/1189745257\", \n \"_key\" : \"1189745257\", \n \"_rev\" : \"1189745257\", \n \"Hello4\" : \"World4\" \n }, \n { \n \"_id\" : \"products/1190072937\", \n \"_key\" : \"1190072937\", \n \"_rev\" : \"1190072937\", \n \"Hello5\" : \"World5\" \n }, \n { \n \"_id\" : \"products/1188762217\", \n \"_key\" : \"1188762217\", \n \"_rev\" : \"1188762217\", \n \"Hello1\" : \"World1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"1190269545\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"nickname": "ReturnAll"
}
],
@ -137,7 +137,7 @@
"notes": "<br><br> Returns a random document from a collection. The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The identifier or name of the collection to query. </ul> Returns a JSON object with the document stored in the attribute <em>document</em> if the collection contains at least one document. If the collection is empty, the <em>document</em> attrbute contains null. <br><br>",
"summary": " Random document",
"httpMethod": "PUT",
"examples": "<br><br><br><br><pre><code class=\"json\">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/1151775073\", \n \"_key\" : \"1151775073\", \n \"_rev\" : \"1151775073\", \n \"Hello4\" : \"World4\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"examples": "<br><br><br><br><pre><code class=\"json\">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/1192039017\", \n \"_key\" : \"1192039017\", \n \"_rev\" : \"1192039017\", \n \"Hello5\" : \"World5\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "RandomDocument"
}
],
@ -172,7 +172,7 @@
"notes": "<br><br> 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. <br><br> In order to use the <em>near</em> 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 <em>geo</em> field to select a particular index. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>latitude</em>: The latitude of the coordinate. <li><em>longitude</em>: The longitude of the coordinate. <li><em>distance</em>: If given, the attribute key used to return the distance to the given coordinate. (optional). If specified, distances are returned in meters. <li><em>skip</em>: The number of documents to skip in the query. (optional) <li><em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is applied before the <em>limit</em> restriction. The default is 100. (optional) <li><em>geo</em>: If given, the identifier of the geo-index to use. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": " Near query",
"httpMethod": "PUT",
"examples": "<br><br> Without distance: <br><br><br><br><pre><code class=\"json\">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/1154199905\", \n \"_key\" : \"1154199905\", \n \"_rev\" : \"1154199905\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/1153806689\", \n \"_key\" : \"1153806689\", \n \"_rev\" : \"1153806689\", \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</code></pre><br><br><br> With distance: <br><br><br><br><pre><code class=\"json\">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/1156821345\", \n \"_key\" : \"1156821345\", \n \"_rev\" : \"1156821345\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/1157214561\", \n \"_key\" : \"1157214561\", \n \"_rev\" : \"1157214561\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/1156624737\", \n \"_key\" : \"1156624737\", \n \"_rev\" : \"1156624737\", \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</code></pre><br><br><br>",
"examples": "<br><br> Without distance: <br><br><br><br><pre><code class=\"json\">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/1194332777\", \n \"_key\" : \"1194332777\", \n \"_rev\" : \"1194332777\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/1193939561\", \n \"_key\" : \"1193939561\", \n \"_rev\" : \"1193939561\", \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</code></pre><br><br><br> With distance: <br><br><br><br><pre><code class=\"json\">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/1196954217\", \n \"_key\" : \"1196954217\", \n \"_rev\" : \"1196954217\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/1197347433\", \n \"_key\" : \"1197347433\", \n \"_rev\" : \"1197347433\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/1196757609\", \n \"_key\" : \"1196757609\", \n \"_rev\" : \"1196757609\", \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</code></pre><br><br><br>",
"nickname": "NearQuery"
}
],
@ -207,7 +207,7 @@
"notes": "<br><br> This will find all documents within a given radius around the coordinate (<em>latitude</em>, <em>longitude</em>). The returned list is sorted by distance. <br><br> In order to use the <em>within</em> 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 <em>geo</em> field to select a particular index. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>latitude</em>: The latitude of the coordinate. <li><em>longitude</em>: The longitude of the coordinate. <li><em>radius</em>: The maximal radius (in meters). <li><em>distance</em>: If given, the attribute key used to return the distance to the given coordinate. (optional). If specified, distances are returned in meters. <li><em>skip</em>: The number of documents to skip in the query. (optional) <li><em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is applied before the <em>limit</em> restriction. The default is 100. (optional) <li><em>geo</em>: If given, the identifier of the geo-index to use. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": " Within query",
"httpMethod": "PUT",
"examples": "<br><br> Without distance: <br><br><br><br><pre><code class=\"json\">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/1160229217\", \n \"_key\" : \"1160229217\", \n \"_rev\" : \"1160229217\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/1159836001\", \n \"_key\" : \"1159836001\", \n \"_rev\" : \"1159836001\", \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</code></pre><br><br><br> With distance: <br><br><br><br><pre><code class=\"json\">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/1162850657\", \n \"_key\" : \"1162850657\", \n \"_rev\" : \"1162850657\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/1163243873\", \n \"_key\" : \"1163243873\", \n \"_rev\" : \"1163243873\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/1162654049\", \n \"_key\" : \"1162654049\", \n \"_rev\" : \"1162654049\", \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</code></pre><br><br><br>",
"examples": "<br><br> Without distance: <br><br><br><br><pre><code class=\"json\">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/1200362089\", \n \"_key\" : \"1200362089\", \n \"_rev\" : \"1200362089\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/1199968873\", \n \"_key\" : \"1199968873\", \n \"_rev\" : \"1199968873\", \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</code></pre><br><br><br> With distance: <br><br><br><br><pre><code class=\"json\">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/1202983529\", \n \"_key\" : \"1202983529\", \n \"_rev\" : \"1202983529\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/1203376745\", \n \"_key\" : \"1203376745\", \n \"_rev\" : \"1203376745\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/1202786921\", \n \"_key\" : \"1202786921\", \n \"_rev\" : \"1202786921\", \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</code></pre><br><br><br>",
"nickname": "WithinQuery"
}
],
@ -242,7 +242,7 @@
"notes": "<br><br> This will find all documents from the collection that match the fulltext query specified in <em>query</em>. <br><br> In order to use the <em>fulltext</em> operator, a fulltext index must be defined for the collection and the specified attribute. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>attribute</em>: The attribute that contains the texts. <li><em>query</em>: The fulltext query. <li><em>skip</em>: The number of documents to skip in the query (optional). <li><em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is applied before the <em>limit</em> restriction. (optional) <li><em>index</em>: The identifier of the fulltext-index to use. </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": " Fulltext index query",
"httpMethod": "PUT",
"examples": "<br><br><br><br><pre><code class=\"json\">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/1164751201\", \n \"_key\" : \"1164751201\", \n \"_rev\" : \"1164751201\", \n \"text\" : \"this text contains word\" \n }, \n { \n \"_id\" : \"products/1164947809\", \n \"_key\" : \"1164947809\", \n \"_rev\" : \"1164947809\", \n \"text\" : \"this text also has a word\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"examples": "<br><br><br><br><pre><code class=\"json\">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/1204884073\", \n \"_key\" : \"1204884073\", \n \"_rev\" : \"1204884073\", \n \"text\" : \"this text contains word\" \n }, \n { \n \"_id\" : \"products/1205080681\", \n \"_key\" : \"1205080681\", \n \"_rev\" : \"1205080681\", \n \"text\" : \"this text also has a word\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"nickname": "FulltextIndexQuery"
}
],
@ -277,7 +277,7 @@
"notes": "<br><br> This will find all documents matching a given example. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>example</em>: The example document. <li><em>skip</em>: The number of documents to skip in the query (optional). <li><em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is applied before the <em>limit</em> restriction. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": " Simple query by-example",
"httpMethod": "PUT",
"examples": "<br><br> Matching an attribute: <br><br><br><br><pre><code class=\"json\">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/1167110497\", \n \"_key\" : \"1167110497\", \n \"_rev\" : \"1167110497\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 2, \n \"j\" : 2 \n } \n }, \n { \n \"_id\" : \"products/1166913889\", \n \"_key\" : \"1166913889\", \n \"_rev\" : \"1166913889\", \n \"i\" : 1 \n }, \n { \n \"_id\" : \"products/1166651745\", \n \"_key\" : \"1166651745\", \n \"_rev\" : \"1166651745\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/1166324065\", \n \"_key\" : \"1166324065\", \n \"_rev\" : \"1166324065\", \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</code></pre><br><br><br> Matching an attribute which is a sub-document: <br><br><br><br><pre><code class=\"json\">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/1168290145\", \n \"_key\" : \"1168290145\", \n \"_rev\" : \"1168290145\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/1168617825\", \n \"_key\" : \"1168617825\", \n \"_rev\" : \"1168617825\", \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</code></pre><br><br><br> Matching an attribute within a sub-document: <br><br><br><br><pre><code class=\"json\">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/1170583905\", \n \"_key\" : \"1170583905\", \n \"_rev\" : \"1170583905\", \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</code></pre><br><br><br>",
"examples": "<br><br> Matching an attribute: <br><br><br><br><pre><code class=\"json\">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/1206653545\", \n \"_key\" : \"1206653545\", \n \"_rev\" : \"1206653545\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/1206981225\", \n \"_key\" : \"1206981225\", \n \"_rev\" : \"1206981225\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/1207243369\", \n \"_key\" : \"1207243369\", \n \"_rev\" : \"1207243369\", \n \"i\" : 1 \n }, \n { \n \"_id\" : \"products/1207439977\", \n \"_key\" : \"1207439977\", \n \"_rev\" : \"1207439977\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 2, \n \"j\" : 2 \n } \n } \n ], \n \"hasMore\" : false, \n \"count\" : 4, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Matching an attribute which is a sub-document: <br><br><br><br><pre><code class=\"json\">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/1208619625\", \n \"_key\" : \"1208619625\", \n \"_rev\" : \"1208619625\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/1208947305\", \n \"_key\" : \"1208947305\", \n \"_rev\" : \"1208947305\", \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</code></pre><br><br><br> Matching an attribute within a sub-document: <br><br><br><br><pre><code class=\"json\">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/1210913385\", \n \"_key\" : \"1210913385\", \n \"_rev\" : \"1210913385\", \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</code></pre><br><br><br>",
"nickname": "SimpleQueryBy-example"
}
],
@ -312,7 +312,7 @@
"notes": "<br><br> This will return the first document matching a given example. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>example</em>: The example document. </ul> Returns a result containing the document or <em>HTTP 404</em> if no document matched the example. <br><br> 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. <br><br>",
"summary": " Document matching an example",
"httpMethod": "PUT",
"examples": "<br><br> If a matching document was found: <br><br><br><br><pre><code class=\"json\">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/1172549985\", \n \"_key\" : \"1172549985\", \n \"_rev\" : \"1172549985\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> If no document was found: <br><br><br><br><pre><code class=\"json\">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</code></pre><br><br><br>",
"examples": "<br><br> If a matching document was found: <br><br><br><br><pre><code class=\"json\">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/1213141609\", \n \"_key\" : \"1213141609\", \n \"_rev\" : \"1213141609\", \n \"i\" : 1 \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> If no document was found: <br><br><br><br><pre><code class=\"json\">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</code></pre><br><br><br>",
"nickname": "DocumentMatchingAnExample"
}
],
@ -347,7 +347,7 @@
"notes": "<br><br> This will return the first document(s) from the collection, in the order of insertion/update time. When the <em>count</em> argument is supplied, the result will be a list of documents, with the \"oldest\" document being first in the result list. If the <em>count</em> argument is not supplied, the result is the \"oldest\" document of the collection, or <em>null</em> if the collection is empty. <br><br> The request body must be a JSON object with the following attributes: <ul class=\"swagger-list\"><li><em>collection</em>: the name of the collection <li><em>count</em>: the number of documents to return at most. Specifiying count is optional. If it is not specified, it defaults to 1. </ul> Note: this method is not supported for sharded collections with more than one shard. <br><br>",
"summary": " First document of a collection",
"httpMethod": "PUT",
"examples": "<br><br> Retrieving the first n documents: <br><br><br><br><pre><code class=\"json\">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/1176678753\", \n \"_key\" : \"1176678753\", \n \"_rev\" : \"1176678753\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/1177006433\", \n \"_key\" : \"1177006433\", \n \"_rev\" : \"1177006433\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Retrieving the first document: <br><br><br><br><pre><code class=\"json\">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/1178317153\", \n \"_key\" : \"1178317153\", \n \"_rev\" : \"1178317153\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"examples": "<br><br> Retrieving the first n documents: <br><br><br><br><pre><code class=\"json\">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/1216352873\", \n \"_key\" : \"1216352873\", \n \"_rev\" : \"1216352873\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/1216680553\", \n \"_key\" : \"1216680553\", \n \"_rev\" : \"1216680553\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Retrieving the first document: <br><br><br><br><pre><code class=\"json\">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/1217991273\", \n \"_key\" : \"1217991273\", \n \"_rev\" : \"1217991273\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "FirstDocumentOfACollection"
}
],
@ -382,7 +382,7 @@
"notes": "<br><br> This will return the last documents from the collection, in the order of insertion/update time. When the <em>count</em> argument is supplied, the result will be a list of documents, with the \"latest\" document being first in the result list. <br><br> The request body must be a JSON object with the following attributes: <ul class=\"swagger-list\"><li><em>collection</em>: the name of the collection <li><em>count</em>: the number of documents to return at most. Specifiying count is optional. If it is not specified, it defaults to 1. </ul> If the <em>count</em> argument is not supplied, the result is the \"latest\" document of the collection, or <em>null</em> if the collection is empty. <br><br> Note: this method is not supported for sharded collections with more than one shard. <br><br>",
"summary": " Last document of a collection",
"httpMethod": "PUT",
"examples": "<br><br> Retrieving the last n documents: <br><br><br><br><pre><code class=\"json\">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/1180741985\", \n \"_key\" : \"1180741985\", \n \"_rev\" : \"1180741985\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 2, \n \"j\" : 2 \n } \n }, \n { \n \"_id\" : \"products/1180545377\", \n \"_key\" : \"1180545377\", \n \"_rev\" : \"1180545377\", \n \"i\" : 1 \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Retrieving the first document: <br><br><br><br><pre><code class=\"json\">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/1182380385\", \n \"_key\" : \"1182380385\", \n \"_rev\" : \"1182380385\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 2, \n \"j\" : 2 \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"examples": "<br><br> Retrieving the last n documents: <br><br><br><br><pre><code class=\"json\">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/1220612713\", \n \"_key\" : \"1220612713\", \n \"_rev\" : \"1220612713\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 2, \n \"j\" : 2 \n } \n }, \n { \n \"_id\" : \"products/1220416105\", \n \"_key\" : \"1220416105\", \n \"_rev\" : \"1220416105\", \n \"i\" : 1 \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Retrieving the first document: <br><br><br><br><pre><code class=\"json\">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/1222251113\", \n \"_key\" : \"1222251113\", \n \"_rev\" : \"1222251113\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 2, \n \"j\" : 2 \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "LastDocumentOfACollection"
}
],
@ -417,7 +417,7 @@
"notes": "<br><br> 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. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>attribute</em>: The attribute path to check. <li><em>left</em>: The lower bound. <li><em>right</em>: The upper bound. <li><em>closed</em>: If <em>true</em>, use interval including <em>left</em> and <em>right</em>, otherwise exclude <em>right</em>, but include <em>left</em>. <li><em>skip</em>: The number of documents to skip in the query (optional). <li><em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is applied before the <em>limit</em> restriction. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": " Simple range query",
"httpMethod": "PUT",
"examples": "<br><br><br><br><pre><code class=\"json\">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/1183363425\", \n \"_key\" : \"1183363425\", \n \"_rev\" : \"1183363425\", \n \"i\" : 2 \n }, \n { \n \"_id\" : \"products/1183560033\", \n \"_key\" : \"1183560033\", \n \"_rev\" : \"1183560033\", \n \"i\" : 3 \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"examples": "<br><br><br><br><pre><code class=\"json\">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/1223234153\", \n \"_key\" : \"1223234153\", \n \"_rev\" : \"1223234153\", \n \"i\" : 2 \n }, \n { \n \"_id\" : \"products/1223430761\", \n \"_key\" : \"1223430761\", \n \"_rev\" : \"1223430761\", \n \"i\" : 3 \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"nickname": "SimpleRangeQuery"
}
],

View File

@ -214,7 +214,7 @@
"notes": "<br><br> Returns the statistics information. The returned object contains the statistics figures grouped together according to the description returned by <em>_admin/statistics-description</em>. For instance, to access a figure <em>userTime</em> from the group <em>system</em>, you first select the sub-object describing the group stored in <em>system</em> and in that sub-object the value for <em>userTime</em> is stored in the attribute of the same name. <br><br> In case of a distribution, the returned object contains the total count in <em>count</em> and the distribution list in <em>counts</em>. The sum (or total) of the individual values is returned in <em>sum</em>. <br><br>",
"summary": " Read the statistics",
"httpMethod": "GET",
"examples": "<br><br><br><br><pre><code class=\"json\">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\" : 1414871031.655745, \n \"system\" : { \n \"minorPageFaults\" : 150444, \n \"majorPageFaults\" : 2261, \n \"userTime\" : 8.434905, \n \"systemTime\" : 4.547633, \n \"numberOfThreads\" : 19, \n \"residentSize\" : 145629184, \n \"residentSizePercent\" : 0.03390693664550781, \n \"virtualSize\" : 5244018688 \n }, \n \"client\" : { \n \"httpConnections\" : 1, \n \"connectionTime\" : { \n \"sum\" : 0.0017719268798828125, \n \"count\" : 1, \n \"counts\" : [ \n 1, \n 0, \n 0, \n 0 \n ] \n }, \n \"totalTime\" : { \n \"sum\" : 29.710599422454834, \n \"count\" : 8784, \n \"counts\" : [ \n 8252, \n 457, \n 24, \n 38, \n 7, \n 4, \n 2 \n ] \n }, \n \"requestTime\" : { \n \"sum\" : 28.54664707183838, \n \"count\" : 8784, \n \"counts\" : [ \n 8263, \n 447, \n 24, \n 37, \n 7, \n 4, \n 2 \n ] \n }, \n \"queueTime\" : { \n \"sum\" : 0.1787550449371338, \n \"count\" : 8784, \n \"counts\" : [ \n 8784, \n 0, \n 0, \n 0, \n 0, \n 0, \n 0 \n ] \n }, \n \"ioTime\" : { \n \"sum\" : 0.9851973056793213, \n \"count\" : 8784, \n \"counts\" : [ \n 8783, \n 0, \n 0, \n 1, \n 0, \n 0, \n 0 \n ] \n }, \n \"bytesSent\" : { \n \"sum\" : 3278088, \n \"count\" : 8784, \n \"counts\" : [ \n 2647, \n 5996, \n 11, \n 8, \n 122, \n 0 \n ] \n }, \n \"bytesReceived\" : { \n \"sum\" : 1876985, \n \"count\" : 8784, \n \"counts\" : [ \n 7013, \n 1771, \n 0, \n 0, \n 0, \n 0 \n ] \n } \n }, \n \"http\" : { \n \"requestsTotal\" : 8785, \n \"requestsAsync\" : 0, \n \"requestsGet\" : 3650, \n \"requestsHead\" : 295, \n \"requestsPost\" : 3165, \n \"requestsPut\" : 685, \n \"requestsPatch\" : 31, \n \"requestsDelete\" : 959, \n \"requestsOptions\" : 0, \n \"requestsOther\" : 0 \n }, \n \"server\" : { \n \"uptime\" : 38.609286069869995, \n \"physicalMemory\" : 4294967296 \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"examples": "<br><br><br><br><pre><code class=\"json\">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\" : 1414879508.508087, \n \"system\" : { \n \"minorPageFaults\" : 187838, \n \"majorPageFaults\" : 2198, \n \"userTime\" : 28.971085, \n \"systemTime\" : 12.25073, \n \"numberOfThreads\" : 19, \n \"residentSize\" : 114233344, \n \"residentSizePercent\" : 0.026597023010253906, \n \"virtualSize\" : 5236682752 \n }, \n \"client\" : { \n \"httpConnections\" : 1, \n \"connectionTime\" : { \n \"sum\" : 0.015321969985961914, \n \"count\" : 1, \n \"counts\" : [ \n 1, \n 0, \n 0, \n 0 \n ] \n }, \n \"totalTime\" : { \n \"sum\" : 85.29192566871643, \n \"count\" : 8784, \n \"counts\" : [ \n 7702, \n 829, \n 159, \n 61, \n 17, \n 7, \n 9 \n ] \n }, \n \"requestTime\" : { \n \"sum\" : 82.07186269760132, \n \"count\" : 8784, \n \"counts\" : [ \n 7734, \n 801, \n 156, \n 61, \n 16, \n 7, \n 9 \n ] \n }, \n \"queueTime\" : { \n \"sum\" : 0.43925046920776367, \n \"count\" : 8784, \n \"counts\" : [ \n 8784, \n 0, \n 0, \n 0, \n 0, \n 0, \n 0 \n ] \n }, \n \"ioTime\" : { \n \"sum\" : 2.7808125019073486, \n \"count\" : 8784, \n \"counts\" : [ \n 8782, \n 1, \n 0, \n 0, \n 1, \n 0, \n 0 \n ] \n }, \n \"bytesSent\" : { \n \"sum\" : 3278063, \n \"count\" : 8784, \n \"counts\" : [ \n 2648, \n 5995, \n 11, \n 8, \n 122, \n 0 \n ] \n }, \n \"bytesReceived\" : { \n \"sum\" : 1876985, \n \"count\" : 8784, \n \"counts\" : [ \n 7013, \n 1771, \n 0, \n 0, \n 0, \n 0 \n ] \n } \n }, \n \"http\" : { \n \"requestsTotal\" : 8785, \n \"requestsAsync\" : 0, \n \"requestsGet\" : 3650, \n \"requestsHead\" : 295, \n \"requestsPost\" : 3165, \n \"requestsPut\" : 685, \n \"requestsPatch\" : 31, \n \"requestsDelete\" : 959, \n \"requestsOptions\" : 0, \n \"requestsOther\" : 0 \n }, \n \"server\" : { \n \"uptime\" : 105.91027998924255, \n \"physicalMemory\" : 4294967296 \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "ReadTheStatistics"
}
],

File diff suppressed because one or more lines are too long

View File

@ -24,7 +24,7 @@
"notes": "Returns the server name and version number. The response is a JSON object with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>server</em>: will always contain <em>arango</em> <li><em>version</em>: the server version string. The string has the format \"<em>major</em>.*minor<em>.*sub</em>\". <em>major</em> and <em>minor</em> will be numeric, and <em>sub</em> may contain a number or a textual version. <li><em>details</em>: an optional JSON object with additional details. This is returned only if the <em>details</em> URL parameter is set to <em>true</em> in the request.",
"summary": " Return server version",
"httpMethod": "GET",
"examples": "<br><br> Returns the version information. <br><br><br><br><pre><code class=\"json\">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.3.0-alpha7\" \n}\n</code></pre><br><br><br> Returns the version information with details. <br><br><br><br><pre><code class=\"json\">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.3.0-alpha7\", \n \"details\" : { \n \"architecture\" : \"64bit\", \n \"build-date\" : \"2014-11-01 20:36:30\", \n \"configure\" : \"'./configure' '--enable-all-in-one-v8' '--enable-all-in-one-libev' '--enable-all-in-one-icu' '--enable-maintainer-mode' '--disable-mruby'\", \n \"icu-version\" : \"52.1\", \n \"libev-version\" : \"4.11\", \n \"maintainer-mode\" : \"true\", \n \"openssl-version\" : \"OpenSSL 0.9.8za 5 Jun 2014\", \n \"repository-version\" : \"heads/2.3-0-g6ad8a7570938b2d47bf3c5294834a610a7f4fab9-dirty\", \n \"server-version\" : \"2.3.0-alpha7\", \n \"sizeof int\" : \"4\", \n \"sizeof void*\" : \"8\", \n \"v8-version\" : \"3.16.14\" \n } \n}\n</code></pre><br><br><br>",
"examples": "<br><br> Returns the version information. <br><br><br><br><pre><code class=\"json\">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.3.0-beta1\" \n}\n</code></pre><br><br><br> Returns the version information with details. <br><br><br><br><pre><code class=\"json\">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.3.0-beta1\", \n \"details\" : { \n \"architecture\" : \"64bit\", \n \"build-date\" : \"2014-11-01 22:41:09\", \n \"configure\" : \"'./configure' '--enable-all-in-one-v8' '--enable-all-in-one-libev' '--enable-all-in-one-icu' '--enable-maintainer-mode' '--disable-mruby'\", \n \"icu-version\" : \"52.1\", \n \"libev-version\" : \"4.11\", \n \"maintainer-mode\" : \"true\", \n \"openssl-version\" : \"OpenSSL 0.9.8za 5 Jun 2014\", \n \"repository-version\" : \"heads/2.3-0-gc082e8feba969c650023fbbfbec644f370cf675b-dirty\", \n \"server-version\" : \"2.3.0-beta1\", \n \"sizeof int\" : \"4\", \n \"sizeof void*\" : \"8\", \n \"v8-version\" : \"3.16.14\" \n } \n}\n</code></pre><br><br><br>",
"nickname": "ReturnServerVersion"
}
],