diff --git a/html/admin/api-docs/aqlfunction b/html/admin/api-docs/aqlfunction index 3dedc83fa2..7e3fb4977a 100644 --- a/html/admin/api-docs/aqlfunction +++ b/html/admin/api-docs/aqlfunction @@ -55,7 +55,7 @@ "description": "the body with name and code of the aql user function. " } ], - "notes": "

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

- name: the fully qualified name of the user functions.

- code: a string representation of the function body.

- isDeterministic: an optional boolean value to indicate that the function
results are fully deterministic (function return value solely depends on the input value and return value is the same for repeated calls with same input). The isDeterministic attribute is currently not used but may be used later for optimisations.

In case of success, the returned JSON object has the following properties:

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

- code: the HTTP status code

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

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

- code: the HTTP status code

- errorNum: the server error number

- errorMessage: a descriptive error message

", + "notes": "

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

- name: the fully qualified name of the user functions.

- code: a string representation of the function body.

- isDeterministic: an optional boolean value to indicate that the function results are fully deterministic (function return value solely depends on the input value and return value is the same for repeated calls with same input). The isDeterministic attribute is currently not used but may be used later for optimisations.

In case of success, the returned JSON object has the following properties:

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

- code: the HTTP status code

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

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

- code: the HTTP status code

- errorNum: the server error number

- errorMessage: a descriptive error message

", "summary": "creates or replaces an AQL user function", "httpMethod": "POST", "examples": "

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

", @@ -96,7 +96,7 @@ "description": "If set to true, then the function name provided in name is treated as a namespace prefix, and all functions in the specified namespace will be deleted. If set to false, the function name provided in name must be fully qualified, including any namespaces. " } ], - "notes": "

Removes an existing AQL user function, identified by name.

In case of success, the returned JSON object has the following properties:

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

- code: the HTTP status code

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

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

- code: the HTTP status code

- errorNum: the server error number

- errorMessage: a descriptive error message

", + "notes": "

Removes an existing AQL user function, identified by name.

In case of success, the returned JSON object has the following properties:

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

- code: the HTTP status code

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

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

- code: the HTTP status code

- errorNum: the server error number

- errorMessage: a descriptive error message

", "summary": "remove an existing AQL user function", "httpMethod": "DELETE", "examples": "deletes a function:

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

function not found:

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

", diff --git a/html/admin/api-docs/collection b/html/admin/api-docs/collection index a7664336f2..f519be0a61 100644 --- a/html/admin/api-docs/collection +++ b/html/admin/api-docs/collection @@ -16,10 +16,10 @@ "description": "the body with name, options of a collection. " } ], - "notes": "Creates an new collection with a given name. The request must contain an object with the following attributes.

- name: The name of the collection.

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

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

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

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

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

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

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

", + "notes": "Creates an new collection with a given name. The request must contain an object with the following attributes.

- name: The name of the collection.

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

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

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

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

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

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

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

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

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



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

", + "examples": "

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



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

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

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

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

unix> curl --dump - http://localhost:8529/_api/collection\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"collections\" : [ \n    { \n      \"id\" : \"6650382\", \n      \"name\" : \"_aal\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"47544846\", \n      \"name\" : \"testCollectionUsers\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"8813070\", \n      \"name\" : \"_fishbowl\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"23099918\", \n      \"name\" : \"animals\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"2718222\", \n      \"name\" : \"_modules\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"5601806\", \n      \"name\" : \"_structures\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"7830030\", \n      \"name\" : \"_aqlfunctions\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"96782\", \n      \"name\" : \"_users\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"21264910\", \n      \"name\" : \"demo\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"3701262\", \n      \"name\" : \"_routing\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"10058254\", \n      \"name\" : \"_trx\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"1669646\", \n      \"name\" : \"_graphs\", \n      \"status\" : 3, \n      \"type\" : 2 \n    } \n  ], \n  \"names\" : { \n    \"_aal\" : { \n      \"id\" : \"6650382\", \n      \"name\" : \"_aal\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"testCollectionUsers\" : { \n      \"id\" : \"47544846\", \n      \"name\" : \"testCollectionUsers\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_fishbowl\" : { \n      \"id\" : \"8813070\", \n      \"name\" : \"_fishbowl\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"animals\" : { \n      \"id\" : \"23099918\", \n      \"name\" : \"animals\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_modules\" : { \n      \"id\" : \"2718222\", \n      \"name\" : \"_modules\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_structures\" : { \n      \"id\" : \"5601806\", \n      \"name\" : \"_structures\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_aqlfunctions\" : { \n      \"id\" : \"7830030\", \n      \"name\" : \"_aqlfunctions\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_users\" : { \n      \"id\" : \"96782\", \n      \"name\" : \"_users\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"demo\" : { \n      \"id\" : \"21264910\", \n      \"name\" : \"demo\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_routing\" : { \n      \"id\" : \"3701262\", \n      \"name\" : \"_routing\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_trx\" : { \n      \"id\" : \"10058254\", \n      \"name\" : \"_trx\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_graphs\" : { \n      \"id\" : \"1669646\", \n      \"name\" : \"_graphs\", \n      \"status\" : 3, \n      \"type\" : 2 \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

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

unix> curl --dump - http://localhost:8529/_api/collection\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"collections\" : [ \n    { \n      \"id\" : \"2763996\", \n      \"name\" : \"_modules\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"7810268\", \n      \"name\" : \"_aqlfunctions\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"77020\", \n      \"name\" : \"_users\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"21245148\", \n      \"name\" : \"demo\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"3681500\", \n      \"name\" : \"_routing\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"10038492\", \n      \"name\" : \"_trx\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"1649884\", \n      \"name\" : \"_graphs\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"6630620\", \n      \"name\" : \"_aal\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"47525084\", \n      \"name\" : \"testCollectionUsers\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"8793308\", \n      \"name\" : \"_fishbowl\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"23080156\", \n      \"name\" : \"animals\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    { \n      \"id\" : \"5582044\", \n      \"name\" : \"_structures\", \n      \"status\" : 3, \n      \"type\" : 2 \n    } \n  ], \n  \"names\" : { \n    \"_modules\" : { \n      \"id\" : \"2763996\", \n      \"name\" : \"_modules\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_aqlfunctions\" : { \n      \"id\" : \"7810268\", \n      \"name\" : \"_aqlfunctions\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_users\" : { \n      \"id\" : \"77020\", \n      \"name\" : \"_users\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"demo\" : { \n      \"id\" : \"21245148\", \n      \"name\" : \"demo\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_routing\" : { \n      \"id\" : \"3681500\", \n      \"name\" : \"_routing\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_trx\" : { \n      \"id\" : \"10038492\", \n      \"name\" : \"_trx\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_graphs\" : { \n      \"id\" : \"1649884\", \n      \"name\" : \"_graphs\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_aal\" : { \n      \"id\" : \"6630620\", \n      \"name\" : \"_aal\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"testCollectionUsers\" : { \n      \"id\" : \"47525084\", \n      \"name\" : \"testCollectionUsers\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_fishbowl\" : { \n      \"id\" : \"8793308\", \n      \"name\" : \"_fishbowl\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"animals\" : { \n      \"id\" : \"23080156\", \n      \"name\" : \"animals\", \n      \"status\" : 3, \n      \"type\" : 2 \n    }, \n    \"_structures\" : { \n      \"id\" : \"5582044\", \n      \"name\" : \"_structures\", \n      \"status\" : 3, \n      \"type\" : 2 \n    } \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "readsAllCollections" } ], @@ -65,7 +65,7 @@ "description": "" } ], - "notes": "The result is an object describing the collection with the following attributes:

