1
0
Fork 0

droidsans.css path error fixed

This commit is contained in:
Thomas Richter 2013-06-12 10:41:50 +02:00
parent c451eb734a
commit 10dea3e18e
16 changed files with 94 additions and 94 deletions

View File

@ -55,7 +55,7 @@
"description": "the body with name and code of the aql user function. "
}
],
"notes": "<br><br>The following data need to be passed in a JSON representation in the body of the POST request: <br><br>- <em>name</em>: the fully qualified name of the user functions.<br><br>- <em>code</em>: a string representation of the function body.<br><br>- <em>isDeterministic</em>: an optional boolean value to indicate that the function<br> results are fully deterministic (function return value solely depends on the input value and return value is the same for repeated calls with same input). The <em>isDeterministic</em> attribute is currently not used but may be used later for optimisations. <br><br>In case of success, the returned JSON object has the following properties: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>false</em><br> in this case) <br><br>- <em>code</em>: the HTTP status code<br><br>The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case)<br><br>- <em>code</em>: the HTTP status code<br><br>- <em>errorNum</em>: the server error number<br><br>- <em>errorMessage</em>: a descriptive error message<br><br>",
"notes": "<br><br>The following data need to be passed in a JSON representation in the body of the POST request: <br><br>- <em>name</em>: the fully qualified name of the user functions.<br><br>- <em>code</em>: a string representation of the function body.<br><br>- <em>isDeterministic</em>: an optional boolean value to indicate that the function results are fully deterministic (function return value solely depends on the input value and return value is the same for repeated calls with same input). The <em>isDeterministic</em> attribute is currently not used but may be used later for optimisations. <br><br>In case of success, the returned JSON object has the following properties: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>false</em> in this case) <br><br>- <em>code</em>: the HTTP status code<br><br>The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case)<br><br>- <em>code</em>: the HTTP status code<br><br>- <em>errorNum</em>: the server error number<br><br>- <em>errorMessage</em>: a descriptive error message<br><br>",
"summary": "creates or replaces an AQL user function",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/aqlfunction\n{ \"name\" : \"myfunctions:temperature:celsiustofahrenheit\", \"code\" : \"function (celsius) { return celsius * 1.8 + 32; }\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
@ -96,7 +96,7 @@
"description": "If set to <em>true</em>, then the function name provided in <em>name</em> is treated as a namespace prefix, and all functions in the specified namespace will be deleted. If set to <em>false</em>, the function name provided in <em>name</em> must be fully qualified, including any namespaces. "
}
],
"notes": "<br><br>Removes an existing AQL user function, identified by <em>name</em>. <br><br>In case of success, the returned JSON object has the following properties: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>false</em><br> in this case) <br><br>- <em>code</em>: the HTTP status code<br><br>The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case)<br><br>- <em>code</em>: the HTTP status code<br><br>- <em>errorNum</em>: the server error number<br><br>- <em>errorMessage</em>: a descriptive error message<br><br>",
"notes": "<br><br>Removes an existing AQL user function, identified by <em>name</em>. <br><br>In case of success, the returned JSON object has the following properties: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>false</em> in this case) <br><br>- <em>code</em>: the HTTP status code<br><br>The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case)<br><br>- <em>code</em>: the HTTP status code<br><br>- <em>errorNum</em>: the server error number<br><br>- <em>errorMessage</em>: a descriptive error message<br><br>",
"summary": "remove an existing AQL user function",
"httpMethod": "DELETE",
"examples": "deletes a function: <br><br><pre><code class=\"json\" >unix> curl -X DELETE --dump - http://localhost:8529/_api/aqlfunction/square:x:y\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>function not found: <br><br><pre><code class=\"json\" >unix> curl -X DELETE --dump - http://localhost:8529/_api/aqlfunction/myfunction:x:y\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 1582, \n \"errorMessage\" : \"user function '%s()' not found\" \n}\n\n</code></pre><br>",

View File

