1
0
Fork 0

Regenerated Swagger documentatioN

This commit is contained in:
Michael Hackstein 2014-10-22 11:00:00 +02:00
parent bedec7a435
commit d87137328a
23 changed files with 278 additions and 351 deletions

View File

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

View File

@ -24,7 +24,7 @@
"notes": "Returns all registered AQL user functions. <br><br> The call will return a JSON list with all user functions found. Each user function will at least have the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>name</em>: The fully qualified name of the user function <li><em>code</em>: A string representation of the function body",
"summary": " Return registered AQL user functions",
"httpMethod": "GET",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/aqlfunction\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n[ ]\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/aqlfunction\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n[ ]\n</code></pre><br><br><br>",
"nickname": "ReturnRegisteredAqlUserFunctions"
}
],
@ -39,7 +39,7 @@
"code": "200"
},
{
"reason": "If the function can be registered by the server, the server will respond with <em>HTTP 201</em>. <br><br>",
"reason": "If the function can be registered by the server, the server will respond with <em>HTTP 201</em>. <br><br>",
"code": "201"
},
{
@ -56,10 +56,10 @@
"description": "the body with name and code of the aql user function. <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> <ul class=\"swagger-list\"><li><em>name</em>: the fully qualified name of the user functions. <li><em>code</em>: a string representation of the function body. <li><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. </ul> In case of success, the returned JSON object has the following properties: <br><br> <ul class=\"swagger-list\"><li><em>error</em>: boolean flag to indicate that an error occurred (<em>false</em> in this case) <li><em>code</em>: the HTTP status code </ul> The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case) <li><em>code</em>: the HTTP status code <li><em>errorNum</em>: the server error number <li><em>errorMessage</em>: a descriptive error message",
"notes": "<br><br> The following data need to be passed in a JSON representation in the body of the POST request: <br><br> <ul class=\"swagger-list\"><li><em>name</em>: the fully qualified name of the user functions. <li><em>code</em>: a string representation of the function body. <li><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. </ul> In case of success, the returned JSON object has the following properties: <br><br> <ul class=\"swagger-list\"><li><em>error</em>: boolean flag to indicate that an error occurred (<em>false</em> in this case) <li><em>code</em>: the HTTP status code </ul> The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case) <li><em>code</em>: the HTTP status code <li><em>errorNum</em>: the server error number <li><em>errorMessage</em>: a descriptive error message",
"summary": " Create AQL user function",
"httpMethod": "POST",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/aqlfunction\n{ \"name\" : \"myfunctions::temperature::celsiustofahrenheit\", \"code\" : \"function (celsius) { return celsius * 1.8 + 32; }\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/aqlfunction\n{ \"name\" : \"myfunctions::temperature::celsiustofahrenheit\", \"code\" : \"function (celsius) { return celsius * 1.8 + 32; }\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"nickname": "CreateAqlUserFunction"
}
],
@ -70,7 +70,7 @@
{
"errorResponses": [
{
"reason": "If the function can be removed by the server, the server will respond with <em>HTTP 200</em>. <br><br>",
"reason": "If the function can be removed by the server, the server will respond with <em>HTTP 200</em>. <br><br>",
"code": "200"
},
{
@ -95,13 +95,13 @@
"paramType": "query",
"required": "false",
"name": "group",
"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. <br><br>"
"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. <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> <ul class=\"swagger-list\"><li><em>error</em>: boolean flag to indicate that an error occurred (<em>false</em> in this case) <li><em>code</em>: the HTTP status code </ul> The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case) <li><em>code</em>: the HTTP status code <li><em>errorNum</em>: the server error number <li><em>errorMessage</em>: a descriptive error message",
"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> <ul class=\"swagger-list\"><li><em>error</em>: boolean flag to indicate that an error occurred (<em>false</em> in this case) <li><em>code</em>: the HTTP status code </ul> The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case) <li><em>code</em>: the HTTP status code <li><em>errorNum</em>: the server error number <li><em>errorMessage</em>: a descriptive error message",
"summary": " Remove existing AQL user function",
"httpMethod": "DELETE",
"examples": "<br><br> deletes a function: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/aqlfunction/square::x::y\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> function not found: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/aqlfunction/myfunction::x::y\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 1582, \n \"errorMessage\" : \"user function '%s()' not found\" \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> deletes a function: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/aqlfunction/square::x::y\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> function not found: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/aqlfunction/myfunction::x::y\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 1582, \n \"errorMessage\" : \"user function '%s()' not found\" \n}\n</code></pre><br><br><br>",
"nickname": "RemoveExistingAqlUserFunction"
}
],

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -33,10 +33,10 @@
"description": "A JSON object describing the query and query parameters. <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> <ul class=\"swagger-list\"><li><em>query</em>: contains the query string to be executed (mandatory) <li><em>count</em>: boolean flag that indicates whether the number of documents in the result set should be returned in the \"count\" attribute of the result (optional). Calculating the \"count\" attribute might in the future have a performance impact for some queries so this option is turned off by default, and \"count\" is only returned when requested. <li><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. <li><em>ttl</em>: an optional time-to-live for the cursor (in seconds). The cursor will be removed on the server automatically after the specified amount of time. This is useful to ensure garbage collection of cursors that are not fully fetched by clients. If not set, a server-defined value will be used. <li><em>bindVars</em>: key/value list of bind parameters (optional). <li><em>options</em>: key/value list of extra options for the query (optional). </ul> The following options are supported at the moment: <br><br> <ul class=\"swagger-list\"><li><em>fullCount</em>: if set to <em>true</em> and the query contains a <em>LIMIT</em> clause, then the result will contain an extra attribute <em>extra</em> with a sub-attribute <em>fullCount</em>. This sub-attribute will contain the number of documents in the result before the last LIMIT in the query was applied. It can be used to count the number of documents that match certain filter criteria, but only return a subset of them, in one go. It is thus similar to MySQL's <em>SQL_CALC_FOUND_ROWS</em> hint. Note that setting the option will disable a few LIMIT optimizations and may lead to more documents being processed, and thus make queries run longer. Note that the <em>fullCount</em> sub-attribute will only be present in the result if the query has a LIMIT clause and the LIMIT clause is actually used in the query. </ul> 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 returned JSON object has the following properties: <br><br> <ul class=\"swagger-list\"><li><em>error</em>: boolean flag to indicate that an error occurred (<em>false</em> in this case) <li><em>code</em>: the HTTP status code <li><em>result</em>: an array of result documents (might be empty if query has no results) <li><em>hasMore</em>: a boolean indicator whether there are more results available for the cursor on the server <li><em>count</em>: the total number of result documents available (only available if the query was executed with the <em>count</em> attribute set) <li><em>id</em>: id of temporary cursor created on the server (optional, see above) <li><em>extra</em>: an optional JSON object with extra information about the query result. For data-modification queries, the <em>extra</em> attribute will contain the number of modified documents and the number of documents that could not be modified due to an error (if <em>ignoreErrors</em> query option is specified) </ul> 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> <ul class=\"swagger-list\"><li><em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case) <li><em>code</em>: the HTTP status code <li><em>errorNum</em>: the server error number <li><em>errorMessage</em>: a descriptive error message </ul> 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 (../ArangoErrors/README.md) 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> <ul class=\"swagger-list\"><li><em>query</em>: contains the query string to be executed (mandatory) <li><em>count</em>: boolean flag that indicates whether the number of documents in the result set should be returned in the \"count\" attribute of the result (optional). Calculating the \"count\" attribute might in the future have a performance impact for some queries so this option is turned off by default, and \"count\" is only returned when requested. <li><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. <li><em>ttl</em>: an optional time-to-live for the cursor (in seconds). The cursor will be removed on the server automatically after the specified amount of time. This is useful to ensure garbage collection of cursors that are not fully fetched by clients. If not set, a server-defined value will be used. <li><em>bindVars</em>: key/value list of bind parameters (optional). <li><em>options</em>: key/value list of extra options for the query (optional). </ul> The following options are supported at the moment: <br><br> <ul class=\"swagger-list\"><li><em>fullCount</em>: if set to <em>true</em> and the query contains a <em>LIMIT</em> clause, then the result will contain an extra attribute <em>extra</em> with a sub-attribute <em>fullCount</em>. This sub-attribute will contain the number of documents in the result before the last LIMIT in the query was applied. It can be used to count the number of documents that match certain filter criteria, but only return a subset of them, in one go. It is thus similar to MySQL's <em>SQL_CALC_FOUND_ROWS</em> hint. Note that setting the option will disable a few LIMIT optimizations and may lead to more documents being processed, and thus make queries run longer. Note that the <em>fullCount</em> sub-attribute will only be present in the result if the query has a LIMIT clause and the LIMIT clause is actually used in the query. </ul> 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 returned JSON object has the following properties: <br><br> <ul class=\"swagger-list\"><li><em>error</em>: boolean flag to indicate that an error occurred (<em>false</em> in this case) <li><em>code</em>: the HTTP status code <li><em>result</em>: an array of result documents (might be empty if query has no results) <li><em>hasMore</em>: a boolean indicator whether there are more results available for the cursor on the server <li><em>count</em>: the total number of result documents available (only available if the query was executed with the <em>count</em> attribute set) <li><em>id</em>: id of temporary cursor created on the server (optional, see above) <li><em>extra</em>: an optional JSON object with extra information about the query result. For data-modification queries, the <em>extra</em> attribute will contain the number of modified documents and the number of documents that could not be modified due to an error (if <em>ignoreErrors</em> query option is specified) </ul> 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> <ul class=\"swagger-list\"><li><em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case) <li><em>code</em>: the HTTP status code <li><em>errorNum</em>: the server error number <li><em>errorMessage</em>: a descriptive error message </ul> 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 (../ArangoErrors/README.md) here. <br><br>",
"summary": " Create cursor",
"httpMethod": "POST",
"examples": "<br><br> Executes a query and extract the result in a single go: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 2 RETURN p\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/835657222\", \n \"_rev\" : \"835657222\", \n \"_key\" : \"835657222\", \n \"hello1\" : \"world1\" \n }, \n { \n \"_id\" : \"products/835984902\", \n \"_rev\" : \"835984902\", \n \"_key\" : \"835984902\", \n \"hello2\" : \"world1\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Executes a query and extracts part of the result: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 5 RETURN p\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/837885446\", \n \"_rev\" : \"837885446\", \n \"_key\" : \"837885446\", \n \"hello5\" : \"world1\" \n }, \n { \n \"_id\" : \"products/836902406\", \n \"_rev\" : \"836902406\", \n \"_key\" : \"836902406\", \n \"hello2\" : \"world1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"838082054\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Using a query option: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR i IN 1..1000 FILTER i > 500 LIMIT 10 RETURN i\",\"count\":true,\"options\":{\"fullCount\":true}}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n 501, \n 502, \n 503, \n 504, \n 505, \n 506, \n 507, \n 508, \n 509, \n 510 \n ], \n \"hasMore\" : false, \n \"count\" : 10, \n \"extra\" : { \n \"fullCount\" : 500 \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Executes a data-modification query and retrieves the number of modified documents: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products REMOVE p IN products\"}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ ], \n \"hasMore\" : false, \n \"extra\" : { \n \"operations\" : { \n \"executed\" : 2, \n \"ignored\" : 0 \n } \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Executes a data-modification query with option <em>ignoreErrors</em>: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"REMOVE 'bar' IN products OPTIONS { ignoreErrors: true }\"}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ ], \n \"hasMore\" : false, \n \"extra\" : { \n \"operations\" : { \n \"executed\" : 0, \n \"ignored\" : 1 \n } \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Bad queries: <br><br> Missing body: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --dump - http://localhost:8529/_api/cursor\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 1502, \n \"errorMessage\" : \"query is empty\" \n}\n</code></pre><br><br><br> Unknown collection: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR u IN unknowncoll LIMIT 2 RETURN u\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 1203, \n \"errorMessage\" : \"cannot execute query: collection not found: 'unknowncoll'\" \n}\n</code></pre><br><br><br> Executes a data-modification query that attempts to remove a non-existing document: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"REMOVE 'foo' IN products\"}\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 1202, \n \"errorMessage\" : \"document not found\" \n}\n</code></pre><br><br><br> @endDocuBlock",
"examples": "<br><br> Executes a query and extract the result in a single go: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 2 RETURN p\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/917896360\", \n \"_key\" : \"917896360\", \n \"_rev\" : \"917896360\", \n \"hello2\" : \"world1\" \n }, \n { \n \"_id\" : \"products/917568680\", \n \"_key\" : \"917568680\", \n \"_rev\" : \"917568680\", \n \"hello1\" : \"world1\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Executes a query and extracts part of the result: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 5 RETURN p\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/919796904\", \n \"_key\" : \"919796904\", \n \"_rev\" : \"919796904\", \n \"hello5\" : \"world1\" \n }, \n { \n \"_id\" : \"products/919141544\", \n \"_key\" : \"919141544\", \n \"_rev\" : \"919141544\", \n \"hello3\" : \"world1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"919993512\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Using a query option: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR i IN 1..1000 FILTER i > 500 LIMIT 10 RETURN i\",\"count\":true,\"options\":{\"fullCount\":true}}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n 501, \n 502, \n 503, \n 504, \n 505, \n 506, \n 507, \n 508, \n 509, \n 510 \n ], \n \"hasMore\" : false, \n \"count\" : 10, \n \"extra\" : { \n \"fullCount\" : 500 \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Executes a data-modification query and retrieves the number of modified documents: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products REMOVE p IN products\"}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ ], \n \"hasMore\" : false, \n \"extra\" : { \n \"operations\" : { \n \"executed\" : 2, \n \"ignored\" : 0 \n } \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Executes a data-modification query with option <em>ignoreErrors</em>: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"REMOVE 'bar' IN products OPTIONS { ignoreErrors: true }\"}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ ], \n \"hasMore\" : false, \n \"extra\" : { \n \"operations\" : { \n \"executed\" : 0, \n \"ignored\" : 1 \n } \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Bad queries: <br><br> Missing body: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --dump - http://localhost:8529/_api/cursor\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 1502, \n \"errorMessage\" : \"query is empty\" \n}\n</code></pre><br><br><br> Unknown collection: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR u IN unknowncoll LIMIT 2 RETURN u\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 1203, \n \"errorMessage\" : \"cannot execute query: collection not found: 'unknowncoll'\" \n}\n</code></pre><br><br><br> Executes a data-modification query that attempts to remove a non-existing document: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"REMOVE 'foo' IN products\"}\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 1202, \n \"errorMessage\" : \"document not found\" \n}\n</code></pre><br><br><br> <br><br>",
"nickname": "CreateCursor"
}
],
@ -47,7 +47,7 @@
{
"errorResponses": [
{
"reason": "The server will respond with <em>HTTP 200</em> in case of success. <br><br>",
"reason": "The server will respond with <em>HTTP 200</em> in case of success. <br><br>",
"code": "200"
},
{
@ -71,7 +71,7 @@
"notes": "<br><br> If the cursor is still alive, returns an object with the following attributes. <br><br> <ul class=\"swagger-list\"><li><em>id</em>: the <em>cursor-identifier</em> <li><em>result</em>: a list of documents for the current batch <li><em>hasMore</em>: <em>false</em> if this was the last batch <li><em>count</em>: if present the total number of elements </ul> 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": " Read next batch from cursor",
"httpMethod": "PUT",
"examples": "<br><br> Valid request for next batch: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 5 RETURN p\",\"count\":true,\"batchSize\":2}\n\nshell> curl -X PUT --dump - http://localhost:8529/_api/cursor/842866182\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/841686534\", \n \"_rev\" : \"841686534\", \n \"_key\" : \"841686534\", \n \"hello2\" : \"world1\" \n }, \n { \n \"_id\" : \"products/841358854\", \n \"_rev\" : \"841358854\", \n \"_key\" : \"841358854\", \n \"hello1\" : \"world1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"842866182\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Missing identifier <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --dump - http://localhost:8529/_api/cursor\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 400, \n \"errorMessage\" : \"bad parameter\" \n}\n</code></pre><br><br><br> Unknown identifier <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --dump - http://localhost:8529/_api/cursor/123123\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 1600, \n \"errorMessage\" : \"cursor not found\" \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Valid request for next batch: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 5 RETURN p\",\"count\":true,\"batchSize\":2}\n\nshell> curl -X PUT --dump - http://localhost:8529/_api/cursor/924777640\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/923597992\", \n \"_key\" : \"923597992\", \n \"_rev\" : \"923597992\", \n \"hello2\" : \"world1\" \n }, \n { \n \"_id\" : \"products/924253352\", \n \"_key\" : \"924253352\", \n \"_rev\" : \"924253352\", \n \"hello4\" : \"world1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"924777640\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Missing identifier <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --dump - http://localhost:8529/_api/cursor\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 400, \n \"errorMessage\" : \"bad parameter\" \n}\n</code></pre><br><br><br> Unknown identifier <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --dump - http://localhost:8529/_api/cursor/123123\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 1600, \n \"errorMessage\" : \"cursor not found\" \n}\n</code></pre><br><br><br>",
"nickname": "ReadNextBatchFromCursor"
}
],
@ -99,10 +99,10 @@
"description": "The name of the cursor <br><br>"
}
],
"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>",
"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": " Delete cursor",
"httpMethod": "DELETE",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 5 RETURN p\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/843980294\", \n \"_rev\" : \"843980294\", \n \"_key\" : \"843980294\", \n \"hello3\" : \"world1\" \n }, \n { \n \"_id\" : \"products/844307974\", \n \"_rev\" : \"844307974\", \n \"_key\" : \"844307974\", \n \"hello4\" : \"world1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"844832262\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 201 \n}\nshell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/cursor/844832262\n\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor\n{\"query\":\"FOR p IN products LIMIT 5 RETURN p\",\"count\":true,\"batchSize\":2}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/925564072\", \n \"_key\" : \"925564072\", \n \"_rev\" : \"925564072\", \n \"hello2\" : \"world1\" \n }, \n { \n \"_id\" : \"products/926219432\", \n \"_key\" : \"926219432\", \n \"_rev\" : \"926219432\", \n \"hello4\" : \"world1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"926743720\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 201 \n}\nshell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/cursor/926743720\n\n</code></pre><br><br><br>",
"nickname": "DeleteCursor"
}
],

View File

@ -21,10 +21,10 @@
}
],
"parameters": [],
"notes": "Retrieves the list of all existing databases <br><br> <em>*Note*</em>: retrieving the list of databases is only possible from within the <em>_system</em> database. <br><br>",
"notes": "Retrieves the list of all existing databases <br><br> <em>Note</em>: retrieving the list of databases is only possible from within the <em>_system</em> database. <br><br>",
"summary": " List of databases",
"httpMethod": "GET",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/database\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n \"_system\" \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/database\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n \"_system\" \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "ListOfDatabases"
}
],
@ -44,10 +44,10 @@
}
],
"parameters": [],
"notes": "Retrieves the list of all databases the current user can access without specifying a different username or password. <br><br>",
"notes": "Retrieves the list of all databases the current user can access without specifying a different username or password. <br><br>",
"summary": " List of accessible databases ",
"httpMethod": "GET",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/database/user\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n \"_system\" \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/database/user\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n \"_system\" \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "ListOfAccessibleDatabases"
}
],
@ -74,7 +74,7 @@
"notes": "Retrieves information about the current database <br><br> The response is a JSON object with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>name</em>: the name of the current database <li><em>id</em>: the id of the current database <li><em>path</em>: the filesystem path of the current database <li><em>isSystem</em>: whether or not the current database is the <em>_system</em> database",
"summary": " Information of the database",
"httpMethod": "GET",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/database/current\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : { \n \"name\" : \"_system\", \n \"id\" : \"73222\", \n \"path\" : \"/tmp/vocdir.92357/databases/database-73222\", \n \"isSystem\" : true \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/database/current\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : { \n \"name\" : \"_system\", \n \"id\" : \"130216\", \n \"path\" : \"/tmp/vocdir.14793/databases/database-130216\", \n \"isSystem\" : true \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "InformationOfTheDatabase"
}
],
@ -89,7 +89,7 @@
"code": "201"
},
{
"reason": "is returned if the request parameters are invalid or if a database with the specified name already exists. <br><br>",
"reason": "is returned if the request parameters are invalid or if a database with the specified name already exists. <br><br>",
"code": "400"
},
{
@ -110,10 +110,10 @@
"description": "the body with the name of the database. <br><br>"
}
],
"notes": "Creates a new database <br><br> The request body must be a JSON object with the attribute <em>name</em>. <em>name</em> must contain a valid database name. <br><br> The request body can optionally contain an attribute <em>users</em>, which then must be a list of user objects to initially create for the new database. Each user object can contain the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>username</em>: the user name as a string. This attribute is mandatory. <li><em>passwd</em>: the user password as a string. If not specified, then it defaults to the empty string. <li><em>active</em>: a boolean flag indicating whether the user accout should be actived or not. The default value is <em>true</em>. <li><em>extra</em>: an optional JSON object with extra user information. The data contained in <em>extra</em> will be stored for the user but not be interpreted further by ArangoDB. </ul> If <em>users</em> is not specified or does not contain any users, a default user <em>root</em> will be created with an empty string password. This ensures that the new database will be accessible after it is created. <br><br> The response is a JSON object with the attribute <em>result</em> set to <em>true</em>. <br><br> <em>*Note*</em>: creating a new database is only possible from within the <em>_system</em> database. <br><br>",
"notes": "Creates a new database <br><br> The request body must be a JSON object with the attribute <em>name</em>. <em>name</em> must contain a valid database name. <br><br> The request body can optionally contain an attribute <em>users</em>, which then must be a list of user objects to initially create for the new database. Each user object can contain the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>username</em>: the user name as a string. This attribute is mandatory. <li><em>passwd</em>: the user password as a string. If not specified, then it defaults to the empty string. <li><em>active</em>: a boolean flag indicating whether the user accout should be actived or not. The default value is <em>true</em>. <li><em>extra</em>: an optional JSON object with extra user information. The data contained in <em>extra</em> will be stored for the user but not be interpreted further by ArangoDB. </ul> If <em>users</em> is not specified or does not contain any users, a default user <em>root</em> will be created with an empty string password. This ensures that the new database will be accessible after it is created. <br><br> The response is a JSON object with the attribute <em>result</em> set to <em>true</em>. <br><br> <em>Note</em>: creating a new database is only possible from within the <em>_system</em> database. <br><br>",
"summary": " Create database",
"httpMethod": "POST",
"examples": "<br><br> Creating a database named <em>example</em>. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/database\n{\"name\":\"example\"}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Creating a database named <em>mydb</em> with two users. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/database\n{\"name\":\"mydb\",\"users\":[{\"username\":\"admin\",\"passwd\":\"secret\",\"active\":true},{\"username\":\"tester\",\"passwd\":\"test001\",\"active\":false}]}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Creating a database named <em>example</em>. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/database\n{\"name\":\"example\"}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Creating a database named <em>mydb</em> with two users. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/database\n{\"name\":\"mydb\",\"users\":[{\"username\":\"admin\",\"passwd\":\"secret\",\"active\":true},{\"username\":\"tester\",\"passwd\":\"test001\",\"active\":false}]}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"nickname": "CreateDatabase"
}
],
@ -149,10 +149,10 @@
"description": "The name of the database <br><br>"
}
],
"notes": "Deletes the database along with all data stored in it. <br><br> <em>*Note*</em>: dropping a database is only possible from within the <em>_system</em> database. The <em>_system</em> database itself cannot be dropped. <br><br>",
"notes": "Deletes the database along with all data stored in it. <br><br> <em>Note</em>: dropping a database is only possible from within the <em>_system</em> database. The <em>_system</em> database itself cannot be dropped. <br><br>",
"summary": " Drop database",
"httpMethod": "DELETE",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/database/example\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : true, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/database/example\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : true, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "DropDatabase"
}
],