- id: The identifier of the collection.

- name: The name of the collection.

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

Every other status indicates a corrupted collection.

- type: The type of the collection as number.
- 2: document collection (normal case) - 3: edges collection

", + "notes": "The result is an object describing the collection with the following attributes:

- id: The identifier of the collection.

- name: The name of the collection.

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

Every other status indicates a corrupted collection.

- type: The type of the collection as number. - 2: document collection (normal case) - 3: edges collection

", "summary": "reads a collection", "httpMethod": "GET", "examples": "", @@ -96,10 +96,10 @@ "description": "" } ], - "notes": "In addition to the above, the result will always contain the waitForSync, journalSize, and isVolatile properties. This is achieved by forcing a load of the underlying collection.

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

- journalSize: The maximal size of a journal / datafile.

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

", + "notes": "In addition to the above, the result will always contain the waitForSync, journalSize, and isVolatile properties. This is achieved by forcing a load of the underlying collection.

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

- journalSize: The maximal size of a journal / datafile.

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

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

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

Using a name:

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

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

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

Using a name:

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

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

- count: The number of documents inside the collection.

", "summary": "reads a collection with count", "httpMethod": "GET", - "examples": "Using an identifier and requesting the number of documents:

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

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

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

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

- count: The number of documents inside the collection.

- figures.alive.count: The number of living documents.

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

- figures.dead.count: The number of dead documents.

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

- figures.dead.deletion: The total number of deletion markers.

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

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

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

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

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

Note: the filesizes of shapes and compactor files are not reported.

", + "notes": "In addition to the above, the result also contains the number of documents and additional statistical information about the collection. Note that this will always load the collection into memory.

- count: The number of documents inside the collection.

- figures.alive.count: The number of living documents.

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

- figures.dead.count: The number of dead documents.

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

- figures.dead.deletion: The total number of deletion markers.

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

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

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

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

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

Note: the filesizes of shapes and compactor files are not reported.

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

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

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

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

", "nickname": "readsACollectionWithStats" } ], @@ -220,10 +220,10 @@ "description": "" } ], - "notes": "Loads a collection into memory. Returns the collection on success.

The request might optionally contain the following attribute:

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

On success an object with the following attributes is returned:

- id: The identifier of the collection.

- name: The name of the collection.

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

- status: The status of the collection as number.

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

", + "notes": "Loads a collection into memory. Returns the collection on success.

The request might optionally contain the following attribute:

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

On success an object with the following attributes is returned:

- id: The identifier of the collection.

- name: The name of the collection.

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

- status: The status of the collection as number.

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

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

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

", + "examples": "

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

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

- id: The identifier of the collection.

- name: The name of the collection.

- status: The status of the collection as number.

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

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

- id: The identifier of the collection.

- name: The name of the collection.

- status: The status of the collection as number.

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

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

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

", + "examples": "

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

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

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

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

", + "examples": "

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

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

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

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

If returns an object with the attributes

- id: The identifier of the collection.

- name: The name of the collection.

- waitForSync: The new value.

- journalSize: The new value.

- status: The status of the collection as number.

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

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

", + "notes": "Changes the properties of a collection. Expects an object with the attribute(s)

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

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

If returns an object with the attributes

- id: The identifier of the collection.

- name: The name of the collection.

- waitForSync: The new value.

- journalSize: The new value.

- status: The status of the collection as number.

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

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

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

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

", + "examples": "

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

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

- name: The new name.

If returns an object with the attributes

- id: The identifier of the collection.

- name: The new name of the collection.

- status: The status of the collection as number.

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

", + "notes": "Renames a collection. Expects an object with the attribute(s)

- name: The new name.

If returns an object with the attributes

- id: The identifier of the collection.

- name: The new name of the collection.

- status: The status of the collection as number.

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

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

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

", + "examples": "

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

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

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

- error: false

- id: The identifier of the deleted collection.

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

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

Using a name:

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

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

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

Using a name:

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

", "nickname": "deletesACollection" } ], diff --git a/html/admin/api-docs/cursor b/html/admin/api-docs/cursor index 836a02efd8..4c87799a29 100644 --- a/html/admin/api-docs/cursor +++ b/html/admin/api-docs/cursor @@ -25,10 +25,10 @@ "description": "The following attributes can be used inside the JSON object: - query: contains the query string to be executed (mandatory) - count: boolean flag that indicates whether the number of documents found should be returned as \"count\" attribute in the result set (optional). Calculating the \"count\" attribute might have a performance penalty for some queries so this option is turned off by default. - batchSize: maximum number of result documents to be transferred from the server to the client in one roundtrip (optional). If this attribute is not set, a server-controlled default value will be used. - bindVars: key/value list of bind parameters (optional). " } ], - "notes": "The query details include the query string plus optional query options and bind parameters. These values need to be passed in a JSON representation in the body of the POST request.

The following attributes can be used inside the JSON object:

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

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

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

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

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

The JSON object has the following properties:

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

- code: the HTTP status code

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

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

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

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

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

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

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

- code: the HTTP status code

- errorNum: the server error number

- errorMessage: a descriptive error message

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

A list of query errors can be found @ref ArangoErrors here.

", + "notes": "The query details include the query string plus optional query options and bind parameters. These values need to be passed in a JSON representation in the body of the POST request.

The following attributes can be used inside the JSON object:

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

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

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

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

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

The JSON object has the following properties:

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

- code: the HTTP status code

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

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

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

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

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

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

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

- code: the HTTP status code

- errorNum: the server error number

- errorMessage: a descriptive error message

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

A list of query errors can be found @ref ArangoErrors here.

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

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

Executes a query and extract part of the result:

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

Bad queries: Missing body:

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

Unknown collection:

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

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

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

Executes a query and extract part of the result:

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

Bad queries: Missing body:

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

Unknown collection:

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