@ -16,10 +16,10 @@
"description": "the body with name, options of a collection. "
}
],
"notes": "Creates an new collection with a given name. The request must contain an object with the following attributes. <br><br>- <em>name</em>: The name of the collection.<br><br>- <em>waitForSync</em> (optional, default: false): If <em>true</em> then<br> the data is synchronised to disk before returning from a create or update of a document. <br><br>- <em>journalSize</em> (optional, default is a @ref<br> CommandLineArangod \"configuration parameter\"): The maximal size of a journal or datafile. Note that this also limits the maximal size of a single object. Must be at least 1MB. <br><br>- <em>isSystem</em> (optional, default is <em>false</em>): If <em>true</em>, create a<br> system collection. In this case <em>collection-name</em> should start with an underscore. End users should normally create non-system collections only. API implementors may be required to create system collections in very special occasions, but normally a regular collection will do. <br><br>- <em>isVolatile</em> (optional, default is <em>false</em>): If <em>true</em> then the<br> collection data is kept in-memory only and not made persistent. Unloading the collection will cause the collection data to be discarded. Stopping or re-starting the server will also cause full loss of data in the collection. Setting this option will make the resulting collection be slightly faster than regular collections because ArangoDB does not enforce any synchronisation to disk and does not calculate any CRC checksums for datafiles (as there are no datafiles). <br><br> This option should threrefore be used for cache-type collections only, and not for data that cannot be re-created otherwise. <br><br>- <em>keyOptions</em> (optional) additional options for key generation. If<br> specified, then <em>keyOptions</em> should be a JSON array containing the following attributes (note: some of them are optional): - <em>type</em>: specifies the type of the key generator. The currently available generators are <em>traditional</em> and <em>autoincrement</em>. - <em>allowUserKeys</em>: if set to <em>true</em>, then it is allowed to supply own key values in the <em>_key</em> attribute of a document. If set to <em>false</em>, then the key generator will solely be responsible for generating keys and supplying own key values in the <em>_key</em> attribute of documents is considered an error. - <em>increment</em>: increment value for <em>autoincrement</em> key generator. Not used for other key generator types. - <em>offset</em>: initial offset value for <em>autoincrement</em> key generator. Not used for other key generator types. <br><br>- <em>type</em> (optional, default is <em>2</em>): the type of the collection to<br> create. The following values for <em>type</em> are valid: - <em>2</em>: document collection - <em>3</em>: edges collection <br><br>",
"notes": "Creates an new collection with a given name. The request must contain an object with the following attributes. <br><br>- <em>name</em>: The name of the collection.<br><br>- <em>waitForSync</em> (optional, default: false): If <em>true</em> then the data is synchronised to disk before returning from a create or update of a document. <br><br>- <em>journalSize</em> (optional, default is a @ref CommandLineArangod \"configuration parameter\"): The maximal size of a journal or datafile. Note that this also limits the maximal size of a single object. Must be at least 1MB. <br><br>- <em>isSystem</em> (optional, default is <em>false</em>): If <em>true</em>, create a system collection. In this case <em>collection-name</em> should start with an underscore. End users should normally create non-system collections only. API implementors may be required to create system collections in very special occasions, but normally a regular collection will do. <br><br>- <em>isVolatile</em> (optional, default is <em>false</em>): If <em>true</em> then the collection data is kept in-memory only and not made persistent. Unloading the collection will cause the collection data to be discarded. Stopping or re-starting the server will also cause full loss of data in the collection. Setting this option will make the resulting collection be slightly faster than regular collections because ArangoDB does not enforce any synchronisation to disk and does not calculate any CRC checksums for datafiles (as there are no datafiles). <br><br> This option should threrefore be used for cache-type collections only, and not for data that cannot be re-created otherwise. <br><br>- <em>keyOptions</em> (optional) additional options for key generation. If specified, then <em>keyOptions</em> should be a JSON array containing the following attributes (note: some of them are optional): - <em>type</em>: specifies the type of the key generator. The currently available generators are <em>traditional</em> and <em>autoincrement</em>. - <em>allowUserKeys</em>: if set to <em>true</em>, then it is allowed to supply own key values in the <em>_key</em> attribute of a document. If set to <em>false</em>, then the key generator will solely be responsible for generating keys and supplying own key values in the <em>_key</em> attribute of documents is considered an error. - <em>increment</em>: increment value for <em>autoincrement</em> key generator. Not used for other key generator types. - <em>offset</em>: initial offset value for <em>autoincrement</em> key generator. Not used for other key generator types. <br><br>- <em>type</em> (optional, default is <em>2</em>): the type of the collection to create. The following values for <em>type</em> are valid: - <em>2</em>: document collection - <em>3</em>: edges collection <br><br>",
"summary": "creates a collection",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/collection\n{ \"name\": \"testCollectionBasics\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_api/collection/testCollectionBasics\n\n{ \n \"id\" : \"78936590\", \n \"name\" : \"testCollectionBasics\", \n \"waitForSync\" : false, \n \"isVolatile\" : false, \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\nunix> curl -X POST --data @- --dump - http://localhost:8529/_api/collection\n{ \"name\": \"testCollectionEdges\", \"type\" : 3 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_api/collection/testCollectionEdges\n\n{ \n \"id\" : \"79723022\", \n \"name\" : \"testCollectionEdges\", \n \"waitForSync\" : false, \n \"isVolatile\" : false, \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 3, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br><br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/collection\n{ \"name\": \"testCollectionUsers\", \"keyOptions\" : { \"type\" : \"autoincrement\", \"increment\" : 5, \"allowUserKeys\" : true }}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_api/collection/testCollectionUsers\n\n{ \n \"id\" : \"47544846\", \n \"name\" : \"testCollectionUsers\", \n \"waitForSync\" : false, \n \"isVolatile\" : false, \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/collection\n{ \"name\": \"testCollectionBasics\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_api/collection/testCollectionBasics\n\n{ \n \"id\" : \"78916828\", \n \"name\" : \"testCollectionBasics\", \n \"waitForSync\" : false, \n \"isVolatile\" : false, \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\nunix> curl -X POST --data @- --dump - http://localhost:8529/_api/collection\n{ \"name\": \"testCollectionEdges\", \"type\" : 3 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_api/collection/testCollectionEdges\n\n{ \n \"id\" : \"79703260\", \n \"name\" : \"testCollectionEdges\", \n \"waitForSync\" : false, \n \"isVolatile\" : false, \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 3, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br><br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/collection\n{ \"name\": \"testCollectionUsers\", \"keyOptions\" : { \"type\" : \"autoincrement\", \"increment\" : 5, \"allowUserKeys\" : true }}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_api/collection/testCollectionUsers\n\n{ \n \"id\" : \"47525084\", \n \"name\" : \"testCollectionUsers\", \n \"waitForSync\" : false, \n \"isVolatile\" : false, \n \"isSystem\" : false, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"nickname": "createsACollection"
}
],
@ -41,7 +41,7 @@
"notes": "Returns an object with an attribute <em>collections</em> containing a list of all collection descriptions. The same information is also available in the <em>names</em> as hash map with the collection names as keys. <br><br>By providing the optional URL parameter <em>excludeSystem</em> with a value of <em>true</em>, all system collections will be excluded from the response. <br><br>",
"summary": "reads all collections",
"httpMethod": "GET",
"examples": "Return information about all collections: <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/collection\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"collections\" : [ \n { \n \"id\" : \"6650382\", \n \"name\" : \"_aal\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"47544846\", \n \"name\" : \"testCollectionUsers\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"8813070\", \n \"name\" : \"_fishbowl\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"23099918\", \n \"name\" : \"animals\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"2718222\", \n \"name\" : \"_modules\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"5601806\", \n \"name\" : \"_structures\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"7830030\", \n \"name\" : \"_aqlfunctions\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"96782\", \n \"name\" : \"_users\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"21264910\", \n \"name\" : \"demo\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"3701262\", \n \"name\" : \"_routing\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"10058254\", \n \"name\" : \"_trx\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"1669646\", \n \"name\" : \"_graphs\", \n \"status\" : 3, \n \"type\" : 2 \n } \n ], \n \"names\" : { \n \"_aal\" : { \n \"id\" : \"6650382\", \n \"name\" : \"_aal\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"testCollectionUsers\" : { \n \"id\" : \"47544846\", \n \"name\" : \"testCollectionUsers\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_fishbowl\" : { \n \"id\" : \"8813070\", \n \"name\" : \"_fishbowl\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"animals\" : { \n \"id\" : \"23099918\", \n \"name\" : \"animals\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_modules\" : { \n \"id\" : \"2718222\", \n \"name\" : \"_modules\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_structures\" : { \n \"id\" : \"5601806\", \n \"name\" : \"_structures\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_aqlfunctions\" : { \n \"id\" : \"7830030\", \n \"name\" : \"_aqlfunctions\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_users\" : { \n \"id\" : \"96782\", \n \"name\" : \"_users\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"demo\" : { \n \"id\" : \"21264910\", \n \"name\" : \"demo\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_routing\" : { \n \"id\" : \"3701262\", \n \"name\" : \"_routing\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_trx\" : { \n \"id\" : \"10058254\", \n \"name\" : \"_trx\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_graphs\" : { \n \"id\" : \"1669646\", \n \"name\" : \"_graphs\", \n \"status\" : 3, \n \"type\" : 2 \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"examples": "Return information about all collections: <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/collection\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"collections\" : [ \n { \n \"id\" : \"2763996\", \n \"name\" : \"_modules\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"7810268\", \n \"name\" : \"_aqlfunctions\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"77020\", \n \"name\" : \"_users\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"21245148\", \n \"name\" : \"demo\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"3681500\", \n \"name\" : \"_routing\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"10038492\", \n \"name\" : \"_trx\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"1649884\", \n \"name\" : \"_graphs\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"6630620\", \n \"name\" : \"_aal\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"47525084\", \n \"name\" : \"testCollectionUsers\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"8793308\", \n \"name\" : \"_fishbowl\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"23080156\", \n \"name\" : \"animals\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n { \n \"id\" : \"5582044\", \n \"name\" : \"_structures\", \n \"status\" : 3, \n \"type\" : 2 \n } \n ], \n \"names\" : { \n \"_modules\" : { \n \"id\" : \"2763996\", \n \"name\" : \"_modules\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_aqlfunctions\" : { \n \"id\" : \"7810268\", \n \"name\" : \"_aqlfunctions\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_users\" : { \n \"id\" : \"77020\", \n \"name\" : \"_users\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"demo\" : { \n \"id\" : \"21245148\", \n \"name\" : \"demo\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_routing\" : { \n \"id\" : \"3681500\", \n \"name\" : \"_routing\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_trx\" : { \n \"id\" : \"10038492\", \n \"name\" : \"_trx\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_graphs\" : { \n \"id\" : \"1649884\", \n \"name\" : \"_graphs\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_aal\" : { \n \"id\" : \"6630620\", \n \"name\" : \"_aal\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"testCollectionUsers\" : { \n \"id\" : \"47525084\", \n \"name\" : \"testCollectionUsers\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_fishbowl\" : { \n \"id\" : \"8793308\", \n \"name\" : \"_fishbowl\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"animals\" : { \n \"id\" : \"23080156\", \n \"name\" : \"animals\", \n \"status\" : 3, \n \"type\" : 2 \n }, \n \"_structures\" : { \n \"id\" : \"5582044\", \n \"name\" : \"_structures\", \n \"status\" : 3, \n \"type\" : 2 \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"nickname": "readsAllCollections"
}
],
@ -65,7 +65,7 @@
"description": ""
}
],
"notes": "The result is an object describing the collection with the following attributes: <br><br>- <em>id</em>: The identifier of the collection.<br><br>- <em>name</em>: The name of the collection.<br><br>- <em>status</em>: The status of the collection as number.<br> - 1: new born collection - 2: unloaded - 3: loaded - 4: in the process of being unloaded - 5: deleted <br><br>Every other status indicates a corrupted collection. <br><br>- <em>type</em>: The type of the collection as number.<br> - 2: document collection (normal case) - 3: edges collection <br><br>",
"notes": "The result is an object describing the collection with the following attributes: <br><br>- <em>id</em>: The identifier of the collection.<br><br>- <em>name</em>: The name of the collection.<br><br>- <em>status</em>: The status of the collection as number. - 1: new born collection - 2: unloaded - 3: loaded - 4: in the process of being unloaded - 5: deleted <br><br>Every other status indicates a corrupted collection. <br><br>- <em>type</em>: The type of the collection as number. - 2: document collection (normal case) - 3: edges collection <br><br>",
"summary": "reads a collection",
"httpMethod": "GET",
"examples": "",
@ -96,10 +96,10 @@
"description": ""
}
],
"notes": "In addition to the above, the result will always contain the <em>waitForSync</em>, <em>journalSize</em>, and <em>isVolatile</em> properties. This is achieved by forcing a load of the underlying collection. <br><br>- <em>waitForSync</em>: If <em>true</em> then creating or changing a<br> document will wait until the data has been synchronised to disk. <br><br>- <em>journalSize</em>: The maximal size of a journal / datafile.<br><br>- <em>isVolatile</em>: If <em>true</em> then the collection data will be<br> kept in memory only and ArangoDB will not write or sync the data to disk. <br><br>",
"notes": "In addition to the above, the result will always contain the <em>waitForSync</em>, <em>journalSize</em>, and <em>isVolatile</em> properties. This is achieved by forcing a load of the underlying collection. <br><br>- <em>waitForSync</em>: If <em>true</em> then creating or changing a document will wait until the data has been synchronised to disk. <br><br>- <em>journalSize</em>: The maximal size of a journal / datafile.<br><br>- <em>isVolatile</em>: If <em>true</em> then the collection data will be kept in memory only and ArangoDB will not write or sync the data to disk. <br><br>",
"summary": "reads a collection with properties",
"httpMethod": "GET",
"examples": "Using an identifier: <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/collection/208370190/properties\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_api/collection/products/properties\n\n{ \n \"id\" : \"208370190\", \n \"name\" : \"products\", \n \"isVolatile\" : false, \n \"isSystem\" : false, \n \"journalSize\" : 1048576, \n \"keyOptions\" : { \n \"type\" : \"traditional\", \n \"allowUserKeys\" : true \n }, \n \"waitForSync\" : true, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>Using a name: <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/collection/products/properties\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_api/collection/products/properties\n\n{ \n \"id\" : \"171407886\", \n \"name\" : \"products\", \n \"isVolatile\" : false, \n \"isSystem\" : false, \n \"journalSize\" : 1048576, \n \"keyOptions\" : { \n \"type\" : \"traditional\", \n \"allowUserKeys\" : true \n }, \n \"waitForSync\" : true, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"examples": "Using an identifier: <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/collection/208547036/properties\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_api/collection/products/properties\n\n{ \n \"id\" : \"208547036\", \n \"name\" : \"products\", \n \"isVolatile\" : false, \n \"isSystem\" : false, \n \"journalSize\" : 1048576, \n \"keyOptions\" : { \n \"type\" : \"traditional\", \n \"allowUserKeys\" : true \n }, \n \"waitForSync\" : true, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>Using a name: <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/collection/products/properties\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_api/collection/products/properties\n\n{ \n \"id\" : \"171584732\", \n \"name\" : \"products\", \n \"isVolatile\" : false, \n \"isSystem\" : false, \n \"journalSize\" : 1048576, \n \"keyOptions\" : { \n \"type\" : \"traditional\", \n \"allowUserKeys\" : true \n }, \n \"waitForSync\" : true, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"nickname": "readsACollectionWithProperties"
}
],
@ -130,7 +130,7 @@
"notes": "In addition to the above, the result also contains the number of documents. Note that this will always load the collection into memory. <br><br>- <em>count</em>: The number of documents inside the collection.<br><br>",
"summary": "reads a collection with count",
"httpMethod": "GET",
"examples": "Using an identifier and requesting the number of documents: <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/collection/172390926/count\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_api/collection/products/count\n\n{ \n \"id\" : \"172390926\", \n \"name\" : \"products\", \n \"isVolatile\" : false, \n \"isSystem\" : false, \n \"journalSize\" : 1048576, \n \"keyOptions\" : { \n \"type\" : \"traditional\", \n \"allowUserKeys\" : true \n }, \n \"waitForSync\" : true, \n \"count\" : 100, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"examples": "Using an identifier and requesting the number of documents: <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/collection/172567772/count\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_api/collection/products/count\n\n{ \n \"id\" : \"172567772\", \n \"name\" : \"products\", \n \"isVolatile\" : false, \n \"isSystem\" : false, \n \"journalSize\" : 1048576, \n \"keyOptions\" : { \n \"type\" : \"traditional\", \n \"allowUserKeys\" : true \n }, \n \"waitForSync\" : true, \n \"count\" : 100, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"nickname": "readsACollectionWithCount"
}
],
@ -158,10 +158,10 @@
"description": ""
}
],
"notes": "In addition to the above, the result also contains the number of documents and additional statistical information about the collection. Note that this will always load the collection into memory. <br><br>- <em>count</em>: The number of documents inside the collection.<br><br>- <em>figures.alive.count</em>: The number of living documents.<br><br>- <em>figures.alive.size</em>: The total size in bytes used by all<br> living documents. <br><br>- <em>figures.dead.count</em>: The number of dead documents.<br><br>- <em>figures.dead.size</em>: The total size in bytes used by all<br> dead documents. <br><br>- <em>figures.dead.deletion</em>: The total number of deletion markers.<br><br>- <em>figures.datafiles.count</em>: The number of active datafiles.<br>- <em>figures.datafiles.fileSize</em>: The total filesize of datafiles.<br><br>- <em>figures.journals.count</em>: The number of journal files.<br>- <em>figures.journals.fileSize</em>: The total filesize of journal files.<br><br>- <em>figures.shapes.count</em>: The total number of shapes used in the <br> collection (this includes shapes that are not in use anymore) <br><br>- <em>figures.attributes.count</em>: The total number of attributes used <br> in the collection (this includes attributes that are not in use anymore) <br><br>- <em>journalSize</em>: The maximal size of the journal in bytes.<br><br>Note: the filesizes of shapes and compactor files are not reported. <br><br>",
"notes": "In addition to the above, the result also contains the number of documents and additional statistical information about the collection. Note that this will always load the collection into memory. <br><br>- <em>count</em>: The number of documents inside the collection.<br><br>- <em>figures.alive.count</em>: The number of living documents.<br><br>- <em>figures.alive.size</em>: The total size in bytes used by all living documents. <br><br>- <em>figures.dead.count</em>: The number of dead documents.<br><br>- <em>figures.dead.size</em>: The total size in bytes used by all dead documents. <br><br>- <em>figures.dead.deletion</em>: The total number of deletion markers.<br><br>- <em>figures.datafiles.count</em>: The number of active datafiles.- <em>figures.datafiles.fileSize</em>: The total filesize of datafiles.<br><br>- <em>figures.journals.count</em>: The number of journal files.- <em>figures.journals.fileSize</em>: The total filesize of journal files.<br><br>- <em>figures.shapes.count</em>: The total number of shapes used in the collection (this includes shapes that are not in use anymore) <br><br>- <em>figures.attributes.count</em>: The total number of attributes used in the collection (this includes attributes that are not in use anymore) <br><br>- <em>journalSize</em>: The maximal size of the journal in bytes.<br><br>Note: the filesizes of shapes and compactor files are not reported. <br><br>",
"summary": "reads a collection with stats",
"httpMethod": "GET",
"examples": "Using an identifier and requesting the figures of the collection: <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/collection/111442446/figures\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_api/collection/products/figures\n\n{ \n \"id\" : \"111442446\", \n \"name\" : \"products\", \n \"isVolatile\" : false, \n \"isSystem\" : false, \n \"journalSize\" : 1048576, \n \"keyOptions\" : { \n \"type\" : \"traditional\", \n \"allowUserKeys\" : true \n }, \n \"waitForSync\" : true, \n \"count\" : 0, \n \"figures\" : { \n \"alive\" : { \n \"count\" : 0, \n \"size\" : 0 \n }, \n \"dead\" : { \n \"count\" : 0, \n \"size\" : 0, \n \"deletion\" : 0 \n }, \n \"datafiles\" : { \n \"count\" : 0, \n \"fileSize\" : 0 \n }, \n \"journals\" : { \n \"count\" : 0, \n \"fileSize\" : 0 \n }, \n \"shapes\" : { \n \"count\" : 6 \n }, \n \"attributes\" : { \n \"count\" : 0 \n } \n }, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"examples": "Using an identifier and requesting the figures of the collection: <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/collection/111422684/figures\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\nlocation: /_api/collection/products/figures\n\n{ \n \"id\" : \"111422684\", \n \"name\" : \"products\", \n \"isVolatile\" : false, \n \"isSystem\" : false, \n \"journalSize\" : 1048576, \n \"keyOptions\" : { \n \"type\" : \"traditional\", \n \"allowUserKeys\" : true \n }, \n \"waitForSync\" : true, \n \"count\" : 0, \n \"figures\" : { \n \"alive\" : { \n \"count\" : 0, \n \"size\" : 0 \n }, \n \"dead\" : { \n \"count\" : 0, \n \"size\" : 0, \n \"deletion\" : 0 \n }, \n \"datafiles\" : { \n \"count\" : 0, \n \"fileSize\" : 0 \n }, \n \"journals\" : { \n \"count\" : 0, \n \"fileSize\" : 0 \n }, \n \"shapes\" : { \n \"count\" : 6 \n }, \n \"attributes\" : { \n \"count\" : 0 \n } \n }, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"nickname": "readsACollectionWithStats"
}
],
@ -220,10 +220,10 @@
"description": ""
}
],
"notes": "Loads a collection into memory. Returns the collection on success. <br><br>The request might optionally contain the following attribute: <br><br>- <em>count</em>: If set, this controls whether the return value should include<br> the number of documents in the collection. Setting <em>count</em> to <em>false</em> may speed up loading a collection. The default value for <em>count</em> is <em>true</em>. <br><br>On success an object with the following attributes is returned: <br><br>- <em>id</em>: The identifier of the collection.<br><br>- <em>name</em>: The name of the collection.<br><br>- <em>count</em>: The number of documents inside the collection. This is only<br> returned if the <em>count</em> input parameters is set to <em>true</em> or has not been specified. <br><br>- <em>status</em>: The status of the collection as number.<br><br>- <em>type</em>: The collection type. Valid types are:<br> - 2: document collection - 3: edges collection <br><br>",
"notes": "Loads a collection into memory. Returns the collection on success. <br><br>The request might optionally contain the following attribute: <br><br>- <em>count</em>: If set, this controls whether the return value should include the number of documents in the collection. Setting <em>count</em> to <em>false</em> may speed up loading a collection. The default value for <em>count</em> is <em>true</em>. <br><br>On success an object with the following attributes is returned: <br><br>- <em>id</em>: The identifier of the collection.<br><br>- <em>name</em>: The name of the collection.<br><br>- <em>count</em>: The number of documents inside the collection. This is only returned if the <em>count</em> input parameters is set to <em>true</em> or has not been specified. <br><br>- <em>status</em>: The status of the collection as number.<br><br>- <em>type</em>: The collection type. Valid types are: - 2: document collection - 3: edges collection <br><br>",
"summary": "loads a collection",
"httpMethod": "PUT",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PUT --dump - http://localhost:8529/_api/collection/244808206/load\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"244808206\", \n \"name\" : \"products\", \n \"count\" : 0, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PUT --dump - http://localhost:8529/_api/collection/244985052/load\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"244985052\", \n \"name\" : \"products\", \n \"count\" : 0, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"nickname": "loadsACollection"
}
],
@ -251,10 +251,10 @@
"description": ""
}
],
"notes": "Removes a collection from memory. This call does not delete any documents. You can use the collection afterwards; in which case it will be loaded into memory, again. On success an object with the following attributes is returned: <br><br>- <em>id</em>: The identifier of the collection.<br><br>- <em>name</em>: The name of the collection.<br><br>- <em>status</em>: The status of the collection as number.<br><br>- <em>type</em>: The collection type. Valid types are:<br> - 2: document collection - 3: edges collection <br><br>",
"notes": "Removes a collection from memory. This call does not delete any documents. You can use the collection afterwards; in which case it will be loaded into memory, again. On success an object with the following attributes is returned: <br><br>- <em>id</em>: The identifier of the collection.<br><br>- <em>name</em>: The name of the collection.<br><br>- <em>status</em>: The status of the collection as number.<br><br>- <em>type</em>: The collection type. Valid types are: - 2: document collection - 3: edges collection <br><br>",
"summary": "unloads a collection",
"httpMethod": "PUT",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PUT --dump - http://localhost:8529/_api/collection/39090702/unload\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"39090702\", \n \"name\" : \"products\", \n \"status\" : 4, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PUT --dump - http://localhost:8529/_api/collection/39070940/unload\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"39070940\", \n \"name\" : \"products\", \n \"status\" : 2, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"nickname": "unloadsACollection"
}
],
@ -276,7 +276,7 @@
"notes": "Removes all documents from the collection, but leaves the indexes intact. <br><br>",
"summary": "truncates a collection",
"httpMethod": "PUT",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PUT --dump - http://localhost:8529/_api/collection/159087118/truncate\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"159087118\", \n \"name\" : \"products\", \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PUT --dump - http://localhost:8529/_api/collection/159067356/truncate\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"159067356\", \n \"name\" : \"products\", \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"nickname": "truncatesACollection"
}
],
@ -295,10 +295,10 @@
"description": ""
}
],
"notes": "Changes the properties of a collection. Expects an object with the attribute(s) <br><br>- <em>waitForSync</em>: If <em>true</em> then creating or changing a<br> document will wait until the data has been synchronised to disk. <br><br>- <em>journalSize</em>: Size (in bytes) for new journal files that are<br> created for the collection. <br><br>If returns an object with the attributes <br><br>- <em>id</em>: The identifier of the collection.<br><br>- <em>name</em>: The name of the collection.<br><br>- <em>waitForSync</em>: The new value.<br><br>- <em>journalSize</em>: The new value.<br><br>- <em>status</em>: The status of the collection as number.<br><br>- <em>type</em>: The collection type. Valid types are:<br> - 2: document collection - 3: edges collection <br><br>Note: some other collection properties, such as <em>type</em> or <em>isVolatile</em> cannot be changed once the collection is created. <br><br>",
"notes": "Changes the properties of a collection. Expects an object with the attribute(s) <br><br>- <em>waitForSync</em>: If <em>true</em> then creating or changing a document will wait until the data has been synchronised to disk. <br><br>- <em>journalSize</em>: Size (in bytes) for new journal files that are created for the collection. <br><br>If returns an object with the attributes <br><br>- <em>id</em>: The identifier of the collection.<br><br>- <em>name</em>: The name of the collection.<br><br>- <em>waitForSync</em>: The new value.<br><br>- <em>journalSize</em>: The new value.<br><br>- <em>status</em>: The status of the collection as number.<br><br>- <em>type</em>: The collection type. Valid types are: - 2: document collection - 3: edges collection <br><br>Note: some other collection properties, such as <em>type</em> or <em>isVolatile</em> cannot be changed once the collection is created. <br><br>",
"summary": "changes the properties of a collection",
"httpMethod": "PUT",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/collection/201751054/properties\n{\"waitForSync\":true}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"201751054\", \n \"name\" : \"products\", \n \"isVolatile\" : false, \n \"isSystem\" : false, \n \"journalSize\" : 1048576, \n \"keyOptions\" : { \n \"type\" : \"traditional\", \n \"allowUserKeys\" : true \n }, \n \"waitForSync\" : true, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/collection/201927900/properties\n{\"waitForSync\":true}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"201927900\", \n \"name\" : \"products\", \n \"isVolatile\" : false, \n \"isSystem\" : false, \n \"journalSize\" : 1048576, \n \"keyOptions\" : { \n \"type\" : \"traditional\", \n \"allowUserKeys\" : true \n }, \n \"waitForSync\" : true, \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"nickname": "changesThePropertiesOfACollection"
}
],
@ -317,10 +317,10 @@
"description": ""
}
],
"notes": "Renames a collection. Expects an object with the attribute(s) <br><br>- <em>name</em>: The new name.<br><br>If returns an object with the attributes <br><br>- <em>id</em>: The identifier of the collection.<br><br>- <em>name</em>: The new name of the collection.<br><br>- <em>status</em>: The status of the collection as number.<br><br>- <em>type</em>: The collection type. Valid types are:<br> - 2: document collection - 3: edges collection <br><br>",
"notes": "Renames a collection. Expects an object with the attribute(s) <br><br>- <em>name</em>: The new name.<br><br>If returns an object with the attributes <br><br>- <em>id</em>: The identifier of the collection.<br><br>- <em>name</em>: The new name of the collection.<br><br>- <em>status</em>: The status of the collection as number.<br><br>- <em>type</em>: The collection type. Valid types are: - 2: document collection - 3: edges collection <br><br>",
"summary": "renames a collection",
"httpMethod": "PUT",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/collection/199260686/rename\n{\"name\":\"newname\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"199260686\", \n \"name\" : \"newname\", \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/collection/199437532/rename\n{\"name\":\"newname\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"199437532\", \n \"name\" : \"newname\", \n \"status\" : 3, \n \"type\" : 2, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"nickname": "renamesACollection"
}
],
@ -351,7 +351,7 @@
"notes": "Deletes a collection identified by <em>collection-name</em>. <br><br>If the collection was successfully deleted then, an object is returned with the following attributes: <br><br>- <em>error</em>: <em>false</em><br><br>- <em>id</em>: The identifier of the deleted collection.<br><br>",
"summary": "deletes a collection",
"httpMethod": "DELETE",
"examples": "Using an identifier: <br><br><pre><code class=\"json\" >unix> curl -X DELETE --dump - http://localhost:8529/_api/collection/216889870\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"216889870\", \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>Using a name: <br><br><pre><code class=\"json\" >unix> curl -X DELETE --dump - http://localhost:8529/_api/collection/products1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"132610574\", \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"examples": "Using an identifier: <br><br><pre><code class=\"json\" >unix> curl -X DELETE --dump - http://localhost:8529/_api/collection/217066716\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"217066716\", \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>Using a name: <br><br><pre><code class=\"json\" >unix> curl -X DELETE --dump - http://localhost:8529/_api/collection/products1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"132590812\", \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"nickname": "deletesACollection"
}
],

View File