View File

@ -44,7 +44,7 @@
"paramType": "query",
"required": "false",
"name": "createCollection",
"description": "If this parameter has a value of <em>true</em> or <em>yes</em>, then the collection is created if it does not yet exist. Other values will be ignored so the collection must be present for the operation to succeed. <br><br> <em>*Note*</em>: this flag is not supported in a cluster. Using it will result in an error. <br><br>"
"description": "If this parameter has a value of <em>true</em> or <em>yes</em>, then the collection is created if it does not yet exist. Other values will be ignored so the collection must be present for the operation to succeed. <br><br> <em>Note</em>: this flag is not supported in a cluster. Using it will result in an error. <br><br>"
},
{
"dataType": "Boolean",
@ -57,7 +57,7 @@
"notes": "Creates a new document in the collection named <em>collection</em>. A JSON representation of the document must be passed as the body of the POST request. <br><br> If the document was created successfully, then the \"Location\" header contains the path to the newly created document. The \"ETag\" header field contains the revision of the document. <br><br> The body of the response contains a JSON object with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>_id</em> contains the document handle of the newly created document <li><em>_key</em> contains the document key <li><em>_rev</em> contains the document revision </ul> If the collection parameter <em>waitForSync</em> is <em>false</em>, then the call returns as soon as the document has been accepted. It will not wait until the document has been synced to disk. <br><br> Optionally, the URL parameter <em>waitForSync</em> can be used to force synchronisation of the document creation operation to disk even in case that the <em>waitForSync</em> flag had been disabled for the entire collection. Thus, the <em>waitForSync</em> URL parameter can be used to force synchronisation of just this specific operations. To use this, set the <em>waitForSync</em> parameter to <em>true</em>. If the <em>waitForSync</em> parameter is not specified or set to <em>false</em>, then the collection's default <em>waitForSync</em> behavior is applied. The <em>waitForSync</em> URL parameter cannot be used to disable synchronisation for collections that have a default <em>waitForSync</em> value of <em>true</em>. <br><br>",
"summary": "Create document",
"httpMethod": "POST",
"examples": "<br><br> Create a document given a collection named <em>products</em>. Note that the revision identifier might or might not by equal to the auto-generated key. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: \"1216552454\"\nlocation: /_db/_system/_api/document/products/1216552454\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1216552454\", \n \"_rev\" : \"1216552454\", \n \"_key\" : \"1216552454\" \n}\n</code></pre><br><br><br> Create a document in a collection named <em>products</em> with a collection-level <em>waitForSync</em> value of <em>false</em>. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1217076742\"\nlocation: /_db/_system/_api/document/products/1217076742\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1217076742\", \n \"_rev\" : \"1217076742\", \n \"_key\" : \"1217076742\" \n}\n</code></pre><br><br><br> Create a document in a collection with a collection-level <em>waitForSync</em> value of <em>false</em>, but using the <em>waitForSync</em> URL parameter. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products&waitForSync=true\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: \"1217601030\"\nlocation: /_db/_system/_api/document/products/1217601030\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1217601030\", \n \"_rev\" : \"1217601030\", \n \"_key\" : \"1217601030\" \n}\n</code></pre><br><br><br> Create a document in a new, named collection <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products&createCollection=true\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1218125318\"\nlocation: /_db/_system/_api/document/products/1218125318\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1218125318\", \n \"_rev\" : \"1218125318\", \n \"_key\" : \"1218125318\" \n}\n</code></pre><br><br><br> Unknown collection name: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"collection 'products' not found\", \n \"code\" : 404, \n \"errorNum\" : 1203 \n}\n</code></pre><br><br><br> Illegal document: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products\n{ 1: \"World\" }\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"expecting attribute name\", \n \"code\" : 400, \n \"errorNum\" : 600 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Create a document given a collection named <em>products</em>. Note that the revision identifier might or might not by equal to the auto-generated key. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: \"1365638312\"\nlocation: /_db/_system/_api/document/products/1365638312\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1365638312\", \n \"_rev\" : \"1365638312\", \n \"_key\" : \"1365638312\" \n}\n</code></pre><br><br><br> Create a document in a collection named <em>products</em> with a collection-level <em>waitForSync</em> value of <em>false</em>. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1366162600\"\nlocation: /_db/_system/_api/document/products/1366162600\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1366162600\", \n \"_rev\" : \"1366162600\", \n \"_key\" : \"1366162600\" \n}\n</code></pre><br><br><br> Create a document in a collection with a collection-level <em>waitForSync</em> value of <em>false</em>, but using the <em>waitForSync</em> URL parameter. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products&waitForSync=true\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: \"1366686888\"\nlocation: /_db/_system/_api/document/products/1366686888\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1366686888\", \n \"_rev\" : \"1366686888\", \n \"_key\" : \"1366686888\" \n}\n</code></pre><br><br><br> Create a document in a new, named collection <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products&createCollection=true\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1367211176\"\nlocation: /_db/_system/_api/document/products/1367211176\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1367211176\", \n \"_rev\" : \"1367211176\", \n \"_key\" : \"1367211176\" \n}\n</code></pre><br><br><br> Unknown collection name: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products\n{ \"Hello\": \"World\" }\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"collection 'products' not found\", \n \"code\" : 404, \n \"errorNum\" : 1203 \n}\n</code></pre><br><br><br> Illegal document: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products\n{ 1: \"World\" }\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"expecting attribute name\", \n \"code\" : 400, \n \"errorNum\" : 600 \n}\n</code></pre><br><br><br>",
"nickname": "CreateDocument"
}
],
@ -108,7 +108,7 @@
"notes": "Returns the document identified by <em>document-handle</em>. The returned document contains two special attributes: <em>_id</em> containing the document handle and <em>_rev</em> containing the revision. <br><br>",
"summary": "Read document",
"httpMethod": "GET",
"examples": "<br><br> Use a document handle: <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1218649606\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1218649606\"\n\n{ \n \"hello\" : \"world\", \n \"_id\" : \"products/1218649606\", \n \"_rev\" : \"1218649606\", \n \"_key\" : \"1218649606\" \n}\n</code></pre><br><br><br> Use a document handle and an etag: <br><br><br><br><pre><code class=\"json\">shell> curl --header 'If-None-Match: \"1219239430\"' --dump - http://localhost:8529/_api/document/products/1219239430\n\n</code></pre><br><br><br> Unknown document handle: <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/unknownhandle\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"document /_api/document/products/unknownhandle not found\", \n \"code\" : 404, \n \"errorNum\" : 1202 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Use a document handle: <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1367735464\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1367735464\"\n\n{ \n \"hello\" : \"world\", \n \"_id\" : \"products/1367735464\", \n \"_rev\" : \"1367735464\", \n \"_key\" : \"1367735464\" \n}\n</code></pre><br><br><br> Use a document handle and an etag: <br><br><br><br><pre><code class=\"json\">shell> curl --header 'If-None-Match: \"1368325288\"' --dump - http://localhost:8529/_api/document/products/1368325288\n\n</code></pre><br><br><br> Unknown document handle: <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/unknownhandle\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"document /_api/document/products/unknownhandle not found\", \n \"code\" : 404, \n \"errorNum\" : 1202 \n}\n</code></pre><br><br><br>",
"nickname": "ReadDocument"
}
],
@ -134,12 +134,19 @@
"required": "true",
"name": "collection",
"description": "The name of the collection. <br><br>"
},
{
"dataType": "String",
"paramType": "query",
"required": "false",
"name": "type",
"description": "The type of the result. The following values are allowed: <br><br> <ul class=\"swagger-list\"><li><em>id</em>: returns a list of document ids (<em>_id</em> attributes) <li><em>key</em>: returns a list of document keys (<em>_key</em> attributes) <li><em>path</em>: returns a list of document URI paths. This is the default."
}
],
"notes": "Returns a list of all URI for all documents from the collection identified by <em>collection</em>. <br><br>",
"notes": "Returns a list of all keys, ids, or URI paths for all documents in the collection identified by <em>collection</em>. The type of the result list is determined by the <em>type</em> attribute. <br><br> Note that the results have no defined order and thus the order should not be relied on. <br><br>",
"summary": "Read all documents",
"httpMethod": "GET",
"examples": "<br><br> Returns a all ids. <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/?collection=products\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"documents\" : [ \n \"/_api/document/products/1220550150\", \n \"/_api/document/products/1220222470\", \n \"/_api/document/products/1219894790\" \n ] \n}\n</code></pre><br><br><br> Collection does not exist. <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/?collection=doesnotexist\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"collection 'doesnotexist' not found\", \n \"code\" : 404, \n \"errorNum\" : 1203 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Returns all document paths <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/?collection=products\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"documents\" : [ \n \"/_api/document/products/1369636008\", \n \"/_api/document/products/1368980648\", \n \"/_api/document/products/1369308328\" \n ] \n}\n</code></pre><br><br><br> Returns all document keys <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/?collection=products&type=key\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"documents\" : [ \n \"1370225832\", \n \"1370881192\", \n \"1370553512\" \n ] \n}\n</code></pre><br><br><br> Collection does not exist. <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/?collection=doesnotexist\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"collection 'doesnotexist' not found\", \n \"code\" : 404, \n \"errorNum\" : 1203 \n}\n</code></pre><br><br><br>",
"nickname": "ReadAllDocuments"
}
],
@ -197,7 +204,7 @@
"notes": "Like <em>GET</em>, but only returns the header fields and not the body. You can use this call to get the current revision of a document or check if the document was deleted. <br><br>",
"summary": "Read document header",
"httpMethod": "HEAD",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X HEAD --data-binary @- --dump - http://localhost:8529/_api/document/products/1221139974\n\n</code></pre><br>@endDocuBlock @endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X HEAD --data-binary @- --dump - http://localhost:8529/_api/document/products/1371471016\n\n</code></pre><br><br><br> <br><br>",
"nickname": "ReadDocumentHeader"
}
],
@ -274,7 +281,7 @@
"notes": "Completely updates (i.e. replaces) the document identified by <em>document-handle</em>. If the document exists and can be updated, then a <em>HTTP 201</em> is returned and the \"ETag\" header field contains the new revision of the document. <br><br> If the new document passed in the body of the request contains the <em>document-handle</em> in the attribute <em>_id</em> and the revision in <em>_rev</em>, these attributes will be ignored. Only the URI and the \"ETag\" header are relevant in order to avoid confusion when using proxies. <br><br> Optionally, the URL parameter <em>waitForSync</em> can be used to force synchronisation of the document replacement operation to disk even in case that the <em>waitForSync</em> flag had been disabled for the entire collection. Thus, the <em>waitForSync</em> URL parameter can be used to force synchronisation of just specific operations. To use this, set the <em>waitForSync</em> parameter to <em>true</em>. If the <em>waitForSync</em> parameter is not specified or set to <em>false</em>, then the collection's default <em>waitForSync</em> behavior is applied. The <em>waitForSync</em> URL parameter cannot be used to disable synchronisation for collections that have a default <em>waitForSync</em> value of <em>true</em>. <br><br> The body of the response contains a JSON object with the information about the handle and the revision. The attribute <em>_id</em> contains the known <em>document-handle</em> of the updated document, the attribute <em>_rev</em> contains the new document revision. <br><br> If the document does not exist, then a <em>HTTP 404</em> is returned and the body of the response contains an error document. <br><br> There are two ways for specifying the targeted document revision id for conditional replacements (i.e. replacements that will only be executed if the revision id found in the database matches the document revision id specified in the request): <ul class=\"swagger-list\"><li>specifying the target revision in the <em>rev</em> URL query parameter <li>specifying the target revision in the <em>if-match</em> HTTP header </ul> Specifying a target revision is optional, however, if done, only one of the described mechanisms must be used (either the <em>rev</em> URL parameter or the <em>if-match</em> HTTP header). Regardless which mechanism is used, the parameter needs to contain the target document revision id as returned in the <em>_rev</em> attribute of a document or by an HTTP <em>etag</em> header. <br><br> For example, to conditionally replace a document based on a specific revision id, you can use the following request: <br><br> <em>PUT /_api/document/document-handle?rev=etag</em> <br><br> If a target revision id is provided in the request (e.g. via the <em>etag</em> value in the <em>rev</em> URL query parameter above), ArangoDB will check that the revision id of the document found in the database is equal to the target revision id provided in the request. If there is a mismatch between the revision id, then by default a <em>HTTP 412</em> conflict is returned and no replacement is performed. <br><br> The conditional update behavior can be overriden with the <em>policy</em> URL query parameter: <br><br> <em>PUT /_api/document/document-handle?policy=policy</em> <br><br> If <em>policy</em> is set to <em>error</em>, then the behavior is as before: replacements will fail if the revision id found in the database does not match the target revision id specified in the request. <br><br> If <em>policy</em> is set to <em>last</em>, then the replacement will succeed, even if the revision id found in the database does not match the target revision id specified in the request. You can use the <em>last</em> *policy* to force replacements. <br><br>",
"summary": "Replace document",
"httpMethod": "PUT",
"examples": "<br><br> Using document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1221729798\n{\"Hello\": \"you\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1222057478\"\nlocation: /_db/_system/_api/document/products/1221729798\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1221729798\", \n \"_rev\" : \"1222057478\", \n \"_key\" : \"1221729798\" \n}\n</code></pre><br><br><br> Unknown document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1222581766\n{}\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"document /_api/document/products/1222581766 not found\", \n \"code\" : 404, \n \"errorNum\" : 1202 \n}\n</code></pre><br><br><br> Produce a revision conflict: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --header 'If-Match: \"1223826950\"' --data-binary @- --dump - http://localhost:8529/_api/document/products/1223499270\n{\"other\":\"content\"}\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\netag: \"1223499270\"\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/1223499270\", \n \"_rev\" : \"1223499270\", \n \"_key\" : \"1223499270\" \n}\n</code></pre><br><br><br> Last write wins: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --header 'If-Match: \"1224941062\"' --data-binary @- --dump - http://localhost:8529/_api/document/products/1224613382?policy=last\n{}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1225203206\"\nlocation: /_db/_system/_api/document/products/1224613382\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1224613382\", \n \"_rev\" : \"1225203206\", \n \"_key\" : \"1224613382\" \n}\n</code></pre><br><br><br> Alternative to header field: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1225727494?rev=1226055174\n{\"other\":\"content\"}\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\netag: \"1225727494\"\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/1225727494\", \n \"_rev\" : \"1225727494\", \n \"_key\" : \"1225727494\" \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Using document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1372060840\n{\"Hello\": \"you\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1372388520\"\nlocation: /_db/_system/_api/document/products/1372060840\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1372060840\", \n \"_rev\" : \"1372388520\", \n \"_key\" : \"1372060840\" \n}\n</code></pre><br><br><br> Unknown document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1372912808\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/1372912808 not found\", \n \"code\" : 404, \n \"errorNum\" : 1202 \n}\n</code></pre><br><br><br> Produce a revision conflict: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --header 'If-Match: \"1374157992\"' --data-binary @- --dump - http://localhost:8529/_api/document/products/1373830312\n{\"other\":\"content\"}\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\netag: \"1373830312\"\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/1373830312\", \n \"_rev\" : \"1373830312\", \n \"_key\" : \"1373830312\" \n}\n</code></pre><br><br><br> Last write wins: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --header 'If-Match: \"1375272104\"' --data-binary @- --dump - http://localhost:8529/_api/document/products/1374944424?policy=last\n{}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1375534248\"\nlocation: /_db/_system/_api/document/products/1374944424\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1374944424\", \n \"_rev\" : \"1375534248\", \n \"_key\" : \"1374944424\" \n}\n</code></pre><br><br><br> Alternative to header field: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1376058536?rev=1376386216\n{\"other\":\"content\"}\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\netag: \"1376058536\"\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/1376058536\", \n \"_rev\" : \"1376058536\", \n \"_key\" : \"1376058536\" \n}\n</code></pre><br><br><br>",
"nickname": "ReplaceDocument"
}
],
@ -358,7 +365,7 @@
"notes": "Partially updates the document identified by <em>document-handle</em>. The body of the request must contain a JSON document with the attributes to patch (the patch document). All attributes from the patch document will be added to the existing document if they do not yet exist, and overwritten in the existing document if they do exist there. <br><br> Setting an attribute value to <em>null</em> in the patch document will cause a value of <em>null</em> be saved for the attribute by default. <br><br> Optionally, the URL parameter <em>waitForSync</em> can be used to force synchronisation of the document update operation to disk even in case that the <em>waitForSync</em> flag had been disabled for the entire collection. Thus, the <em>waitForSync</em> URL parameter can be used to force synchronisation of just specific operations. To use this, set the <em>waitForSync</em> parameter to <em>true</em>. If the <em>waitForSync</em> parameter is not specified or set to <em>false</em>, then the collection's default <em>waitForSync</em> behavior is applied. The <em>waitForSync</em> URL parameter cannot be used to disable synchronisation for collections that have a default <em>waitForSync</em> value of <em>true</em>. <br><br> The body of the response contains a JSON object with the information about the handle and the revision. The attribute <em>_id</em> contains the known <em>document-handle</em> of the updated document, the attribute <em>_rev</em> contains the new document revision. <br><br> If the document does not exist, then a <em>HTTP 404</em> is returned and the body of the response contains an error document. <br><br> You can conditionally update a document based on a target revision id by using either the <em>rev</em> URL parameter or the <em>if-match</em> HTTP header. To control the update behavior in case there is a revision mismatch, you can use the <em>policy</em> parameter. This is the same as when replacing documents (see replacing documents for details). <br><br>",
"summary": " Patch document",
"httpMethod": "PATCH",
"examples": "<br><br> patches an existing document with new content. <br><br><br><br><pre><code class=\"json\">shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1226841606\n{ \n \"hello\" : \"world\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1227169286\"\nlocation: /_db/_system/_api/document/products/1226841606\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1226841606\", \n \"_rev\" : \"1227169286\", \n \"_key\" : \"1226841606\" \n}\nshell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1226841606\n{ \n \"numbers\" : { \n \"one\" : 1, \n \"two\" : 2, \n \"three\" : 3, \n \"empty\" : null \n } \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1227759110\"\nlocation: /_db/_system/_api/document/products/1226841606\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1226841606\", \n \"_rev\" : \"1227759110\", \n \"_key\" : \"1226841606\" \n}\nshell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1226841606\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1227759110\"\n\n{ \n \"one\" : \"world\", \n \"hello\" : \"world\", \n \"numbers\" : { \n \"empty\" : null, \n \"one\" : 1, \n \"two\" : 2, \n \"three\" : 3 \n }, \n \"_id\" : \"products/1226841606\", \n \"_rev\" : \"1227759110\", \n \"_key\" : \"1226841606\" \n}\nshell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1226841606?keepNull=false\n{ \n \"hello\" : null, \n \"numbers\" : { \n \"four\" : 4 \n } \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1228217862\"\nlocation: /_db/_system/_api/document/products/1226841606\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1226841606\", \n \"_rev\" : \"1228217862\", \n \"_key\" : \"1226841606\" \n}\nshell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1226841606\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1228217862\"\n\n{ \n \"one\" : \"world\", \n \"numbers\" : { \n \"empty\" : null, \n \"one\" : 1, \n \"two\" : 2, \n \"three\" : 3, \n \"four\" : 4 \n }, \n \"_id\" : \"products/1226841606\", \n \"_rev\" : \"1228217862\", \n \"_key\" : \"1226841606\" \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> patches an existing document with new content. <br><br><br><br><pre><code class=\"json\">shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1377172648\n{ \n \"hello\" : \"world\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1377500328\"\nlocation: /_db/_system/_api/document/products/1377172648\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1377172648\", \n \"_rev\" : \"1377500328\", \n \"_key\" : \"1377172648\" \n}\nshell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1377172648\n{ \n \"numbers\" : { \n \"one\" : 1, \n \"two\" : 2, \n \"three\" : 3, \n \"empty\" : null \n } \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1378090152\"\nlocation: /_db/_system/_api/document/products/1377172648\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1377172648\", \n \"_rev\" : \"1378090152\", \n \"_key\" : \"1377172648\" \n}\nshell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1377172648\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1378090152\"\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/1377172648\", \n \"_rev\" : \"1378090152\", \n \"_key\" : \"1377172648\" \n}\nshell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1377172648?keepNull=false\n{ \n \"hello\" : null, \n \"numbers\" : { \n \"four\" : 4 \n } \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1378548904\"\nlocation: /_db/_system/_api/document/products/1377172648\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1377172648\", \n \"_rev\" : \"1378548904\", \n \"_key\" : \"1377172648\" \n}\nshell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1377172648\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1378548904\"\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/1377172648\", \n \"_rev\" : \"1378548904\", \n \"_key\" : \"1377172648\" \n}\n</code></pre><br><br><br>",
"nickname": "PatchDocument"
}
],
@ -424,7 +431,7 @@
"notes": "The body of the response contains a JSON object with the information about the handle and the revision. The attribute <em>_id</em> contains the known <em>document-handle</em> of the deleted document, the attribute <em>_rev</em> contains the document revision. <br><br> If the <em>waitForSync</em> parameter is not specified or set to <em>false</em>, then the collection's default <em>waitForSync</em> behavior is applied. The <em>waitForSync</em> URL parameter cannot be used to disable synchronisation for collections that have a default <em>waitForSync</em> value of <em>true</em>. <br><br>",
"summary": " Deletes document",
"httpMethod": "DELETE",
"examples": "<br><br> Using document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/document/products/1228807686\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1228807686\", \n \"_rev\" : \"1228807686\", \n \"_key\" : \"1228807686\" \n}\n</code></pre><br><br><br> Unknown document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/document/products/1229528582\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"errorMessage\" : \"document /_api/document/products/1229528582 not found\", \n \"code\" : 404, \n \"errorNum\" : 1202 \n}\n</code></pre><br><br><br> Revision conflict: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --header 'If-Match: \"1230708230\"' --dump - http://localhost:8529/_api/document/products/1230380550\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\netag: \"1230380550\"\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/1230380550\", \n \"_rev\" : \"1230380550\", \n \"_key\" : \"1230380550\" \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Using document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/document/products/1379138728\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : false, \n \"_id\" : \"products/1379138728\", \n \"_rev\" : \"1379138728\", \n \"_key\" : \"1379138728\" \n}\n</code></pre><br><br><br> Unknown document handle: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/document/products/1380252840\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/1380252840 not found\", \n \"code\" : 404, \n \"errorNum\" : 1202 \n}\n</code></pre><br><br><br> Revision conflict: <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --header 'If-Match: \"1381694632\"' --dump - http://localhost:8529/_api/document/products/1381366952\n\nHTTP/1.1 412 Precondition Failed\ncontent-type: application/json; charset=utf-8\netag: \"1381366952\"\n\n{ \n \"error\" : true, \n \"code\" : 412, \n \"errorNum\" : 1200, \n \"errorMessage\" : \"precondition failed\", \n \"_id\" : \"products/1381366952\", \n \"_rev\" : \"1381366952\", \n \"_key\" : \"1381366952\" \n}\n</code></pre><br><br><br>",
"nickname": "DeletesDocument"
}
],