", "nickname": "createsACursor" } ], @@ -56,10 +56,10 @@ "description": "The name of the cursor " } ], - "notes": "

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

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

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

", + "notes": "

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

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

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

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

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

Missing identifier

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

Unknown identifier

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

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

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

Missing identifier

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

Unknown identifier

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

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

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

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

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

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

", + "examples": "

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

", "nickname": "deletesACursor" } ], diff --git a/html/admin/api-docs/document b/html/admin/api-docs/document index 97e3a5a9fd..f7c1192ba4 100644 --- a/html/admin/api-docs/document +++ b/html/admin/api-docs/document @@ -52,10 +52,10 @@ "description": "Wait until document has been sync to disk. " } ], - "notes": "Creates a new document in the collection named collection. A JSON representation of the document must be passed as the body of the POST request.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Create a document in a new, named collection

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

Unknown collection name:

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

Illegal document:

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

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

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

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

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

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

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

Create a document in a new, named collection

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

Unknown collection name:

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

Illegal document:

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

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

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

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

Use a document handle and an etag:

unix> curl --header 'If-None-Match:\"149191182\"' --dump - http://localhost:8529/_api/document/products/149191182\n\nHTTP/1.1 304 Not Modified\ncontent-type: text/plain; charset=utf-8\netag: \"149191182\"\n\n

Unknown document handle:

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

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

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

Use a document handle and an etag:

unix> curl --header 'If-None-Match:\"149302492\"' --dump - http://localhost:8529/_api/document/products/149302492\n\nHTTP/1.1 304 Not Modified\ncontent-type: text/plain; charset=utf-8\netag: \"149302492\"\n\n

Unknown document handle:

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

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

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

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

Collection does not exist.

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

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

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

Collection does not exist.

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

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

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

unix> curl -X HEAD --dump - http://localhost:8529/_api/document/products/216562190\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"216562190\"\n\n

", + "examples": "

unix> curl -X HEAD --dump - http://localhost:8529/_api/document/products/216739036\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: \"216739036\"\n\n

", "nickname": "readsADocumentHeader" } ], @@ -258,10 +258,10 @@ "description": "You can conditionally replace a document based on a target revision id by using the if-match HTTP header. " } ], - "notes": "Completely updates (i.e. replaces) the document identified by document-handle. If the document exists and can be updated, then a HTTP 201 is returned and the \"ETag\" header field contains the new revision of the document.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Unknown document handle:

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

Produce a revision conflict:

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

Last write wins:

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

Alternative to header field:

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

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

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

Unknown document handle:

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

Produce a revision conflict:

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

Last write wins:

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

Alternative to header field:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Unknown document handle:

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

Revision conflict:

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

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

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

Unknown document handle:

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

Revision conflict:

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

", "nickname": "deletesADocument" } ], diff --git a/html/admin/api-docs/edge b/html/admin/api-docs/edge index ec52c2edab..2ea70a669a 100644 --- a/html/admin/api-docs/edge +++ b/html/admin/api-docs/edge @@ -49,7 +49,7 @@ "notes": "from handle and to handle are immutable once the edge has been created.

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

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

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

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

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

", "nickname": "createsAnEdge" } ], diff --git a/html/admin/api-docs/edges b/html/admin/api-docs/edges index 47bdd9af8b..da0dcd7385 100644 --- a/html/admin/api-docs/edges +++ b/html/admin/api-docs/edges @@ -32,7 +32,7 @@ "notes": "Returns the list of edges starting or ending in the vertex identified by vertex-handle.

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

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

In edges

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

Out edges

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

", + "examples": "Any direction

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

In edges

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

Out edges

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

", "nickname": "readsIn-OrOutboundEdges" } ], diff --git a/html/admin/api-docs/explain b/html/admin/api-docs/explain index c628469347..ab3849a0c6 100644 --- a/html/admin/api-docs/explain +++ b/html/admin/api-docs/explain @@ -25,7 +25,7 @@ "description": "The query string needs to be passed in the attribute query of a JSON object as the body of the POST request. If the query references any bind variables, these must also be passed in the attribute bindVars. " } ], - "notes": "

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

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

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

Please note that the structure of the explain result data might change in future versions of ArangoDB without further notice and without maintaining backwards compatibility.

", + "notes": "

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

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

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

Please note that the structure of the explain result data might change in future versions of ArangoDB without further notice and without maintaining backwards compatibility.

", "summary": "explains a query", "httpMethod": "POST", "examples": "Valid query:

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