@ -25,10 +25,10 @@
"description": "The following attributes can be used inside the JSON object: - <em>query</em>: contains the query string to be executed (mandatory) - <em>count</em>: boolean flag that indicates whether the number of documents found should be returned as \"count\" attribute in the result set (optional). Calculating the \"count\" attribute might have a performance penalty for some queries so this option is turned off by default. - <em>batchSize</em>: maximum number of result documents to be transferred from the server to the client in one roundtrip (optional). If this attribute is not set, a server-controlled default value will be used. - <em>bindVars</em>: key/value list of bind parameters (optional). "
}
],
"notes": "The query details include the query string plus optional query options and bind parameters. These values need to be passed in a JSON representation in the body of the POST request. <br><br>The following attributes can be used inside the JSON object: <br><br>- <em>query</em>: contains the query string to be executed (mandatory)<br><br>- <em>count</em>: boolean flag that indicates whether the number of documents<br> found should be returned as \"count\" attribute in the result set (optional). Calculating the \"count\" attribute might have a performance penalty for some queries so this option is turned off by default. <br><br>- <em>batchSize</em>: maximum number of result documents to be transferred from<br> the server to the client in one roundtrip (optional). If this attribute is not set, a server-controlled default value will be used. <br><br>- <em>bindVars</em>: key/value list of bind parameters (optional). <br><br>If the result set can be created by the server, the server will respond with <em>HTTP 201</em>. The body of the response will contain a JSON object with the result set. <br><br>The JSON object has the following properties: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>false</em><br> in this case) <br><br>- <em>code</em>: the HTTP status code<br><br>- <em>result</em>: an array of result documents (might be empty if query has no results)<br><br>- <em>hasMore</em>: a boolean indicator whether there are more results<br> available on the server <br><br>- <em>count</em>: the total number of result documents available (only<br> available if the query was executed with the <em>count</em> attribute set. <br><br>- <em>id</em>: id of temporary cursor created on the server (optional, see above)<br><br>If the JSON representation is malformed or the query specification is missing from the request, the server will respond with <em>HTTP 400</em>. <br><br>The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case)<br><br>- <em>code</em>: the HTTP status code<br><br>- <em>errorNum</em>: the server error number<br><br>- <em>errorMessage</em>: a descriptive error message<br><br>If the query specification is complete, the server will process the query. If an error occurs during query processing, the server will respond with <em>HTTP 400</em>. Again, the body of the response will contain details about the error. <br><br>A list of query errors can be found @ref ArangoErrors here. <br><br>",
"notes": "The query details include the query string plus optional query options and bind parameters. These values need to be passed in a JSON representation in the body of the POST request. <br><br>The following attributes can be used inside the JSON object: <br><br>- <em>query</em>: contains the query string to be executed (mandatory)<br><br>- <em>count</em>: boolean flag that indicates whether the number of documents found should be returned as \"count\" attribute in the result set (optional). Calculating the \"count\" attribute might have a performance penalty for some queries so this option is turned off by default. <br><br>- <em>batchSize</em>: maximum number of result documents to be transferred from the server to the client in one roundtrip (optional). If this attribute is not set, a server-controlled default value will be used. <br><br>- <em>bindVars</em>: key/value list of bind parameters (optional). <br><br>If the result set can be created by the server, the server will respond with <em>HTTP 201</em>. The body of the response will contain a JSON object with the result set. <br><br>The JSON object has the following properties: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>false</em> in this case) <br><br>- <em>code</em>: the HTTP status code<br><br>- <em>result</em>: an array of result documents (might be empty if query has no results)<br><br>- <em>hasMore</em>: a boolean indicator whether there are more results available on the server <br><br>- <em>count</em>: the total number of result documents available (only available if the query was executed with the <em>count</em> attribute set. <br><br>- <em>id</em>: id of temporary cursor created on the server (optional, see above)<br><br>If the JSON representation is malformed or the query specification is missing from the request, the server will respond with <em>HTTP 400</em>. <br><br>The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case)<br><br>- <em>code</em>: the HTTP status code<br><br>- <em>errorNum</em>: the server error number<br><br>- <em>errorMessage</em>: a descriptive error message<br><br>If the query specification is complete, the server will process the query. If an error occurs during query processing, the server will respond with <em>HTTP 400</em>. Again, the body of the response will contain details about the error. <br><br>A list of query errors can be found @ref ArangoErrors here. <br><br>",
"summary": "creates a cursor",
"httpMethod": "POST",
"examples": "Executes a query and extract the result in a single go: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{ \"query\" : \"FOR p IN products LIMIT 2 RETURN p\", \"count\" : true, \"batchSize\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/135100942\", \n \"_rev\" : \"135100942\", \n \"_key\" : \"135100942\", \n \"hello2\" : \"world1\" \n }, \n { \n \"_id\" : \"products/134642190\", \n \"_rev\" : \"134642190\", \n \"_key\" : \"134642190\", \n \"hello1\" : \"world1\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>Executes a query and extract part of the result: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{ \"query\" : \"FOR p IN products LIMIT 5 RETURN p\", \"count\" : true, \"batchSize\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/165509646\", \n \"_rev\" : \"165509646\", \n \"_key\" : \"165509646\", \n \"hello5\" : \"world1\" \n }, \n { \n \"_id\" : \"products/164264462\", \n \"_rev\" : \"164264462\", \n \"_key\" : \"164264462\", \n \"hello1\" : \"world1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"165640718\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>Bad queries: Missing body: <br><br><pre><code class=\"json\" >unix> curl -X POST --dump - http://localhost:8529/_api/cursor\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 1502, \n \"errorMessage\" : \"query is empty\" \n}\n\n</code></pre><br>Unknown collection: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{ \"query\" : \"FOR u IN unknowncoll LIMIT 2 RETURN u\", \"count\" : true, \"batchSize\" : 2 }\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 1203, \n \"errorMessage\" : \"cannot execute query: collection not found\" \n}\n\n</code></pre><br>",
"examples": "Executes a query and extract the result in a single go: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{ \"query\" : \"FOR p IN products LIMIT 2 RETURN p\", \"count\" : true, \"batchSize\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/134753500\", \n \"_rev\" : \"134753500\", \n \"_key\" : \"134753500\", \n \"hello1\" : \"world1\" \n }, \n { \n \"_id\" : \"products/135081180\", \n \"_rev\" : \"135081180\", \n \"_key\" : \"135081180\", \n \"hello2\" : \"world1\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>Executes a query and extract part of the result: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{ \"query\" : \"FOR p IN products LIMIT 5 RETURN p\", \"count\" : true, \"batchSize\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/165424348\", \n \"_rev\" : \"165424348\", \n \"_key\" : \"165424348\", \n \"hello4\" : \"world1\" \n }, \n { \n \"_id\" : \"products/165686492\", \n \"_rev\" : \"165686492\", \n \"_key\" : \"165686492\", \n \"hello5\" : \"world1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"165817564\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>Bad queries: Missing body: <br><br><pre><code class=\"json\" >unix> curl -X POST --dump - http://localhost:8529/_api/cursor\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 1502, \n \"errorMessage\" : \"query is empty\" \n}\n\n</code></pre><br>Unknown collection: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{ \"query\" : \"FOR u IN unknowncoll LIMIT 2 RETURN u\", \"count\" : true, \"batchSize\" : 2 }\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 1203, \n \"errorMessage\" : \"cannot execute query: collection not found\" \n}\n\n</code></pre><br>",
"nickname": "createsACursor"
}
],
@ -56,10 +56,10 @@
"description": "The name of the cursor "
}
],
"notes": "<br><br>If the cursor is still alive, returns an object with the following attributes. <br><br>- <em>id</em>: the <em>cursor-identifier</em><br>- <em>result</em>: a list of documents for the current batch<br>- <em>hasMore</em>: <em>false</em> if this was the last batch<br>- <em>count</em>: if present the total number of elements<br><br>Note that even if <em>hasMore</em> returns <em>true</em>, the next call might still return no documents. If, however, <em>hasMore</em> is <em>false</em>, then the cursor is exhausted. Once the <em>hasMore</em> attribute has a value of <em>false</em>, the client can stop. <br><br>",
"notes": "<br><br>If the cursor is still alive, returns an object with the following attributes. <br><br>- <em>id</em>: the <em>cursor-identifier</em>- <em>result</em>: a list of documents for the current batch- <em>hasMore</em>: <em>false</em> if this was the last batch- <em>count</em>: if present the total number of elements<br><br>Note that even if <em>hasMore</em> returns <em>true</em>, the next call might still return no documents. If, however, <em>hasMore</em> is <em>false</em>, then the cursor is exhausted. Once the <em>hasMore</em> attribute has a value of <em>false</em>, the client can stop. <br><br>",
"summary": "reads next batch from a cursor",
"httpMethod": "PUT",
"examples": "Valid request for next batch: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{ \"query\" : \"FOR p IN products LIMIT 5 RETURN p\", \"count\" : true, \"batchSize\" : 2 }\n\nunix> curl -X PUT --dump - http://localhost:8529/_api/cursor/226785806\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/226654734\", \n \"_rev\" : \"226654734\", \n \"_key\" : \"226654734\", \n \"hello5\" : \"world1\" \n }, \n { \n \"_id\" : \"products/225868302\", \n \"_rev\" : \"225868302\", \n \"_key\" : \"225868302\", \n \"hello2\" : \"world1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"226785806\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>Missing identifier <br><br><pre><code class=\"json\" >unix> curl -X PUT --dump - http://localhost:8529/_api/cursor\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 400, \n \"errorMessage\" : \"bad parameter\" \n}\n\n</code></pre><br>Unknown identifier <br><br><pre><code class=\"json\" >unix> curl -X PUT --dump - http://localhost:8529/_api/cursor/123123\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 1600, \n \"errorMessage\" : \"cursor not found\" \n}\n\n</code></pre><br>",
"examples": "Valid request for next batch: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{ \"query\" : \"FOR p IN products LIMIT 5 RETURN p\", \"count\" : true, \"batchSize\" : 2 }\n\nunix> curl -X PUT --dump - http://localhost:8529/_api/cursor/226962652\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/226045148\", \n \"_rev\" : \"226045148\", \n \"_key\" : \"226045148\", \n \"hello2\" : \"world1\" \n }, \n { \n \"_id\" : \"products/225717468\", \n \"_rev\" : \"225717468\", \n \"_key\" : \"225717468\", \n \"hello1\" : \"world1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"226962652\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>Missing identifier <br><br><pre><code class=\"json\" >unix> curl -X PUT --dump - http://localhost:8529/_api/cursor\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 400, \n \"errorMessage\" : \"bad parameter\" \n}\n\n</code></pre><br>Unknown identifier <br><br><pre><code class=\"json\" >unix> curl -X PUT --dump - http://localhost:8529/_api/cursor/123123\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 1600, \n \"errorMessage\" : \"cursor not found\" \n}\n\n</code></pre><br>",
"nickname": "readsNextBatchFromACursor"
}
],
@ -90,7 +90,7 @@
"notes": "Deletes the cursor and frees the resources associated with it. <br><br>The cursor will automatically be destroyed on the server when the client has retrieved all documents from it. The client can also explicitly destroy the cursor at any earlier time using an HTTP DELETE request. The cursor id must be included as part of the URL. <br><br>Note: the server will also destroy abandoned cursors automatically after a certain server-controlled timeout to avoid resource leakage. <br><br>",
"summary": "deletes a cursor",
"httpMethod": "DELETE",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{ \"query\" : \"FOR p IN products LIMIT 5 RETURN p\", \"count\" : true, \"batchSize\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/231897614\", \n \"_rev\" : \"231897614\", \n \"_key\" : \"231897614\", \n \"hello2\" : \"world1\" \n }, \n { \n \"_id\" : \"products/232684046\", \n \"_rev\" : \"232684046\", \n \"_key\" : \"232684046\", \n \"hello5\" : \"world1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"232815118\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 201 \n}\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/cursor/232815118\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"232815118\", \n \"error\" : false, \n \"code\" : 202 \n}\n\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/cursor\n{ \"query\" : \"FOR p IN products LIMIT 5 RETURN p\", \"count\" : true, \"batchSize\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/232074460\", \n \"_rev\" : \"232074460\", \n \"_key\" : \"232074460\", \n \"hello2\" : \"world1\" \n }, \n { \n \"_id\" : \"products/232336604\", \n \"_rev\" : \"232336604\", \n \"_key\" : \"232336604\", \n \"hello3\" : \"world1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"232991964\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 201 \n}\n\nunix> curl -X DELETE --dump - http://localhost:8529/_api/cursor/232991964\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"232991964\", \n \"error\" : false, \n \"code\" : 202 \n}\n\n</code></pre><br>",
"nickname": "deletesACursor"
}
],

View File