View File

@ -44,7 +44,7 @@
"paramType": "query",
"required": "false",
"name": "createCollection",
"description": "If this parameter has a value of <em>true</em> or <em>yes</em>, then the collection is created if it does not yet exist. Other values will be ignored so the collection must be present for the operation to succeed. <br><br> <em>*Note*</em>: This flag is not supported in a cluster. Using it will result in an error. <br><br>"
"description": "If this parameter has a value of <em>true</em> or <em>yes</em>, then the collection is created if it does not yet exist. Other values will be ignored so the collection must be present for the operation to succeed. <br><br> <em>Note</em>: This flag is not supported in a cluster. Using it will result in an error. <br><br>"
},
{
"dataType": "Boolean",
@ -71,7 +71,7 @@
"notes": "Creates a new edge document in the collection named <em>collection</em>. A JSON representation of the document must be passed as the body of the POST request. <br><br> The <em>from</em> and <em>to</em> handles are immutable once the edge has been created. <br><br> In all other respects the method works like <em>POST /document</em>. <br><br>",
"summary": "Create edge",
"httpMethod": "POST",
"examples": "<br><br> Create an edge and read it back: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/edge/?collection=edges&from=vertices/1&to=vertices/2\n{ \n \"name\" : \"Emil\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1233067526\"\nlocation: /_db/_system/_api/document/edges/1233067526\n\n{ \n \"error\" : false, \n \"_id\" : \"edges/1233067526\", \n \"_rev\" : \"1233067526\", \n \"_key\" : \"1233067526\" \n}\nshell> curl --data-binary @- --dump - http://localhost:8529/_api/edge/edges/1233067526\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1233067526\"\n\n{ \n \"name\" : \"Emil\", \n \"_id\" : \"edges/1233067526\", \n \"_rev\" : \"1233067526\", \n \"_key\" : \"1233067526\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/2\" \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Create an edge and read it back: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/edge/?collection=edges&from=vertices/1&to=vertices/2\n{ \n \"name\" : \"Emil\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: \"1383988392\"\nlocation: /_db/_system/_api/document/edges/1383988392\n\n{ \n \"error\" : false, \n \"_id\" : \"edges/1383988392\", \n \"_rev\" : \"1383988392\", \n \"_key\" : \"1383988392\" \n}\nshell> curl --data-binary @- --dump - http://localhost:8529/_api/edge/edges/1383988392\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"1383988392\"\n\n{ \n \"name\" : \"Emil\", \n \"_id\" : \"edges/1383988392\", \n \"_rev\" : \"1383988392\", \n \"_key\" : \"1383988392\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/2\" \n}\n</code></pre><br><br><br>",
"nickname": "CreateEdge"
}
],
@ -94,7 +94,7 @@
"code": "404"
},
{
"reason": "is returned if a \"If-Match\" header or <em>rev</em> is given and the found document has a different version. The response will also contain the found document's current revision in the <em>_rev</em> attribute. Additionally, the attributes <em>_id</em> and <em>_key</em> will be returned. @endDocuBlock",
"reason": "is returned if a \"If-Match\" header or <em>rev</em> is given and the found document has a different version. The response will also contain the found document's current revision in the <em>_rev</em> attribute. Additionally, the attributes <em>_id</em> and <em>_key</em> will be returned. <br><br>",
"code": "412"
}
],
@ -137,7 +137,7 @@
"code": "200"
},
{
"reason": "The collection does not exist. @endDocuBlock",
"reason": "The collection does not exist. <br><br>",
"code": "404"
}
],
@ -176,7 +176,7 @@
"code": "404"
},
{
"reason": "is returned if a \"If-Match\" header or <em>rev</em> is given and the found document has a different version. The response will also contain the found document's current revision in the <em>etag</em> header. @endDocuBlock",
"reason": "is returned if a \"If-Match\" header or <em>rev</em> is given and the found document has a different version. The response will also contain the found document's current revision in the <em>etag</em> header. <br><br>",
"code": "412"
}
],
@ -232,7 +232,7 @@
"code": "404"
},
{
"reason": "is returned if a \"If-Match\" header or <em>rev</em> is given and the found document has a different version. The response will also contain the found document's current revision in the <em>_rev</em> attribute. Additionally, the attributes <em>_id</em> and <em>_key</em> will be returned. @endDocuBlock",
"reason": "is returned if a \"If-Match\" header or <em>rev</em> is given and the found document has a different version. The response will also contain the found document's current revision in the <em>_rev</em> attribute. Additionally, the attributes <em>_id</em> and <em>_key</em> will be returned. <br><br>",
"code": "412"
}
],
@ -279,7 +279,7 @@
"description": "You can conditionally replace an edge document based on a target revision id by using the <em>if-match</em> HTTP header. <br><br>"
}
],
"notes": "Completely updates (i.e. replaces) the edge document identified by <em>document-handle</em>. If the edge 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 edge document. <br><br> If the new edge 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. <em>*Note*</em>: The attributes <em>_from</em> and <em>_to</em> of an edge are immutable and cannot be updated either. <br><br> Optionally, the URL parameter <em>waitForSync</em> can be used to force synchronisation of the edge 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 edge document, the attribute <em>_rev</em> contains the new revision of the edge document. <br><br> If the edge 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 revision id for conditional replacements (i.e. replacements that will only be executed if the revision id found in the database matches the revision id specified in the request): <ul class=\"swagger-list\"><li>specifying the target revision in the <em>rev</em> URL query parameter <li>specifying the target revision in the <em>if-match</em> HTTP header </ul> Specifying a target revision is optional, however, if done, only one of the described mechanisms must be used (either the <em>rev</em> URL parameter or the <em>if-match</em> HTTP header). Regardless which mechanism is used, the parameter needs to contain the target revision id as returned in the <em>_rev</em> attribute of an edge document or by an HTTP <em>etag</em> header. <br><br> For example, to conditionally replace an edge document based on a specific revision id, you can use the following request: <br><br> <ul class=\"swagger-list\"><li>PUT /_api/document/<em>document-handle</em>?rev=<em>etag</em> </ul> 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 edge document found in the database is equal to the target revision id provided in the request. If there is a mismatch between the revision id, then by default a <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> <ul class=\"swagger-list\"><li>PUT /_api/document/<em>document-handle</em>?policy=<em>policy</em> </ul> 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 edge document identified by <em>document-handle</em>. If the edge 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 edge document. <br><br> If the new edge 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. <em>Note</em>: The attributes <em>_from</em> and <em>_to</em> of an edge are immutable and cannot be updated either. <br><br> Optionally, the URL parameter <em>waitForSync</em> can be used to force synchronisation of the edge 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 edge document, the attribute <em>_rev</em> contains the new revision of the edge document. <br><br> If the edge 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 revision id for conditional replacements (i.e. replacements that will only be executed if the revision id found in the database matches the revision id specified in the request): <ul class=\"swagger-list\"><li>specifying the target revision in the <em>rev</em> URL query parameter <li>specifying the target revision in the <em>if-match</em> HTTP header </ul> Specifying a target revision is optional, however, if done, only one of the described mechanisms must be used (either the <em>rev</em> URL parameter or the <em>if-match</em> HTTP header). Regardless which mechanism is used, the parameter needs to contain the target revision id as returned in the <em>_rev</em> attribute of an edge document or by an HTTP <em>etag</em> header. <br><br> For example, to conditionally replace an edge document based on a specific revision id, you can use the following request: <br><br> <ul class=\"swagger-list\"><li>PUT /_api/document/<em>document-handle</em>?rev=<em>etag</em> </ul> 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 edge document found in the database is equal to the target revision id provided in the request. If there is a mismatch between the revision id, then by default a <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> <ul class=\"swagger-list\"><li>PUT /_api/document/<em>document-handle</em>?policy=<em>policy</em> </ul> 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 an edge",
"httpMethod": "PUT",
"examples": "",
@ -309,7 +309,7 @@
"code": "404"
},
{
"reason": "is returned if a \"If-Match\" header or <em>rev</em> is given and the found document has a different version. The response will also contain the found document's current revision in the <em>_rev</em> attribute. Additionally, the attributes <em>_id</em> and <em>_key</em> will be returned. @endDocuBlock",
"reason": "is returned if a \"If-Match\" header or <em>rev</em> is given and the found document has a different version. The response will also contain the found document's current revision in the <em>_rev</em> attribute. Additionally, the attributes <em>_id</em> and <em>_key</em> will be returned. <br><br>",
"code": "412"
}
],
@ -363,7 +363,7 @@
"description": "You can conditionally patch an edge document based on a target revision id by using the <em>if-match</em> HTTP header. <br><br>"
}
],
"notes": "Partially updates the edge 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 edge document if they do not yet exist, and overwritten in the existing edge 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> <em>*Note*</em>: Internal attributes such as <em>_key</em>, <em>_from</em> and <em>_to</em> are immutable once set and cannot be updated. <br><br> Optionally, the URL parameter <em>waitForSync</em> can be used to force synchronisation of the edge 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 edge document, the attribute <em>_rev</em> contains the new edge document revision. <br><br> If the edge 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 an edge 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 edge documents (see replacing documents for details). <br><br>",
"notes": "Partially updates the edge 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 edge document if they do not yet exist, and overwritten in the existing edge 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> <em>Note</em>: Internal attributes such as <em>_key</em>, <em>_from</em> and <em>_to</em> are immutable once set and cannot be updated. <br><br> Optionally, the URL parameter <em>waitForSync</em> can be used to force synchronisation of the edge 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 edge document, the attribute <em>_rev</em> contains the new edge document revision. <br><br> If the edge 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 an edge 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 edge documents (see replacing documents for details). <br><br>",
"summary": " Patches edge",
"httpMethod": "PATCH",
"examples": "",
@ -389,7 +389,7 @@
"code": "404"
},
{
"reason": "is returned if a \"If-Match\" header or <em>rev</em> is given and the found document has a different version. The response will also contain the found document's current revision in the <em>_rev</em> attribute. Additionally, the attributes <em>_id</em> and <em>_key</em> will be returned. @endDocuBlock",
"reason": "is returned if a \"If-Match\" header or <em>rev</em> is given and the found document has a different version. The response will also contain the found document's current revision in the <em>_rev</em> attribute. Additionally, the attributes <em>_id</em> and <em>_key</em> will be returned. <br><br>",
"code": "412"
}
],

View File

@ -33,7 +33,7 @@
"notes": "Returns the list of edges starting or ending in the vertex identified by <em>vertex-handle</em>. <br><br>",
"summary": " Read in- or outbound edges",
"httpMethod": "GET",
"examples": "<br><br> Any direction <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"edges\" : [ \n { \n \"_id\" : \"edges/6\", \n \"_rev\" : \"906436102\", \n \"_key\" : \"6\", \n \"_from\" : \"vertices/2\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v2 -> v1\" \n }, \n { \n \"_id\" : \"edges/7\", \n \"_rev\" : \"906960390\", \n \"_key\" : \"7\", \n \"_from\" : \"vertices/4\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v4 -> v1\" \n }, \n { \n \"_id\" : \"edges/5\", \n \"_rev\" : \"905911814\", \n \"_key\" : \"5\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/3\", \n \"$label\" : \"v1 -> v3\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> In edges <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&direction=in\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"edges\" : [ \n { \n \"_id\" : \"edges/6\", \n \"_rev\" : \"911220230\", \n \"_key\" : \"6\", \n \"_from\" : \"vertices/2\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v2 -> v1\" \n }, \n { \n \"_id\" : \"edges/7\", \n \"_rev\" : \"911744518\", \n \"_key\" : \"7\", \n \"_from\" : \"vertices/4\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v4 -> v1\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Out edges <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&direction=out\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"edges\" : [ \n { \n \"_id\" : \"edges/5\", \n \"_rev\" : \"915480070\", \n \"_key\" : \"5\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/3\", \n \"$label\" : \"v1 -> v3\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Any direction <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"edges\" : [ \n { \n \"_id\" : \"edges/6\", \n \"_key\" : \"6\", \n \"_rev\" : \"1046281384\", \n \"_from\" : \"vertices/2\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v2 -> v1\" \n }, \n { \n \"_id\" : \"edges/7\", \n \"_key\" : \"7\", \n \"_rev\" : \"1046805672\", \n \"_from\" : \"vertices/4\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v4 -> v1\" \n }, \n { \n \"_id\" : \"edges/5\", \n \"_key\" : \"5\", \n \"_rev\" : \"1045757096\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/3\", \n \"$label\" : \"v1 -> v3\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> In edges <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&direction=in\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"edges\" : [ \n { \n \"_id\" : \"edges/6\", \n \"_key\" : \"6\", \n \"_rev\" : \"1050999976\", \n \"_from\" : \"vertices/2\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v2 -> v1\" \n }, \n { \n \"_id\" : \"edges/7\", \n \"_key\" : \"7\", \n \"_rev\" : \"1051524264\", \n \"_from\" : \"vertices/4\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v4 -> v1\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Out edges <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&direction=out\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"edges\" : [ \n { \n \"_id\" : \"edges/5\", \n \"_key\" : \"5\", \n \"_rev\" : \"1055194280\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/3\", \n \"$label\" : \"v1 -> v3\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "ReadIn-OrOutboundEdges"
}
],

View File