Invalid query:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/explain\n{ \"query\" : \"FOR p IN products FILTER p.id == @id LIMIT 2 RETURN p.n\" }\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 400, \n  \"errorNum\" : 1551, \n  \"errorMessage\" : \"no value specified for declared bind parameter 'id'\" \n}\n\n

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

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

", diff --git a/html/admin/api-docs/graph b/html/admin/api-docs/graph index 00291abaa4..b55db210e0 100644 --- a/html/admin/api-docs/graph +++ b/html/admin/api-docs/graph @@ -38,7 +38,7 @@ "notes": "Creates a new graph.

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

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

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

", + "examples": "

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

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

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

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

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

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

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

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

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

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

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

", + "examples": "

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

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

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

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

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

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

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

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

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

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

", + "examples": "

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

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

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

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

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

", + "examples": "

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

", "nickname": "updateVertex" } ], @@ -457,10 +457,10 @@ "description": "The call expects a JSON hash array as body to filter the result: " } ], - "notes": "Returns a cursor.

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

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

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

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

", + "notes": "Returns a cursor.

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

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

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

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

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

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

", + "examples": "Select all vertices

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

", "nickname": "getVertices" } ], @@ -491,10 +491,10 @@ "description": "The call expects a JSON hash array as body to filter the result: " } ], - "notes": "Returns a cursor.

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

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

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

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

", + "notes": "Returns a cursor.

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

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

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

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

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

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

Select vertices by direction and property filter

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

", + "examples": "Select all vertices

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

Select vertices by direction and property filter

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

", "nickname": "getVertices" } ], @@ -535,10 +535,10 @@ "description": "The call expects a JSON hash array as body with the edge properties: " } ], - "notes": "Creates an edge in a graph.

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

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

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

", + "notes": "Creates an edge in a graph.

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

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

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

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

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

", + "examples": "

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

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

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

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

", + "examples": "

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

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

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

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

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

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

", + "examples": "

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

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

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

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

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

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

", + "examples": "

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

", "nickname": "updateEdge" } ], @@ -817,10 +817,10 @@ "description": "The call expects a JSON hash array as body to filter the result: " } ], - "notes": "Returns a cursor.

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

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

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

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

", + "notes": "Returns a cursor.

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

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

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

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

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

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

", + "examples": "Select all edges

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

", "nickname": "getEdges" } ], @@ -858,10 +858,10 @@ "description": "The call expects a JSON hash array as body to filter the result: " } ], - "notes": "

Returns a cursor.

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

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

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

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

", + "notes": "

Returns a cursor.

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

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

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

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

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

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

", + "examples": "Select all edges

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

", "nickname": "getEdges" } ], diff --git a/html/admin/api-docs/index b/html/admin/api-docs/index index 091c2539ad..023d7b6982 100644 --- a/html/admin/api-docs/index +++ b/html/admin/api-docs/index @@ -92,7 +92,7 @@ "notes": "

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

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

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

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

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

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

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

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

", "nickname": "createsACapConstraint" } ], @@ -131,10 +131,10 @@ "description": "" } ], - "notes": "

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

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

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

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

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

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

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

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

", + "notes": "

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

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

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

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

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

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

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

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

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

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

Creating a geo index with latitude and longitude attributes:

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

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

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

Creating a geo index with latitude and longitude attributes:

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

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

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

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

- fields: A list of attribute paths.

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

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

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

Creating a hash index:

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

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

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

Creating a hash index:

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

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

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

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

- fields: A list of attribute paths.

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

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

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

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

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

", "nickname": "createsASkipList" } ], @@ -265,10 +265,10 @@ "description": "" } ], - "notes": "

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

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

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

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

", + "notes": "

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

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

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

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

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

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

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

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

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

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

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

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

- unique: Must always be set to false.

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

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

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

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

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

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

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

See @ref IndexCapHttp, @ref IndexGeoHttp, @ref IndexHashHttp, @ref IndexFulltextHttp, and @ref IndexSkiplistHttp for details.

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

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

Note that the following index types do not support uniqueness, and using the unique attribute with these types may lead to an error: - cap constraints
- fulltext indexes

", + "notes": "

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

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

See @ref IndexCapHttp, @ref IndexGeoHttp, @ref IndexHashHttp, @ref IndexFulltextHttp, and @ref IndexSkiplistHttp for details.

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

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

Note that the following index types do not support uniqueness, and using the unique attribute with these types may lead to an error: - cap constraints- fulltext indexes

", "summary": "creates an index", "httpMethod": "POST", "examples": "", @@ -375,7 +375,7 @@ "notes": "

Deletes an index with index-handle.

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

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

", + "examples": "

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

", "nickname": "deletesAnIndex" } ], diff --git a/html/admin/api-docs/simple b/html/admin/api-docs/simple index 9dce01006f..7688a79397 100644 --- a/html/admin/api-docs/simple +++ b/html/admin/api-docs/simple @@ -29,10 +29,10 @@ "description": "Contains the query. " } ], - "notes": "

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

- collection: The name of the collection to query.

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

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

Returns a cursor containing the result, see @ref HttpCursor for details.

", + "notes": "

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

- collection: The name of the collection to query.

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

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

Returns a cursor containing the result, see @ref HttpCursor for details.

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

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

Using a batchSize value

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

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

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

Using a batchSize value

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

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

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

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

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

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

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

", + "examples": "

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

", "nickname": "executesSimpleQueryAny" } ], @@ -99,10 +99,10 @@ "description": "Contains the query. " } ], - "notes": "

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

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

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

- collection: The name of the collection to query.

- latitude: The latitude of the coordinate.

- longitude: The longitude of the coordinate.

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

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

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

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

Returns a cursor containing the result, see @ref HttpCursor for details.

", + "notes": "

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

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

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

- collection: The name of the collection to query.

- latitude: The latitude of the coordinate.

- longitude: The longitude of the coordinate.

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

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

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

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

Returns a cursor containing the result, see @ref HttpCursor for details.

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

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

With distance:

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

", + "examples": "Without distance:

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

With distance:

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

", "nickname": "executesSimpleQueryNear" } ], @@ -134,10 +134,10 @@ "description": "Contains the query. " } ], - "notes": "

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

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

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

- collection: The name of the collection to query.

- latitude: The latitude of the coordinate.

- longitude: The longitude of the coordinate.

- radius: The maximal radius (in meters).

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

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

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

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

Returns a cursor containing the result, see @ref HttpCursor for details.

", + "notes": "

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

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

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

- collection: The name of the collection to query.

- latitude: The latitude of the coordinate.

- longitude: The longitude of the coordinate.

- radius: The maximal radius (in meters).

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

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

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

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

Returns a cursor containing the result, see @ref HttpCursor for details.

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

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

With distance:

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

", + "examples": "Without distance:

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

With distance:

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

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

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

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

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

- collection: The name of the collection to query.

- attribute: The attribute that contains the texts.

- query: The fulltext query.

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

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

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

Returns a cursor containing the result, see @ref HttpCursor for details.

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

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

", + "examples": "

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

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

This will find all documents matching a given example.

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

- collection: The name of the collection to query.

- example: The example.

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

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

Returns a cursor containing the result, see @ref HttpCursor for details.

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

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

Matching an attribute which is a sub-document:

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

Matching an attribute within a sub-document:

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

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

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

Matching an attribute which is a sub-document:

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

Matching an attribute within a sub-document:

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

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

This will return the first document matching a given example.

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

- collection: The name of the collection to query.

- example: The example.

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

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

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

If no document was found:

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

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

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

If no document was found:

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

", "nickname": "executesSimpleQueryFirst-example" } ], @@ -258,10 +258,10 @@ } ], "parameters": [], - "notes": "

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

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

- collection: The name of the collection to query.

- attribute: The attribute path to check.

- left: The lower bound.

- right: The upper bound.

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

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

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

Returns a cursor containing the result, see @ref HttpCursor for details.

", + "notes": "

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

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

- collection: The name of the collection to query.

- attribute: The attribute path to check.

- left: The lower bound.

- right: The upper bound.

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

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

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

Returns a cursor containing the result, see @ref HttpCursor for details.

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

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

", + "examples": "

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

", "nickname": "executesSimpleRangeQuery" } ], @@ -285,7 +285,7 @@ } ], "parameters": [], - "notes": "

This will find all documents in the collection that match the specified example object.

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

- collection: The name of the collection to remove from.

- example: An example object that all collection objects are compared
against.

- waitForSync: if set to true, then all removal operations will
instantly be synchronised to disk. If this is not specified, then the collection's default sync behavior will be applied.

- limit: an optional value that determines how many documents to
delete at most. If limit is specified but is less than the number of documents in the collection, it is undefined which of the documents will be deleted.

Returns the number of documents that were deleted

", + "notes": "

This will find all documents in the collection that match the specified example object.

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

- collection: The name of the collection to remove from.

- example: An example object that all collection objects are compared against.

- waitForSync: if set to true, then all removal operations will instantly be synchronised to disk. If this is not specified, then the collection's default sync behavior will be applied.

- limit: an optional value that determines how many documents to delete at most. If limit is specified but is less than the number of documents in the collection, it is undefined which of the documents will be deleted.

Returns the number of documents that were deleted

", "summary": "removes documents by example", "httpMethod": "PUT", "examples": "

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/remove-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } } }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"deleted\" : 1, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", @@ -312,7 +312,7 @@ } ], "parameters": [], - "notes": "

