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": "
",
@@ -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:
",
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": "
",
"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:
",
"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:
",
"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:
",
"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:
",
"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.
",
+ "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.
",
"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:
",
+ "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:
",
"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.
",
"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:
",
"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:
",
"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": "
",
"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.
",
+ "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.
",
"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:
",
"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.
",
"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.
",
"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.
",
"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.
",
"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.
",
"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:
",
"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
",
"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.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:
",
"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
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.
",
"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
",
"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
",
"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.
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.
",
"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
",
"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
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
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:
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:
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
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.
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.
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.
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": "
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": "
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": "
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": "
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.
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:
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)
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)