@ -21,10 +21,10 @@
}
],
"parameters": [],
"notes": "Returns a list of all configured endpoints the server is listening on. For each endpoint, the list of allowed databases is returned too if set. <br><br> The result is a JSON hash which has the endpoints as keys, and the list of mapped database names as values for each endpoint. <br><br> If a list of mapped databases is empty, it means that all databases can be accessed via the endpoint. If a list of mapped databases contains more than one database name, this means that any of the databases might be accessed via the endpoint, and the first database in the list will be treated as the default database for the endpoint. The default database will be used when an incoming request does not specify a database name in the request explicitly. <br><br> <em>*Note*</em>: retrieving the list of all endpoints is allowed in the system database only. Calling this action in any other database will make the server return an error. <br><br>",
"notes": "Returns a list of all configured endpoints the server is listening on. For each endpoint, the list of allowed databases is returned too if set. <br><br> The result is a JSON hash which has the endpoints as keys, and the list of mapped database names as values for each endpoint. <br><br> If a list of mapped databases is empty, it means that all databases can be accessed via the endpoint. If a list of mapped databases contains more than one database name, this means that any of the databases might be accessed via the endpoint, and the first database in the list will be treated as the default database for the endpoint. The default database will be used when an incoming request does not specify a database name in the request explicitly. <br><br> <em>Note</em>: retrieving the list of all endpoints is allowed in the system database only. Calling this action in any other database will make the server return an error. <br><br>",
"summary": " Return list of all endpoints",
"httpMethod": "GET",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/endpoint\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n[ \n { \n \"endpoint\" : \"tcp://127.0.0.1:32357\", \n \"databases\" : [ ] \n }, \n { \n \"endpoint\" : \"tcp://127.0.0.1:8532\", \n \"databases\" : [ \n \"mydb1\", \n \"mydb2\" \n ] \n } \n]\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/endpoint\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n[ \n { \n \"endpoint\" : \"tcp://127.0.0.1:34793\", \n \"databases\" : [ ] \n }, \n { \n \"endpoint\" : \"tcp://127.0.0.1:8532\", \n \"databases\" : [ \n \"mydb1\", \n \"mydb2\" \n ] \n } \n]\n</code></pre><br><br><br>",
"nickname": "ReturnListOfAllEndpoints"
}
],
@ -39,7 +39,7 @@
"code": "200"
},
{
"reason": "is returned if the request is malformed or if the action is not carried out in the system database. <br><br>",
"reason": "is returned if the request is malformed or if the action is not carried out in the system database. <br><br>",
"code": "400"
},
{
@ -56,10 +56,10 @@
"description": "A JSON object describing the endpoint. <br><br>"
}
],
"notes": "The request body must be JSON hash with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>endpoint</em>: the endpoint specification, e.g. <em>tcp://127.0.0.1:8530</em> <li><em>databases</em>: a list of database names the endpoint is responsible for. </ul> If <em>databases</em> is an empty list, all databases present in the server will become accessible via the endpoint, with the <em>_system</em> database being the default database. <br><br> If <em>databases</em> is non-empty, only the specified databases will become available via the endpoint. The first database name in the <em>databases</em> list will also become the default database for the endpoint. The default database will always be used if a request coming in on the endpoint does not specify the database name explicitly. <br><br> <em>*Note*</em>: adding or reconfiguring endpoints is allowed in the system database only. Calling this action in any other database will make the server return an error. <br><br> Adding SSL endpoints at runtime is only supported if the server was started with SSL properly configured (e.g. <em>--server.keyfile</em> must have been set). <br><br>",
"notes": "The request body must be JSON hash with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>endpoint</em>: the endpoint specification, e.g. <em>tcp://127.0.0.1:8530</em> <li><em>databases</em>: a list of database names the endpoint is responsible for. </ul> If <em>databases</em> is an empty list, all databases present in the server will become accessible via the endpoint, with the <em>_system</em> database being the default database. <br><br> If <em>databases</em> is non-empty, only the specified databases will become available via the endpoint. The first database name in the <em>databases</em> list will also become the default database for the endpoint. The default database will always be used if a request coming in on the endpoint does not specify the database name explicitly. <br><br> <em>Note</em>: adding or reconfiguring endpoints is allowed in the system database only. Calling this action in any other database will make the server return an error. <br><br> Adding SSL endpoints at runtime is only supported if the server was started with SSL properly configured (e.g. <em>--server.keyfile</em> must have been set). <br><br>",
"summary": " Add new endpoint or reconfigures an existing endpoint",
"httpMethod": "POST",
"examples": "Adding an endpoint <em>tcp://127.0.0.1:8532</em> with two mapped databases (<em>mydb1</em> and <em>mydb2</em>). <em>mydb1</em> will become the default database for the endpoint. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/endpoint\n{\"endpoint\":\"tcp://127.0.0.1:8532\",\"databases\":[\"mydb1\",\"mydb2\"]}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : true, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Adding an endpoint <em>tcp://127.0.0.1:8533</em> with no database names specified. This will allow access to all databases on this endpoint. The <em>_system</em> database will become the default database for requests that come in on this endpoint and do not specify the database name explicitly. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/endpoint\n{\"endpoint\":\"tcp://127.0.0.1:8533\",\"databases\":[]}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : true, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Adding an endpoint <em>tcp://127.0.0.1:8533</em> without any databases first, and then updating the databases for the endpoint to <em>testdb1</em>, <em>testdb2</em>, and <em>testdb3</em>. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/endpoint\n{\"endpoint\":\"tcp://127.0.0.1:8533\",\"databases\":[]}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : true, \n \"error\" : false, \n \"code\" : 200 \n}\nshell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/endpoint\n{\"endpoint\":\"tcp://127.0.0.1:8533\",\"databases\":[],\"database\":[\"testdb1\",\"testdb2\",\"testdb3\"]}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : true, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "Adding an endpoint <em>tcp://127.0.0.1:8532</em> with two mapped databases (<em>mydb1</em> and <em>mydb2</em>). <em>mydb1</em> will become the default database for the endpoint. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/endpoint\n{\"endpoint\":\"tcp://127.0.0.1:8532\",\"databases\":[\"mydb1\",\"mydb2\"]}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : true, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Adding an endpoint <em>tcp://127.0.0.1:8533</em> with no database names specified. This will allow access to all databases on this endpoint. The <em>_system</em> database will become the default database for requests that come in on this endpoint and do not specify the database name explicitly. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/endpoint\n{\"endpoint\":\"tcp://127.0.0.1:8533\",\"databases\":[]}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : true, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Adding an endpoint <em>tcp://127.0.0.1:8533</em> without any databases first, and then updating the databases for the endpoint to <em>testdb1</em>, <em>testdb2</em>, and <em>testdb3</em>. <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/endpoint\n{\"endpoint\":\"tcp://127.0.0.1:8533\",\"databases\":[]}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : true, \n \"error\" : false, \n \"code\" : 200 \n}\nshell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/endpoint\n{\"endpoint\":\"tcp://127.0.0.1:8533\",\"databases\":[],\"database\":[\"testdb1\",\"testdb2\",\"testdb3\"]}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : true, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "AddNewEndpointOrReconfiguresAnExistingEndpoint"
}
],
@ -74,7 +74,7 @@
"code": "200"
},
{
"reason": "is returned if the request is malformed or if the action is not carried out in the system database. <br><br>",
"reason": "is returned if the request is malformed or if the action is not carried out in the system database. <br><br>",
"code": "400"
},
{
@ -95,10 +95,10 @@
"description": "The endpoint to delete, e.g. <em>tcp://127.0.0.1:8529</em>. <br><br>"
}
],
"notes": "This operation deletes an existing endpoint from the list of all endpoints, and makes the server stop listening on the endpoint. <br><br> <em>*Note*</em>: deleting and disconnecting an endpoint is allowed in the system database only. Calling this action in any other database will make the server return an error. <br><br> Futhermore, the last remaining endpoint cannot be deleted as this would make the server kaputt. <br><br>",
"notes": "This operation deletes an existing endpoint from the list of all endpoints, and makes the server stop listening on the endpoint. <br><br> <em>Note</em>: deleting and disconnecting an endpoint is allowed in the system database only. Calling this action in any other database will make the server return an error. <br><br> Futhermore, the last remaining endpoint cannot be deleted as this would make the server kaputt. <br><br>",
"summary": " Delete and disconnects an existing endpoint",
"httpMethod": "DELETE",
"examples": "<br><br> Deleting an existing endpoint <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/endpoint/tcp%3A%2F%2F127.0.0.1%3A8532\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : true, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Deleting a non-existing endpoint <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/endpoint/tcp%3A%2F%2F127.0.0.1%3A8532\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 1231, \n \"errorMessage\" : \"endpoint not found\" \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Deleting an existing endpoint <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/endpoint/tcp%3A%2F%2F127.0.0.1%3A8532\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : true, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Deleting a non-existing endpoint <br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/endpoint/tcp%3A%2F%2F127.0.0.1%3A8532\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 1231, \n \"errorMessage\" : \"endpoint not found\" \n}\n</code></pre><br><br><br>",
"nickname": "DeleteAndDisconnectsAnExistingEndpoint"
}
],

File diff suppressed because one or more lines are too long

View File

@ -39,7 +39,7 @@
"notes": "Creates a new graph. <br><br> Returns an object with an attribute <em>graph</em> containing a list of all graph properties. <br><br>",
"summary": "create graph",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/\n{ \n \"_key\" : \"graph\", \n \"vertices\" : \"vertices\", \n \"edges\" : \"edges\" \n}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: 918691334\n\n{ \n \"graph\" : { \n \"_id\" : \"_graphs/graph\", \n \"_rev\" : \"918691334\", \n \"_key\" : \"graph\", \n \"edgeDefinitions\" : [ \n { \n \"collection\" : \"edges\", \n \"from\" : [ \n \"vertices\" \n ], \n \"to\" : [ \n \"vertices\" \n ] \n } \n ] \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/\n{ \n \"_key\" : \"graph\", \n \"vertices\" : \"vertices\", \n \"edges\" : \"edges\" \n}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: 1058340008\n\n{ \n \"graph\" : { \n \"_id\" : \"_graphs/graph\", \n \"_key\" : \"graph\", \n \"_rev\" : \"1058340008\", \n \"edgeDefinitions\" : [ \n { \n \"collection\" : \"edges\", \n \"from\" : [ \n \"vertices\" \n ], \n \"to\" : [ \n \"vertices\" \n ] \n } \n ] \n }, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"nickname": "createGraph"
}
],
@ -50,7 +50,7 @@
{
"errorResponses": [
{
"reason": "is returned if the graph was found (in case <em>graph-name</em> was specified) or the list of graphs was assembled successfully (in case <em>graph-name</em> was not specified). <br><br>",
"reason": "is returned if the graph was found (in case <em>graph-name</em> was specified) or the list of graphs was assembled successfully (in case <em>graph-name</em> was not specified). <br><br>",
"code": "200"
},
{
@ -58,11 +58,11 @@
"code": "404"
},
{
"reason": "\"If-None-Match\" header is given and the current graph has not a different version. This response code may only be returned if <em>graph-name</em> is specified in the request. <br><br>",
"reason": "\"If-None-Match\" header is given and the current graph has not a different version. This response code may only be returned if <em>graph-name</em> is specified in the request. <br><br>",
"code": "304"
},
{
"reason": "\"If-Match\" header or <em>rev</em> is given and the current graph has a different version. This response code may only be returned if <em>graph-name</em> is specified in the request. <br><br> <em>Examples</em> <br><br> get graph by name <br><br>",
"reason": "\"If-Match\" header or <em>rev</em> is given and the current graph has a different version. This response code may only be returned if <em>graph-name</em> is specified in the request. <br><br> <em>Examples</em> <br><br> get graph by name <br><br>",
"code": "412"
}
],
@ -78,19 +78,19 @@
"dataType": "String",
"paramType": "header",
"name": "If-None-Match",
"description": "If <em>graph-name</em> is specified, then this header can be used to check whether a specific graph has changed or not. <br><br> If the \"If-None-Match\" header is given, then it must contain exactly one etag. The document is returned if it has a different revision than the given etag. Otherwise a <em>HTTP 304</em> is returned. <br><br>"
"description": "If <em>graph-name</em> is specified, then this header can be used to check whether a specific graph has changed or not. <br><br> If the \"If-None-Match\" header is given, then it must contain exactly one etag. The document is returned if it has a different revision than the given etag. Otherwise a <em>HTTP 304</em> is returned. <br><br>"
},
{
"dataType": "String",
"paramType": "header",
"name": "If-Match",
"description": "If <em>graph-name</em> is specified, then this header can be used to check whether a specific graph has changed or not. <br><br> If the \"If-Match\" header is given, then it must contain exactly one etag. The document is returned, if it has the same revision ad the given etag. Otherwise a <em>HTTP 412</em> is returned. As an alternative you can supply the etag in an attribute <em>rev</em> in the URL. <br><br>"
"description": "If <em>graph-name</em> is specified, then this header can be used to check whether a specific graph has changed or not. <br><br> If the \"If-Match\" header is given, then it must contain exactly one etag. The document is returned, if it has the same revision ad the given etag. Otherwise a <em>HTTP 412</em> is returned. As an alternative you can supply the etag in an attribute <em>rev</em> in the URL. <br><br>"
}
],
"notes": "<br><br> If <em>graph-name</em> is specified, returns an object with an attribute <em>graph</em> containing a JSON hash with all properties of the specified graph. <br><br> If <em>graph-name</em> is not specified, returns a list of graph objects. <br><br>",
"notes": "<br><br> If <em>graph-name</em> is specified, returns an object with an attribute <em>graph</em> containing a JSON hash with all properties of the specified graph. <br><br> If <em>graph-name</em> is not specified, returns a list of graph objects. <br><br>",
"summary": "get the properties of a specific or all graphs",
"httpMethod": "GET",
"examples": "<br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/graph/graph\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 920067590\n\n{ \n \"graph\" : { \n \"_id\" : \"_graphs/graph\", \n \"_rev\" : \"920067590\", \n \"_key\" : \"graph\", \n \"edgeDefinitions\" : [ \n { \n \"collection\" : \"edges\", \n \"from\" : [ \n \"vertices\" \n ], \n \"to\" : [ \n \"vertices\" \n ] \n } \n ] \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> get all graphs <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/graph\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"graphs\" : [ \n { \n \"_id\" : \"_graphs/graph2\", \n \"_rev\" : \"922885638\", \n \"_key\" : \"graph2\", \n \"edgeDefinitions\" : [ \n { \n \"collection\" : \"edges2\", \n \"from\" : [ \n \"vertices2\" \n ], \n \"to\" : [ \n \"vertices2\" \n ] \n } \n ] \n }, \n { \n \"_id\" : \"_graphs/graph1\", \n \"_rev\" : \"921837062\", \n \"_key\" : \"graph1\", \n \"edgeDefinitions\" : [ \n { \n \"collection\" : \"edges1\", \n \"from\" : [ \n \"vertices1\" \n ], \n \"to\" : [ \n \"vertices1\" \n ] \n } \n ] \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/graph/graph\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 1059650728\n\n{ \n \"graph\" : { \n \"_id\" : \"_graphs/graph\", \n \"_key\" : \"graph\", \n \"_rev\" : \"1059650728\", \n \"edgeDefinitions\" : [ \n { \n \"collection\" : \"edges\", \n \"from\" : [ \n \"vertices\" \n ], \n \"to\" : [ \n \"vertices\" \n ] \n } \n ] \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> get all graphs <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/graph\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"graphs\" : [ \n { \n \"_id\" : \"_graphs/graph2\", \n \"_key\" : \"graph2\", \n \"_rev\" : \"1062337704\", \n \"edgeDefinitions\" : [ \n { \n \"collection\" : \"edges2\", \n \"from\" : [ \n \"vertices2\" \n ], \n \"to\" : [ \n \"vertices2\" \n ] \n } \n ] \n }, \n { \n \"_id\" : \"_graphs/graph1\", \n \"_key\" : \"graph1\", \n \"_rev\" : \"1061354664\", \n \"edgeDefinitions\" : [ \n { \n \"collection\" : \"edges1\", \n \"from\" : [ \n \"vertices1\" \n ], \n \"to\" : [ \n \"vertices1\" \n ] \n } \n ] \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>",
"nickname": "getThePropertiesOfASpecificOrAllGraphs"
}
],
@ -113,7 +113,7 @@
"code": "404"
},
{
"reason": "\"If-Match\" header or <em>rev</em> is given and the current graph has a different version <br><br> <em>Examples</em> <br><br> delete graph by name <br><br>",
"reason": "\"If-Match\" header or <em>rev</em> is given and the current graph has a different version <br><br> <em>Examples</em> <br><br> delete graph by name <br><br>",
"code": "412"
}
],
@ -180,7 +180,7 @@
"notes": "Creates a vertex in a graph. <br><br> Returns an object with an attribute <em>vertex</em> containing a list of all vertex properties. <br><br>",
"summary": "create vertex",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertex\n{ \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 927407622\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"927407622\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertex\n{ \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 1066728616\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1066728616\", \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"nickname": "createVertex"
}
],
@ -195,7 +195,7 @@
"code": "200"
},
{
"reason": "\"If-Match\" header is given and the current graph has not a different version <br><br>",
"reason": "\"If-Match\" header is given and the current graph has not a different version <br><br>",
"code": "304"
},
{
@ -203,7 +203,7 @@
"code": "404"
},
{
"reason": "\"If-None-Match\" header or <em>rev</em> is given and the current graph has a different version <br><br> <em>Examples</em> <br><br> get vertex properties by name <br><br>",
"reason": "\"If-None-Match\" header or <em>rev</em> is given and the current graph has a different version <br><br> <em>Examples</em> <br><br> get vertex properties by name <br><br>",
"code": "412"
}
],
@ -245,7 +245,7 @@
"notes": "Returns an object with an attribute <em>vertex</em> containing a list of all vertex properties. <br><br>",
"summary": "get vertex",
"httpMethod": "GET",
"examples": "<br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 929308166\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"929308166\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 1068563624\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1068563624\", \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>",
"nickname": "getVertex"
}
],
@ -268,7 +268,7 @@
"code": "404"
},
{
"reason": "\"If-Match\" header or <em>rev</em> is given and the current vertex has a different version <br><br> <em>Examples</em> <br><br>",
"reason": "\"If-Match\" header or <em>rev</em> is given and the current vertex has a different version <br><br> <em>Examples</em> <br><br>",
"code": "412"
}
],
@ -334,7 +334,7 @@
"code": "404"
},
{
"reason": "\"If-Match\" header or <em>rev</em> is given and the current vertex has a different version <br><br> <em>Examples</em> <br><br>",
"reason": "\"If-Match\" header or <em>rev</em> is given and the current vertex has a different version <br><br> <em>Examples</em> <br><br>",
"code": "412"
}
],
@ -384,7 +384,7 @@
"notes": "Replaces the vertex properties. <br><br> Returns an object with an attribute <em>vertex</em> containing a list of all vertex properties. <br><br>",
"summary": "update vertex",
"httpMethod": "PUT",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{ \n \"optional1\" : \"val2\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 934223366\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"934223366\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val2\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{ \n \"optional1\" : \"val2\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 1073347752\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1073347752\", \n \"optional1\" : \"val2\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"nickname": "updateVertex"
}
],
@ -407,7 +407,7 @@
"code": "404"
},
{
"reason": "\"If-Match\" header or <em>rev</em> is given and the current vertex has a different version <br><br> <em>Examples</em> <br><br>",
"reason": "\"If-Match\" header or <em>rev</em> is given and the current vertex has a different version <br><br> <em>Examples</em> <br><br>",
"code": "412"
}
],
@ -461,10 +461,10 @@
"description": "If the \"If-Match\" header is given, then it must contain exactly one etag. The document is updated, if it has the same revision ad the given etag. Otherwise a <em>HTTP 412</em> is returned. As an alternative you can supply the etag in an attribute <em>rev</em> in the URL. <br><br>"
}
],
"notes": "Partially updates the vertex properties. <br><br> Setting an attribute value to <em>null</em> in the patch document will cause a value of <em>null</em> be saved for the attribute by default. If the intention is to delete existing attributes with the patch command, the URL parameter <em>keepNull</em> can be used with a value of <em>false</em>. This will modify the behavior of the patch command to remove any attributes from the existing document that are contained in the patch document with an attribute value of <em>null</em>. <br><br> Returns an object with an attribute <em>vertex</em> containing a list of all vertex properties. <br><br>",
"notes": "Partially updates the vertex properties. <br><br> Setting an attribute value to <em>null</em> in the patch document will cause a value of <em>null</em> be saved for the attribute by default. If the intention is to delete existing attributes with the patch command, the URL parameter <em>keepNull</em> can be used with a value of <em>false</em>. This will modify the behavior of the patch command to remove any attributes from the existing document that are contained in the patch document with an attribute value of <em>null</em>. <br><br> Returns an object with an attribute <em>vertex</em> containing a list of all vertex properties. <br><br>",
"summary": "update vertex",
"httpMethod": "PATCH",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{ \n \"optional1\" : \"vertexPatch\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 936648198\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"936648198\", \n \"_key\" : \"v1\", \n \"optional1\" : \"vertexPatch\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\nshell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{ \n \"optional1\" : null \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 937172486\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"937172486\", \n \"_key\" : \"v1\", \n \"optional1\" : null \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{ \n \"optional1\" : \"vertexPatch\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 1075707048\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1075707048\", \n \"optional1\" : \"vertexPatch\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\nshell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{ \n \"optional1\" : null \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 1076231336\n\n{ \n \"vertex\" : { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1076231336\", \n \"optional1\" : null \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"nickname": "updateVertex"
}
],
@ -498,7 +498,7 @@
"notes": "Returns a cursor. <br><br> The call expects a JSON hash array as body to filter the result: <br><br> <ul class=\"swagger-list\"><li><em>batchSize</em>: the batch size of the returned cursor <li><em>limit</em>: limit the result size <li><em>count</em>: return the total number of results (default \"false\") <li><em>filter</em>: a optional filter </ul> The attributes of filter <ul class=\"swagger-list\"><li><em>properties</em>: filter by an array of vertex properties </ul> The attributes of a property filter <ul class=\"swagger-list\"><li><em>key</em>: filter the result vertices by a key value pair <li><em>value</em>: the value of the <em>key</em> <li><em>compare</em>: a compare operator",
"summary": "get vertices",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertices\n{ \n \"batchSize\" : 100 \n}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"vertices/v3\", \n \"_rev\" : \"939859462\", \n \"_key\" : \"v3\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v2\", \n \"_rev\" : \"939466246\", \n \"_key\" : \"v2\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v5\", \n \"_rev\" : \"940645894\", \n \"_key\" : \"v5\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v4\", \n \"_rev\" : \"940252678\", \n \"_key\" : \"v4\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"939073030\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertices\n{ \n \"batchSize\" : 100 \n}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"vertices/v3\", \n \"_key\" : \"v3\", \n \"_rev\" : \"1078852776\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v2\", \n \"_key\" : \"v2\", \n \"_rev\" : \"1078459560\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v5\", \n \"_key\" : \"v5\", \n \"_rev\" : \"1079639208\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v4\", \n \"_key\" : \"v4\", \n \"_rev\" : \"1079245992\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1078066344\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"nickname": "getVertices"
}
],
@ -539,7 +539,7 @@
"notes": "Returns a cursor. <br><br> The call expects a JSON hash array as body to filter the result: <br><br> <ul class=\"swagger-list\"><li><em>batchSize</em>: the batch size of the returned cursor <li><em>limit</em>: limit the result size <li><em>count</em>: return the total number of results (default \"false\") <li><em>filter</em>: a optional filter </ul> The attributes of filter <ul class=\"swagger-list\"><li><em>direction</em>: Filter for inbound (value \"in\") or outbound (value \"out\") neighbors. Default value is \"any\". <li><em>labels</em>: filter by an array of edge labels (empty array means no restriction) <li><em>properties</em>: filter neighbors by an array of edge properties </ul> The attributes of a property filter <ul class=\"swagger-list\"><li><em>key</em>: filter the result vertices by a key value pair <li><em>value</em>: the value of the <em>key</em> <li><em>compare</em>: a compare operator",
"summary": "get vertices",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertices/v2\n{\"batchSize\" : 100, \"filter\" : {\"direction\" : \"any\", \"properties\":[] }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"942743046\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v4\", \n \"_rev\" : \"943922694\", \n \"_key\" : \"v4\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Select vertices by direction and property filter <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertices/v2\n{\"batchSize\" : 100, \"filter\" : {\"direction\" : \"out\", \"properties\":[ { \"key\": \"optional1\", \"value\": \"val2\", \"compare\" : \"==\" }, ] }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"vertices/v4\", \n \"_rev\" : \"949886470\", \n \"_key\" : \"v4\", \n \"optional1\" : \"val2\" \n }, \n { \n \"_id\" : \"vertices/v1\", \n \"_rev\" : \"948706822\", \n \"_key\" : \"v1\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertices/v2\n{\"batchSize\" : 100, \"filter\" : {\"direction\" : \"any\", \"properties\":[] }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1099037864\", \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"vertices/v4\", \n \"_key\" : \"v4\", \n \"_rev\" : \"1100217512\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Select vertices by direction and property filter <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/vertices/v2\n{\"batchSize\" : 100, \"filter\" : {\"direction\" : \"out\", \"properties\":[ { \"key\": \"optional1\", \"value\": \"val2\", \"compare\" : \"==\" }, ] }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"vertices/v4\", \n \"_key\" : \"v4\", \n \"_rev\" : \"1106115752\", \n \"optional1\" : \"val2\" \n }, \n { \n \"_id\" : \"vertices/v1\", \n \"_key\" : \"v1\", \n \"_rev\" : \"1104936104\", \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"nickname": "getVertices"
}
],
@ -584,7 +584,7 @@
"notes": "Creates an edge in a graph. <br><br> The call expects a JSON hash array as body with the edge properties: <br><br> <ul class=\"swagger-list\"><li><em>_key</em>: The name of the edge (optional, if edge collection allows user defined keys). <li><em>_from</em>: The name of the from vertex. <li><em>_to</em>: The name of the to vertex. <li><em>$label</em>: A label for the edge (optional). <li>further optional attributes. </ul> Returns an object with an attribute <em>edge</em> containing the list of all edge properties. <br><br>",
"summary": "create edge",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edge\n{ \n \"_key\" : \"edge1\", \n \"_from\" : \"vert2\", \n \"_to\" : \"vert1\", \n \"optional1\" : \"val1\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 955719174\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"955719174\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/vert2\", \n \"_to\" : \"vertices/vert1\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edge\n{ \n \"_key\" : \"edge1\", \n \"_from\" : \"vert2\", \n \"_to\" : \"vert1\", \n \"optional1\" : \"val1\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 1111882920\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_key\" : \"edge1\", \n \"_rev\" : \"1111882920\", \n \"_from\" : \"vertices/vert2\", \n \"_to\" : \"vertices/vert1\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"nickname": "createEdge"
}
],
@ -599,7 +599,7 @@
"code": "200"
},
{
"reason": "\"If-Match\" header is given and the current edge has not a different version <br><br>",
"reason": "\"If-Match\" header is given and the current edge has not a different version <br><br>",
"code": "304"
},
{
@ -607,7 +607,7 @@
"code": "404"
},
{
"reason": "\"If-None-Match\" header or <em>rev</em> is given and the current edge has a different version <br><br> <em>Examples</em> <br><br>",
"reason": "\"If-None-Match\" header or <em>rev</em> is given and the current edge has a different version <br><br> <em>Examples</em> <br><br>",
"code": "412"
}
],
@ -649,7 +649,7 @@
"notes": "Returns an object with an attribute <em>edge</em> containing a list of all edge properties. <br><br>",
"summary": "get edge",
"httpMethod": "GET",
"examples": "<br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 958668294\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"958668294\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 1114766504\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_key\" : \"edge1\", \n \"_rev\" : \"1114766504\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>",
"nickname": "getEdge"
}
],
@ -672,7 +672,7 @@
"code": "404"
},
{
"reason": "\"If-Match\" header or <em>rev</em> is given and the current edge has a different version <br><br> <em>Examples</em> <br><br>",
"reason": "\"If-Match\" header or <em>rev</em> is given and the current edge has a different version <br><br> <em>Examples</em> <br><br>",
"code": "412"
}
],
@ -738,7 +738,7 @@
"code": "404"
},
{
"reason": "\"If-Match\" header or <em>rev</em> is given and the current edge has a different version <br><br> <em>Examples</em> <br><br>",
"reason": "\"If-Match\" header or <em>rev</em> is given and the current edge has a different version <br><br> <em>Examples</em> <br><br>",
"code": "412"
}
],
@ -788,7 +788,7 @@
"notes": "Replaces the optional edge properties. <br><br> The call expects a JSON hash array as body with the new edge properties. <br><br> Returns an object with an attribute <em>edge</em> containing a list of all edge properties. <br><br>",
"summary": "update edge",
"httpMethod": "PUT",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n{ \n \"optional1\" : \"val2\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 965811718\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"965811718\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val2\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n{ \n \"optional1\" : \"val2\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 1121778856\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_key\" : \"edge1\", \n \"_rev\" : \"1121778856\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val2\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"nickname": "updateEdge"
}
],
@ -811,7 +811,7 @@
"code": "404"
},
{
"reason": "\"If-Match\" header or <em>rev</em> is given and the current edge has a different version <br><br> <em>Examples</em> <br><br>",
"reason": "\"If-Match\" header or <em>rev</em> is given and the current edge has a different version <br><br> <em>Examples</em> <br><br>",
"code": "412"
}
],
@ -865,10 +865,10 @@
"description": "If the \"If-Match\" header is given, then it must contain exactly one etag. The document is returned, if it has the same revision ad the given etag. Otherwise a <em>HTTP 412</em> is returned. As an alternative you can supply the etag in an attribute <em>rev</em> in the URL. <br><br>"
}
],
"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>",
"notes": "Partially updates the edge properties. <br><br> Setting an attribute value to <em>null</em> in the patch document will cause a value of <em>null</em> be saved for the attribute by default. If the intention is to delete existing attributes with the patch command, the URL parameter <em>keepNull</em> can be used with a value of <em>false</em>. This will modify the behavior of the patch command to remove any attributes from the existing document that are contained in the patch document with an attribute value of <em>null</em>. <br><br> Returns an object with an attribute <em>edge</em> containing a list of all edge properties. <br><br>",
"summary": "update edge",
"httpMethod": "PATCH",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n{ \n \"optional3\" : \"val3\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 969416198\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"969416198\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val1\", \n \"optional3\" : \"val3\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n{ \n \"optional3\" : \"val3\" \n}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 1125317800\n\n{ \n \"edge\" : { \n \"_id\" : \"edges/edge1\", \n \"_key\" : \"edge1\", \n \"_rev\" : \"1125317800\", \n \"_from\" : \"vertices/vert1\", \n \"_to\" : \"vertices/vert2\", \n \"$label\" : null, \n \"optional1\" : \"val1\", \n \"optional3\" : \"val3\" \n }, \n \"error\" : false, \n \"code\" : 202 \n}\n</code></pre><br>",
"nickname": "updateEdge"
}
],
@ -902,7 +902,7 @@
"notes": "Returns a cursor. <br><br> The call expects a JSON hash array as body to filter the result: <br><br> <ul class=\"swagger-list\"><li><em>batchSize</em>: the batch size of the returned cursor <li><em>limit</em>: limit the result size <li><em>count</em>: return the total number of results (default \"false\") <li><em>filter</em>: a optional filter </ul> The attributes of filter <ul class=\"swagger-list\"><li><em>labels</em>: filter by an array of edge labels <li><em>properties</em>: filter by an array of edge properties </ul> The attributes of a property filter <ul class=\"swagger-list\"><li><em>key</em>: filter the result edges by a key value pair <li><em>value</em>: the value of the <em>key</em> <li><em>compare</em>: a compare operator",
"summary": "get edges",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edges\n{ \n \"batchSize\" : 100 \n}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"edges/edge2\", \n \"_rev\" : \"974134790\", \n \"_key\" : \"edge2\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v3\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge3\", \n \"_rev\" : \"974659078\", \n \"_key\" : \"edge3\", \n \"_from\" : \"vertices/v2\", \n \"_to\" : \"vertices/v4\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"973610502\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge4\", \n \"_rev\" : \"975183366\", \n \"_key\" : \"edge4\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v5\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edges\n{ \n \"batchSize\" : 100 \n}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"edges/edge2\", \n \"_key\" : \"edge2\", \n \"_rev\" : \"1129970856\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v3\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge3\", \n \"_key\" : \"edge3\", \n \"_rev\" : \"1130495144\", \n \"_from\" : \"vertices/v2\", \n \"_to\" : \"vertices/v4\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge1\", \n \"_key\" : \"edge1\", \n \"_rev\" : \"1129446568\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge4\", \n \"_key\" : \"edge4\", \n \"_rev\" : \"1131019432\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v5\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"nickname": "getEdges"
}
],
@ -943,7 +943,7 @@
"notes": "<br><br> Returns a cursor. <br><br> The call expects a JSON hash array as body to filter the result: <br><br> <ul class=\"swagger-list\"><li><em>batchSize</em>: the batch size of the returned cursor <li><em>limit</em>: limit the result size <li><em>count</em>: return the total number of results (default \"false\") <li><em>filter</em>: a optional filter </ul> The attributes of filter <ul class=\"swagger-list\"><li><em>direction</em>: Filter for inbound (value \"in\") or outbound (value \"out\") neighbors. Default value is \"any\". <li><em>labels</em>: filter by an array of edge labels <li><em>properties</em>: filter neighbors by an array of properties </ul> The attributes of a property filter <ul class=\"swagger-list\"><li><em>key</em>: filter the result vertices by a key value pair <li><em>value</em>: the value of the <em>key</em> <li><em>compare</em>: a compare operator",
"summary": "get edges",
"httpMethod": "POST",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edges/v2\n{\"batchSize\" : 100, \"filter\" : { \"direction\" : \"any\" }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"edges/edge1\", \n \"_rev\" : \"979574278\", \n \"_key\" : \"edge1\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge3\", \n \"_rev\" : \"980622854\", \n \"_key\" : \"edge3\", \n \"_from\" : \"vertices/v2\", \n \"_to\" : \"vertices/v4\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n } \n ], \n \"hasMore\" : false, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>",
"examples": "<br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/graph/graph/edges/v2\n{\"batchSize\" : 100, \"filter\" : { \"direction\" : \"any\" }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"edges/edge1\", \n \"_key\" : \"edge1\", \n \"_rev\" : \"1135344808\", \n \"_from\" : \"vertices/v1\", \n \"_to\" : \"vertices/v2\", \n \"$label\" : null, \n \"optional1\" : \"val1\" \n }, \n { \n \"_id\" : \"edges/edge3\", \n \"_key\" : \"edge3\", \n \"_rev\" : \"1136393384\", \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</code></pre><br>",
"nickname": "getEdges"
}
],