This will find all documents in the collection that match the specified example object, and replace the entire document body with the new value specified. Note that document meta-attributes such as _id, _key, _from, _to etc. cannot be replaced.

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

- collection: The name of the collection to replace within.

- example: An example object that all collection objects are compared
against.

- newValue: The replacement document that will get inserted in place
of the \"old\" documents.

- waitForSync: if set to true, then all removal operations will
instantly be synchronised to disk. If this is not specified, then the collection's default sync behavior will be applied.

- limit: an optional value that determines how many documents to
replace at most. If limit is specified but is less than the number of documents in the collection, it is undefined which of the documents will be replaced.

Returns the number of documents that were replaced

", + "notes": "

This will find all documents in the collection that match the specified example object, and replace the entire document body with the new value specified. Note that document meta-attributes such as _id, _key, _from, _to etc. cannot be replaced.

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

- collection: The name of the collection to replace within.

- example: An example object that all collection objects are compared against.

- newValue: The replacement document that will get inserted in place of the \"old\" documents.

- waitForSync: if set to true, then all removal operations will instantly be synchronised to disk. If this is not specified, then the collection's default sync behavior will be applied.

- limit: an optional value that determines how many documents to replace at most. If limit is specified but is less than the number of documents in the collection, it is undefined which of the documents will be replaced.

Returns the number of documents that were replaced

", "summary": "replaces documents by example", "httpMethod": "PUT", "examples": "

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/replace-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } }, \"newValue\" : {\"foo\" : \"bar\"}, \"limit\" : 3 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"replaced\" : 1, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", @@ -339,7 +339,7 @@ } ], "parameters": [], - "notes": "

This will find all documents in the collection that match the specified example object, and partially update the document body with the new value specified. Note that document meta-attributes such as _id, _key, _from, _to etc. cannot be replaced.

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

- collection: The name of the collection to update within.

- example: An example object that all collection objects are compared
against.

- newValue: The update value that will get inserted in place
of the \"old\" version of the found documents.

- keepNull: This parameter can be used to modify the behavior when
handling null values. Normally, null values are stored in the database. By setting the keepNull parameter to false, this behavior can be changed so that all attributes in data with null values will be removed from the updated document.

- waitForSync: if set to true, then all removal operations will
instantly be synchronised to disk. If this is not specified, then the collection's default sync behavior will be applied.

- limit: an optional value that determines how many documents to
update at most. If limit is specified but is less than the number of documents in the collection, it is undefined which of the documents will be updated.

Returns the number of documents that were updated

", + "notes": "

This will find all documents in the collection that match the specified example object, and partially update the document body with the new value specified. Note that document meta-attributes such as _id, _key, _from, _to etc. cannot be replaced.

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

- collection: The name of the collection to update within.

- example: An example object that all collection objects are compared against.

- newValue: The update value that will get inserted in place of the \"old\" version of the found documents.

- keepNull: This parameter can be used to modify the behavior when handling null values. Normally, null values are stored in the database. By setting the keepNull parameter to false, this behavior can be changed so that all attributes in data with null values will be removed from the updated document.

- waitForSync: if set to true, then all removal operations will instantly be synchronised to disk. If this is not specified, then the collection's default sync behavior will be applied.

- limit: an optional value that determines how many documents to update at most. If limit is specified but is less than the number of documents in the collection, it is undefined which of the documents will be updated.

Returns the number of documents that were updated