@ -52,10 +52,10 @@
"description": "Wait until document has been sync to disk. "
}
],
"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>- <em>_id</em> contains the document handle of the newly created document<br>- <em>_key</em> contains the document key<br>- <em>_rev</em> contains the document revision<br><br>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 documents has been sync 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>",
"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>- <em>_id</em> contains the document handle of the newly created document- <em>_key</em> contains the document key- <em>_rev</em> contains the document revision<br><br>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 documents has been sync 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": "creates a document",
"httpMethod": "POST",
"examples": "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><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: \"210532878\"\nlocation: /_api/document/products/210532878\n\n{ \n \"error\" : false, \n \"_id\" : \"products/210532878\", \n \"_rev\" : \"210532878\", \n \"_key\" : \"210532878\" \n}\n\n</code></pre><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><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"24869390\"\nlocation: /_api/document/products/24869390\n\n{ \n \"error\" : false, \n \"_id\" : \"products/24869390\", \n \"_rev\" : \"24869390\", \n \"_key\" : \"24869390\" \n}\n\n</code></pre><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><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products&waitForSync=true\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: \"158824974\"\nlocation: /_api/document/products/158824974\n\n{ \n \"error\" : false, \n \"_id\" : \"products/158824974\", \n \"_rev\" : \"158824974\", \n \"_key\" : \"158824974\" \n}\n\n</code></pre><br>Create a document in a new, named collection <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products&createCollection=true\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"211581454\"\nlocation: /_api/document/products/211581454\n\n{ \n \"error\" : false, \n \"_id\" : \"products/211581454\", \n \"_rev\" : \"211581454\", \n \"_key\" : \"211581454\" \n}\n\n</code></pre><br>Unknown collection name: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"collection /_api/collection/products not found\", \n \"code\" : 404, \n \"errorNum\" : 1203 \n}\n\n</code></pre><br>Illegal document: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products\n{ 1: \"World\" }\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"expecting attribute name\", \n \"code\" : 400, \n \"errorNum\" : 600 \n}\n\n</code></pre><br>",
"examples": "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><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: \"210709724\"\nlocation: /_api/document/products/210709724\n\n{ \n \"error\" : false, \n \"_id\" : \"products/210709724\", \n \"_rev\" : \"210709724\", \n \"_key\" : \"210709724\" \n}\n\n</code></pre><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><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"24849628\"\nlocation: /_api/document/products/24849628\n\n{ \n \"error\" : false, \n \"_id\" : \"products/24849628\", \n \"_rev\" : \"24849628\", \n \"_key\" : \"24849628\" \n}\n\n</code></pre><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><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products&waitForSync=true\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: \"158805212\"\nlocation: /_api/document/products/158805212\n\n{ \n \"error\" : false, \n \"_id\" : \"products/158805212\", \n \"_rev\" : \"158805212\", \n \"_key\" : \"158805212\" \n}\n\n</code></pre><br>Create a document in a new, named collection <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products&createCollection=true\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"211823836\"\nlocation: /_api/document/products/211823836\n\n{ \n \"error\" : false, \n \"_id\" : \"products/211823836\", \n \"_rev\" : \"211823836\", \n \"_key\" : \"211823836\" \n}\n\n</code></pre><br>Unknown collection name: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"collection /_api/collection/products not found\", \n \"code\" : 404, \n \"errorNum\" : 1203 \n}\n\n</code></pre><br>Illegal document: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/document?collection=products\n{ 1: \"World\" }\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"expecting attribute name\", \n \"code\" : 400, \n \"errorNum\" : 600 \n}\n\n</code></pre><br>",
"nickname": "createsADocument"
}
],
@ -106,7 +106,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": "reads a document",
"httpMethod": "GET",
"examples": "Use a document handle: <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/document/products/162101774\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"162101774\"\n\n{ \n \"hello\" : \"world\", \n \"_id\" : \"products/162101774\", \n \"_rev\" : \"162101774\", \n \"_key\" : \"162101774\" \n}\n\n</code></pre><br>Use a document handle and an etag: <br><br><pre><code class=\"json\" >unix> curl --header 'If-None-Match:\"149191182\"' --dump - http://localhost:8529/_api/document/products/149191182\n\nHTTP/1.1 304 Not Modified\ncontent-type: text/plain; charset=utf-8\netag: \"149191182\"\n\n</code></pre><br>Unknown document handle: <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/document/products/unknownhandle\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"collection /_api/collection/products not found\", \n \"code\" : 404, \n \"errorNum\" : 1203 \n}\n\n</code></pre><br>",
"examples": "Use a document handle: <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/document/products/162147548\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"162147548\"\n\n{ \n \"hello\" : \"world\", \n \"_id\" : \"products/162147548\", \n \"_rev\" : \"162147548\", \n \"_key\" : \"162147548\" \n}\n\n</code></pre><br>Use a document handle and an etag: <br><br><pre><code class=\"json\" >unix> curl --header 'If-None-Match:\"149302492\"' --dump - http://localhost:8529/_api/document/products/149302492\n\nHTTP/1.1 304 Not Modified\ncontent-type: text/plain; charset=utf-8\netag: \"149302492\"\n\n</code></pre><br>Unknown document handle: <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/document/products/unknownhandle\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"collection /_api/collection/products not found\", \n \"code\" : 404, \n \"errorNum\" : 1203 \n}\n\n</code></pre><br>",
"nickname": "readsADocument"
}
],
@ -137,7 +137,7 @@
"notes": "Returns a list of all URI for all documents from the collection identified by <em>collection</em>. <br><br>",
"summary": "reads all documents from collection",
"httpMethod": "GET",
"examples": "Returns a collection. <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/document/?collection=products\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"documents\" : [ \n \"/_api/document/products/37911054\", \n \"/_api/document/products/37648910\", \n \"/_api/document/products/37190158\" \n ] \n}\n\n</code></pre><br>Collection does not exist. <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/document/?collection=doesnotexist\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"collection /_api/collection/doesnotexist not found\", \n \"code\" : 404, \n \"errorNum\" : 1203 \n}\n\n</code></pre><br>",
"examples": "Returns a collection. <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/document/?collection=products\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"documents\" : [ \n \"/_api/document/products/37891292\", \n \"/_api/document/products/37301468\", \n \"/_api/document/products/37629148\" \n ] \n}\n\n</code></pre><br>Collection does not exist. <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/document/?collection=doesnotexist\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"collection /_api/collection/doesnotexist not found\", \n \"code\" : 404, \n \"errorNum\" : 1203 \n}\n\n</code></pre><br>",
"nickname": "readsAllDocumentsFromCollection"
}
],
@ -194,7 +194,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": "reads a document header",
"httpMethod": "HEAD",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X HEAD --dump - http://localhost:8529/_api/document/products/216562190\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"216562190\"\n\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X HEAD --dump - http://localhost:8529/_api/document/products/216739036\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"216739036\"\n\n</code></pre><br>",
"nickname": "readsADocumentHeader"
}
],
@ -258,10 +258,10 @@
"description": "You can conditionally replace a document based on a target revision id by using the <em>if-match</em> HTTP header. "
}
],
"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): - specifying the target revision in the <em>rev</em> URL query parameter<br>- specifying the target revision in the <em>if-match</em> HTTP header<br><br>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 the following request: <br><br>- PUT /_api/document/<em>document-handle</em>?rev=<em>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>- PUT /_api/document/<em>document-handle</em>?policy=<em>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>",
"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): - specifying the target revision in the <em>rev</em> URL query parameter- specifying the target revision in the <em>if-match</em> HTTP header<br><br>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 the following request: <br><br>- PUT /_api/document/<em>document-handle</em>?rev=<em>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>- PUT /_api/document/<em>document-handle</em>?policy=<em>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": "replaces a document",
"httpMethod": "PUT",
"examples": "Using document handle: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/document/products/97942030\n{\"Hello\": \"you\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"98400782\"\nlocation: /_api/document/products/97942030\n\n{ \n \"error\" : false, \n \"_id\" : \"products/97942030\", \n \"_rev\" : \"98400782\", \n \"_key\" : \"97942030\" \n}\n\n</code></pre><br>Unknown document handle: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/document/products/201161230\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/201161230 not found\", \n \"code\" : 404, \n \"errorNum\" : 1202 \n}\n\n</code></pre><br>Produce a revision conflict: <br><br><pre><code class=\"json\" >unix> curl -X PUT --header 'If-Match:\"29719054\"' --data @- --dump - http://localhost:8529/_api/document/products/29260302\n{\"other\":\"content\"}\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/29260302\", \n \"_rev\" : \"29260302\", \n \"_key\" : \"29260302\" \n}\n\n</code></pre><br>Last write wins: <br><br><pre><code class=\"json\" >unix> curl -X PUT --header 'If-Match:\"95058446\"' --data @- --dump - http://localhost:8529/_api/document/products/94730766?policy=last\n{}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"95255054\"\nlocation: /_api/document/products/94730766\n\n{ \n \"error\" : false, \n \"_id\" : \"products/94730766\", \n \"_rev\" : \"95255054\", \n \"_key\" : \"94730766\" \n}\n\n</code></pre><br>Alternative to header field: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/document/products/150501902?rev=150960654\n{\"other\":\"content\"}\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/150501902\", \n \"_rev\" : \"150501902\", \n \"_key\" : \"150501902\" \n}\n\n</code></pre><br>",
"examples": "Using document handle: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/document/products/97922268\n{\"Hello\": \"you\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"98381020\"\nlocation: /_api/document/products/97922268\n\n{ \n \"error\" : false, \n \"_id\" : \"products/97922268\", \n \"_rev\" : \"98381020\", \n \"_key\" : \"97922268\" \n}\n\n</code></pre><br>Unknown document handle: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/document/products/201534684\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/201534684 not found\", \n \"code\" : 404, \n \"errorNum\" : 1202 \n}\n\n</code></pre><br>Produce a revision conflict: <br><br><pre><code class=\"json\" >unix> curl -X PUT --header 'If-Match:\"29699292\"' --data @- --dump - http://localhost:8529/_api/document/products/29240540\n{\"other\":\"content\"}\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/29240540\", \n \"_rev\" : \"29240540\", \n \"_key\" : \"29240540\" \n}\n\n</code></pre><br>Last write wins: <br><br><pre><code class=\"json\" >unix> curl -X PUT --header 'If-Match:\"95038684\"' --data @- --dump - http://localhost:8529/_api/document/products/94711004?policy=last\n{}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"95235292\"\nlocation: /_api/document/products/94711004\n\n{ \n \"error\" : false, \n \"_id\" : \"products/94711004\", \n \"_rev\" : \"95235292\", \n \"_key\" : \"94711004\" \n}\n\n</code></pre><br>Alternative to header field: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/document/products/150613212?rev=150940892\n{\"other\":\"content\"}\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/150613212\", \n \"_rev\" : \"150613212\", \n \"_key\" : \"150613212\" \n}\n\n</code></pre><br>",
"nickname": "replacesADocument"
}
],
@ -334,7 +334,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": "patches a document",
"httpMethod": "PATCH",
"examples": "patches an existing document with new content. <br><br><pre><code class=\"json\" >unix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/document/products/92109326\n{\"hello\":\"world\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"92568078\"\nlocation: /_api/document/products/92109326\n\n{ \n \"error\" : false, \n \"_id\" : \"products/92109326\", \n \"_rev\" : \"92568078\", \n \"_key\" : \"92109326\" \n}\n\nunix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/document/products/92109326\n{\"numbers\":{\"one\":1,\"two\":2,\"three\":3,\"empty\":null}}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"93092366\"\nlocation: /_api/document/products/92109326\n\n{ \n \"error\" : false, \n \"_id\" : \"products/92109326\", \n \"_rev\" : \"93092366\", \n \"_key\" : \"92109326\" \n}\n\nunix> curl --dump - http://localhost:8529/_api/document/products/92109326\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"93092366\"\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/92109326\", \n \"_rev\" : \"93092366\", \n \"_key\" : \"92109326\" \n}\n\nunix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/document/products/92109326?keepNull=false\n{\"hello\":null,\"numbers\":{\"four\":4}}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"93485582\"\nlocation: /_api/document/products/92109326\n\n{ \n \"error\" : false, \n \"_id\" : \"products/92109326\", \n \"_rev\" : \"93485582\", \n \"_key\" : \"92109326\" \n}\n\nunix> curl --dump - http://localhost:8529/_api/document/products/92109326\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"93485582\"\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/92109326\", \n \"_rev\" : \"93485582\", \n \"_key\" : \"92109326\" \n}\n\n</code></pre><br>",
"examples": "patches an existing document with new content. <br><br><pre><code class=\"json\" >unix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/document/products/92089564\n{\"hello\":\"world\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"92548316\"\nlocation: /_api/document/products/92089564\n\n{ \n \"error\" : false, \n \"_id\" : \"products/92089564\", \n \"_rev\" : \"92548316\", \n \"_key\" : \"92089564\" \n}\n\nunix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/document/products/92089564\n{\"numbers\":{\"one\":1,\"two\":2,\"three\":3,\"empty\":null}}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"93072604\"\nlocation: /_api/document/products/92089564\n\n{ \n \"error\" : false, \n \"_id\" : \"products/92089564\", \n \"_rev\" : \"93072604\", \n \"_key\" : \"92089564\" \n}\n\nunix> curl --dump - http://localhost:8529/_api/document/products/92089564\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"93072604\"\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/92089564\", \n \"_rev\" : \"93072604\", \n \"_key\" : \"92089564\" \n}\n\nunix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/document/products/92089564?keepNull=false\n{\"hello\":null,\"numbers\":{\"four\":4}}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"93465820\"\nlocation: /_api/document/products/92089564\n\n{ \n \"error\" : false, \n \"_id\" : \"products/92089564\", \n \"_rev\" : \"93465820\", \n \"_key\" : \"92089564\" \n}\n\nunix> curl --dump - http://localhost:8529/_api/document/products/92089564\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"93465820\"\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/92089564\", \n \"_rev\" : \"93465820\", \n \"_key\" : \"92089564\" \n}\n\n</code></pre><br>",
"nickname": "patchesADocument"
}
],
@ -397,7 +397,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 updated document, the attribute <em>_rev</em> contains the known 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 a document",
"httpMethod": "DELETE",
"examples": "Using document handle: <br><br><pre><code class=\"json\" >unix> curl -X DELETE --dump - http://localhost:8529/_api/document/products/53574158\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : false, \n \"_id\" : \"products/53574158\", \n \"_rev\" : \"53574158\", \n \"_key\" : \"53574158\" \n}\n\n</code></pre><br>Unknown document handle: <br><br><pre><code class=\"json\" >unix> curl -X DELETE --dump - http://localhost:8529/_api/document/products/78608910\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/78608910 not found\", \n \"code\" : 404, \n \"errorNum\" : 1202 \n}\n\n</code></pre><br>Revision conflict: <br><br><pre><code class=\"json\" >unix> curl -X DELETE --header 'If-Match:\"96762382\"' --dump - http://localhost:8529/_api/document/products/96303630\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/96303630\", \n \"_rev\" : \"96303630\", \n \"_key\" : \"96303630\" \n}\n\n</code></pre><br>",
"examples": "Using document handle: <br><br><pre><code class=\"json\" >unix> curl -X DELETE --dump - http://localhost:8529/_api/document/products/53554396\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : false, \n \"_id\" : \"products/53554396\", \n \"_rev\" : \"53554396\", \n \"_key\" : \"53554396\" \n}\n\n</code></pre><br>Unknown document handle: <br><br><pre><code class=\"json\" >unix> curl -X DELETE --dump - http://localhost:8529/_api/document/products/78589148\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/78589148 not found\", \n \"code\" : 404, \n \"errorNum\" : 1202 \n}\n\n</code></pre><br>Revision conflict: <br><br><pre><code class=\"json\" >unix> curl -X DELETE --header 'If-Match:\"96742620\"' --dump - http://localhost:8529/_api/document/products/96414940\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/96414940\", \n \"_rev\" : \"96414940\", \n \"_key\" : \"96414940\" \n}\n\n</code></pre><br>",
"nickname": "deletesADocument"
}
],

View File

@ -49,7 +49,7 @@
"notes": "<em>from</em> handle and <em>to</em> handle are immutable once the edge has been created. <br><br>In all other respects the method works like <em>POST /document</em>, see @ref RestDocument for details. <br><br>",
"summary": "creates an edge",
"httpMethod": "POST",
"examples": "Create an edge and reads it back: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/edge/?collection=edges&from=vertices/1&to=vertices/2\n{\"name\":\"Emil\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"193427982\"\nlocation: /_api/document/edges/193427982\n\n{ \n \"error\" : false, \n \"_id\" : \"edges/193427982\", \n \"_rev\" : \"193427982\", \n \"_key\" : \"193427982\" \n}\n\nunix> curl --dump - http://localhost:8529/_api/edge/edges/193427982\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"193427982\"\n\n{ \n \"name\" : \"Emil\", \n \"_id\" : \"edges/193427982\", \n \"_rev\" : \"193427982\", \n \"_key\" : \"193427982\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/2\" \n}\n\n</code></pre><br>",
"examples": "Create an edge and reads it back: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/edge/?collection=edges&from=vertices/1&to=vertices/2\n{\"name\":\"Emil\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"193604828\"\nlocation: /_api/document/edges/193604828\n\n{ \n \"error\" : false, \n \"_id\" : \"edges/193604828\", \n \"_rev\" : \"193604828\", \n \"_key\" : \"193604828\" \n}\n\nunix> curl --dump - http://localhost:8529/_api/edge/edges/193604828\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"193604828\"\n\n{ \n \"name\" : \"Emil\", \n \"_id\" : \"edges/193604828\", \n \"_rev\" : \"193604828\", \n \"_key\" : \"193604828\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/2\" \n}\n\n</code></pre><br>",
"nickname": "createsAnEdge"
}
],

View File

@ -32,7 +32,7 @@
"notes": "Returns the list of edges starting or ending in the vertex identified by <em>vertex-handle</em>. <br><br>",
"summary": "reads in- or outbound edges",
"httpMethod": "GET",
"examples": "Any direction <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"edges\" : [ \n { \n \"_id\" : \"edges/6\", \n \"_rev\" : \"222263822\", \n \"_key\" : \"6\", \n \"_from\" : \"vertices/2\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v2 -> v1\" \n }, \n { \n \"_id\" : \"edges/7\", \n \"_rev\" : \"222788110\", \n \"_key\" : \"7\", \n \"_from\" : \"vertices/4\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v4 -> v1\" \n }, \n { \n \"_id\" : \"edges/5\", \n \"_rev\" : \"221739534\", \n \"_key\" : \"5\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/3\", \n \"$label\" : \"v1 -> v3\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>In edges <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&direction=in\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"edges\" : [ \n { \n \"_id\" : \"edges/6\", \n \"_rev\" : \"156989966\", \n \"_key\" : \"6\", \n \"_from\" : \"vertices/2\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v2 -> v1\" \n }, \n { \n \"_id\" : \"edges/7\", \n \"_rev\" : \"157514254\", \n \"_key\" : \"7\", \n \"_from\" : \"vertices/4\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v4 -> v1\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>Out edges <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&direction=out\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"edges\" : [ \n { \n \"_id\" : \"edges/5\", \n \"_rev\" : \"122190350\", \n \"_key\" : \"5\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/3\", \n \"$label\" : \"v1 -> v3\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"examples": "Any direction <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"edges\" : [ \n { \n \"_id\" : \"edges/6\", \n \"_rev\" : \"222440668\", \n \"_key\" : \"6\", \n \"_from\" : \"vertices/2\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v2 -> v1\" \n }, \n { \n \"_id\" : \"edges/7\", \n \"_rev\" : \"222964956\", \n \"_key\" : \"7\", \n \"_from\" : \"vertices/4\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v4 -> v1\" \n }, \n { \n \"_id\" : \"edges/5\", \n \"_rev\" : \"221916380\", \n \"_key\" : \"5\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/3\", \n \"$label\" : \"v1 -> v3\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>In edges <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&direction=in\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"edges\" : [ \n { \n \"_id\" : \"edges/6\", \n \"_rev\" : \"156970204\", \n \"_key\" : \"6\", \n \"_from\" : \"vertices/2\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v2 -> v1\" \n }, \n { \n \"_id\" : \"edges/7\", \n \"_rev\" : \"157494492\", \n \"_key\" : \"7\", \n \"_from\" : \"vertices/4\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v4 -> v1\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>Out edges <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&direction=out\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"edges\" : [ \n { \n \"_id\" : \"edges/5\", \n \"_rev\" : \"122170588\", \n \"_key\" : \"5\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/3\", \n \"$label\" : \"v1 -> v3\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"nickname": "readsIn-OrOutboundEdges"
}
],

View File

@ -25,7 +25,7 @@
"description": "The query string needs to be passed in the attribute <em>query</em> of a JSON object as the body of the POST request. If the query references any bind variables, these must also be passed in the attribute <em>bindVars</em>. "
}
],
"notes": "<br><br>To explain how an AQL query would be executed on the server, the query string can be sent to the server via an HTTP POST request. The server will then validate the query and create an execution plan for it, but will not execute it. <br><br>The execution plan that is returned by the server can be used to estimate the probable performance of an AQL query. Though the actual performance will depend on many different factors, the execution plan normally can give some good hint on the amount of work the server needs to do in order to actually run the query. <br><br>The top-level statements will appear in the result in the same order in which they have been used in the original query. Each result element has at most the following attributes: - <em>id</em>: the row number of the top-level statement, starting at 1<br>- <em>type</em>: the type of the top-level statement (e.g. <em>for</em>, <em>return</em> ...)<br>- <em>loopLevel</em>: the nesting level of the top-level statement, starting at 1<br>Depending on the type of top-level statement, there might be other attributes providing additional information, for example, if and which indexed will be used. Many top-level statements will provide an <em>expression</em> attribute that contains data about the expression they operate on. This is true for <em>FOR</em>, <em>FILTER</em>, <em>SORT</em>, <em>COLLECT</em>, and <em>RETURN</em> statements. The <em>expression</em> attribute has the following sub-attributes: - <em>type</em>: the type of the expression. Some possible values are:<br> - <em>collection</em>: an iteration over documents from a collection. The <em>value</em> attribute will then contain the collection name. The <em>extra</em> attribute will contain information about if and which index is used when accessing the documents from the collection. If no index is used, the <em>accessType</em> sub-attribute of the <em>extra</em> attribute will have the value <em>all</em>, otherwise it will be <em>index</em>. - <em>list</em>: a list of dynamic values. The <em>value</em> attribute will contain the list elements. - <em>const list</em>: a list of constant values. The <em>value</em> attribute will contain the list elements. - <em>reference</em>: a reference to another variable. The <em>value</em> attribute will contain the name of the variable that is referenced. <br><br>Please note that the structure of the explain result data might change in future versions of ArangoDB without further notice and without maintaining backwards compatibility. <br><br>",
"notes": "<br><br>To explain how an AQL query would be executed on the server, the query string can be sent to the server via an HTTP POST request. The server will then validate the query and create an execution plan for it, but will not execute it. <br><br>The execution plan that is returned by the server can be used to estimate the probable performance of an AQL query. Though the actual performance will depend on many different factors, the execution plan normally can give some good hint on the amount of work the server needs to do in order to actually run the query. <br><br>The top-level statements will appear in the result in the same order in which they have been used in the original query. Each result element has at most the following attributes: - <em>id</em>: the row number of the top-level statement, starting at 1- <em>type</em>: the type of the top-level statement (e.g. <em>for</em>, <em>return</em> ...)- <em>loopLevel</em>: the nesting level of the top-level statement, starting at 1Depending on the type of top-level statement, there might be other attributes providing additional information, for example, if and which indexed will be used. Many top-level statements will provide an <em>expression</em> attribute that contains data about the expression they operate on. This is true for <em>FOR</em>, <em>FILTER</em>, <em>SORT</em>, <em>COLLECT</em>, and <em>RETURN</em> statements. The <em>expression</em> attribute has the following sub-attributes: - <em>type</em>: the type of the expression. Some possible values are: - <em>collection</em>: an iteration over documents from a collection. The <em>value</em> attribute will then contain the collection name. The <em>extra</em> attribute will contain information about if and which index is used when accessing the documents from the collection. If no index is used, the <em>accessType</em> sub-attribute of the <em>extra</em> attribute will have the value <em>all</em>, otherwise it will be <em>index</em>. - <em>list</em>: a list of dynamic values. The <em>value</em> attribute will contain the list elements. - <em>const list</em>: a list of constant values. The <em>value</em> attribute will contain the list elements. - <em>reference</em>: a reference to another variable. The <em>value</em> attribute will contain the name of the variable that is referenced. <br><br>Please note that the structure of the explain result data might change in future versions of ArangoDB without further notice and without maintaining backwards compatibility. <br><br>",
"summary": "explains a query",
"httpMethod": "POST",
"examples": "Valid query: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/explain\n{ \"query\" : \"FOR p IN products FILTER p.id == @id LIMIT 2 RETURN p.name\", \"bindVars\": { \"id\" : 3 } }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"plan\" : [ \n { \n \"id\" : 1, \n \"loopLevel\" : 1, \n \"type\" : \"for\", \n \"resultVariable\" : \"p\", \n \"limit\" : true, \n \"expression\" : { \n \"type\" : \"collection\", \n \"value\" : \"products\", \n \"extra\" : { \n \"accessType\" : \"all\" \n } \n } \n }, \n { \n \"id\" : 2, \n \"loopLevel\" : 1, \n \"type\" : \"filter\", \n \"expression\" : { \n \"type\" : \"expression\", \n \"value\" : \"p.id == 3\" \n } \n }, \n { \n \"id\" : 3, \n \"loopLevel\" : 1, \n \"type\" : \"return\", \n \"expression\" : { \n \"type\" : \"expression\", \n \"value\" : \"p.name\" \n } \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>Invalid query: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/explain\n{ \"query\" : \"FOR p IN products FILTER p.id == @id LIMIT 2 RETURN p.n\" }\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 1551, \n \"errorMessage\" : \"no value specified for declared bind parameter 'id'\" \n}\n\n</code></pre><br>The data returned in the <em>plan</em> attribute of the result contains one element per AQL top-level statement (i.e. <em>FOR</em>, <em>RETURN</em>, <em>FILTER</em> etc.). If the query optimiser removed some unnecessary statements, the result might also contain less elements than there were top-level statements in the AQL query. The following example shows a query with a non-sensible filter condition that the optimiser has removed so that there are less top-level statements: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/explain\n{ \"query\" : \"FOR i IN [ 1, 2, 3 ] FILTER 1 == 2 RETURN i\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"plan\" : [ \n { \n \"id\" : 1, \n \"loopLevel\" : 0, \n \"type\" : \"return (empty)\", \n \"expression\" : { \n \"type\" : \"const list\", \n \"value\" : \"[ ]\" \n } \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",