View File

@ -19,7 +19,7 @@
"notes": "<br><br> Returns an object with an attribute <em>indexes</em> containing a list of all index descriptions for the given collection. The same information is also available in the <em>identifiers</em> as hash map with the index handle as keys. <br><br>",
"summary": " Read all indexes of a collection",
"httpMethod": "GET",
"examples": "<br><br> Return information about all indexes: <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"indexes\" : [ \n { \n \"id\" : \"products/0\", \n \"type\" : \"primary\", \n \"unique\" : true, \n \"fields\" : [ \n \"_key\" \n ] \n } \n ], \n \"identifiers\" : { \n \"products/0\" : { \n \"id\" : \"products/0\", \n \"type\" : \"primary\", \n \"unique\" : true, \n \"fields\" : [ \n \"_key\" \n ] \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Return information about all indexes: <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"indexes\" : [ \n { \n \"id\" : \"products/0\", \n \"type\" : \"primary\", \n \"unique\" : true, \n \"fields\" : [ \n \"_key\" \n ] \n } \n ], \n \"identifiers\" : { \n \"products/0\" : { \n \"id\" : \"products/0\", \n \"type\" : \"primary\", \n \"unique\" : true, \n \"fields\" : [ \n \"_key\" \n ] \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "ReadAllIndexesOfACollection"
}
],
@ -50,7 +50,7 @@
"notes": "<br><br> The result is an objects describing the index. It has at least the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>id</em>: The identifier of the index. </ul> All other attributes are type-dependent. <br><br>",
"summary": "Read index",
"httpMethod": "GET",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/index/products/0\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/0\", \n \"type\" : \"primary\", \n \"unique\" : true, \n \"fields\" : [ \n \"_key\" \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/index/products/0\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/0\", \n \"type\" : \"primary\", \n \"unique\" : true, \n \"fields\" : [ \n \"_key\" \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "ReadIndex"
}
],
@ -93,10 +93,10 @@
"description": "<br><br>"
}
],
"notes": "<br><br> Creates a cap constraint for the collection <em>collection-name</em>, if it does not already exist. Expects an object containing the index details. <br><br> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"cap\"</em>. <li><em>size</em>: The maximal number of documents for the collection. If specified, the value must be greater than zero. <li><em>byteSize</em>: The maximal size of the active document data in the collection (in bytes). If specified, the value must be at least 16384. </ul> <em>*Note*</em>: The cap constraint does not index particular attributes of the documents in a collection, but limits the number of documents in the collection to a maximum value. The cap constraint thus does not support attribute names specified in the <em>fields</em> attribute nor uniqueness of any kind via the <em>unique</em> attribute. <br><br> It is allowed to specify either <em>size</em> or <em>byteSize</em>, or both at the same time. If both are specified, then the automatic document removal will be triggered by the first non-met constraint. <br><br>",
"notes": "<br><br> Creates a cap constraint for the collection <em>collection-name</em>, if it does not already exist. Expects an object containing the index details. <br><br> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"cap\"</em>. <li><em>size</em>: The maximal number of documents for the collection. If specified, the value must be greater than zero. <li><em>byteSize</em>: The maximal size of the active document data in the collection (in bytes). If specified, the value must be at least 16384. </ul> <em>Note</em>: The cap constraint does not index particular attributes of the documents in a collection, but limits the number of documents in the collection to a maximum value. The cap constraint thus does not support attribute names specified in the <em>fields</em> attribute nor uniqueness of any kind via the <em>unique</em> attribute. <br><br> It is allowed to specify either <em>size</em> or <em>byteSize</em>, or both at the same time. If both are specified, then the automatic document removal will be triggered by the first non-met constraint. <br><br>",
"summary": " Create cap constraint",
"httpMethod": "POST",
"examples": "<br><br> Creating a cap constraint <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{\"type\":\"cap\",\"size\":10}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/982720006\", \n \"type\" : \"cap\", \n \"unique\" : false, \n \"size\" : 10, \n \"byteSize\" : 0, \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Creating a cap constraint <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{\"type\":\"cap\",\"size\":10}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1138490536\", \n \"type\" : \"cap\", \n \"unique\" : false, \n \"size\" : 10, \n \"byteSize\" : 0, \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"nickname": "CreateCapConstraint"
}
],
@ -111,7 +111,7 @@
"code": "200"
},
{
"reason": "If the index does not already exist and could be created, then a <em>HTTP 201</em> is returned. <br><br>",
"reason": "If the index does not already exist and could be created, then a <em>HTTP 201</em> is returned. <br><br>",
"code": "201"
},
{
@ -135,10 +135,10 @@
"description": "<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> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"geo\"</em>. <li><em>fields</em>: A list with one or two attribute paths. If it is a list with one attribute path <em>location</em>, then a geo-spatial index on all documents is created using <em>location</em> as path to the coordinates. The value of the attribute must be a list with at least two double values. The list must contain the latitude (first value) and the longitude (second value). All documents, which do not have the attribute path or with value that are not suitable, are ignored. If it is a list with two attribute paths <em>latitude</em> and <em>longitude</em>, then a geo-spatial index on all documents is created using <em>latitude</em> and <em>longitude</em> as paths the latitude and the longitude. The value of the attribute <em>latitude</em> and of the attribute <em>longitude</em> must a double. All documents, which do not have the attribute paths or which values are not suitable, are ignored. <li><em>geoJson</em>: If a geo-spatial index on a <em>location</em> is constructed and <em>geoJson</em> is <em>true</em>, then the order within the list is longitude followed by latitude. This corresponds to the format described in http://geojson.org/geojson-spec.html#positions <li><em>constraint</em>: If <em>constraint</em> is <em>true</em>, then a geo-spatial constraint is created. The constraint is a non-unique variant of the index. <em>*Note*</em>: It is also possible to set the <em>unique</em> attribute instead of the <em>constraint</em> attribute. <li><em>ignoreNull</em>: If a geo-spatial constraint is created and <em>ignoreNull</em> is true, then documents with a null in <em>location</em> or at least one null in <em>latitude</em> or <em>longitude</em> are ignored. </ul> <em>*Note*</em>: Unique indexes on non-shard keys are not supported in a cluster. <br><br>",
"notes": "<br><br> Creates a geo-spatial index in the collection <em>collection-name</em>, if it does not already exist. Expects an object containing the index details. <br><br> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"geo\"</em>. <li><em>fields</em>: A list with one or two attribute paths. If it is a list with one attribute path <em>location</em>, then a geo-spatial index on all documents is created using <em>location</em> as path to the coordinates. The value of the attribute must be a list with at least two double values. The list must contain the latitude (first value) and the longitude (second value). All documents, which do not have the attribute path or with value that are not suitable, are ignored. If it is a list with two attribute paths <em>latitude</em> and <em>longitude</em>, then a geo-spatial index on all documents is created using <em>latitude</em> and <em>longitude</em> as paths the latitude and the longitude. The value of the attribute <em>latitude</em> and of the attribute <em>longitude</em> must a double. All documents, which do not have the attribute paths or which values are not suitable, are ignored. <li><em>geoJson</em>: If a geo-spatial index on a <em>location</em> is constructed and <em>geoJson</em> is <em>true</em>, then the order within the list is longitude followed by latitude. This corresponds to the format described in http://geojson.org/geojson-spec.html#positions <li><em>constraint</em>: If <em>constraint</em> is <em>true</em>, then a geo-spatial constraint is created. The constraint is a non-unique variant of the index. <em>Note</em>: It is also possible to set the <em>unique</em> attribute instead of the <em>constraint</em> attribute. <li><em>ignoreNull</em>: If a geo-spatial constraint is created and <em>ignoreNull</em> is true, then documents with a null in <em>location</em> or at least one null in <em>latitude</em> or <em>longitude</em> are ignored. </ul> <em>Note</em>: Unique indexes on non-shard keys are not supported in a cluster. <br><br>",
"summary": " Create geo-spatial index",
"httpMethod": "POST",
"examples": "<br><br> Creating a geo index with a location attribute: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"geo\", \"fields\" : [ \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/983244294\", \n \"type\" : \"geo1\", \n \"unique\" : false, \n \"geoJson\" : false, \n \"constraint\" : false, \n \"ignoreNull\" : false, \n \"fields\" : [ \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Creating a geo index with latitude and longitude attributes: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"geo\", \"fields\" : [ \"e\", \"f\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/983768582\", \n \"type\" : \"geo2\", \n \"unique\" : false, \n \"constraint\" : false, \n \"ignoreNull\" : false, \n \"fields\" : [ \n \"e\", \n \"f\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Creating a geo index with a location attribute: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"geo\", \"fields\" : [ \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1139014824\", \n \"type\" : \"geo1\", \n \"unique\" : false, \n \"geoJson\" : false, \n \"constraint\" : false, \n \"ignoreNull\" : false, \n \"fields\" : [ \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Creating a geo index with latitude and longitude attributes: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"geo\", \"fields\" : [ \"e\", \"f\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1139539112\", \n \"type\" : \"geo2\", \n \"unique\" : false, \n \"constraint\" : false, \n \"ignoreNull\" : false, \n \"fields\" : [ \n \"e\", \n \"f\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"nickname": "CreateGeo-spatialIndex"
}
],
@ -153,7 +153,7 @@
"code": "200"
},
{
"reason": "If the index does not already exist and could be created, then a <em>HTTP 201</em> is returned. <br><br>",
"reason": "If the index does not already exist and could be created, then a <em>HTTP 201</em> is returned. <br><br>",
"code": "201"
},
{
@ -181,10 +181,10 @@
"description": "<br><br>"
}
],
"notes": "<br><br> Creates a hash index for the collection <em>collection-name</em>, if it does not already exist. The call expects an object containing the index details. <br><br> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"hash\"</em>. <li><em>fields</em>: A list of attribute paths. <li><em>unique</em>: If <em>true</em>, then create a unique index. </ul> <em>*Note*</em>: unique indexes on non-shard keys are not supported in a cluster. <br><br>",
"notes": "<br><br> Creates a hash index for the collection <em>collection-name</em>, if it does not already exist. The call expects an object containing the index details. <br><br> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"hash\"</em>. <li><em>fields</em>: A list of attribute paths. <li><em>unique</em>: If <em>true</em>, then create a unique index. </ul> <em>Note</em>: unique indexes on non-shard keys are not supported in a cluster. <br><br>",
"summary": " Create hash index",
"httpMethod": "POST",
"examples": "<br><br> Creating an unique constraint: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"hash\", \"unique\" : true, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/984292870\", \n \"type\" : \"hash\", \n \"unique\" : true, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Creating a hash index: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"hash\", \"unique\" : false, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/984817158\", \n \"type\" : \"hash\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Creating an unique constraint: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"hash\", \"unique\" : true, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1140063400\", \n \"type\" : \"hash\", \n \"unique\" : true, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Creating a hash index: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"hash\", \"unique\" : false, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1140587688\", \n \"type\" : \"hash\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"nickname": "CreateHashIndex"
}
],
@ -227,10 +227,10 @@
"description": "<br><br>"
}
],
"notes": "<br><br> Creates a skip-list index for the collection <em>collection-name</em>, if it does not already exist. The call expects an object containing the index details. <br><br> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"skiplist\"</em>. <li><em>fields</em>: A list of attribute paths. <li><em>unique</em>: If <em>true</em>, then create a unique index. </ul> <em>*Note*</em>: unique indexes on non-shard keys are not supported in a cluster. <br><br>",
"notes": "<br><br> Creates a skip-list index for the collection <em>collection-name</em>, if it does not already exist. The call expects an object containing the index details. <br><br> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"skiplist\"</em>. <li><em>fields</em>: A list of attribute paths. <li><em>unique</em>: If <em>true</em>, then create a unique index. </ul> <em>Note</em>: unique indexes on non-shard keys are not supported in a cluster. <br><br>",
"summary": " Create skip list",
"httpMethod": "POST",
"examples": "<br><br> Creating a skiplist: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"skiplist\", \"unique\" : false, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/985341446\", \n \"type\" : \"skiplist\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Creating a skiplist: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\": \"skiplist\", \"unique\" : false, \"fields\" : [ \"a\", \"b\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1141111976\", \n \"type\" : \"skiplist\", \n \"unique\" : false, \n \"fields\" : [ \n \"a\", \n \"b\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"nickname": "CreateSkipList"
}
],
@ -269,57 +269,15 @@
"description": "<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> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"fulltext\"</em>. <li><em>fields</em>: A list of attribute names. Currently, the list is limited to exactly one attribute, so the value of <em>fields</em> should look like this for example: <em>[ \"text\" ]</em>. <li><em>minLength</em>: Minimum character length of words to index. Will default to a server-defined value if unspecified. It is thus recommended to set this value explicitly when creating the index.",
"notes": "<br><br> Creates a fulltext index for the collection <em>collection-name</em>, if it does not already exist. The call expects an object containing the index details. <br><br> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"fulltext\"</em>. <li><em>fields</em>: A list of attribute names. Currently, the list is limited to exactly one attribute, so the value of <em>fields</em> should look like this for example: <em>[ \"text\" ]</em>. <li><em>minLength</em>: Minimum character length of words to index. Will default to a server-defined value if unspecified. It is thus recommended to set this value explicitly when creating the index.",
"summary": " Create fulltext index",
"httpMethod": "POST",
"examples": "<br><br> Creating a fulltext index: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\" : \"fulltext\", \"fields\" : [ \"text\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/985800198\", \n \"type\" : \"fulltext\", \n \"unique\" : false, \n \"minLength\" : 2, \n \"fields\" : [ \n \"text\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Creating a fulltext index: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\" : \"fulltext\", \"fields\" : [ \"text\" ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1141570728\", \n \"type\" : \"fulltext\", \n \"unique\" : false, \n \"minLength\" : 2, \n \"fields\" : [ \n \"text\" \n ], \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"nickname": "CreateFulltextIndex"
}
],
"path": "/_api/index"
},
{
"operations": [
{
"errorResponses": [
{
"reason": "If the index already exists, then a <em>HTTP 200</em> is returned. <br><br>",
"code": "200"
},
{
"reason": "If the index does not already exist and could be created, then a <em>HTTP 201</em> is returned. <br><br>",
"code": "201"
},
{
"reason": "If the <em>collection-name</em> is unknown, then a <em>HTTP 404</em> is returned. <br><br>",
"code": "404"
}
],
"parameters": [
{
"dataType": "String",
"paramType": "query",
"required": "true",
"name": "collection-name",
"description": "The collection name. <br><br>"
},
{
"dataType": "Json",
"paramType": "body",
"required": "true",
"name": "index-details",
"description": "<br><br>"
}
],
"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> <ul class=\"swagger-list\"><li><em>type</em>: must be equal to <em>\"bitarray\"</em>. <li><em>fields</em>: A list of pairs. A pair consists of an attribute path followed by a list of values. <li><em>unique</em>: Must always be set to <em>false</em>.",
"summary": " Create bitarray index",
"httpMethod": "POST",
"examples": "<br><br> Creating a bitarray index: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/index?collection=products\n{ \"type\" : \"bitarray\", \"unique\" : false, \"fields\" : [ \"x\", [0,1,[]], \"y\", [\"a\",\"b\",[]] ] }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/986324486\", \n \"type\" : \"bitarray\", \n \"unique\" : false, \n \"fields\" : [ \n [ \n \"x\", \n [ \n 0, \n 1, \n [ ] \n ] \n ], \n [ \n \"y\", \n [ \n \"a\", \n \"b\", \n [ ] \n ] \n ] \n ], \n \"undefined\" : false, \n \"isNewlyCreated\" : true, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"nickname": "CreateBitarrayIndex"
}
],
"path": "/_api/index"
},
{
"operations": [
{
@ -337,7 +295,7 @@
"code": "400"
},
{
"reason": "If <em>collection</em> is unknown, then an <em>HTTP 404</em> is returned. @endDocuBlock",
"reason": "If <em>collection</em> is unknown, then an <em>HTTP 404</em> is returned. <br><br>",
"code": "404"
}
],
@ -357,7 +315,7 @@
"description": "<br><br>"
}
],
"notes": "<br><br> Creates a new index in the collection <em>collection</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> 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> Indexing system attributes such as <em>_id</em>, <em>_key</em>, <em>_from</em>, and <em>_to</em> is not supported by any index type. Manually creating an index that relies on any of these attributes is unsupported. <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> <em>*Note*</em>: The following index types do not support uniqueness, and using the <em>unique</em> attribute with these types may lead to an error: <ul class=\"swagger-list\"><li>cap constraints <li>fulltext indexes <li>bitarray indexes </ul> <em>*Note*</em>: Unique indexes on non-shard keys are not supported in a cluster. <br><br>",
"notes": "<br><br> Creates a new index in the collection <em>collection</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> 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> Indexing system attributes such as <em>_id</em>, <em>_key</em>, <em>_from</em>, and <em>_to</em> is not supported by any index type. Manually creating an index that relies on any of these attributes is unsupported. <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> <em>Note</em>: The following index types do not support uniqueness, and using the <em>unique</em> attribute with these types may lead to an error: <ul class=\"swagger-list\"><li>cap constraints <li>fulltext indexes </ul> <em>Note</em>: Unique indexes on non-shard keys are not supported in a cluster. <br><br>",
"summary": " Create index",
"httpMethod": "POST",
"examples": "",
@ -391,7 +349,7 @@
"notes": "<br><br> Deletes an index with <em>index-handle</em>. <br><br>",
"summary": " Delete index",
"httpMethod": "DELETE",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/index/products/986848774\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/986848774\", \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/index/products/1142095016\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"id\" : \"products/1142095016\", \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "DeleteIndex"
}
],