", "summary": "updates documents by example", "httpMethod": "PUT", "examples": "

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/simple/update-by-example\n{ \"collection\": \"products\", \"example\" : { \"a\" : { \"j\" : 1 } }, \"newValue\" : { \"a\" : { \"j\" : 22 } }, \"limit\" : 3 }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"updated\" : 1, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", diff --git a/html/admin/api-docs/system b/html/admin/api-docs/system index 5578921a84..81c85c98fb 100644 --- a/html/admin/api-docs/system +++ b/html/admin/api-docs/system @@ -92,7 +92,7 @@ "notes": "

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

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

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

unix> curl --dump - http://localhost:8529/_admin/statistics\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"system\" : { \n    \"minorPageFaults\" : 33765, \n    \"majorPageFaults\" : 40, \n    \"userTime\" : 1.12, \n    \"systemTime\" : 0.12, \n    \"numberOfThreads\" : 16, \n    \"residentSize\" : 67604480, \n    \"virtualSize\" : 3544875008 \n  }, \n  \"client\" : { \n    \"httpConnections\" : 1, \n    \"connectionTime\" : { \n      \"sum\" : 0, \n      \"count\" : 0, \n      \"counts\" : [ \n        0, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"totalTime\" : { \n      \"sum\" : 2.490015983581543, \n      \"count\" : 68, \n      \"counts\" : [ \n        29, \n        22, \n        10, \n        4, \n        3, \n        0, \n        0 \n      ] \n    }, \n    \"requestTime\" : { \n      \"sum\" : 2.480271339416504, \n      \"count\" : 68, \n      \"counts\" : [ \n        29, \n        22, \n        10, \n        4, \n        3, \n        0, \n        0 \n      ] \n    }, \n    \"queueTime\" : { \n      \"sum\" : 0.002524137496948242, \n      \"count\" : 67, \n      \"counts\" : [ \n        67, \n        0, \n        0, \n        0, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"bytesSent\" : { \n      \"sum\" : 29623, \n      \"count\" : 68, \n      \"counts\" : [ \n        17, \n        42, \n        9, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"bytesReceived\" : { \n      \"sum\" : 12700, \n      \"count\" : 68, \n      \"counts\" : [ \n        64, \n        4, \n        0, \n        0, \n        0, \n        0 \n      ] \n    } \n  }, \n  \"server\" : { \n    \"uptime\" : 9.610474109649658 \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", + "examples": "

unix> curl --dump - http://localhost:8529/_admin/statistics\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"system\" : { \n    \"minorPageFaults\" : 35314, \n    \"majorPageFaults\" : 40, \n    \"userTime\" : 1.31, \n    \"systemTime\" : 0.3, \n    \"numberOfThreads\" : 16, \n    \"residentSize\" : 63541248, \n    \"virtualSize\" : 3552657408 \n  }, \n  \"client\" : { \n    \"httpConnections\" : 1, \n    \"connectionTime\" : { \n      \"sum\" : 0, \n      \"count\" : 0, \n      \"counts\" : [ \n        0, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"totalTime\" : { \n      \"sum\" : 2.976754903793335, \n      \"count\" : 68, \n      \"counts\" : [ \n        30, \n        21, \n        8, \n        5, \n        4, \n        0, \n        0 \n      ] \n    }, \n    \"requestTime\" : { \n      \"sum\" : 2.9571785926818848, \n      \"count\" : 68, \n      \"counts\" : [ \n        30, \n        21, \n        8, \n        5, \n        4, \n        0, \n        0 \n      ] \n    }, \n    \"queueTime\" : { \n      \"sum\" : 0.003583669662475586, \n      \"count\" : 67, \n      \"counts\" : [ \n        67, \n        0, \n        0, \n        0, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"bytesSent\" : { \n      \"sum\" : 29623, \n      \"count\" : 68, \n      \"counts\" : [ \n        17, \n        42, \n        9, \n        0, \n        0, \n        0 \n      ] \n    }, \n    \"bytesReceived\" : { \n      \"sum\" : 12700, \n      \"count\" : 68, \n      \"counts\" : [ \n        64, \n        4, \n        0, \n        0, \n        0, \n        0 \n      ] \n    } \n  }, \n  \"server\" : { \n    \"uptime\" : 10.15137004852295 \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "readsTheStatistics" } ], @@ -108,7 +108,7 @@ } ], "parameters": [], - "notes": "

Returns a description of the statistics returned by /_admin/statistics. The returned objects contains a list of statistics groups in the attribute groups and a list of statistics figures in the attribute figures.

A statistics group is described by

- group: The identifier of the group.
- name: The name of the group.
- description: A description of the group.

A statistics figure is described by

- group: The identifier of the group to which this figure belongs.
- identifier: The identifier of the figure. It is unique within the group.
- name: The name of the figure.
- description: A description of the group.
- type: Either current, accumulated, or distribution.
- cuts: The distribution vector.
- units: Units in which the figure is measured.

", + "notes": "

Returns a description of the statistics returned by /_admin/statistics. The returned objects contains a list of statistics groups in the attribute groups and a list of statistics figures in the attribute figures.

A statistics group is described by

- group: The identifier of the group.- name: The name of the group.- description: A description of the group.

A statistics figure is described by

- group: The identifier of the group to which this figure belongs.- identifier: The identifier of the figure. It is unique within the group.- name: The name of the figure.- description: A description of the group.- type: Either current, accumulated, or distribution.- cuts: The distribution vector.- units: Units in which the figure is measured.

", "summary": "statistics description", "httpMethod": "GET", "examples": "

unix> curl --dump - http://localhost:8529/_admin/statistics-description\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"groups\" : [ \n    { \n      \"group\" : \"system\", \n      \"name\" : \"Process Statistics\", \n      \"description\" : \"Statistics about the ArangoDB process\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"name\" : \"Client Statistics\", \n      \"description\" : \"Statistics about the clients connecting to the server.\" \n    }, \n    { \n      \"group\" : \"server\", \n      \"name\" : \"Server Statistics\", \n      \"description\" : \"Statistics about the ArangoDB server\" \n    } \n  ], \n  \"figures\" : [ \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"userTime\", \n      \"name\" : \"User Time\", \n      \"description\" : \"Amount of time that this process has been scheduled in user mode, measured in clock ticks divided by sysconf(_SC_CLK_TCK) aka seconds.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"seconds\" \n    }, \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"systemTime\", \n      \"name\" : \"System Time\", \n      \"description\" : \"Amount of time that this process has been scheduled in kernel mode, measured in clock ticks divided by sysconf(_SC_CLK_TCK) aka seconds.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"seconds\" \n    }, \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"numberOfThreads\", \n      \"name\" : \"Number of Threads\", \n      \"description\" : \"Number of threads in this process.\", \n      \"type\" : \"current\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"residentSize\", \n      \"name\" : \"Resident Set Size\", \n      \"description\" : \"The total size of the number of pages the process has in real memory. This is just the pages which count toward text, data, or stack space. This does not include pages which have not been demand-loaded in, or which are swapped out. The resident set size is reported in bytes.\", \n      \"type\" : \"current\", \n      \"units\" : \"bytes\" \n    }, \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"virtualSize\", \n      \"name\" : \"Virtual Memory Size\", \n      \"description\" : \"The size of the virtual memory the process is using.\", \n      \"type\" : \"current\", \n      \"units\" : \"bytes\" \n    }, \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"minorPageFaults\", \n      \"name\" : \"Minor Page Faults\", \n      \"description\" : \"The number of minor faults the process has made which have not required loading a memory page from disk.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"system\", \n      \"identifier\" : \"majorPageFaults\", \n      \"name\" : \"Major Page Faults\", \n      \"description\" : \"The number of major faults the process has made which have required loading a memory page from disk.\", \n      \"type\" : \"accumulated\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"identifier\" : \"httpConnections\", \n      \"name\" : \"HTTP Client Connections\", \n      \"description\" : \"The number of http connections that are currently open.\", \n      \"type\" : \"current\", \n      \"units\" : \"number\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"identifier\" : \"totalTime\", \n      \"name\" : \"Total Time\", \n      \"description\" : \"Total time needed to answer a request.\", \n      \"type\" : \"distribution\", \n      \"cuts\" : [ \n        0.01, \n        0.05, \n        0.1, \n        0.2, \n        0.5, \n        1 \n      ], \n      \"units\" : \"seconds\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"identifier\" : \"requestTime\", \n      \"name\" : \"Request Time\", \n      \"description\" : \"Request time needed to answer a request.\", \n      \"type\" : \"distribution\", \n      \"cuts\" : [ \n        0.01, \n        0.05, \n        0.1, \n        0.2, \n        0.5, \n        1 \n      ], \n      \"units\" : \"seconds\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"identifier\" : \"queueTime\", \n      \"name\" : \"Queue Time\", \n      \"description\" : \"Queue time needed to answer a request.\", \n      \"type\" : \"distribution\", \n      \"cuts\" : [ \n        0.01, \n        0.05, \n        0.1, \n        0.2, \n        0.5, \n        1 \n      ], \n      \"units\" : \"seconds\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"identifier\" : \"bytesSent\", \n      \"name\" : \"Bytes Sent\", \n      \"description\" : \"Bytes sents for a request.\", \n      \"type\" : \"distribution\", \n      \"cuts\" : [ \n        250, \n        1000, \n        2000, \n        5000, \n        10000 \n      ], \n      \"units\" : \"bytes\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"identifier\" : \"bytesReceived\", \n      \"name\" : \"Bytes Received\", \n      \"description\" : \"Bytes receiveds for a request.\", \n      \"type\" : \"distribution\", \n      \"cuts\" : [ \n        250, \n        1000, \n        2000, \n        5000, \n        10000 \n      ], \n      \"units\" : \"bytes\" \n    }, \n    { \n      \"group\" : \"client\", \n      \"identifier\" : \"connectionTime\", \n      \"name\" : \"Connection Time\", \n      \"description\" : \"Total connection time of a client.\", \n      \"type\" : \"distribution\", \n      \"cuts\" : [ \n        0.1, \n        1, \n        60 \n      ], \n      \"units\" : \"seconds\" \n    }, \n    { \n      \"group\" : \"server\", \n      \"identifier\" : \"uptime\", \n      \"name\" : \"Server Uptime\", \n      \"description\" : \"Number of seconds elapsed since server start.\", \n      \"type\" : \"current\", \n      \"units\" : \"seconds\" \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", diff --git a/html/admin/api-docs/transaction b/html/admin/api-docs/transaction index b959d7f699..0b2b02258c 100644 --- a/html/admin/api-docs/transaction +++ b/html/admin/api-docs/transaction @@ -29,7 +29,7 @@ "description": "Contains the collections and action. " } ], - "notes": "

The transaction description must be passed in the body of the POST request.

The following attributes must be specified inside the JSON object:

- collections: contains the list of collections to be used in the
transaction (mandatory). collections must be a JSON array that can have the optional sub-attributes read and write. read and write must each be either lists of collections names or strings with a single collection name.

- action: the actual transaction operations to be executed, in the
form of stringified Javascript code. The code will be executed on server side, with late binding. It is thus critical that the code specified in action properly sets up all the variables it needs. If the code specified in action ends with a return statement, the value returned will also be returned by the REST API in the result attribute if the transaction committed successfully.

The following optional attributes may also be specified in the request:

- waitForSync: an optional boolean flag that, if set, will force the
transaction to write all data to disk before returning.

- lockTimeout: an optional numeric value that can be used to set a
timeout for waiting on collection locks. If not specified, a default value will be used. Setting lockTimeout to 0 will make ArangoDB not time out waiting for a lock.

- params: optional arguments passed to action.

If the transaction is fully executed and committed on the server, HTTP 200 will be returned. Additionally, the return value of the code defined in action will be returned in the result attribute.

For successfully committed transactions, the returned JSON object has the following properties:

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

- code: the HTTP status code

- result: the return value of the transaction

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

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

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

- code: the HTTP status code

- errorNum: the server error number

- errorMessage: a descriptive error message

If a transaction fails to commit, either by an exception thrown in the action code, or by an internal error, the server will respond with an error. Any other errors will be returned with any of the return codes HTTP 400, HTTP 409, or HTTP 500.

", + "notes": "

The transaction description must be passed in the body of the POST request.

The following attributes must be specified inside the JSON object:

- collections: contains the list of collections to be used in the transaction (mandatory). collections must be a JSON array that can have the optional sub-attributes read and write. read and write must each be either lists of collections names or strings with a single collection name.

- action: the actual transaction operations to be executed, in the form of stringified Javascript code. The code will be executed on server side, with late binding. It is thus critical that the code specified in action properly sets up all the variables it needs. If the code specified in action ends with a return statement, the value returned will also be returned by the REST API in the result attribute if the transaction committed successfully.

The following optional attributes may also be specified in the request:

- waitForSync: an optional boolean flag that, if set, will force the transaction to write all data to disk before returning.

- lockTimeout: an optional numeric value that can be used to set a timeout for waiting on collection locks. If not specified, a default value will be used. Setting lockTimeout to 0 will make ArangoDB not time out waiting for a lock.

- params: optional arguments passed to action.

If the transaction is fully executed and committed on the server, HTTP 200 will be returned. Additionally, the return value of the code defined in action will be returned in the result attribute.

For successfully committed transactions, the returned JSON object has the following properties:

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

- code: the HTTP status code

- result: the return value of the transaction

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

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

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

- code: the HTTP status code

- errorNum: the server error number

- errorMessage: a descriptive error message

If a transaction fails to commit, either by an exception thrown in the action code, or by an internal error, the server will respond with an error. Any other errors will be returned with any of the return codes HTTP 400, HTTP 409, or HTTP 500.

", "summary": "executes a transaction", "httpMethod": "POST", "examples": "Executing a transaction on a single collection:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/transaction\n{ \"collections\": { \"write\" : \"products\" }, \"action\" : \"function () { var db = require(\\\"internal\\\").db;db.products.save({});return db.products.count(); }\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : 1, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Executing a transaction using multiple collections:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/transaction\n{ \"collections\": { \"write\" : [\"products\", \"materials\" ] }, \"action\" : \"function () { var db = require(\\\"internal\\\").db;db.products.save({});db.materials.save({});return \\\"worked!\\\"; }\" }\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : \"worked!\", \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

Aborting a transaction due to an internal error:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/transaction\n{ \"collections\": { \"write\" : \"products\" }, \"action\" : \"function () { var db = require(\\\"internal\\\").db;db.products.save({_key: \\\"abc\\\"});db.products.save({_key: \\\"abc\\\"});\n\nHTTP/1.1 400 Bad Request\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 400, \n  \"errorNum\" : 400, \n  \"errorMessage\" : \"bad parameter\" \n}\n\n

Aborting a transaction by throwing an exception:

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/transaction\n{ \"collections\": { \"read\" : \"products\" }, \"action\" : \"function () { throw \\\"doh!\\\"; }\" }\n\nHTTP/1.1 500 Internal Error\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"error\" : true, \n  \"code\" : 500, \n  \"errorNum\" : 500, \n  \"errorMessage\" : \"doh!\" \n}\n\n

", diff --git a/html/admin/api-docs/user b/html/admin/api-docs/user index 62022c40e3..5eb7bdad47 100644 --- a/html/admin/api-docs/user +++ b/html/admin/api-docs/user @@ -25,7 +25,7 @@ "description": "The username of the user. " } ], - "notes": "

Fetches data about the specified user.

The call will return a JSON document with at least the following attributes on success:

- username: The name of the user as a string.

- active: an optional flag that specifies whether the user is active.

- extra: an optional JSON object with arbitrary extra data about the
user.

", + "notes": "

Fetches data about the specified user.

The call will return a JSON document with at least the following attributes on success:

- username: The name of the user as a string.

- active: an optional flag that specifies whether the user is active.

- extra: an optional JSON object with arbitrary extra data about the user.

", "summary": "fetches a user", "httpMethod": "GET", "examples": "", @@ -56,7 +56,7 @@ "description": "" } ], - "notes": "

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

- username: The name of the user as a string. This is mandatory.

- passwd: The user password as a string. If no password is specified,
the empty string will be used.

- active: an optional flag that specifies whether the user is active.
If not specified, this will default to true.

- extra: an optional JSON object with arbitrary extra data about the
user.

If the user can be added by the server, the server will respond with HTTP 201.

In case of success, the returned JSON object has the following properties:

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

- code: the HTTP status code

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

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

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

- code: the HTTP status code

- errorNum: the server error number

- errorMessage: a descriptive error message

", + "notes": "

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

- username: The name of the user as a string. This is mandatory.

- passwd: The user password as a string. If no password is specified, the empty string will be used.

- active: an optional flag that specifies whether the user is active. If not specified, this will default to true.

- extra: an optional JSON object with arbitrary extra data about the user.

If the user can be added by the server, the server will respond with HTTP 201.

In case of success, the returned JSON object has the following properties:

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

- code: the HTTP status code

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

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

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

- code: the HTTP status code

- errorNum: the server error number

- errorMessage: a descriptive error message

", "summary": "creates user", "httpMethod": "POST", "examples": "", @@ -87,7 +87,7 @@ "description": "" } ], - "notes": "

Replaces the data of an existing user. The name of an existing user must be specified in username.

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

- passwd: The user password as a string. Specifying a password is
mandatory, but the empty string is allowed for passwords.

- active: an optional flag that specifies whether the user is active.
If not specified, this will default to true.

- extra: an optional JSON object with arbitrary extra data about the
user.

If the user can be replaced by the server, the server will respond with HTTP 200.

In case of success, the returned JSON object has the following properties:

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

- code: the HTTP status code

If the JSON representation is malformed or mandatory data is missing from the request, the server will respond with HTTP 400. If the specified user does not exist, the server will respond with HTTP 404.

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

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

- code: the HTTP status code

- errorNum: the server error number

- errorMessage: a descriptive error message

", + "notes": "

Replaces the data of an existing user. The name of an existing user must be specified in username.

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

- passwd: The user password as a string. Specifying a password is mandatory, but the empty string is allowed for passwords.

- active: an optional flag that specifies whether the user is active. If not specified, this will default to true.

- extra: an optional JSON object with arbitrary extra data about the user.

If the user can be replaced by the server, the server will respond with HTTP 200.

In case of success, the returned JSON object has the following properties:

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

- code: the HTTP status code

If the JSON representation is malformed or mandatory data is missing from the request, the server will respond with HTTP 400. If the specified user does not exist, the server will respond with HTTP 404.

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

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

- code: the HTTP status code

- errorNum: the server error number

- errorMessage: a descriptive error message

", "summary": "replaces user", "httpMethod": "PUT", "examples": "", @@ -122,7 +122,7 @@ "description": "" } ], - "notes": "

Partially updates the data of an existing user. The name of an existing user must be specified in username.

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

- passwd: The user password as a string. Specifying a password is
optional. If not specified, the previously existing value will not be modified.

- active: an optional flag that specifies whether the user is active.
If not specified, the previously existing value will not be modified.

- extra: an optional JSON object with arbitrary extra data about the
user. If not specified, the previously existing value will not be modified.

If the user can be updated by the server, the server will respond with HTTP 200.

In case of success, the returned JSON object has the following properties:

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

- code: the HTTP status code

If the JSON representation is malformed or mandatory data is missing from the request, the server will respond with HTTP 400. If the specified user does not exist, the server will respond with HTTP 404.

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

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

- code: the HTTP status code

- errorNum: the server error number

- errorMessage: a descriptive error message

", + "notes": "

Partially updates the data of an existing user. The name of an existing user must be specified in username.

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

- passwd: The user password as a string. Specifying a password is optional. If not specified, the previously existing value will not be modified.

- active: an optional flag that specifies whether the user is active. If not specified, the previously existing value will not be modified.

- extra: an optional JSON object with arbitrary extra data about the user. If not specified, the previously existing value will not be modified.

If the user can be updated by the server, the server will respond with HTTP 200.

In case of success, the returned JSON object has the following properties:

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

- code: the HTTP status code

If the JSON representation is malformed or mandatory data is missing from the request, the server will respond with HTTP 400. If the specified user does not exist, the server will respond with HTTP 404.

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

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

- code: the HTTP status code

- errorNum: the server error number

- errorMessage: a descriptive error message

", "summary": "updates user", "httpMethod": "PATCH", "examples": "", @@ -145,7 +145,7 @@ } ], "parameters": [], - "notes": "

Removes an existing user, identified by username.

If the user can be removed by the server, the server will respond with HTTP 202.

In case of success, the returned JSON object has the following properties:

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

- code: the HTTP status code

If the specified user does not exist, the server will respond with HTTP 404.

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

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

- code: the HTTP status code

- errorNum: the server error number

- errorMessage: a descriptive error message

", + "notes": "

Removes an existing user, identified by username.

If the user can be removed by the server, the server will respond with HTTP 202.

In case of success, the returned JSON object has the following properties:

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

- code: the HTTP status code

If the specified user does not exist, the server will respond with HTTP 404.

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

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

- code: the HTTP status code

- errorNum: the server error number

- errorMessage: a descriptive error message

", "summary": "removes a user", "httpMethod": "DELETE", "examples": "", diff --git a/html/admin/css/droidsans.css b/html/admin/css/droidsans.css index e94cd44168..973c9dec8e 100644 --- a/html/admin/css/droidsans.css +++ b/html/admin/css/droidsans.css @@ -2,11 +2,11 @@ font-family: 'Droid Sans'; font-style: normal; font-weight: 400; - src: local('Droid Sans'), local('DroidSans'), url(/_admin/ttf/droidsans.ttf) format('truetype'); + src: local('Droid Sans'), local('DroidSans'), url(/_admin/html/ttf/droidsans.ttf) format('truetype'); } @font-face { font-family: 'Droid Sans'; font-style: normal; font-weight: 700; - src: local('Droid Sans Bold'), local('DroidSans-Bold'), url(/_admin/ttf/droidsans-bold.ttf) format('truetype'); + src: local('Droid Sans Bold'), local('DroidSans-Bold'), url(/_admin/html/ttf/droidsans-bold.ttf) format('truetype'); } diff --git a/html/admin/js/lib/swagger-ui.js b/html/admin/js/lib/swagger-ui.js index 947c029943..ae8b67349f 100644 --- a/html/admin/js/lib/swagger-ui.js +++ b/html/admin/js/lib/swagger-ui.js @@ -633,7 +633,7 @@ function program11(depth0,data) { function program13(depth0,data) { - return "\n
\n \n \n \n
\n "; + return "\n
\n \n \n \n
\n "; } buffer += "\n