View File

@ -38,7 +38,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\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/\n{\"_key\":\"graph\",\"vertices\":\"vertices\",\"edges\":\"edges\"}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: 229079566\n\n{ \n \"graph\" : { \n \"_id\" : \"_graphs/graph\", \n \"_rev\" : \"229079566\", \n \"_key\" : \"graph\", \n \"edges\" : \"edges\", \n \"vertices\" : \"vertices\" \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/\n{\"_key\":\"graph\",\"vertices\":\"vertices\",\"edges\":\"edges\"}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: 229125340\n\n{ \n \"graph\" : { \n \"_id\" : \"_graphs/graph\", \n \"_rev\" : \"229125340\", \n \"_key\" : \"graph\", \n \"edges\" : \"edges\", \n \"vertices\" : \"vertices\" \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"nickname": "createGraph"
}
],
@ -89,7 +89,7 @@
"notes": "<br><br>Returns an object with an attribute <em>graph</em> containing a list of all graph properties. <br><br>",
"summary": "get graph properties",
"httpMethod": "GET",
"examples": "get graph by name <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/graph/graph\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 215185934\n\n{ \n \"graph\" : { \n \"_id\" : \"_graphs/graph\", \n \"_rev\" : \"215185934\", \n \"_key\" : \"graph\", \n \"edges\" : \"edges\", \n \"vertices\" : \"vertices\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"examples": "get graph by name <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/graph/graph\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 215362780\n\n{ \n \"graph\" : { \n \"_id\" : \"_graphs/graph\", \n \"_rev\" : \"215362780\", \n \"_key\" : \"graph\", \n \"edges\" : \"edges\", \n \"vertices\" : \"vertices\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"nickname": "getGraphProperties"
}
],
@ -178,7 +178,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\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/vertex\n{\"_key\":\"v1\",\"optional1\":\"val1\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 205421070\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"205421070\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/vertex\n{\"_key\":\"v1\",\"optional1\":\"val1\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 205597916\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"205597916\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n\n</code></pre><br>",
"nickname": "createVertex"
}
],
@ -235,7 +235,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": "get vertex properties by name <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 196377102\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"196377102\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"examples": "get vertex properties by name <br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 196553948\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"196553948\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"nickname": "getVertex"
}
],
@ -356,7 +356,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\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{\"optional1\":\"val2\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 111180302\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"111180302\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val2\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{\"optional1\":\"val2\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 111160540\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"111160540\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val2\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n\n</code></pre><br>",
"nickname": "updateVertex"
}
],
@ -426,7 +426,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>. 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\" >unix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{\"optional1\":\"vertexPatch\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 51608078\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"51608078\", \n \"_key\" : \"v1\", \n \"optional1\" : \"vertexPatch\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n\nunix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{\"optional1\":null}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 52132366\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"52132366\", \n \"_key\" : \"v1\", \n \"optional1\" : null \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{\"optional1\":\"vertexPatch\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 51653852\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"51653852\", \n \"_key\" : \"v1\", \n \"optional1\" : \"vertexPatch\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n\nunix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{\"optional1\":null}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 52112604\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"52112604\", \n \"_key\" : \"v1\", \n \"optional1\" : null \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n\n</code></pre><br>",
"nickname": "updateVertex"
}
],
@ -457,10 +457,10 @@
"description": "The call expects a JSON hash array as body to filter the result: "
}
],
"notes": "Returns a cursor. <br><br>The call expects a JSON hash array as body to filter the result: <br><br>- <em>batchSize</em>: the batch size of the returned cursor<br>- <em>limit</em>: limit the result size<br>- <em>count</em>: return the total number of results (default \"false\")<br>- <em>filter</em>: a optional filter<br><br>The attributes of filter - <em>properties</em>: filter by an array of vertex properties<br><br>The attributes of a property filter - <em>key</em>: filter the result vertices by a key value pair<br>- <em>value</em>: the value of the <em>key</em><br>- <em>compare</em>: a compare operator<br><br>",
"notes": "Returns a cursor. <br><br>The call expects a JSON hash array as body to filter the result: <br><br>- <em>batchSize</em>: the batch size of the returned cursor- <em>limit</em>: limit the result size- <em>count</em>: return the total number of results (default \"false\")- <em>filter</em>: a optional filter<br><br>The attributes of filter - <em>properties</em>: filter by an array of vertex properties<br><br>The attributes of a property filter - <em>key</em>: filter the result vertices by a key value pair- <em>value</em>: the value of the <em>key</em>- <em>compare</em>: a compare operator<br><br>",
"summary": "get vertices",
"httpMethod": "POST",
"examples": "Select all vertices <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/vertices\n{\"batchSize\":100}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"vertices/v5\", \n \"_rev\" : \"44661262\", \n \"_key\" : \"v5\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v4\", \n \"_rev\" : \"44399118\", \n \"_key\" : \"v4\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"43612686\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v3\", \n \"_rev\" : \"44136974\", \n \"_key\" : \"v3\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v2\", \n \"_rev\" : \"43874830\", \n \"_key\" : \"v2\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"examples": "Select all vertices <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/vertices\n{\"batchSize\":100}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"vertices/v5\", \n \"_rev\" : \"44641500\", \n \"_key\" : \"v5\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v4\", \n \"_rev\" : \"44379356\", \n \"_key\" : \"v4\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"43527388\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v3\", \n \"_rev\" : \"44117212\", \n \"_key\" : \"v3\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v2\", \n \"_rev\" : \"43789532\", \n \"_key\" : \"v2\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"nickname": "getVertices"
}
],
@ -491,10 +491,10 @@
"description": "The call expects a JSON hash array as body to filter the result: "
}
],
"notes": "Returns a cursor. <br><br>The call expects a JSON hash array as body to filter the result: <br><br>- <em>batchSize</em>: the batch size of the returned cursor<br>- <em>limit</em>: limit the result size<br>- <em>count</em>: return the total number of results (default \"false\")<br>- <em>filter</em>: a optional filter<br><br>The attributes of filter - <em>direction</em>: Filter for inbound (value \"in\") or outbound (value \"out\")<br> neighbors. Default value is \"any\". - <em>labels</em>: filter by an array of edge labels (empty array means no restriction)<br>- <em>properties</em>: filter neighbors by an array of edge properties<br><br>The attributes of a property filter - <em>key</em>: filter the result vertices by a key value pair<br>- <em>value</em>: the value of the <em>key</em><br>- <em>compare</em>: a compare operator<br><br>",
"notes": "Returns a cursor. <br><br>The call expects a JSON hash array as body to filter the result: <br><br>- <em>batchSize</em>: the batch size of the returned cursor- <em>limit</em>: limit the result size- <em>count</em>: return the total number of results (default \"false\")- <em>filter</em>: a optional filter<br><br>The attributes of filter - <em>direction</em>: Filter for inbound (value \"in\") or outbound (value \"out\") neighbors. Default value is \"any\". - <em>labels</em>: filter by an array of edge labels (empty array means no restriction)- <em>properties</em>: filter neighbors by an array of edge properties<br><br>The attributes of a property filter - <em>key</em>: filter the result vertices by a key value pair- <em>value</em>: the value of the <em>key</em>- <em>compare</em>: a compare operator<br><br>",
"summary": "get vertices",
"httpMethod": "POST",
"examples": "Select all vertices <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/vertices/v2\n{\"batchSize\" : 100, \"filter\" : {\"direction\" : \"any\", \"properties\":[] }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"87063054\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v4\", \n \"_rev\" : \"87849486\", \n \"_key\" : \"v4\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>Select vertices by direction and property filter <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/vertices/v2\n{\"batchSize\" : 100, \"filter\" : {\"direction\" : \"out\", \"properties\":[ { \"key\": \"optional1\", \"value\": \"val2\", \"compare\" : \"==\" }, ] }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"vertices/v4\", \n \"_rev\" : \"144996878\", \n \"_key\" : \"v4\", \n \"optional1\" : \"val2\" \n }, \n { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"144210446\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"examples": "Select all vertices <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/vertices/v2\n{\"batchSize\" : 100, \"filter\" : {\"direction\" : \"any\", \"properties\":[] }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"87043292\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v4\", \n \"_rev\" : \"87829724\", \n \"_key\" : \"v4\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>Select vertices by direction and property filter <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/vertices/v2\n{\"batchSize\" : 100, \"filter\" : {\"direction\" : \"out\", \"properties\":[ { \"key\": \"optional1\", \"value\": \"val2\", \"compare\" : \"==\" }, ] }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"vertices/v4\", \n \"_rev\" : \"144977116\", \n \"_key\" : \"v4\", \n \"optional1\" : \"val2\" \n }, \n { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"144190684\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"nickname": "getVertices"
}
],
@ -535,10 +535,10 @@
"description": "The call expects a JSON hash array as body with the edge properties: "
}
],
"notes": "Creates an edge in a graph. <br><br>The call expects a JSON hash array as body with the edge properties: <br><br>- <em>_key</em>: The name of the edge.<br>- <em>_from</em>: The name of the from vertex.<br>- <em>_to</em>: The name of the to vertex.<br>- <em>$label</em>: A label for the edge (optional).<br>- further optional attributes.<br><br>Returns an object with an attribute <em>edge</em> containing the list of all edge properties. <br><br>",
"notes": "Creates an edge in a graph. <br><br>The call expects a JSON hash array as body with the edge properties: <br><br>- <em>_key</em>: The name of the edge.- <em>_from</em>: The name of the from vertex.- <em>_to</em>: The name of the to vertex.- <em>$label</em>: A label for the edge (optional).- further optional attributes.<br><br>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\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/edge\n{\"_key\":\"edge1\",\"_from\":\"vert2\",\"_to\":\"vert1\",\"optional1\":\"val1\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 131234318\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"131234318\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/vert2\", \n \"_to\" : \"vertices/vert1\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/edge\n{\"_key\":\"edge1\",\"_from\":\"vert2\",\"_to\":\"vert1\",\"optional1\":\"val1\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 131214556\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"131214556\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/vert2\", \n \"_to\" : \"vertices/vert1\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n\n</code></pre><br>",
"nickname": "createEdge"
}
],
@ -595,7 +595,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\" >unix> curl --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 127171086\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"127171086\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\" >unix> curl --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 127151324\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"127151324\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"nickname": "getEdge"
}
],
@ -716,7 +716,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\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n{\"optional1\":\"val2\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 104888846\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"104888846\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val2\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n{\"optional1\":\"val2\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 104869084\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"104869084\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val2\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n\n</code></pre><br>",
"nickname": "updateEdge"
}
],
@ -786,7 +786,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\" >unix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n{\"optional3\":\"val3\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 171145742\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"171145742\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val1\", \n \"optional3\" : \"val3\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n{\"optional3\":\"val3\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 171322588\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"171322588\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val1\", \n \"optional3\" : \"val3\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n\n</code></pre><br>",
"nickname": "updateEdge"
}
],
@ -817,10 +817,10 @@
"description": "The call expects a JSON hash array as body to filter the result: "
}
],
"notes": "Returns a cursor. <br><br>The call expects a JSON hash array as body to filter the result: <br><br>- <em>batchSize</em>: the batch size of the returned cursor<br>- <em>limit</em>: limit the result size<br>- <em>count</em>: return the total number of results (default \"false\")<br>- <em>filter</em>: a optional filter<br><br>The attributes of filter - <em>labels</em>: filter by an array of edge labels<br>- <em>properties</em>: filter by an array of edge properties<br><br>The attributes of a property filter - <em>key</em>: filter the result edges by a key value pair<br>- <em>value</em>: the value of the <em>key</em><br>- <em>compare</em>: a compare operator<br><br>",
"notes": "Returns a cursor. <br><br>The call expects a JSON hash array as body to filter the result: <br><br>- <em>batchSize</em>: the batch size of the returned cursor- <em>limit</em>: limit the result size- <em>count</em>: return the total number of results (default \"false\")- <em>filter</em>: a optional filter<br><br>The attributes of filter - <em>labels</em>: filter by an array of edge labels- <em>properties</em>: filter by an array of edge properties<br><br>The attributes of a property filter - <em>key</em>: filter the result edges by a key value pair- <em>value</em>: the value of the <em>key</em>- <em>compare</em>: a compare operator<br><br>",
"summary": "get edges",
"httpMethod": "POST",
"examples": "Select all edges <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/edges\n{\"batchSize\":100}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"edges/edge4\", \n \"_rev\" : \"66615822\", \n \"_key\" : \"edge4\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v5\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"65042958\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge2\", \n \"_rev\" : \"65567246\", \n \"_key\" : \"edge2\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v3\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge3\", \n \"_rev\" : \"66091534\", \n \"_key\" : \"edge3\", \n \"_from\" : \"vertices/v2\", \n \"_to\" : \"vertices/v4\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"examples": "Select all edges <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/edges\n{\"batchSize\":100}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"edges/edge4\", \n \"_rev\" : \"66596060\", \n \"_key\" : \"edge4\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v5\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"65023196\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge2\", \n \"_rev\" : \"65547484\", \n \"_key\" : \"edge2\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v3\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge3\", \n \"_rev\" : \"66071772\", \n \"_key\" : \"edge3\", \n \"_from\" : \"vertices/v2\", \n \"_to\" : \"vertices/v4\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"nickname": "getEdges"
}
],
@ -858,10 +858,10 @@
"description": "The call expects a JSON hash array as body to filter the result: "
}
],
"notes": "<br><br>Returns a cursor. <br><br>The call expects a JSON hash array as body to filter the result: <br><br>- <em>batchSize</em>: the batch size of the returned cursor<br>- <em>limit</em>: limit the result size<br>- <em>count</em>: return the total number of results (default \"false\")<br>- <em>filter</em>: a optional filter<br><br>The attributes of filter - <em>direction</em>: Filter for inbound (value \"in\") or outbound (value \"out\")<br> neighbors. Default value is \"any\". - <em>labels</em>: filter by an array of edge labels<br>- <em>properties</em>: filter neighbors by an array of properties<br><br>The attributes of a property filter - <em>key</em>: filter the result vertices by a key value pair<br>- <em>value</em>: the value of the <em>key</em><br>- <em>compare</em>: a compare operator<br><br>",
"notes": "<br><br>Returns a cursor. <br><br>The call expects a JSON hash array as body to filter the result: <br><br>- <em>batchSize</em>: the batch size of the returned cursor- <em>limit</em>: limit the result size- <em>count</em>: return the total number of results (default \"false\")- <em>filter</em>: a optional filter<br><br>The attributes of filter - <em>direction</em>: Filter for inbound (value \"in\") or outbound (value \"out\") neighbors. Default value is \"any\". - <em>labels</em>: filter by an array of edge labels- <em>properties</em>: filter neighbors by an array of properties<br><br>The attributes of a property filter - <em>key</em>: filter the result vertices by a key value pair- <em>value</em>: the value of the <em>key</em>- <em>compare</em>: a compare operator<br><br>",
"summary": "get edges",
"httpMethod": "POST",
"examples": "Select all edges <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/edges/v2\n{\"batchSize\" : 100, \"filter\" : { \"direction\" : \"any\" }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"72317454\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge3\", \n \"_rev\" : \"73366030\", \n \"_key\" : \"edge3\", \n \"_from\" : \"vertices/v2\", \n \"_to\" : \"vertices/v4\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"examples": "Select all edges <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/edges/v2\n{\"batchSize\" : 100, \"filter\" : { \"direction\" : \"any\" }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"72297692\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge3\", \n \"_rev\" : \"73346268\", \n \"_key\" : \"edge3\", \n \"_from\" : \"vertices/v2\", \n \"_to\" : \"vertices/v4\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"nickname": "getEdges"
}
],

View File