View File

@ -16,7 +16,7 @@
"code": "403"
},
{
"reason": "is returned if the server cannot generate the result due to an out-of-memory error. @endDocuBlock",
"reason": "is returned if the server cannot generate the result due to an out-of-memory error. <br><br>",
"code": "500"
}
],

View File

@ -28,7 +28,7 @@
"notes": "",
"summary": " Parse query",
"httpMethod": "POST",
"examples": "<br><br> Valid query: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/query\n{ \"query\" : \"FOR p IN products FILTER p.name == @name LIMIT 2 RETURN p.n\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"bindVars\" : [ \n \"name\" \n ], \n \"collections\" : [ \n \"products\" \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Invalid query: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/query\n{ \"query\" : \"FOR p IN products FILTER p.name = @name LIMIT 2 RETURN p.n\" }\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 1501, \n \"errorMessage\" : \"syntax error, unexpected assignment near '= @name LIMIT 2 RETURN p.n' at position 1:33\" \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Valid query: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/query\n{ \"query\" : \"FOR p IN products FILTER p.name == @name LIMIT 2 RETURN p.n\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"bindVars\" : [ \n \"name\" \n ], \n \"collections\" : [ \n \"products\" \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Invalid query: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/query\n{ \"query\" : \"FOR p IN products FILTER p.name = @name LIMIT 2 RETURN p.n\" }\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 1501, \n \"errorMessage\" : \"syntax error, unexpected assignment near '= @name LIMIT 2 RETURN p.n' at position 1:33\\nFOR p IN products FILTER p.name = @name LIMIT 2 RETURN p.n\\n ^^^\\n\" \n}\n</code></pre><br><br><br>",
"nickname": "ParseQuery"
}
],

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
"code": "400"
},
{
"reason": "is returned if the collection specified by <em>collection</em> is unknown. The response body contains an error document in this case. The same error code is also returned if an invalid index id or type is used. @endDocuBlock",
"reason": "is returned if the collection specified by <em>collection</em> is unknown. The response body contains an error document in this case. The same error code is also returned if an invalid index id or type is used. <br><br>",
"code": "404"
}
],
@ -51,7 +51,7 @@
"code": "400"
},
{
"reason": "is returned if the collection specified by <em>collection</em> is unknown. The response body contains an error document in this case. The same error code is also returned if an invalid index id or type is used. @endDocuBlock",
"reason": "is returned if the collection specified by <em>collection</em> is unknown. The response body contains an error document in this case. The same error code is also returned if an invalid index id or type is used. <br><br>",
"code": "404"
}
],
@ -64,7 +64,7 @@
"description": "Contains the query specification. <br><br>"
}
],
"notes": "<br><br> This will find all documents matching a given example, using the specified skiplist index. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>index</em>: The id of the index to be used for the query. The index must exist and must be of type <em>skiplist</em>. <li><em>example</em>: an example document. The example must contain a value for each attribute in the index. <li><em>skip</em>: The number of documents to skip in the query. (optional) <li><em>limit</em>: The maximal number of documents to return. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"notes": "<br><br> This will find all documents matching a given example, using the specified skiplist index. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>index</em>: The id of the index to be used for the query. The index must exist and must be of type <em>skiplist</em>. <li><em>example</em>: an example document. The example must contain a value for each attribute in the index. <li><em>skip</em>: The number of documents to skip in the query. (optional) <li><em>limit</em>: The maximal number of documents to return. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": " Skiplist index",
"httpMethod": "PUT",
"examples": "",
@ -86,7 +86,7 @@
"code": "400"
},
{
"reason": "is returned if the collection specified by <em>collection</em> is unknown. The response body contains an error document in this case. The same error code is also returned if an invalid index id or type is used. @endDocuBlock",
"reason": "is returned if the collection specified by <em>collection</em> is unknown. The response body contains an error document in this case. The same error code is also returned if an invalid index id or type is used. <br><br>",
"code": "404"
}
],
@ -99,42 +99,7 @@
"description": "Contains the query specification. <br><br>"
}
],
"notes": "<br><br> This will find all documents matching a given example, using the specified skiplist index. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>index</em>: The id of the index to be used for the query. The index must exist and must be of type <em>bitarray</em>. <li><em>example</em>: an example document. The example must contain a value for each attribute in the index. <li><em>skip</em>: The number of documents to skip in the query. (optional) <li><em>limit</em>: The maximal number of documents to return. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": " Bitarray index",
"httpMethod": "PUT",
"examples": "",
"nickname": "BitarrayIndex"
}
],
"path": "/_api/simple/by-example-bitarray"
},
{
"operations": [
{
"errorResponses": [
{
"reason": "is returned if the query was executed successfully. <br><br>",
"code": "201"
},
{
"reason": "is returned if the body does not contain a valid JSON representation of a query. The response body contains an error document in this case. <br><br>",
"code": "400"
},
{
"reason": "is returned if the collection specified by <em>collection</em> is unknown. The response body contains an error document in this case. The same error code is also returned if an invalid index id or type is used. @endDocuBlock",
"code": "404"
}
],
"parameters": [
{
"dataType": "String",
"paramType": "body",
"required": "true",
"name": "query",
"description": "Contains the query specification. <br><br>"
}
],
"notes": "<br><br> This will find all documents matching a given condition, using the specified skiplist index. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>index</em>: The id of the index to be used for the query. The index must exist and must be of type <em>skiplist</em>. <li><em>condition</em>: the condition which all returned documents shall satisfy. Conditions must be specified for all indexed attributes. <li><em>skip</em>: The number of documents to skip in the query. (optional) <li><em>limit</em>: The maximal number of documents to return. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"notes": "<br><br> This will find all documents matching a given condition, using the specified skiplist index. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>index</em>: The id of the index to be used for the query. The index must exist and must be of type <em>skiplist</em>. <li><em>condition</em>: the condition which all returned documents shall satisfy. Conditions must be specified for all indexed attributes. <li><em>skip</em>: The number of documents to skip in the query. (optional) <li><em>limit</em>: The maximal number of documents to return. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": "Query by-condition using Skiplist index",
"httpMethod": "PUT",
"examples": "",
@ -143,41 +108,6 @@
],
"path": "/_api/simple/by-condition-skiplist"
},
{
"operations": [
{
"errorResponses": [
{
"reason": "is returned if the query was executed successfully. <br><br>",
"code": "201"
},
{
"reason": "is returned if the body does not contain a valid JSON representation of a query. The response body contains an error document in this case. <br><br>",
"code": "400"
},
{
"reason": "is returned if the collection specified by <em>collection</em> is unknown. The response body contains an error document in this case. The same error code is also returned if an invalid index id or type is used. <br><br> @endDocuBlock",
"code": "404"
}
],
"parameters": [
{
"dataType": "String",
"paramType": "body",
"required": "true",
"name": "query",
"description": "Contains the query specification. <br><br>"
}
],
"notes": "<br><br> This will find all documents matching a given condition, using the specified skiplist index. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>index</em>: The id of the index to be used for the query. The index must exist and must be of type <em>bitarray</em>. <li><em>condition</em>: the condition which all returned documents shall satisfy. Conditions must be specified for all indexed attributes. <li><em>skip</em>: The number of documents to skip in the query. (optional) <li><em>limit</em>: The maximal number of documents to return. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": " Query by-condition using bitarray index",
"httpMethod": "PUT",
"examples": "",
"nickname": "QueryBy-conditionUsingBitarrayIndex"
}
],
"path": "/_api/simple/by-condition-bitarray"
},
{
"operations": [
{
@ -207,7 +137,7 @@
"notes": "<br><br> Returns all documents of a collections. The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>skip</em>: The number of documents to skip in the query (optional). <li><em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is applied before the <em>limit</em> restriction. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": " Return all",
"httpMethod": "PUT",
"examples": "<br><br> Limit the amount of documents using <em>limit</em> <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/all\n{ \"collection\": \"products\", \"skip\": 2, \"limit\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/987504134\", \n \"_rev\" : \"987504134\", \n \"_key\" : \"987504134\", \n \"Hello1\" : \"World1\" \n }, \n { \n \"_id\" : \"products/988814854\", \n \"_rev\" : \"988814854\", \n \"_key\" : \"988814854\", \n \"Hello5\" : \"World5\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Using a <em>batchSize</em> value <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/all\n{ \"collection\": \"products\", \"batchSize\" : 3 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/990453254\", \n \"_rev\" : \"990453254\", \n \"_key\" : \"990453254\", \n \"Hello4\" : \"World4\" \n }, \n { \n \"_id\" : \"products/990125574\", \n \"_rev\" : \"990125574\", \n \"_key\" : \"990125574\", \n \"Hello3\" : \"World3\" \n }, \n { \n \"_id\" : \"products/989470214\", \n \"_rev\" : \"989470214\", \n \"_key\" : \"989470214\", \n \"Hello1\" : \"World1\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"990977542\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Limit the amount of documents using <em>limit</em> <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/all\n{ \"collection\": \"products\", \"skip\": 2, \"limit\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1144061096\", \n \"_key\" : \"1144061096\", \n \"_rev\" : \"1144061096\", \n \"Hello5\" : \"World5\" \n }, \n { \n \"_id\" : \"products/1143733416\", \n \"_key\" : \"1143733416\", \n \"_rev\" : \"1143733416\", \n \"Hello4\" : \"World4\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Using a <em>batchSize</em> value <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/all\n{ \"collection\": \"products\", \"batchSize\" : 3 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1146027176\", \n \"_key\" : \"1146027176\", \n \"_rev\" : \"1146027176\", \n \"Hello5\" : \"World5\" \n }, \n { \n \"_id\" : \"products/1145044136\", \n \"_key\" : \"1145044136\", \n \"_rev\" : \"1145044136\", \n \"Hello2\" : \"World2\" \n }, \n { \n \"_id\" : \"products/1145371816\", \n \"_key\" : \"1145371816\", \n \"_rev\" : \"1145371816\", \n \"Hello3\" : \"World3\" \n } \n ], \n \"hasMore\" : true, \n \"id\" : \"1146223784\", \n \"count\" : 5, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"nickname": "ReturnAll"
}
],
@ -242,7 +172,7 @@
"notes": "<br><br> Returns a random document from a collection. The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The identifier or name of the collection to query. </ul> Returns a JSON object with the document stored in the attribute <em>document</em> if the collection contains at least one document. If the collection is empty, the <em>document</em> attrbute contains null. <br><br>",
"summary": " Random document",
"httpMethod": "PUT",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/any\n{ \"collection\": \"products\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"document\" : { \n \"_id\" : \"products/992747014\", \n \"_rev\" : \"992747014\", \n \"_key\" : \"992747014\", \n \"Hello5\" : \"World5\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/any\n{ \"collection\": \"products\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"document\" : { \n \"_id\" : \"products/1147665576\", \n \"_key\" : \"1147665576\", \n \"_rev\" : \"1147665576\", \n \"Hello4\" : \"World4\" \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "RandomDocument"
}
],
@ -274,10 +204,10 @@
"description": "Contains the query. <br><br>"
}
],
"notes": "<br><br> The default will find at most 100 documents near the given coordinate. The returned list is sorted according to the distance, with the nearest document being first in the list. If there are near documents of equal distance, documents are chosen randomly from this set until the limit is reached. <br><br> In order to use the <em>near</em> operator, a geo index must be defined for the collection. This index also defines which attribute holds the coordinates for the document. If you have more then one geo-spatial index, you can use the <em>geo</em> field to select a particular index. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>latitude</em>: The latitude of the coordinate. <li><em>longitude</em>: The longitude of the coordinate. <li><em>distance</em>: If given, the attribute key used to return the distance to the given coordinate. (optional). If specified, distances are returned in meters. <li><em>skip</em>: The number of documents to skip in the query. (optional) <li><em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is applied before the <em>limit</em> restriction. The default is 100. (optional) <li><em>geo</em>: If given, the identifier of the geo-index to use. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"notes": "<br><br> The default will find at most 100 documents near the given coordinate. The returned list is sorted according to the distance, with the nearest document being first in the list. If there are near documents of equal distance, documents are chosen randomly from this set until the limit is reached. <br><br> In order to use the <em>near</em> operator, a geo index must be defined for the collection. This index also defines which attribute holds the coordinates for the document. If you have more then one geo-spatial index, you can use the <em>geo</em> field to select a particular index. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>latitude</em>: The latitude of the coordinate. <li><em>longitude</em>: The longitude of the coordinate. <li><em>distance</em>: If given, the attribute key used to return the distance to the given coordinate. (optional). If specified, distances are returned in meters. <li><em>skip</em>: The number of documents to skip in the query. (optional) <li><em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is applied before the <em>limit</em> restriction. The default is 100. (optional) <li><em>geo</em>: If given, the identifier of the geo-index to use. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": " Near query",
"httpMethod": "PUT",
"examples": "<br><br> Without distance: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/994844166\", \n \"_rev\" : \"994844166\", \n \"_key\" : \"994844166\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/994450950\", \n \"_rev\" : \"994450950\", \n \"_key\" : \"994450950\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ] \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> With distance: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 3, \"distance\" : \"distance\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/997465606\", \n \"_rev\" : \"997465606\", \n \"_key\" : \"997465606\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/997858822\", \n \"_rev\" : \"997858822\", \n \"_key\" : \"997858822\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/997268998\", \n \"_rev\" : \"997268998\", \n \"_key\" : \"997268998\", \n \"name\" : \"Name/-0.004/\", \n \"loc\" : [ \n -0.004, \n 0 \n ], \n \"distance\" : 444.779706578235 \n } \n ], \n \"hasMore\" : false, \n \"count\" : 3, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Without distance: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 2 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1150090408\", \n \"_key\" : \"1150090408\", \n \"_rev\" : \"1150090408\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/1149697192\", \n \"_key\" : \"1149697192\", \n \"_rev\" : \"1149697192\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ] \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> With distance: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 3, \"distance\" : \"distance\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1152711848\", \n \"_key\" : \"1152711848\", \n \"_rev\" : \"1152711848\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/1153105064\", \n \"_key\" : \"1153105064\", \n \"_rev\" : \"1153105064\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/1152515240\", \n \"_key\" : \"1152515240\", \n \"_rev\" : \"1152515240\", \n \"name\" : \"Name/-0.004/\", \n \"loc\" : [ \n -0.004, \n 0 \n ], \n \"distance\" : 444.779706578235 \n } \n ], \n \"hasMore\" : false, \n \"count\" : 3, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"nickname": "NearQuery"
}
],
@ -312,7 +242,7 @@
"notes": "<br><br> This will find all documents within a given radius around the coordinate (<em>latitude</em>, <em>longitude</em>). The returned list is sorted by distance. <br><br> In order to use the <em>within</em> operator, a geo index must be defined for the collection. This index also defines which attribute holds the coordinates for the document. If you have more then one geo-spatial index, you can use the <em>geo</em> field to select a particular index. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>latitude</em>: The latitude of the coordinate. <li><em>longitude</em>: The longitude of the coordinate. <li><em>radius</em>: The maximal radius (in meters). <li><em>distance</em>: If given, the attribute key used to return the distance to the given coordinate. (optional). If specified, distances are returned in meters. <li><em>skip</em>: The number of documents to skip in the query. (optional) <li><em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is applied before the <em>limit</em> restriction. The default is 100. (optional) <li><em>geo</em>: If given, the identifier of the geo-index to use. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": " Within query",
"httpMethod": "PUT",
"examples": "<br><br> Without distance: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 2, \"radius\" : 500 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1000873478\", \n \"_rev\" : \"1000873478\", \n \"_key\" : \"1000873478\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/1000480262\", \n \"_rev\" : \"1000480262\", \n \"_key\" : \"1000480262\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ] \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> With distance: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 3, \"distance\" : \"distance\", \"radius\" : 300 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1003494918\", \n \"_rev\" : \"1003494918\", \n \"_key\" : \"1003494918\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/1004346886\", \n \"_rev\" : \"1004346886\", \n \"_key\" : \"1004346886\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/1003298310\", \n \"_rev\" : \"1003298310\", \n \"_key\" : \"1003298310\", \n \"name\" : \"Name/-0.004/\", \n \"loc\" : [ \n -0.004, \n 0 \n ], \n \"distance\" : 444.779706578235 \n } \n ], \n \"hasMore\" : false, \n \"count\" : 3, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Without distance: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 2, \"radius\" : 500 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1156119720\", \n \"_key\" : \"1156119720\", \n \"_rev\" : \"1156119720\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ] \n }, \n { \n \"_id\" : \"products/1155726504\", \n \"_key\" : \"1155726504\", \n \"_rev\" : \"1155726504\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ] \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> With distance: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/near\n{ \"collection\": \"products\", \"latitude\" : 0, \"longitude\" : 0, \"skip\" : 1, \"limit\" : 3, \"distance\" : \"distance\", \"radius\" : 300 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1158741160\", \n \"_key\" : \"1158741160\", \n \"_rev\" : \"1158741160\", \n \"name\" : \"Name/-0.002/\", \n \"loc\" : [ \n -0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/1159134376\", \n \"_key\" : \"1159134376\", \n \"_rev\" : \"1159134376\", \n \"name\" : \"Name/0.002/\", \n \"loc\" : [ \n 0.002, \n 0 \n ], \n \"distance\" : 222.38985328911744 \n }, \n { \n \"_id\" : \"products/1158544552\", \n \"_key\" : \"1158544552\", \n \"_rev\" : \"1158544552\", \n \"name\" : \"Name/-0.004/\", \n \"loc\" : [ \n -0.004, \n 0 \n ], \n \"distance\" : 444.779706578235 \n } \n ], \n \"hasMore\" : false, \n \"count\" : 3, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"nickname": "WithinQuery"
}
],
@ -344,10 +274,10 @@
"description": "Contains the query. <br><br>"
}
],
"notes": "<br><br> This will find all documents from the collection that match the fulltext query specified in <em>query</em>. <br><br> In order to use the <em>fulltext</em> operator, a fulltext index must be defined for the collection and the specified attribute. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>attribute</em>: The attribute that contains the texts. <li><em>query</em>: The fulltext query. <li><em>skip</em>: The number of documents to skip in the query (optional). <li><em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is applied before the <em>limit</em> restriction. (optional) <li><em>index</em>: The identifier of the fulltext-index to use. </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"notes": "<br><br> This will find all documents from the collection that match the fulltext query specified in <em>query</em>. <br><br> In order to use the <em>fulltext</em> operator, a fulltext index must be defined for the collection and the specified attribute. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>attribute</em>: The attribute that contains the texts. <li><em>query</em>: The fulltext query. <li><em>skip</em>: The number of documents to skip in the query (optional). <li><em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is applied before the <em>limit</em> restriction. (optional) <li><em>index</em>: The identifier of the fulltext-index to use. </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": " Fulltext index query",
"httpMethod": "PUT",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/fulltext\n{ \"collection\": \"products\", \"attribute\" : \"text\", \"query\" : \"word\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1009196550\", \n \"_rev\" : \"1009196550\", \n \"_key\" : \"1009196550\", \n \"text\" : \"this text also has a word\" \n }, \n { \n \"_id\" : \"products/1008999942\", \n \"_rev\" : \"1008999942\", \n \"_key\" : \"1008999942\", \n \"text\" : \"this text contains word\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/fulltext\n{ \"collection\": \"products\", \"attribute\" : \"text\", \"query\" : \"word\" }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1160838312\", \n \"_key\" : \"1160838312\", \n \"_rev\" : \"1160838312\", \n \"text\" : \"this text contains word\" \n }, \n { \n \"_id\" : \"products/1161034920\", \n \"_key\" : \"1161034920\", \n \"_rev\" : \"1161034920\", \n \"text\" : \"this text also has a word\" \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"nickname": "FulltextIndexQuery"
}
],
@ -382,7 +312,7 @@
"notes": "<br><br> This will find all documents matching a given example. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>example</em>: The example document. <li><em>skip</em>: The number of documents to skip in the query (optional). <li><em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is applied before the <em>limit</em> restriction. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": " Simple query by-example",
"httpMethod": "PUT",
"examples": "<br><br> Matching an attribute: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"i\" : 1 } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1010900486\", \n \"_rev\" : \"1010900486\", \n \"_key\" : \"1010900486\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/1011162630\", \n \"_rev\" : \"1011162630\", \n \"_key\" : \"1011162630\", \n \"i\" : 1 \n }, \n { \n \"_id\" : \"products/1011359238\", \n \"_rev\" : \"1011359238\", \n \"_key\" : \"1011359238\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 2, \n \"j\" : 2 \n } \n }, \n { \n \"_id\" : \"products/1010572806\", \n \"_rev\" : \"1010572806\", \n \"_key\" : \"1010572806\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n } \n ], \n \"hasMore\" : false, \n \"count\" : 4, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Matching an attribute which is a sub-document: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"a.j\" : 1 } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1012604422\", \n \"_rev\" : \"1012604422\", \n \"_key\" : \"1012604422\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/1012932102\", \n \"_rev\" : \"1012932102\", \n \"_key\" : \"1012932102\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Matching an attribute within a sub-document: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1014963718\", \n \"_rev\" : \"1014963718\", \n \"_key\" : \"1014963718\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n } \n ], \n \"hasMore\" : false, \n \"count\" : 1, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Matching an attribute: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"i\" : 1 } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1163001000\", \n \"_key\" : \"1163001000\", \n \"_rev\" : \"1163001000\", \n \"i\" : 1 \n }, \n { \n \"_id\" : \"products/1162411176\", \n \"_key\" : \"1162411176\", \n \"_rev\" : \"1162411176\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/1162738856\", \n \"_key\" : \"1162738856\", \n \"_rev\" : \"1162738856\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/1163197608\", \n \"_key\" : \"1163197608\", \n \"_rev\" : \"1163197608\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 2, \n \"j\" : 2 \n } \n } \n ], \n \"hasMore\" : false, \n \"count\" : 4, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Matching an attribute which is a sub-document: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"a.j\" : 1 } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1164377256\", \n \"_key\" : \"1164377256\", \n \"_rev\" : \"1164377256\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/1164704936\", \n \"_key\" : \"1164704936\", \n \"_rev\" : \"1164704936\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br> Matching an attribute within a sub-document: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } } }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1166671016\", \n \"_key\" : \"1166671016\", \n \"_rev\" : \"1166671016\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n } \n ], \n \"hasMore\" : false, \n \"count\" : 1, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"nickname": "SimpleQueryBy-example"
}
],
@ -414,10 +344,10 @@
"description": "Contains the query. <br><br>"
}
],
"notes": "<br><br> This will return the first document matching a given example. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>example</em>: The example document. </ul> Returns a result containing the document or <em>HTTP 404</em> if no document matched the example. <br><br> If more than one document in the collection matches the specified example, only one of these documents will be returned, and it is undefined which of the matching documents is returned. <br><br>",
"notes": "<br><br> This will return the first document matching a given example. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>example</em>: The example document. </ul> Returns a result containing the document or <em>HTTP 404</em> if no document matched the example. <br><br> If more than one document in the collection matches the specified example, only one of these documents will be returned, and it is undefined which of the matching documents is returned. <br><br>",
"summary": " Document matching an example",
"httpMethod": "PUT",
"examples": "<br><br> If a matching document was found: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/first-example\n{ \"collection\": \"products\", \"example\" : { \"i\" : 1 } }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"document\" : { \n \"_id\" : \"products/1017257478\", \n \"_rev\" : \"1017257478\", \n \"_key\" : \"1017257478\", \n \"i\" : 1 \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> If no document was found: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/first-example\n{ \"collection\": \"products\", \"example\" : { \"l\" : 1 } }\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 404, \n \"errorMessage\" : \"no match\" \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> If a matching document was found: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/first-example\n{ \"collection\": \"products\", \"example\" : { \"i\" : 1 } }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"document\" : { \n \"_id\" : \"products/1168899240\", \n \"_key\" : \"1168899240\", \n \"_rev\" : \"1168899240\", \n \"i\" : 1 \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> If no document was found: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/first-example\n{ \"collection\": \"products\", \"example\" : { \"l\" : 1 } }\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 404, \n \"errorMessage\" : \"no match\" \n}\n</code></pre><br><br><br>",
"nickname": "DocumentMatchingAnExample"
}
],
@ -449,10 +379,10 @@
"description": "Contains the query. <br><br>"
}
],
"notes": "<br><br> This will return the first document(s) from the collection, in the order of insertion/update time. When the <em>count</em> argument is supplied, the result will be a list of documents, with the \"oldest\" document being first in the result list. If the <em>count</em> argument is not supplied, the result is the \"oldest\" document of the collection, or <em>null</em> if the collection is empty. <br><br> The request body must be a JSON object with the following attributes: <ul class=\"swagger-list\"><li><em>collection</em>: the name of the collection <li><em>count</em>: the number of documents to return at most. Specifiying count is optional. If it is not specified, it defaults to 1. </ul> Note: this method is not supported for sharded collections with more than one shard. <br><br>",
"notes": "<br><br> This will return the first document(s) from the collection, in the order of insertion/update time. When the <em>count</em> argument is supplied, the result will be a list of documents, with the \"oldest\" document being first in the result list. If the <em>count</em> argument is not supplied, the result is the \"oldest\" document of the collection, or <em>null</em> if the collection is empty. <br><br> The request body must be a JSON object with the following attributes: <ul class=\"swagger-list\"><li><em>collection</em>: the name of the collection <li><em>count</em>: the number of documents to return at most. Specifiying count is optional. If it is not specified, it defaults to 1. </ul> Note: this method is not supported for sharded collections with more than one shard. <br><br>",
"summary": " First document of a collection",
"httpMethod": "PUT",
"examples": "<br><br> Retrieving the first n documents: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/first\n{ \"collection\": \"products\", \"count\" : 2 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1020599814\", \n \"_rev\" : \"1020599814\", \n \"_key\" : \"1020599814\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/1020927494\", \n \"_rev\" : \"1020927494\", \n \"_key\" : \"1020927494\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Retrieving the first document: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/first\n{ \"collection\": \"products\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : { \n \"_id\" : \"products/1022238214\", \n \"_rev\" : \"1022238214\", \n \"_key\" : \"1022238214\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Retrieving the first n documents: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/first\n{ \"collection\": \"products\", \"count\" : 2 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1172110504\", \n \"_key\" : \"1172110504\", \n \"_rev\" : \"1172110504\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n { \n \"_id\" : \"products/1172438184\", \n \"_key\" : \"1172438184\", \n \"_rev\" : \"1172438184\", \n \"i\" : 1, \n \"a\" : { \n \"j\" : 1 \n } \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Retrieving the first document: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/first\n{ \"collection\": \"products\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : { \n \"_id\" : \"products/1173748904\", \n \"_key\" : \"1173748904\", \n \"_rev\" : \"1173748904\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 1, \n \"j\" : 1 \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "FirstDocumentOfACollection"
}
],
@ -484,10 +414,10 @@
"description": "Contains the query. <br><br>"
}
],
"notes": "<br><br> This will return the last documents from the collection, in the order of insertion/update time. When the <em>count</em> argument is supplied, the result will be a list of documents, with the \"latest\" document being first in the result list. <br><br> The request body must be a JSON object with the following attributes: <ul class=\"swagger-list\"><li><em>collection</em>: the name of the collection <li><em>count</em>: the number of documents to return at most. Specifiying count is optional. If it is not specified, it defaults to 1. </ul> If the <em>count</em> argument is not supplied, the result is the \"latest\" document of the collection, or <em>null</em> if the collection is empty. <br><br> Note: this method is not supported for sharded collections with more than one shard. <br><br>",
"notes": "<br><br> This will return the last documents from the collection, in the order of insertion/update time. When the <em>count</em> argument is supplied, the result will be a list of documents, with the \"latest\" document being first in the result list. <br><br> The request body must be a JSON object with the following attributes: <ul class=\"swagger-list\"><li><em>collection</em>: the name of the collection <li><em>count</em>: the number of documents to return at most. Specifiying count is optional. If it is not specified, it defaults to 1. </ul> If the <em>count</em> argument is not supplied, the result is the \"latest\" document of the collection, or <em>null</em> if the collection is empty. <br><br> Note: this method is not supported for sharded collections with more than one shard. <br><br>",
"summary": " Last document of a collection",
"httpMethod": "PUT",
"examples": "<br><br> Retrieving the last n documents: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/last\n{ \"collection\": \"products\", \"count\" : 2 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1024663046\", \n \"_rev\" : \"1024663046\", \n \"_key\" : \"1024663046\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 2, \n \"j\" : 2 \n } \n }, \n { \n \"_id\" : \"products/1024466438\", \n \"_rev\" : \"1024466438\", \n \"_key\" : \"1024466438\", \n \"i\" : 1 \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Retrieving the first document: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/last\n{ \"collection\": \"products\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : { \n \"_id\" : \"products/1026301446\", \n \"_rev\" : \"1026301446\", \n \"_key\" : \"1026301446\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 2, \n \"j\" : 2 \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Retrieving the last n documents: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/last\n{ \"collection\": \"products\", \"count\" : 2 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1176173736\", \n \"_key\" : \"1176173736\", \n \"_rev\" : \"1176173736\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 2, \n \"j\" : 2 \n } \n }, \n { \n \"_id\" : \"products/1175977128\", \n \"_key\" : \"1175977128\", \n \"_rev\" : \"1175977128\", \n \"i\" : 1 \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Retrieving the first document: <br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/last\n{ \"collection\": \"products\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : { \n \"_id\" : \"products/1177812136\", \n \"_key\" : \"1177812136\", \n \"_rev\" : \"1177812136\", \n \"i\" : 1, \n \"a\" : { \n \"k\" : 2, \n \"j\" : 2 \n } \n }, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "LastDocumentOfACollection"
}
],
@ -522,7 +452,7 @@
"notes": "<br><br> This will find all documents within a given range. In order to execute a range query, a skip-list index on the queried attribute must be present. <br><br> The call expects a JSON object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to query. <li><em>attribute</em>: The attribute path to check. <li><em>left</em>: The lower bound. <li><em>right</em>: The upper bound. <li><em>closed</em>: If <em>true</em>, use interval including <em>left</em> and <em>right</em>, otherwise exclude <em>right</em>, but include <em>left</em>. <li><em>skip</em>: The number of documents to skip in the query (optional). <li><em>limit</em>: The maximal amount of documents to return. The <em>skip</em> is applied before the <em>limit</em> restriction. (optional) </ul> Returns a cursor containing the result, see [Http Cursor](../HttpAqlQueryCursor/README.md) for details. <br><br>",
"summary": " Simple range query",
"httpMethod": "PUT",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/range\n{ \"collection\": \"products\", \"attribute\" : \"i\", \"left\" : 2, \"right\" : 4 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1027284486\", \n \"_rev\" : \"1027284486\", \n \"_key\" : \"1027284486\", \n \"i\" : 2 \n }, \n { \n \"_id\" : \"products/1027481094\", \n \"_rev\" : \"1027481094\", \n \"_key\" : \"1027481094\", \n \"i\" : 3 \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/range\n{ \"collection\": \"products\", \"attribute\" : \"i\", \"left\" : 2, \"right\" : 4 }\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : [ \n { \n \"_id\" : \"products/1178795176\", \n \"_key\" : \"1178795176\", \n \"_rev\" : \"1178795176\", \n \"i\" : 2 \n }, \n { \n \"_id\" : \"products/1178991784\", \n \"_key\" : \"1178991784\", \n \"_rev\" : \"1178991784\", \n \"i\" : 3 \n } \n ], \n \"hasMore\" : false, \n \"count\" : 2, \n \"error\" : false, \n \"code\" : 201 \n}\n</code></pre><br><br><br>",
"nickname": "SimpleRangeQuery"
}
],
@ -554,10 +484,10 @@
"description": "Contains the query. <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 object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to remove from. <li><em>example</em>: An example document that all collection documents are compared against. <li>options: an json object which can contains following attributes: <li><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. <li><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. </ul> Note: the <em>limit</em> attribute is not supported on sharded collections. Using it will result in an error. The options attributes waitForSync and limit can given yet without an ecapsulation into a json object. but this may be deprecated in future versions of arango <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 object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to remove from. <li><em>example</em>: An example document that all collection documents are compared against. <li>options: an json object which can contains following attributes: <li><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. <li><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. </ul> Note: the <em>limit</em> attribute is not supported on sharded collections. Using it will result in an error. The options attributes waitForSync and limit can given yet without an ecapsulation into a json object. but this may be deprecated in future versions of arango <br><br> Returns the number of documents that were deleted. <br><br>",
"summary": " Remove documents by example",
"httpMethod": "PUT",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/remove-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } } }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"deleted\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>Using Parameter: waitForSync and limit<br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/remove-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } },\"waitForSync\": true, \"limit\": 2 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"deleted\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>Using Parameter: waitForSync and limit with new signature<br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/remove-by-example\n{\"collection\": \"products\",\"example\" : { \"a\" : { \"j\" : 1 } },\"options\": {\"waitForSync\": true, \"limit\": 2} }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"deleted\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/remove-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } } }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"deleted\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>Using Parameter: waitForSync and limit<br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/remove-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } },\"waitForSync\": true, \"limit\": 2 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"deleted\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>Using Parameter: waitForSync and limit with new signature<br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/remove-by-example\n{\"collection\": \"products\",\"example\" : { \"a\" : { \"j\" : 1 } },\"options\": {\"waitForSync\": true, \"limit\": 2} }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"deleted\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "RemoveDocumentsByExample"
}
],
@ -589,10 +519,10 @@
"description": "Contains the query. <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 object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to replace within. <li><em>example</em>: An example document that all collection documents are compared against. <li><em>newValue</em>: The replacement document that will get inserted in place of the \"old\" documents. <li><em>options</em>: an json object which can contain following attributes <li><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. <li><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. </ul> Note: the <em>limit</em> attribute is not supported on sharded collections. Using it will result in an error. The options attributes waitForSync and limit can given yet without an ecapsulation into a json object. but this may be deprecated in future versions of arango <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 object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to replace within. <li><em>example</em>: An example document that all collection documents are compared against. <li><em>newValue</em>: The replacement document that will get inserted in place of the \"old\" documents. <li><em>options</em>: an json object which can contain following attributes <li><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. <li><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. </ul> Note: the <em>limit</em> attribute is not supported on sharded collections. Using it will result in an error. The options attributes waitForSync and limit can given yet without an ecapsulation into a json object. but this may be deprecated in future versions of arango <br><br> Returns the number of documents that were replaced. <br><br>",
"summary": " Replace documents by example",
"httpMethod": "PUT",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/replace-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } }, \"newValue\" : {\"foo\" : \"bar\"}, \"limit\" : 3 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"replaced\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>Using new Signature for attributes WaitForSync and limit<br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/replace-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } }, \"newValue\" : {\"foo\" : \"bar\"}, \"options\": {\"limit\" : 3, \"waitForSync\": true }}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"replaced\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br><br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/replace-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } }, \"newValue\" : {\"foo\" : \"bar\"}, \"limit\" : 3 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"replaced\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>Using new Signature for attributes WaitForSync and limit<br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/replace-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } }, \"newValue\" : {\"foo\" : \"bar\"}, \"options\": {\"limit\" : 3, \"waitForSync\": true }}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"replaced\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "ReplaceDocumentsByExample"
}
],
@ -624,10 +554,10 @@
"description": "Contains the query. <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 object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to update within. <li><em>example</em>: An example document that all collection documents are compared against. <li><em>newValue</em>: A document containing all the attributes to update in the found documents. <li><em>options</em>: a json object wich can contains following attributes: <li><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. <li><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. <li><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. </ul> Note: the <em>limit</em> attribute is not supported on sharded collections. Using it will result in an error. <br><br> Returns the number of documents that were updated. <br><br> <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 object as body with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>collection</em>: The name of the collection to update within. <li><em>example</em>: An example document that all collection documents are compared against. <li><em>newValue</em>: A document containing all the attributes to update in the found documents. <li><em>options</em>: a json object wich can contains following attributes: <li><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. <li><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. <li><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. </ul> Note: the <em>limit</em> attribute is not supported on sharded collections. Using it will result in an error. <br><br> Returns the number of documents that were updated. <br><br> <br><br>",
"summary": " Update documents by example",
"httpMethod": "PUT",
"examples": "using old syntax for options<br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/update-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } }, \"newValue\" : { \"a\" : { \"j\" : 22 } }, \"limit\" : 3 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"updated\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>using new signature for options<br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/update-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } }, \"newValue\" : { \"a\" : { \"j\" : 22 } }, \"options\" : { \"limit\" : 3, \"waitForSync\": true } }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"updated\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>@endDocuBlock",
"examples": "using old syntax for options<br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/update-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } }, \"newValue\" : { \"a\" : { \"j\" : 22 } }, \"limit\" : 3 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"updated\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br>using new signature for options<br><br><pre><code class=\"json\">shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/simple/update-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } }, \"newValue\" : { \"a\" : { \"j\" : 22 } }, \"options\" : { \"limit\" : 3, \"waitForSync\": true } }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"updated\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "UpdateDocumentsByExample"
}
],