@ -92,7 +92,7 @@
"notes": "<br><br>Creates a cap constraint (@ref IndexCapIntro) for the collection <em>collection-name</em>, if it does not already exist. Expects an object containing the index details. <br><br>- <em>type</em>: must be equal to <em>\"cap\"</em>.<br><br>- <em>size</em>: The maximal number of documents for the collection.<br><br>Note that the cap constraint does not index particular attributes of the documents in a collection, but limits the number of documents in the collection to a maximum value. The cap constraint thus does not support attribute names specified in the <em>fields</em> attribute nor uniqueness of any kind via the <em>unique</em> attribute. <br><br>",
"summary": "creates a cap constraint",
"httpMethod": "POST",
"examples": "Creating a cap collection <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"cap\", \"size\" : 10 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/230324750\", \n \"type\" : \"cap\", \n \"unique\" : false, \n \"size\" : 10, \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"examples": "Creating a cap collection <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"cap\", \"size\" : 10 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/230501596\", \n \"type\" : \"cap\", \n \"unique\" : false, \n \"size\" : 10, \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"nickname": "createsACapConstraint"
}
],
@ -131,10 +131,10 @@
"description": ""
}
],
"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>- <em>type</em>: must be equal to <em>\"geo\"</em>.<br><br>- <em>fields</em>: A list with one or two attribute paths. <br><br> 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. <br><br> 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. <br><br>- <em>geoJson</em>: If a geo-spatial index on a <em>location</em> is constructed<br> 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 <br><br>- <em>constraint</em>: If <em>constraint</em> is <em>true</em>, then a geo-spatial<br> constraint is created. The constraint is a non-unique variant of the index. Note that it is also possible to set the <em>unique</em> attribute instead of the <em>constraint</em> attribute. <br><br>- <em>ignoreNull</em>: If a geo-spatial constraint is created and<br> <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. <br><br>",
"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>- <em>type</em>: must be equal to <em>\"geo\"</em>.<br><br>- <em>fields</em>: A list with one or two attribute paths. <br><br> 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. <br><br> 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. <br><br>- <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 <br><br>- <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. Note that it is also possible to set the <em>unique</em> attribute instead of the <em>constraint</em> attribute. <br><br>- <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. <br><br>",
"summary": "creates a geo-spatial index",
"httpMethod": "POST",
"examples": "Creating a geo index with a location attribute: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"geo\", \"fields\" : [ \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/233863694\", \n \"type\" : \"geo1\", \n \"unique\" : false, \n \"geoJson\" : false, \n \"constraint\" : false, \n \"fields\" : [ \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>Creating a geo index with latitude and longitude attributes: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"geo\", \"fields\" : [ \"e\", \"f\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/82016782\", \n \"type\" : \"geo2\", \n \"unique\" : false, \n \"constraint\" : false, \n \"fields\" : [ \n \"e\", \n \"f\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"examples": "Creating a geo index with a location attribute: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"geo\", \"fields\" : [ \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/234040540\", \n \"type\" : \"geo1\", \n \"unique\" : false, \n \"geoJson\" : false, \n \"constraint\" : false, \n \"fields\" : [ \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>Creating a geo index with latitude and longitude attributes: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"geo\", \"fields\" : [ \"e\", \"f\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/81997020\", \n \"type\" : \"geo2\", \n \"unique\" : false, \n \"constraint\" : false, \n \"fields\" : [ \n \"e\", \n \"f\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"nickname": "createsAGeo-spatialIndex"
}
],
@ -180,7 +180,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>- <em>type</em>: must be equal to <em>\"hash\"</em>.<br><br>- <em>fields</em>: A list of attribute paths.<br><br>- <em>unique</em>: If <em>true</em>, then create a unique index.<br><br>",
"summary": "creates a hash index",
"httpMethod": "POST",
"examples": "Creating an unique constraint: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"hash\", \"unique\" : true, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/242383374\", \n \"type\" : \"hash\", \n \"unique\" : true, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>Creating a hash index: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"hash\", \"unique\" : false, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/246905358\", \n \"type\" : \"hash\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"examples": "Creating an unique constraint: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"hash\", \"unique\" : true, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/242560220\", \n \"type\" : \"hash\", \n \"unique\" : true, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>Creating a hash index: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"hash\", \"unique\" : false, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/247082204\", \n \"type\" : \"hash\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"nickname": "createsAHashIndex"
}
],
@ -226,7 +226,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>- <em>type</em>: must be equal to <em>\"skiplist\"</em>.<br><br>- <em>fields</em>: A list of attribute paths.<br><br>- <em>unique</em>: If <em>true</em>, then create a unique index.<br><br>",
"summary": "creates a skip list",
"httpMethod": "POST",
"examples": "Creating a skiplist: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"skiplist\", \"unique\" : false, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/132545038\", \n \"type\" : \"skiplist\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"examples": "Creating a skiplist: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"skiplist\", \"unique\" : false, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/132525276\", \n \"type\" : \"skiplist\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"nickname": "createsASkipList"
}
],
@ -265,10 +265,10 @@
"description": ""
}
],
"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>- <em>type</em>: must be equal to <em>\"fulltext\"</em>.<br><br>- <em>fields</em>: A list of attribute names. Currently, the list is limited <br> to exactly one attribute, so the value of <em>fields</em> should look like this for example: <em>[ \"text\" ]</em>. <br><br>- <em>minLength</em>: Minimum character length of words to index. Will default<br> to a server-defined value if unspecified. It is thus recommended to set this value explicitly when creating the index. <br><br>",
"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>- <em>type</em>: must be equal to <em>\"fulltext\"</em>.<br><br>- <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>. <br><br>- <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. <br><br>",
"summary": "creates a fulltext index",
"httpMethod": "POST",
"examples": "Creating a fulltext index: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\" : \"fulltext\", \"fields\" : [ \"text\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/113539598\", \n \"type\" : \"fulltext\", \n \"unique\" : false, \n \"minLength\" : 2, \n \"fields\" : [ \n \"text\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"examples": "Creating a fulltext index: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\" : \"fulltext\", \"fields\" : [ \"text\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/113519836\", \n \"type\" : \"fulltext\", \n \"unique\" : false, \n \"minLength\" : 2, \n \"fields\" : [ \n \"text\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"nickname": "createsAFulltextIndex"
}
],
@ -310,7 +310,7 @@
"notes": "<br><br>Creates a bitarray 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>- <em>type</em>: must be equal to <em>\"bitarray\"</em>.<br><br>- <em>fields</em>: A list of pairs. A pair consists of an attribute path followed by a list of values.<br><br>- <em>unique</em>: Must always be set to <em>false</em>.<br><br>",
"summary": "creates a bitarray index",
"httpMethod": "POST",
"examples": "Creating a bitarray index: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\" : \"bitarray\", \"unique\" : false, \"fields\" : [ \"x\", [0,1,[]], \"y\", [\"a\",\"b\",[]] ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/152271374\", \n \"type\" : \"bitarray\", \n \"unique\" : false, \n \"fields\" : [ \n [ \n \"x\", \n [ \n 0, \n 1, \n [ ] \n ] \n ], \n [ \n \"y\", \n [ \n \"a\", \n \"b\", \n [ ] \n ] \n ] \n ], \n \"undefined\" : false, \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"examples": "Creating a bitarray index: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\" : \"bitarray\", \"unique\" : false, \"fields\" : [ \"x\", [0,1,[]], \"y\", [\"a\",\"b\",[]] ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/152251612\", \n \"type\" : \"bitarray\", \n \"unique\" : false, \n \"fields\" : [ \n [ \n \"x\", \n [ \n 0, \n 1, \n [ ] \n ] \n ], \n [ \n \"y\", \n [ \n \"a\", \n \"b\", \n [ ] \n ] \n ] \n ], \n \"undefined\" : false, \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"nickname": "createsABitarrayIndex"
}
],
@ -345,7 +345,7 @@
"description": ""
}
],
"notes": "<br><br>Creates a new index in the collection <em>collection-name</em>. Expects an object containing the index details. <br><br>The type of the index to be created must specified in the <em>type</em> attribute of the index details. Depending on the index type, additional other attributes may need to specified in the request in order to create the index. <br><br>See @ref IndexCapHttp, @ref IndexGeoHttp, @ref IndexHashHttp, @ref IndexFulltextHttp, and @ref IndexSkiplistHttp for details. <br><br>Most indexes (a notable exception being the cap constraint) require the list of attributes to be indexed in the <em>fields</em> attribute of the index details. Depending on the index type, a single attribute or multiple attributes may be indexed. <br><br>Some indexes can be created as unique or non-unique variants. Uniqueness can be controlled for most indexes by specifying the <em>unique</em> in the index details. Setting it to <em>true</em> will create a unique index. Setting it to <em>false</em> or omitting the <em>unique</em> attribute will create a non-unique index. <br><br>Note that the following index types do not support uniqueness, and using the <em>unique</em> attribute with these types may lead to an error: - cap constraints<br>- fulltext indexes<br><br>",
"notes": "<br><br>Creates a new index in the collection <em>collection-name</em>. Expects an object containing the index details. <br><br>The type of the index to be created must specified in the <em>type</em> attribute of the index details. Depending on the index type, additional other attributes may need to specified in the request in order to create the index. <br><br>See @ref IndexCapHttp, @ref IndexGeoHttp, @ref IndexHashHttp, @ref IndexFulltextHttp, and @ref IndexSkiplistHttp for details. <br><br>Most indexes (a notable exception being the cap constraint) require the list of attributes to be indexed in the <em>fields</em> attribute of the index details. Depending on the index type, a single attribute or multiple attributes may be indexed. <br><br>Some indexes can be created as unique or non-unique variants. Uniqueness can be controlled for most indexes by specifying the <em>unique</em> in the index details. Setting it to <em>true</em> will create a unique index. Setting it to <em>false</em> or omitting the <em>unique</em> attribute will create a non-unique index. <br><br>Note that the following index types do not support uniqueness, and using the <em>unique</em> attribute with these types may lead to an error: - cap constraints- fulltext indexes<br><br>",
"summary": "creates an index",
"httpMethod": "POST",
"examples": "",
@ -375,7 +375,7 @@
"notes": "<br><br>Deletes an index with <em>index-handle</em>. <br><br>",
"summary": "deletes an index",
"httpMethod": "DELETE",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X DELETE --dump - http://localhost:8529/_api/index/products/190085646\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/190085646\", \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X DELETE --dump - http://localhost:8529/_api/index/products/190262492\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/190262492\", \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"nickname": "deletesAnIndex"
}
],

View File