View File

@ -154,7 +154,7 @@
"paramType": "path",
"required": "true",
"name": "document-handle",
"description": "Deletes the document identified by <em>document-handle</em>. <br><br>"
"description": "Deletes the document identified by <em>document-handle</em>. <br><br>"
},
{
"dataType": "String",
@ -231,7 +231,7 @@
"paramType": "query",
"required": "false",
"name": "keepNull",
"description": "If the intention is to delete existing attributes with the patch command, the URL query 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>"
"description": "If the intention is to delete existing attributes with the patch command, the URL query 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>"
},
{
"dataType": "Boolean",
@ -275,7 +275,7 @@
"description": "You can conditionally delete a document based on a target revision id by using the <em>if-match</em> HTTP header. <br><br>"
}
],
"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>",
"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": "",

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
{
"errorResponses": [
{
"reason": "If the transaction is fully executed and committed on the server, <em>HTTP 200</em> will be returned. <br><br>",
"reason": "If the transaction is fully executed and committed on the server, <em>HTTP 200</em> will be returned. <br><br>",
"code": "200"
},
{
@ -20,7 +20,7 @@
"code": "404"
},
{
"reason": "Exceptions thrown by users will make the server respond with a return code of <em>HTTP 500</em> <br><br>",
"reason": "Exceptions thrown by users will make the server respond with a return code of <em>HTTP 500</em> <br><br>",
"code": "500"
}
],
@ -33,10 +33,10 @@
"description": "Contains the <em>collections</em> and <em>action</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> <ul class=\"swagger-list\"><li><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. <li><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. </ul> The following optional attributes may also be specified in the request: <br><br> <ul class=\"swagger-list\"><li><em>waitForSync</em>: an optional boolean flag that, if set, will force the transaction to write all data to disk before returning. <li><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. <li><em>params</em>: optional arguments passed to <em>action</em>. </ul> 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> <ul class=\"swagger-list\"><li><em>error</em>: boolean flag to indicate if an error occurred (<em>false</em> in this case) <li><em>code</em>: the HTTP status code <li><em>result</em>: the return value of the transaction </ul> 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> <ul class=\"swagger-list\"><li><em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case) <li><em>code</em>: the HTTP status code <li><em>errorNum</em>: the server error number <li><em>errorMessage</em>: a descriptive error message </ul> 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> <ul class=\"swagger-list\"><li><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. <li><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. </ul> The following optional attributes may also be specified in the request: <br><br> <ul class=\"swagger-list\"><li><em>waitForSync</em>: an optional boolean flag that, if set, will force the transaction to write all data to disk before returning. <li><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. <li><em>params</em>: optional arguments passed to <em>action</em>. </ul> 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> <ul class=\"swagger-list\"><li><em>error</em>: boolean flag to indicate if an error occurred (<em>false</em> in this case) <li><em>code</em>: the HTTP status code <li><em>result</em>: the return value of the transaction </ul> 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> <ul class=\"swagger-list\"><li><em>error</em>: boolean flag to indicate that an error occurred (<em>true</em> in this case) <li><em>code</em>: the HTTP status code <li><em>errorNum</em>: the server error number <li><em>errorMessage</em>: a descriptive error message </ul> 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": " Execute transaction",
"httpMethod": "POST",
"examples": "<br><br> Executing a transaction on a single collection: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n \"collections\" : { \n \"write\" : \"products\" \n }, \n \"action\" : \"function () { var db = require('internal').db; db.products.save({}); return db.products.count(); }\" \n}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Executing a transaction using multiple collections: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n \"collections\" : { \n \"write\" : [ \n \"products\", \n \"materials\" \n ] \n }, \n \"action\" : \"function () { var db = require('internal').db; db.products.save({}); db.materials.save({}); return 'worked!'; }\" \n}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : \"worked!\", \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Aborting a transaction due to an internal error: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n \"collections\" : { \n \"write\" : \"products\" \n }, \n \"action\" : \"function () { var db = require('internal').db; db.products.save({ _key: 'abc'}); db.products.save({ _key: 'abc'}); }\" \n}\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 1210, \n \"errorMessage\" : \"unique constraint violated\" \n}\n</code></pre><br><br><br> Aborting a transaction by explicitly throwing an exception: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n \"collections\" : { \n \"read\" : \"products\" \n }, \n \"action\" : \"function () { throw 'doh!'; }\" \n}\n\nHTTP/1.1 500 Internal Error\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 500, \n \"errorNum\" : 500, \n \"errorMessage\" : \"doh!\" \n}\n</code></pre><br><br><br> Referring to a non-existing collection: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n \"collections\" : { \n \"read\" : \"products\" \n }, \n \"action\" : \"function () { return true; }\" \n}\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 1203, \n \"errorMessage\" : \"collection not found\" \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Executing a transaction on a single collection: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n \"collections\" : { \n \"write\" : \"products\" \n }, \n \"action\" : \"function () { var db = require('internal').db; db.products.save({}); return db.products.count(); }\" \n}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : 1, \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Executing a transaction using multiple collections: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n \"collections\" : { \n \"write\" : [ \n \"products\", \n \"materials\" \n ] \n }, \n \"action\" : \"function () {var db = require('internal').db;db.products.save({});db.materials.save({});return 'worked!';}\" \n}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"result\" : \"worked!\", \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Aborting a transaction due to an internal error: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n \"collections\" : { \n \"write\" : \"products\" \n }, \n \"action\" : \"function () {var db = require('internal').db;db.products.save({ _key: 'abc'});db.products.save({ _key: 'abc'});}\" \n}\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 400, \n \"errorNum\" : 1210, \n \"errorMessage\" : \"Error: unique constraint violated\\n at eval (<anonymous>:2:99)\\n at eval (<anonymous>:2:122)\\n at post_api_transaction (js/actions/api-transaction.js:268:16)\\n at Function.actions.defineHttp.callback (js/actions/api-transaction.js:288:11)\\n\" \n}\n</code></pre><br><br><br> Aborting a transaction by explicitly throwing an exception: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n \"collections\" : { \n \"read\" : \"products\" \n }, \n \"action\" : \"function () { throw 'doh!'; }\" \n}\n\nHTTP/1.1 500 Internal Error\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 500, \n \"errorNum\" : 500, \n \"errorMessage\" : \"doh!\" \n}\n</code></pre><br><br><br> Referring to a non-existing collection: <br><br><br><br><pre><code class=\"json\">shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/transaction\n{ \n \"collections\" : { \n \"read\" : \"products\" \n }, \n \"action\" : \"function () { return true; }\" \n}\n\nHTTP/1.1 404 Not Found\ncontent-type: application/json; charset=utf-8\n\n{ \n \"error\" : true, \n \"code\" : 404, \n \"errorNum\" : 1203, \n \"errorMessage\" : \"Error: collection not found\\n at post_api_transaction (js/actions/api-transaction.js:268:16)\\n at Function.actions.defineHttp.callback (js/actions/api-transaction.js:288:11)\\n\" \n}\n</code></pre><br><br><br>",
"nickname": "ExecuteTransaction"
}
],

File diff suppressed because one or more lines are too long

View File

@ -12,12 +12,20 @@
"code": "200"
},
{
"reason": "The user with user does not exist <br><br> @endDocuBlock",
"reason": "The user with the specified name does not exist <br><br> <br><br>",
"code": "404"
}
],
"parameters": [],
"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> *user</em>: The name of the user as a string. <em> *active</em>: An optional flag that specifies whether the user is active. <em> *extra</em>: An optional JSON object with arbitrary extra data about the user. <em> *changePassword</em>: An optional flag that specifies whether the user must change the password or not. <br><br>",
"parameters": [
{
"dataType": "String",
"paramType": "path",
"required": "false",
"name": "user",
"description": "The name of the 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> <ul class=\"swagger-list\"><li><em>user</em>: The name of the user as a string. <li><em>active</em>: An optional flag that specifies whether the user is active. <li><em>extra</em>: An optional JSON object with arbitrary extra data about the user. <li><em>changePassword</em>: An optional flag that specifies whether the user must change the password or not.",
"summary": " Fetch User",
"httpMethod": "GET",
"examples": "",
@ -35,12 +43,12 @@
"code": "201"
},
{
"reason": "If the JSON representation is malformed or mandatory data is missing from the request. <br><br> @endDocuBlock",
"reason": "If the JSON representation is malformed or mandatory data is missing from the request. <br><br> <br><br>",
"code": "400"
}
],
"parameters": [],
"notes": "<br><br> The following data need to be passed in a JSON representation in the body of the POST request: <br><br> <em> *user</em>: The name of the user as a string. This is mandatory <em> *passwd</em>: The user password as a string. If no password is specified, the empty string will be used <em> *active</em>: An optional flag that specifies whether the user is active. If not specified, this will default to true <em> *extra</em>: An optional JSON object with arbitrary extra data about the user <em> *changePassword</em>: An optional flag that specifies whethers the user must change the password or not. If not specified, this will default to false <br><br> If set to true, the only operations allowed are PUT /_api/user or PATCH /_api/user. All other operations will result in a HTTP 403. If the user can be added by the server, the server will respond with HTTP 201. In case of success, the returned JSON object has the following properties: <br><br> <em> *error</em>: Boolean flag to indicate that an error occurred (false in this case) <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 HTTP 400. <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 (true in this case) <em> *code</em>: The HTTP status code <em> *errorNum</em>: The server error number <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> <ul class=\"swagger-list\"><li><em>user</em>: The name of the user as a string. This is mandatory <li><em>passwd</em>: The user password as a string. If no password is specified, the empty string will be used <li><em>active</em>: An optional flag that specifies whether the user is active. If not specified, this will default to true <li><em>extra</em>: An optional JSON object with arbitrary extra data about the user <li><em>changePassword</em>: An optional flag that specifies whethers the user must change the password or not. If not specified, this will default to false </ul> If set to true, the only operations allowed are PUT /_api/user or PATCH /_api/user. All other operations will result in a HTTP 403. If the user can be added by the server, the server will respond with HTTP 201. In case of success, the returned JSON object has the following properties: <br><br> <ul class=\"swagger-list\"><li><em>error</em>: Boolean flag to indicate that an error occurred (false in this case) <li><em>code</em>: The HTTP status code </ul> If the JSON representation is malformed or mandatory data is missing from the request, the server will respond with HTTP 400. <br><br> The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>error</em>: Boolean flag to indicate that an error occurred (true in this case) <li><em>code</em>: The HTTP status code <li><em>errorNum</em>: The server error number <li><em>errorMessage</em>: A descriptive error message",
"summary": " Create User",
"httpMethod": "POST",
"examples": "",
@ -62,12 +70,20 @@
"code": "400"
},
{
"reason": "The specified user does not exist <br><br> @endDocuBlock",
"reason": "The specified user does not exist <br><br> <br><br>",
"code": "404"
}
],
"parameters": [],
"notes": "<br><br> Replaces the data of an existing user. The name of an existing user must be specified in user. <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 <em> *active</em>: An optional flag that specifies whether the user is active. If not specified, this will default to true <em> *extra</em>: An optional JSON object with arbitrary extra data about the user <em> *changePassword</em>: An optional flag that specifies whether the user must change the password or not. If not specified, this will default to false <br><br> If the user can be replaced by the server, the server will respond with HTTP 200. <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 (false in this case) <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 HTTP 400. If the specified user does not exist, the server will respond with HTTP 404. <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 (true in this case) <em> *code</em>: The HTTP status code <em> *errorNum</em>: The server error number <em> *errorMessage</em>: A descriptive error message <br><br>",
"parameters": [
{
"dataType": "String",
"paramType": "path",
"required": "false",
"name": "user",
"description": "The name of the user <br><br>"
}
],
"notes": "<br><br> Replaces the data of an existing user. The name of an existing user must be specified in user. <br><br> The following data can to be passed in a JSON representation in the body of the POST request: <br><br> <ul class=\"swagger-list\"><li><em>passwd</em>: The user password as a string. Specifying a password is mandatory, but the empty string is allowed for passwords <li><em>active</em>: An optional flag that specifies whether the user is active. If not specified, this will default to true <li><em>extra</em>: An optional JSON object with arbitrary extra data about the user <li><em>changePassword</em>: An optional flag that specifies whether the user must change the password or not. If not specified, this will default to false </ul> If the user can be replaced by the server, the server will respond with HTTP 200. <br><br> In case of success, the returned JSON object has the following properties: <br><br> <ul class=\"swagger-list\"><li><em>error</em>: Boolean flag to indicate that an error occurred (false in this case) <li><em>code</em>: The HTTP status code </ul> If the JSON representation is malformed or mandatory data is missing from the request, the server will respond with HTTP 400. If the specified user does not exist, the server will respond with HTTP 404. <br><br> The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>error</em>: Boolean flag to indicate that an error occurred (true in this case) <li><em>code</em>: The HTTP status code <li><em>errorNum</em>: The server error number <li><em>errorMessage</em>: A descriptive error message",
"summary": " Replace User",
"httpMethod": "PUT",
"examples": "",
@ -89,12 +105,20 @@
"code": "400"
},
{
"reason": "The specified user does not exist <br><br> @endDocuBlock",
"reason": "The specified user does not exist <br><br> <br><br>",
"code": "404"
}
],
"parameters": [],
"notes": "<br><br> Partially updates the data of an existing user. The name of an existing user must be specified in user. <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. <em> *active</em>: An optional flag that specifies whether the user is active. If not specified, the previously existing value will not be modified. <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. <em> *changePassword</em>: An optional flag that specifies whether the user must change the password or not. If not specified, the previously existing value will not be modified. <br><br> If the user can be updated by the server, the server will respond with HTTP 200. <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 (false in this case) <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 HTTP 400. If the specified user does not exist, the server will respond with HTTP 404. <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 (true in this case) <em> *code</em>: The HTTP status code <em> *errorNum</em>: The server error number <em> *errorMessage</em>: A descriptive error message <br><br>",
"parameters": [
{
"dataType": "String",
"paramType": "path",
"required": "false",
"name": "user",
"description": "The name of the user <br><br>"
}
],
"notes": "<br><br> Partially updates the data of an existing user. The name of an existing user must be specified in user. <br><br> The following data can be passed in a JSON representation in the body of the POST request: <br><br> <ul class=\"swagger-list\"><li><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. <li><em>active</em>: An optional flag that specifies whether the user is active. If not specified, the previously existing value will not be modified. <li><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. <li><em>changePassword</em>: An optional flag that specifies whether the user must change the password or not. If not specified, the previously existing value will not be modified. </ul> If the user can be updated by the server, the server will respond with HTTP 200. <br><br> In case of success, the returned JSON object has the following properties: <br><br> <ul class=\"swagger-list\"><li><em>error</em>: Boolean flag to indicate that an error occurred (false in this case) <li><em>code</em>: The HTTP status code </ul> If the JSON representation is malformed or mandatory data is missing from the request, the server will respond with HTTP 400. If the specified user does not exist, the server will respond with HTTP 404. <br><br> The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>error</em>: Boolean flag to indicate that an error occurred (true in this case) <li><em>code</em>: The HTTP status code <li><em>errorNum</em>: The server error number <li><em>errorMessage</em>: A descriptive error message",
"summary": " Update User",
"httpMethod": "PATCH",
"examples": "",
@ -112,12 +136,20 @@
"code": "202"
},
{
"reason": "The specified user does not exist <br><br> @endDocuBlock",
"reason": "The specified user does not exist <br><br> <br><br>",
"code": "404"
}
],
"parameters": [],
"notes": "<br><br> Removes an existing user, identified by user. <br><br> If the user can be removed, the server will respond with HTTP 202. In case of success, the returned JSON object has the following properties: <br><br> <em> *error</em>: Boolean flag to indicate that an error occurred (false in this case) <em> *code</em>: The HTTP status code <br><br> If the specified user does not exist, the server will respond with HTTP 404. <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 (true in this case) <em> *code</em>: The HTTP status code <em> *errorNum</em>: The server error number <em> *errorMessage</em>: A descriptive error message <br><br>",
"parameters": [
{
"dataType": "String",
"paramType": "path",
"required": "false",
"name": "user",
"description": "The name of the user <br><br>"
}
],
"notes": "<br><br> Removes an existing user, identified by user. <br><br> If the user can be removed, the server will respond with HTTP 202. In case of success, the returned JSON object has the following properties: <br><br> <ul class=\"swagger-list\"><li><em>error</em>: Boolean flag to indicate that an error occurred (false in this case) <li><em>code</em>: The HTTP status code </ul> If the specified user does not exist, the server will respond with HTTP 404. <br><br> The body of the response will contain a JSON object with additional error details. The object has the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>error</em>: Boolean flag to indicate that an error occurred (true in this case) <li><em>code</em>: The HTTP status code <li><em>errorNum</em>: The server error number <li><em>errorMessage</em>: A descriptive error message",
"summary": " Remove User",
"httpMethod": "DELETE",
"examples": "",

View File

@ -24,7 +24,7 @@
"notes": "Returns the server name and version number. The response is a JSON object with the following attributes: <br><br> <ul class=\"swagger-list\"><li><em>server</em>: will always contain <em>arango</em> <li><em>version</em>: the server version string. The string has the format \"<em>major</em>.*minor<em>.*sub</em>\". <em>major</em> and <em>minor</em> will be numeric, and <em>sub</em> may contain a number or a textual version. <li><em>details</em>: an optional JSON object with additional details. This is returned only if the <em>details</em> URL parameter is set to <em>true</em> in the request.",
"summary": " Return server version",
"httpMethod": "GET",
"examples": "<br><br> Returns the version information. <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"server\" : \"arango\", \n \"version\" : \"2.2.2-rc1\" \n}\n</code></pre><br><br><br> Returns the version information with details. <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/version?details=true\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"server\" : \"arango\", \n \"version\" : \"2.2.2-rc1\", \n \"details\" : { \n \"build-date\" : \"Aug 6 2014 16:32:54\", \n \"configure\" : \"'./configure' '--enable-all-in-one-icu' '--enable-relative' '--enable-maintainer-mode'\", \n \"icu-version\" : \"52.1\", \n \"libev-version\" : \"4.11\", \n \"openssl-version\" : \"OpenSSL 0.9.8y 5 Feb 2013\", \n \"repository-version\" : \"tags/v2.2.2-rc1-0-gb8df91e175fba53212b464304531234b7559636b\", \n \"server-version\" : \"2.2.2-rc1\", \n \"sizeof int\" : \"4\", \n \"sizeof void*\" : \"8\", \n \"v8-version\" : \"3.16.14\" \n } \n}\n</code></pre><br>@endDocuBlock",
"examples": "<br><br> Returns the version information. <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/version\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"server\" : \"arango\", \n \"version\" : \"2.3.0-devel\" \n}\n</code></pre><br><br><br> Returns the version information with details. <br><br><br><br><pre><code class=\"json\">shell> curl --data-binary @- --dump - http://localhost:8529/_api/version?details=true\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"server\" : \"arango\", \n \"version\" : \"2.3.0-devel\", \n \"details\" : { \n \"build-date\" : \"2014-10-02 15:22:34\", \n \"configure\" : \"'./configure' '--enable-all-in-one-icu' '--enable-maintainer-mode' '--enable-relative'\", \n \"icu-version\" : \"49.1.2\", \n \"libev-version\" : \"4.11\", \n \"openssl-version\" : \"OpenSSL 0.9.8za 5 Jun 2014\", \n \"repository-version\" : \"heads/devel-0-g5e7bbf3470e18b0391f8f3da42c7afa5fac91e20-dirty\", \n \"server-version\" : \"2.3.0-devel\", \n \"sizeof int\" : \"4\", \n \"sizeof void*\" : \"8\", \n \"v8-version\" : \"3.16.14\" \n } \n}\n</code></pre><br><br><br>",
"nickname": "ReturnServerVersion"
}
],