@ -29,10 +29,10 @@
"description": "Contains the query. "
}
],
"notes": "<br><br>Returns all documents of a collections. The call expects a JSON object as body with the following attributes: <br><br>- <em>collection</em>: The name of the collection to query.<br><br>- <em>skip</em>: The number of documents to skip in the query (optional).<br><br>- <em>limit</em>: The maximal amount of documents to return. The <em>skip</em><br> is applied before the <em>limit</em> restriction. (optional) <br><br>Returns a cursor containing the result, see @ref HttpCursor for details. <br><br>",
"notes": "<br><br>Returns all documents of a collections. The call expects a JSON object as body with the following attributes: <br><br>- <em>collection</em>: The name of the collection to query.<br><br>- <em>skip</em>: The number of documents to skip in the query (optional).<br><br>- <em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is applied before the <em>limit</em> restriction. (optional) <br><br>Returns a cursor containing the result, see @ref HttpCursor for details. <br><br>",
"summary": "executes simple query ALL",
"httpMethod": "PUT",
"examples": "Limit the amount of documents using <em>limit</em> <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/all\n{ \"collection\": \"products\", \"skip\": 2, \"limit\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/198801934\", \n \"_rev\" : \"198801934\", \n \"_key\" : \"198801934\", \n \"Hello4\" : \"World4\" \n }, \n { \n \"_id\" : \"products/199064078\", \n \"_rev\" : \"199064078\", \n \"_key\" : \"199064078\", \n \"Hello5\" : \"World5\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>Using a <em>batchSize</em> value <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/all\n{ \"collection\": \"products\", \"batchSize\" : 3 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/99908110\", \n \"_rev\" : \"99908110\", \n \"_key\" : \"99908110\", \n \"Hello2\" : \"World2\" \n }, \n { \n \"_id\" : \"products/100170254\", \n \"_rev\" : \"100170254\", \n \"_key\" : \"100170254\", \n \"Hello3\" : \"World3\" \n }, \n { \n \"_id\" : \"products/100432398\", \n \"_rev\" : \"100432398\", \n \"_key\" : \"100432398\", \n \"Hello4\" : \"World4\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"100825614\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"examples": "Limit the amount of documents using <em>limit</em> <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/all\n{ \"collection\": \"products\", \"skip\": 2, \"limit\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/198716636\", \n \"_rev\" : \"198716636\", \n \"_key\" : \"198716636\", \n \"Hello3\" : \"World3\" \n }, \n { \n \"_id\" : \"products/198192348\", \n \"_rev\" : \"198192348\", \n \"_key\" : \"198192348\", \n \"Hello1\" : \"World1\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>Using a <em>batchSize</em> value <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/all\n{ \"collection\": \"products\", \"batchSize\" : 3 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/99888348\", \n \"_rev\" : \"99888348\", \n \"_key\" : \"99888348\", \n \"Hello2\" : \"World2\" \n }, \n { \n \"_id\" : \"products/100412636\", \n \"_rev\" : \"100412636\", \n \"_key\" : \"100412636\", \n \"Hello4\" : \"World4\" \n }, \n { \n \"_id\" : \"products/99429596\", \n \"_rev\" : \"99429596\", \n \"_key\" : \"99429596\", \n \"Hello1\" : \"World1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"100805852\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"nickname": "executesSimpleQueryAll"
}
],
@ -67,7 +67,7 @@
"notes": "<br><br>Returns a random document of a collection. The call expects a JSON object as body with the following attributes: <br><br>- <em>collection</em>: The identifier or name of the collection to query.<br><br>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 attrbute contains null. <br><br>",
"summary": "executes simple query ANY",
"httpMethod": "PUT",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/any\n{ \"collection\": \"products\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"document\" : { \n \"_id\" : \"products/187660814\", \n \"_rev\" : \"187660814\", \n \"_key\" : \"187660814\", \n \"Hello1\" : \"World1\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/any\n{ \"collection\": \"products\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"document\" : { \n \"_id\" : \"products/187837660\", \n \"_rev\" : \"187837660\", \n \"_key\" : \"187837660\", \n \"Hello1\" : \"World1\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
"nickname": "executesSimpleQueryAny"
}
],
@ -99,10 +99,10 @@
"description": "Contains the query. "
}
],
"notes": "<br><br>The default will find at most 100 documents near a given coordinate. The returned list is sorted according to the distance, with the nearest document coming first. If there are near documents of equal distance, documents are chosen randomly from this set until the limit is reached. <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 hash array as body with the following attributes: <br><br>- <em>collection</em>: The name of the collection to query.<br><br>- <em>latitude</em>: The latitude of the coordinate.<br><br>- <em>longitude</em>: The longitude of the coordinate.<br><br>- <em>distance</em>: If given, the attribute key used to store the<br> distance. (optional) <br><br>- <em>skip</em>: The number of documents to skip in the query. (optional)<br><br>- <em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is<br> applied before the <em>limit</em> restriction. The default is 100. (optional) <br><br>- <em>geo</em>: If given, the identifier of the geo-index to use. (optional)<br><br>Returns a cursor containing the result, see @ref HttpCursor for details. <br><br>",
"notes": "<br><br>The default will find at most 100 documents near a given coordinate. The returned list is sorted according to the distance, with the nearest document coming first. If there are near documents of equal distance, documents are chosen randomly from this set until the limit is reached. <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 hash array as body with the following attributes: <br><br>- <em>collection</em>: The name of the collection to query.<br><br>- <em>latitude</em>: The latitude of the coordinate.<br><br>- <em>longitude</em>: The longitude of the coordinate.<br><br>- <em>distance</em>: If given, the attribute key used to store the distance. (optional) <br><br>- <em>skip</em>: The number of documents to skip in the query. (optional)<br><br>- <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) <br><br>- <em>geo</em>: If given, the identifier of the geo-index to use. (optional)<br><br>Returns a cursor containing the result, see @ref HttpCursor for details. <br><br>",
"summary": "executes simple query NEAR",
"httpMethod": "PUT",
"examples": "Without distance: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/236157454\", \n \"_rev\" : \"236157454\", \n \"_key\" : \"236157454\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/235895310\", \n \"_rev\" : \"235895310\", \n \"_key\" : \"235895310\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ] \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>With distance: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 3, \"distance\" : \"distance\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/76380686\", \n \"_rev\" : \"76380686\", \n \"_key\" : \"76380686\", \n \"distance\" : 222.38985328911744, \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/76642830\", \n \"_rev\" : \"76642830\", \n \"_key\" : \"76642830\", \n \"distance\" : 222.38985328911744, \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/76249614\", \n \"_rev\" : \"76249614\", \n \"_key\" : \"76249614\", \n \"distance\" : 444.779706578235, \n \"name\" : \"Name/-0.004/\", \n \"loc\" : [ \n -0.004, \n 0 \n ] \n } \n ], \n \"hasMore\" : false, \n \"count\" : 3, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"examples": "Without distance: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/236334300\", \n \"_rev\" : \"236334300\", \n \"_key\" : \"236334300\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/236072156\", \n \"_rev\" : \"236072156\", \n \"_key\" : \"236072156\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ] \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>With distance: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 3, \"distance\" : \"distance\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/76360924\", \n \"_rev\" : \"76360924\", \n \"_key\" : \"76360924\", \n \"distance\" : 222.38985328911744, \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/76623068\", \n \"_rev\" : \"76623068\", \n \"_key\" : \"76623068\", \n \"distance\" : 222.38985328911744, \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/76229852\", \n \"_rev\" : \"76229852\", \n \"_key\" : \"76229852\", \n \"distance\" : 444.779706578235, \n \"name\" : \"Name/-0.004/\", \n \"loc\" : [ \n -0.004, \n 0 \n ] \n } \n ], \n \"hasMore\" : false, \n \"count\" : 3, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"nickname": "executesSimpleQueryNear"
}
],
@ -134,10 +134,10 @@
"description": "Contains the query. "
}
],
"notes": "<br><br>This will find all documents with in 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 hash array as body with the following attributes: <br><br>- <em>collection</em>: The name of the collection to query.<br><br>- <em>latitude</em>: The latitude of the coordinate.<br><br>- <em>longitude</em>: The longitude of the coordinate.<br><br>- <em>radius</em>: The maximal radius (in meters).<br><br>- <em>distance</em>: If given, the result attribute key used to store the<br> distance values (optional). If specified, distances are returned in meters. <br><br>- <em>skip</em>: The documents to skip in the query. (optional)<br><br>- <em>limit</em>: The maximal amount of documents to return. (optional)<br><br>- <em>geo</em>: If given, the identifier of the geo-index to use. (optional)<br><br>Returns a cursor containing the result, see @ref HttpCursor for details. <br><br>",
"notes": "<br><br>This will find all documents with in 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 hash array as body with the following attributes: <br><br>- <em>collection</em>: The name of the collection to query.<br><br>- <em>latitude</em>: The latitude of the coordinate.<br><br>- <em>longitude</em>: The longitude of the coordinate.<br><br>- <em>radius</em>: The maximal radius (in meters).<br><br>- <em>distance</em>: If given, the result attribute key used to store the distance values (optional). If specified, distances are returned in meters. <br><br>- <em>skip</em>: The documents to skip in the query. (optional)<br><br>- <em>limit</em>: The maximal amount of documents to return. (optional)<br><br>- <em>geo</em>: If given, the identifier of the geo-index to use. (optional)<br><br>Returns a cursor containing the result, see @ref HttpCursor for details. <br><br>",
"summary": "executes simple query WITHIN",
"httpMethod": "PUT",
"examples": "Without distance: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 2, \"radius\" : 500 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/27490830\", \n \"_rev\" : \"27490830\", \n \"_key\" : \"27490830\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/27228686\", \n \"_rev\" : \"27228686\", \n \"_key\" : \"27228686\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ] \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>With distance: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 3, \"distance\" : \"distance\", \"radius\" : 300 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/107051534\", \n \"_rev\" : \"107051534\", \n \"_key\" : \"107051534\", \n \"distance\" : 222.38985328911744, \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/107313678\", \n \"_rev\" : \"107313678\", \n \"_key\" : \"107313678\", \n \"distance\" : 222.38985328911744, \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/106920462\", \n \"_rev\" : \"106920462\", \n \"_key\" : \"106920462\", \n \"distance\" : 444.779706578235, \n \"name\" : \"Name/-0.004/\", \n \"loc\" : [ \n -0.004, \n 0 \n ] \n } \n ], \n \"hasMore\" : false, \n \"count\" : 3, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"examples": "Without distance: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 2, \"radius\" : 500 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/27471068\", \n \"_rev\" : \"27471068\", \n \"_key\" : \"27471068\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/27208924\", \n \"_rev\" : \"27208924\", \n \"_key\" : \"27208924\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ] \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>With distance: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 3, \"distance\" : \"distance\", \"radius\" : 300 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/107031772\", \n \"_rev\" : \"107031772\", \n \"_key\" : \"107031772\", \n \"distance\" : 222.38985328911744, \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/107293916\", \n \"_rev\" : \"107293916\", \n \"_key\" : \"107293916\", \n \"distance\" : 222.38985328911744, \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/106900700\", \n \"_rev\" : \"106900700\", \n \"_key\" : \"106900700\", \n \"distance\" : 444.779706578235, \n \"name\" : \"Name/-0.004/\", \n \"loc\" : [ \n -0.004, \n 0 \n ] \n } \n ], \n \"hasMore\" : false, \n \"count\" : 3, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"nickname": "executesSimpleQueryWithin"
}
],
@ -172,7 +172,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 hash array as body with the following attributes: <br><br>- <em>collection</em>: The name of the collection to query.<br><br>- <em>attribute</em>: The attribute that contains the texts.<br><br>- <em>query</em>: The fulltext query.<br><br>- <em>skip</em>: The documents to skip in the query. (optional)<br><br>- <em>limit</em>: The maximal amount of documents to return. (optional)<br><br>- <em>index</em>: If given, the identifier of the fulltext-index to use. (optional)<br><br>Returns a cursor containing the result, see @ref HttpCursor for details. <br><br>",
"summary": "executes simple query FULLTEXT",
"httpMethod": "PUT",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/fulltext\n{ \"collection\": \"products\", \"attribute\" : \"text\", \"query\" : \"word\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/138770958\", \n \"_rev\" : \"138770958\", \n \"_key\" : \"138770958\", \n \"text\" : \"this text also has a word\" \n }, \n { \n \"_id\" : \"products/138639886\", \n \"_rev\" : \"138639886\", \n \"_key\" : \"138639886\", \n \"text\" : \"this text contains word\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/fulltext\n{ \"collection\": \"products\", \"attribute\" : \"text\", \"query\" : \"word\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/138620124\", \n \"_rev\" : \"138620124\", \n \"_key\" : \"138620124\", \n \"text\" : \"this text contains word\" \n }, \n { \n \"_id\" : \"products/138751196\", \n \"_rev\" : \"138751196\", \n \"_key\" : \"138751196\", \n \"text\" : \"this text also has a word\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"nickname": "executesSimpleQueryFulltext"
}
],
@ -207,7 +207,7 @@
"notes": "<br><br>This will find all documents matching a given example. <br><br>The call expects a JSON hash array as body with the following attributes: <br><br>- <em>collection</em>: The name of the collection to query.<br><br>- <em>example</em>: The example.<br><br>- <em>skip</em>: The documents to skip in the query. (optional)<br><br>- <em>limit</em>: The maximal amount of documents to return. (optional)<br><br>Returns a cursor containing the result, see @ref HttpCursor for details. <br><br>",
"summary": "executes simple query by-example",
"httpMethod": "PUT",
"examples": "Matching an attribute: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"i\" : 1 } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/59800078\", \n \"_rev\" : \"59800078\", \n \"_key\" : \"59800078\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/60389902\", \n \"_rev\" : \"60389902\", \n \"_key\" : \"60389902\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 2, \n \"j\" : 2 \n } \n }, \n { \n \"_id\" : \"products/60062222\", \n \"_rev\" : \"60062222\", \n \"_key\" : \"60062222\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/60258830\", \n \"_rev\" : \"60258830\", \n \"_key\" : \"60258830\", \n \"i\" : 1 \n } \n ], \n \"hasMore\" : false, \n \"count\" : 4, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>Matching an attribute which is a sub-document: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"a.j\" : 1 } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/117602830\", \n \"_rev\" : \"117602830\", \n \"_key\" : \"117602830\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/117340686\", \n \"_rev\" : \"117340686\", \n \"_key\" : \"117340686\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>Matching an attribute within a sub-document: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/115374606\", \n \"_rev\" : \"115374606\", \n \"_key\" : \"115374606\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n } \n ], \n \"hasMore\" : false, \n \"count\" : 1, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"examples": "Matching an attribute: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"i\" : 1 } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/60239068\", \n \"_rev\" : \"60239068\", \n \"_key\" : \"60239068\", \n \"i\" : 1 \n }, \n { \n \"_id\" : \"products/59780316\", \n \"_rev\" : \"59780316\", \n \"_key\" : \"59780316\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/60370140\", \n \"_rev\" : \"60370140\", \n \"_key\" : \"60370140\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 2, \n \"j\" : 2 \n } \n }, \n { \n \"_id\" : \"products/60042460\", \n \"_rev\" : \"60042460\", \n \"_key\" : \"60042460\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n } \n ], \n \"hasMore\" : false, \n \"count\" : 4, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>Matching an attribute which is a sub-document: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"a.j\" : 1 } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/117583068\", \n \"_rev\" : \"117583068\", \n \"_key\" : \"117583068\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/117320924\", \n \"_rev\" : \"117320924\", \n \"_key\" : \"117320924\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>Matching an attribute within a sub-document: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/115354844\", \n \"_rev\" : \"115354844\", \n \"_key\" : \"115354844\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n } \n ], \n \"hasMore\" : false, \n \"count\" : 1, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"nickname": "executesSimpleQueryBy-example"
}
],
@ -234,7 +234,7 @@
"notes": "<br><br>This will return the first document matching a given example. <br><br>The call expects a JSON hash array as body with the following attributes: <br><br>- <em>collection</em>: The name of the collection to query.<br><br>- <em>example</em>: The example.<br><br>Returns a result containing the document or <em>HTTP 404</em> if no document matched the example. <br><br>",
"summary": "executes simple query first-example",
"httpMethod": "PUT",
"examples": "If a matching document was found: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/first-example\n{ \"collection\": \"products\", \"example\" : { \"i\" : 1 } }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"document\" : { \n \"_id\" : \"products/136739342\", \n \"_rev\" : \"136739342\", \n \"_key\" : \"136739342\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>If no document was found: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/first-example\n{ \"collection\": \"products\", \"example\" : { \"l\" : 1 } }\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 404, \n \"errorMessage\" : \"no match\" \n}\n\n</code></pre><br>",
"examples": "If a matching document was found: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/first-example\n{ \"collection\": \"products\", \"example\" : { \"i\" : 1 } }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"document\" : { \n \"_id\" : \"products/137178332\", \n \"_rev\" : \"137178332\", \n \"_key\" : \"137178332\", \n \"i\" : 1 \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>If no document was found: <br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/first-example\n{ \"collection\": \"products\", \"example\" : { \"l\" : 1 } }\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 404, \n \"errorMessage\" : \"no match\" \n}\n\n</code></pre><br>",
"nickname": "executesSimpleQueryFirst-example"
}
],
@ -258,10 +258,10 @@
}
],
"parameters": [],
"notes": "<br><br>This will find all documents within a given range. You must declare a skip-list index on the attribute in order to be able to use a range query. <br><br>The call expects a JSON hash array as body with the following attributes: <br><br>- <em>collection</em>: The name of the collection to query.<br><br>- <em>attribute</em>: The attribute path to check.<br><br>- <em>left</em>: The lower bound.<br><br>- <em>right</em>: The upper bound.<br><br>- <em>closed</em>: If true, use interval including <em>left</em> and <em>right</em>,<br> otherwise exclude <em>right</em>, but include <em>left</em>. <br><br>- <em>skip</em>: The documents to skip in the query. (optional)<br><br>- <em>limit</em>: The maximal amount of documents to return. (optional)<br><br>Returns a cursor containing the result, see @ref HttpCursor for details. <br><br>",
"notes": "<br><br>This will find all documents within a given range. You must declare a skip-list index on the attribute in order to be able to use a range query. <br><br>The call expects a JSON hash array as body with the following attributes: <br><br>- <em>collection</em>: The name of the collection to query.<br><br>- <em>attribute</em>: The attribute path to check.<br><br>- <em>left</em>: The lower bound.<br><br>- <em>right</em>: The upper bound.<br><br>- <em>closed</em>: If true, use interval including <em>left</em> and <em>right</em>, otherwise exclude <em>right</em>, but include <em>left</em>. <br><br>- <em>skip</em>: The documents to skip in the query. (optional)<br><br>- <em>limit</em>: The maximal amount of documents to return. (optional)<br><br>Returns a cursor containing the result, see @ref HttpCursor for details. <br><br>",
"summary": "executes simple range query",
"httpMethod": "PUT",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/range\n{ \"collection\": \"products\", \"attribute\" : \"i\", \"left\" : 2, \"right\" : 4 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/31357454\", \n \"_rev\" : \"31357454\", \n \"_key\" : \"31357454\", \n \"i\" : 2 \n }, \n { \n \"_id\" : \"products/31488526\", \n \"_rev\" : \"31488526\", \n \"_key\" : \"31488526\", \n \"i\" : 3 \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/range\n{ \"collection\": \"products\", \"attribute\" : \"i\", \"left\" : 2, \"right\" : 4 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/31337692\", \n \"_rev\" : \"31337692\", \n \"_key\" : \"31337692\", \n \"i\" : 2 \n }, \n { \n \"_id\" : \"products/31468764\", \n \"_rev\" : \"31468764\", \n \"_key\" : \"31468764\", \n \"i\" : 3 \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n\n</code></pre><br>",
"nickname": "executesSimpleRangeQuery"
}
],
@ -285,7 +285,7 @@
}
],
"parameters": [],
"notes": "<br><br>This will find all documents in the collection that match the specified example object. <br><br>The call expects a JSON hash array as body with the following attributes: <br><br>- <em>collection</em>: The name of the collection to remove from.<br><br>- <em>example</em>: An example object that all collection objects are compared<br> against. <br><br>- <em>waitForSync</em>: if set to true, then all removal operations will <br> instantly be synchronised to disk. If this is not specified, then the collection's default sync behavior will be applied. <br><br>- <em>limit</em>: an optional value that determines how many documents to <br> delete at most. If <em>limit</em> is specified but is less than the number of documents in the collection, it is undefined which of the documents will be deleted. <br><br>Returns the number of documents that were deleted <br><br>",
"notes": "<br><br>This will find all documents in the collection that match the specified example object. <br><br>The call expects a JSON hash array as body with the following attributes: <br><br>- <em>collection</em>: The name of the collection to remove from.<br><br>- <em>example</em>: An example object that all collection objects are compared against. <br><br>- <em>waitForSync</em>: if set to true, then all removal operations will instantly be synchronised to disk. If this is not specified, then the collection's default sync behavior will be applied. <br><br>- <em>limit</em>: an optional value that determines how many documents to delete at most. If <em>limit</em> is specified but is less than the number of documents in the collection, it is undefined which of the documents will be deleted. <br><br>Returns the number of documents that were deleted <br><br>",
"summary": "removes documents by example",
"httpMethod": "PUT",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/remove-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } } }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"deleted\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
@ -312,7 +312,7 @@
}
],
"parameters": [],
"notes": "<br><br>This will find all documents in the collection that match the specified example object, and replace the entire document body with the new value specified. Note that document meta-attributes such as <em>_id</em>, <em>_key</em>, <em>_from</em>, <em>_to</em> etc. cannot be replaced. <br><br>The call expects a JSON hash array as body with the following attributes: <br><br>- <em>collection</em>: The name of the collection to replace within.<br><br>- <em>example</em>: An example object that all collection objects are compared<br> against. <br><br>- <em>newValue</em>: The replacement document that will get inserted in place<br> of the \"old\" documents. <br><br>- <em>waitForSync</em>: if set to true, then all removal operations will <br> instantly be synchronised to disk. If this is not specified, then the collection's default sync behavior will be applied. <br><br>- <em>limit</em>: an optional value that determines how many documents to <br> replace at most. If <em>limit</em> is specified but is less than the number of documents in the collection, it is undefined which of the documents will be replaced. <br><br>Returns the number of documents that were replaced <br><br>",
"notes": "<br><br>This will find all documents in the collection that match the specified example object, and replace the entire document body with the new value specified. Note that document meta-attributes such as <em>_id</em>, <em>_key</em>, <em>_from</em>, <em>_to</em> etc. cannot be replaced. <br><br>The call expects a JSON hash array as body with the following attributes: <br><br>- <em>collection</em>: The name of the collection to replace within.<br><br>- <em>example</em>: An example object that all collection objects are compared against. <br><br>- <em>newValue</em>: The replacement document that will get inserted in place of the \"old\" documents. <br><br>- <em>waitForSync</em>: if set to true, then all removal operations will instantly be synchronised to disk. If this is not specified, then the collection's default sync behavior will be applied. <br><br>- <em>limit</em>: an optional value that determines how many documents to replace at most. If <em>limit</em> is specified but is less than the number of documents in the collection, it is undefined which of the documents will be replaced. <br><br>Returns the number of documents that were replaced <br><br>",
"summary": "replaces documents by example",
"httpMethod": "PUT",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/replace-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } }, \"newValue\" : {\"foo\" : \"bar\"}, \"limit\" : 3 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"replaced\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",
@ -339,7 +339,7 @@
}
],
"parameters": [],
"notes": "<br><br>This will find all documents in the collection that match the specified example object, and partially update the document body with the new value specified. Note that document meta-attributes such as <em>_id</em>, <em>_key</em>, <em>_from</em>, <em>_to</em> etc. cannot be replaced. <br><br>The call expects a JSON hash array as body with the following attributes: <br><br>- <em>collection</em>: The name of the collection to update within.<br><br>- <em>example</em>: An example object that all collection objects are compared<br> against. <br><br>- <em>newValue</em>: The update value that will get inserted in place<br> of the \"old\" version of the found documents. <br><br>- <em>keepNull</em>: This parameter can be used to modify the behavior when<br> handling <em>null</em> values. Normally, <em>null</em> values are stored in the database. By setting the <em>keepNull</em> parameter to <em>false</em>, this behavior can be changed so that all attributes in <em>data</em> with <em>null</em> values will be removed from the updated document. <br><br>- <em>waitForSync</em>: if set to true, then all removal operations will <br> instantly be synchronised to disk. If this is not specified, then the collection's default sync behavior will be applied. <br><br>- <em>limit</em>: an optional value that determines how many documents to <br> update at most. If <em>limit</em> is specified but is less than the number of documents in the collection, it is undefined which of the documents will be updated. <br><br>Returns the number of documents that were updated <br><br>",
"notes": "<br><br>This will find all documents in the collection that match the specified example object, and partially update the document body with the new value specified. Note that document meta-attributes such as <em>_id</em>, <em>_key</em>, <em>_from</em>, <em>_to</em> etc. cannot be replaced. <br><br>The call expects a JSON hash array as body with the following attributes: <br><br>- <em>collection</em>: The name of the collection to update within.<br><br>- <em>example</em>: An example object that all collection objects are compared against. <br><br>- <em>newValue</em>: The update value that will get inserted in place of the \"old\" version of the found documents. <br><br>- <em>keepNull</em>: This parameter can be used to modify the behavior when handling <em>null</em> values. Normally, <em>null</em> values are stored in the database. By setting the <em>keepNull</em> parameter to <em>false</em>, this behavior can be changed so that all attributes in <em>data</em> with <em>null</em> values will be removed from the updated document. <br><br>- <em>waitForSync</em>: if set to true, then all removal operations will instantly be synchronised to disk. If this is not specified, then the collection's default sync behavior will be applied. <br><br>- <em>limit</em>: an optional value that determines how many documents to update at most. If <em>limit</em> is specified but is less than the number of documents in the collection, it is undefined which of the documents will be updated. <br><br>Returns the number of documents that were updated <br><br>",
"summary": "updates documents by example",
"httpMethod": "PUT",
"examples": "<br><br><pre><code class=\"json\" >unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/update-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } }, \"newValue\" : { \"a\" : { \"j\" : 22 } }, \"limit\" : 3 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"updated\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>",

File diff suppressed because one or more lines are too long

View File

@ -29,7 +29,7 @@
"description": "Contains the <em>collections</em> and <em>action</em>. "
}
],
"notes": "<br><br>The transaction description must be passed in the body of the POST request. <br><br>The following attributes must be specified inside the JSON object: <br><br>- <em>collections</em>: contains the list of collections to be used in the<br> transaction (mandatory). <em>collections</em> must be a JSON array that can have the optional sub-attributes <em>read</em> and <em>write</em>. <em>read</em> and <em>write</em> must each be either lists of collections names or strings with a single collection name. <br><br>- <em>action</em>: the actual transaction operations to be executed, in the<br> form of stringified Javascript code. The code will be executed on server side, with late binding. It is thus critical that the code specified in <em>action</em> properly sets up all the variables it needs. If the code specified in <em>action</em> ends with a return statement, the value returned will also be returned by the REST API in the <em>result</em> attribute if the transaction committed successfully. <br><br>The following optional attributes may also be specified in the request: <br><br>- <em>waitForSync</em>: an optional boolean flag that, if set, will force the <br> transaction to write all data to disk before returning. <br><br>- <em>lockTimeout</em>: an optional numeric value that can be used to set a<br> timeout for waiting on collection locks. If not specified, a default value will be used. Setting <em>lockTimeout</em> to <em>0</em> will make ArangoDB not time out waiting for a lock. <br><br>- <em>params</em>: optional arguments passed to <em>action</em>.<br><br>If the transaction is fully executed and committed on the server, <em>HTTP 200</em> will be returned. Additionally, the return value of the code defined in <em>action</em> will be returned in the <em>result</em> attribute. <br><br>For successfully committed transactions, the returned JSON object has the following properties: <br><br>- <em>error</em>: boolean flag to indicate if an error occurred (<em>false</em><br> in this case) <br><br>- <em>code</em>: the HTTP status code<br><br>- <em>result</em>: the return value of the transaction<br><br>If the transaction specification is either missing or malformed, the server will respond with <em>HTTP 400</em>. <br><br>The body of the response will then contain a JSON object with additional error details. The object has the following attributes: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case)<br><br>- <em>code</em>: the HTTP status code<br><br>- <em>errorNum</em>: the server error number<br><br>- <em>errorMessage</em>: a descriptive error message<br><br>If a transaction fails to commit, either by an exception thrown in the <em>action</em> code, or by an internal error, the server will respond with an error. Any other errors will be returned with any of the return codes <em>HTTP 400</em>, <em>HTTP 409</em>, or <em>HTTP 500</em>. <br><br>",
"notes": "<br><br>The transaction description must be passed in the body of the POST request. <br><br>The following attributes must be specified inside the JSON object: <br><br>- <em>collections</em>: contains the list of collections to be used in the transaction (mandatory). <em>collections</em> must be a JSON array that can have the optional sub-attributes <em>read</em> and <em>write</em>. <em>read</em> and <em>write</em> must each be either lists of collections names or strings with a single collection name. <br><br>- <em>action</em>: the actual transaction operations to be executed, in the form of stringified Javascript code. The code will be executed on server side, with late binding. It is thus critical that the code specified in <em>action</em> properly sets up all the variables it needs. If the code specified in <em>action</em> ends with a return statement, the value returned will also be returned by the REST API in the <em>result</em> attribute if the transaction committed successfully. <br><br>The following optional attributes may also be specified in the request: <br><br>- <em>waitForSync</em>: an optional boolean flag that, if set, will force the transaction to write all data to disk before returning. <br><br>- <em>lockTimeout</em>: an optional numeric value that can be used to set a timeout for waiting on collection locks. If not specified, a default value will be used. Setting <em>lockTimeout</em> to <em>0</em> will make ArangoDB not time out waiting for a lock. <br><br>- <em>params</em>: optional arguments passed to <em>action</em>.<br><br>If the transaction is fully executed and committed on the server, <em>HTTP 200</em> will be returned. Additionally, the return value of the code defined in <em>action</em> will be returned in the <em>result</em> attribute. <br><br>For successfully committed transactions, the returned JSON object has the following properties: <br><br>- <em>error</em>: boolean flag to indicate if an error occurred (<em>false</em> in this case) <br><br>- <em>code</em>: the HTTP status code<br><br>- <em>result</em>: the return value of the transaction<br><br>If the transaction specification is either missing or malformed, the server will respond with <em>HTTP 400</em>. <br><br>The body of the response will then contain a JSON object with additional error details. The object has the following attributes: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case)<br><br>- <em>code</em>: the HTTP status code<br><br>- <em>errorNum</em>: the server error number<br><br>- <em>errorMessage</em>: a descriptive error message<br><br>If a transaction fails to commit, either by an exception thrown in the <em>action</em> code, or by an internal error, the server will respond with an error. Any other errors will be returned with any of the return codes <em>HTTP 400</em>, <em>HTTP 409</em>, or <em>HTTP 500</em>. <br><br>",
"summary": "executes a transaction",
"httpMethod": "POST",
"examples": "Executing a transaction on a single collection: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/transaction\n{ \"collections\": { \"write\" : \"products\" }, \"action\" : \"function () { var db = require(\\\"internal\\\").db;db.products.save({});return db.products.count(); }\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>Executing a transaction using multiple collections: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/transaction\n{ \"collections\": { \"write\" : [\"products\", \"materials\" ] }, \"action\" : \"function () { var db = require(\\\"internal\\\").db;db.products.save({});db.materials.save({});return \\\"worked!\\\"; }\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : \"worked!\", \n \"error\" : false, \n \"code\" : 200 \n}\n\n</code></pre><br>Aborting a transaction due to an internal error: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/transaction\n{ \"collections\": { \"write\" : \"products\" }, \"action\" : \"function () { var db = require(\\\"internal\\\").db;db.products.save({_key: \\\"abc\\\"});db.products.save({_key: \\\"abc\\\"});\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 400, \n \"errorMessage\" : \"bad parameter\" \n}\n\n</code></pre><br>Aborting a transaction by throwing an exception: <br><br><pre><code class=\"json\" >unix> curl -X POST --data @- --dump - http://localhost:8529/_api/transaction\n{ \"collections\": { \"read\" : \"products\" }, \"action\" : \"function () { throw \\\"doh!\\\"; }\" }\n\nHTTP/1.1 500 Internal Error\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 500, \n \"errorNum\" : 500, \n \"errorMessage\" : \"doh!\" \n}\n\n</code></pre><br>",

View File

@ -25,7 +25,7 @@
"description": "The username of the user. "
}
],
"notes": "<br><br>Fetches data about the specified user. <br><br>The call will return a JSON document with at least the following attributes on success: <br><br>- <em>username</em>: The name of the user as a string.<br><br>- <em>active</em>: an optional flag that specifies whether the user is active.<br><br>- <em>extra</em>: an optional JSON object with arbitrary extra data about the<br> user. <br><br>",
"notes": "<br><br>Fetches data about the specified user. <br><br>The call will return a JSON document with at least the following attributes on success: <br><br>- <em>username</em>: The name of the user as a string.<br><br>- <em>active</em>: an optional flag that specifies whether the user is active.<br><br>- <em>extra</em>: an optional JSON object with arbitrary extra data about the user. <br><br>",
"summary": "fetches a user",
"httpMethod": "GET",
"examples": "",
@ -56,7 +56,7 @@
"description": ""
}
],
"notes": "<br><br>The following data need to be passed in a JSON representation in the body of the POST request: <br><br>- <em>username</em>: The name of the user as a string. This is mandatory.<br><br>- <em>passwd</em>: The user password as a string. If no password is specified,<br> the empty string will be used. <br><br>- <em>active</em>: an optional flag that specifies whether the user is active.<br> If not specified, this will default to <em>true</em>. <br><br>- <em>extra</em>: an optional JSON object with arbitrary extra data about the<br> user. <br><br>If the user can be added by the server, the server will respond with <em>HTTP 201</em>. <br><br>In case of success, the returned JSON object has the following properties: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>false</em><br> in this case) <br><br>- <em>code</em>: the HTTP status code<br><br>If the JSON representation is malformed or mandatory data is missing from the request, the server will respond with <em>HTTP 400</em>. <br><br>The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case)<br><br>- <em>code</em>: the HTTP status code<br><br>- <em>errorNum</em>: the server error number<br><br>- <em>errorMessage</em>: a descriptive error message<br><br>",
"notes": "<br><br>The following data need to be passed in a JSON representation in the body of the POST request: <br><br>- <em>username</em>: The name of the user as a string. This is mandatory.<br><br>- <em>passwd</em>: The user password as a string. If no password is specified, the empty string will be used. <br><br>- <em>active</em>: an optional flag that specifies whether the user is active. If not specified, this will default to <em>true</em>. <br><br>- <em>extra</em>: an optional JSON object with arbitrary extra data about the user. <br><br>If the user can be added by the server, the server will respond with <em>HTTP 201</em>. <br><br>In case of success, the returned JSON object has the following properties: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>false</em> in this case) <br><br>- <em>code</em>: the HTTP status code<br><br>If the JSON representation is malformed or mandatory data is missing from the request, the server will respond with <em>HTTP 400</em>. <br><br>The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case)<br><br>- <em>code</em>: the HTTP status code<br><br>- <em>errorNum</em>: the server error number<br><br>- <em>errorMessage</em>: a descriptive error message<br><br>",
"summary": "creates user",
"httpMethod": "POST",
"examples": "",
@ -87,7 +87,7 @@
"description": ""
}
],
"notes": "<br><br>Replaces the data of an existing user. The name of an existing user must be specified in <em>username</em>. <br><br>The following data can to be passed in a JSON representation in the body of the POST request: <br><br>- <em>passwd</em>: The user password as a string. Specifying a password is<br> mandatory, but the empty string is allowed for passwords. <br><br>- <em>active</em>: an optional flag that specifies whether the user is active.<br> If not specified, this will default to <em>true</em>. <br><br>- <em>extra</em>: an optional JSON object with arbitrary extra data about the<br> user. <br><br>If the user can be replaced by the server, the server will respond with <em>HTTP 200</em>. <br><br>In case of success, the returned JSON object has the following properties: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>false</em><br> in this case) <br><br>- <em>code</em>: the HTTP status code<br><br>If the JSON representation is malformed or mandatory data is missing from the request, the server will respond with <em>HTTP 400</em>. If the specified user does not exist, the server will respond with <em>HTTP 404</em>. <br><br>The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case)<br><br>- <em>code</em>: the HTTP status code<br><br>- <em>errorNum</em>: the server error number<br><br>- <em>errorMessage</em>: a descriptive error message<br><br>",
"notes": "<br><br>Replaces the data of an existing user. The name of an existing user must be specified in <em>username</em>. <br><br>The following data can to be passed in a JSON representation in the body of the POST request: <br><br>- <em>passwd</em>: The user password as a string. Specifying a password is mandatory, but the empty string is allowed for passwords. <br><br>- <em>active</em>: an optional flag that specifies whether the user is active. If not specified, this will default to <em>true</em>. <br><br>- <em>extra</em>: an optional JSON object with arbitrary extra data about the user. <br><br>If the user can be replaced by the server, the server will respond with <em>HTTP 200</em>. <br><br>In case of success, the returned JSON object has the following properties: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>false</em> in this case) <br><br>- <em>code</em>: the HTTP status code<br><br>If the JSON representation is malformed or mandatory data is missing from the request, the server will respond with <em>HTTP 400</em>. If the specified user does not exist, the server will respond with <em>HTTP 404</em>. <br><br>The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case)<br><br>- <em>code</em>: the HTTP status code<br><br>- <em>errorNum</em>: the server error number<br><br>- <em>errorMessage</em>: a descriptive error message<br><br>",
"summary": "replaces user",
"httpMethod": "PUT",
"examples": "",
@ -122,7 +122,7 @@
"description": ""
}
],
"notes": "<br><br>Partially updates the data of an existing user. The name of an existing user must be specified in <em>username</em>. <br><br>The following data can be passed in a JSON representation in the body of the POST request: <br><br>- <em>passwd</em>: The user password as a string. Specifying a password is<br> optional. If not specified, the previously existing value will not be modified. <br><br>- <em>active</em>: an optional flag that specifies whether the user is active.<br> If not specified, the previously existing value will not be modified. <br><br>- <em>extra</em>: an optional JSON object with arbitrary extra data about the<br> user. If not specified, the previously existing value will not be modified. <br><br>If the user can be updated by the server, the server will respond with <em>HTTP 200</em>. <br><br>In case of success, the returned JSON object has the following properties: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>false</em><br> in this case) <br><br>- <em>code</em>: the HTTP status code<br><br>If the JSON representation is malformed or mandatory data is missing from the request, the server will respond with <em>HTTP 400</em>. If the specified user does not exist, the server will respond with <em>HTTP 404</em>. <br><br>The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case)<br><br>- <em>code</em>: the HTTP status code<br><br>- <em>errorNum</em>: the server error number<br><br>- <em>errorMessage</em>: a descriptive error message<br><br>",
"notes": "<br><br>Partially updates the data of an existing user. The name of an existing user must be specified in <em>username</em>. <br><br>The following data can be passed in a JSON representation in the body of the POST request: <br><br>- <em>passwd</em>: The user password as a string. Specifying a password is optional. If not specified, the previously existing value will not be modified. <br><br>- <em>active</em>: an optional flag that specifies whether the user is active. If not specified, the previously existing value will not be modified. <br><br>- <em>extra</em>: an optional JSON object with arbitrary extra data about the user. If not specified, the previously existing value will not be modified. <br><br>If the user can be updated by the server, the server will respond with <em>HTTP 200</em>. <br><br>In case of success, the returned JSON object has the following properties: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>false</em> in this case) <br><br>- <em>code</em>: the HTTP status code<br><br>If the JSON representation is malformed or mandatory data is missing from the request, the server will respond with <em>HTTP 400</em>. If the specified user does not exist, the server will respond with <em>HTTP 404</em>. <br><br>The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case)<br><br>- <em>code</em>: the HTTP status code<br><br>- <em>errorNum</em>: the server error number<br><br>- <em>errorMessage</em>: a descriptive error message<br><br>",
"summary": "updates user",
"httpMethod": "PATCH",
"examples": "",
@ -145,7 +145,7 @@
}
],
"parameters": [],
"notes": "<br><br>Removes an existing user, identified by <em>username</em>. <br><br>If the user can be removed by the server, the server will respond with <em>HTTP 202</em>. <br><br>In case of success, the returned JSON object has the following properties: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>false</em><br> in this case) <br><br>- <em>code</em>: the HTTP status code<br><br>If the specified user does not exist, the server will respond with <em>HTTP 404</em>. <br><br>The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case)<br><br>- <em>code</em>: the HTTP status code<br><br>- <em>errorNum</em>: the server error number<br><br>- <em>errorMessage</em>: a descriptive error message<br><br>",
"notes": "<br><br>Removes an existing user, identified by <em>username</em>. <br><br>If the user can be removed by the server, the server will respond with <em>HTTP 202</em>. <br><br>In case of success, the returned JSON object has the following properties: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>false</em> in this case) <br><br>- <em>code</em>: the HTTP status code<br><br>If the specified user does not exist, the server will respond with <em>HTTP 404</em>. <br><br>The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br>- <em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case)<br><br>- <em>code</em>: the HTTP status code<br><br>- <em>errorNum</em>: the server error number<br><br>- <em>errorMessage</em>: a descriptive error message<br><br>",
"summary": "removes a user",
"httpMethod": "DELETE",
"examples": "",

View File

@ -2,11 +2,11 @@
font-family: 'Droid Sans';
font-style: normal;
font-weight: 400;
src: local('Droid Sans'), local('DroidSans'), url(/_admin/ttf/droidsans.ttf) format('truetype');
src: local('Droid Sans'), local('DroidSans'), url(/_admin/html/ttf/droidsans.ttf) format('truetype');
}
@font-face {
font-family: 'Droid Sans';
font-style: normal;
font-weight: 700;
src: local('Droid Sans Bold'), local('DroidSans-Bold'), url(/_admin/ttf/droidsans-bold.ttf) format('truetype');
src: local('Droid Sans Bold'), local('DroidSans-Bold'), url(/_admin/html/ttf/droidsans-bold.ttf) format('truetype');
}

View File

@ -633,7 +633,7 @@ function program11(depth0,data) {
function program13(depth0,data) {
return "\n <div class='sandbox_header'>\n <input class='submit' name='commit' type='button' value='Try it out!' />\n <a href='#' class='response_hider' style='display:none'>Hide Response</a>\n <img alt='Throbber' class='response_throbber' src='images/throbber.gif' style='display:none' />\n </div>\n ";
return "\n <div class='sandbox_header'>\n <input class='submit' name='commit' type='button' value='Try it out!' />\n <a href='#' class='response_hider' style='display:none'>Hide Response</a>\n <img alt='Throbber' class='response_throbber' src='img/swagger/throbber.gif' style='display:none' />\n </div>\n ";
}
buffer += "\n <ul class='operations' >\n <li class='";

File diff suppressed because one or more lines are too long