mirror of https://gitee.com/bigwinds/arangodb
Documentation3 4/gharial documentation improvements (#6783)
* Ported the improved gharial documentation devel -> 3.4 * Added fix to swagger generator script * Added missing dots at end of sentences * MOre dots at end of sentences * Removed empty lines * Fixed missing edge_definition remove documentation * Fixed a typo
This commit is contained in:
parent
7eb577b8cc
commit
6d99916f84
|
@ -0,0 +1,67 @@
|
|||
@RESTSTRUCT{name,graph_representation,string,required,}
|
||||
The name of the graph.
|
||||
|
||||
@RESTSTRUCT{edgeDefinitions,graph_representation,array,required,graph_edge_definition}
|
||||
An array of definitions for the relations of the graph.
|
||||
Each has the following type:
|
||||
|
||||
@RESTSTRUCT{orphanCollections,graph_representation,array,required,string}
|
||||
An array of additional vertex collections.
|
||||
Documents within these collections do not have edges within this graph.
|
||||
|
||||
@RESTSTRUCT{numberOfShards,graph_representation,integer,required,}
|
||||
Number of shards created for every new collection in the graph.
|
||||
|
||||
@RESTSTRUCT{replicationFactor,graph_representation,integer,required,}
|
||||
The replication factor used for every new collection in the graph.
|
||||
|
||||
@RESTSTRUCT{_id,graph_representation,string,required,}
|
||||
The internal id value of this graph.
|
||||
|
||||
@RESTSTRUCT{_rev,graph_representation,string,required,}
|
||||
The revision of this graph. Can be used to make sure to not override
|
||||
concurrent modifications to this graph.
|
||||
|
||||
@RESTSTRUCT{replicationFactor,graph_representation,integer,required,}
|
||||
The replication factor used for every new collection in the graph.
|
||||
|
||||
@RESTSTRUCT{isSmart,graph_representation,boolean,required,}
|
||||
Flag if the graph is a SmartGraph (Enterprise only) or not.
|
||||
|
||||
@RESTSTRUCT{smartGraphAttribute,graph_representation,string,optional,}
|
||||
The name of the sharding attribute in smart graph case (Enterprise Only)
|
||||
|
||||
@RESTSTRUCT{_id,vertex_representation,string,required,}
|
||||
The _id value of the stored data.
|
||||
|
||||
@RESTSTRUCT{_key,vertex_representation,string,required,}
|
||||
The _key value of the stored data.
|
||||
|
||||
@RESTSTRUCT{_rev,vertex_representation,string,required,}
|
||||
The _rev value of the stored data.
|
||||
|
||||
@RESTSTRUCT{_id,edge_representation,string,required,}
|
||||
The _id value of the stored data.
|
||||
|
||||
@RESTSTRUCT{_key,edge_representation,string,required,}
|
||||
The _key value of the stored data.
|
||||
|
||||
@RESTSTRUCT{_rev,edge_representation,string,required,}
|
||||
The _rev value of the stored data.
|
||||
|
||||
@RESTSTRUCT{_from,edge_representation,string,required,}
|
||||
The _from value of the stored data.
|
||||
|
||||
@RESTSTRUCT{_to,edge_representation,string,required,}
|
||||
The _to value of the stored data.
|
||||
|
||||
@RESTSTRUCT{collection,graph_edge_definition,string,required,}
|
||||
Name of the edge collection, where the edge are stored in.
|
||||
|
||||
@RESTSTRUCT{from,graph_edge_definition,array,required,string}
|
||||
List of vertex collection names.
|
||||
Edges in collection can only be inserted if their _from is in any of the collections here.
|
||||
|
||||
@RESTSTRUCT{to,graph_edge_definition,array,required,string}
|
||||
List of vertex collection names.
|
||||
Edges in collection can only be inserted if their _to is in any of the collections here.
|
|
@ -8,43 +8,107 @@ The creation of a graph requires the name of the graph and a
|
|||
definition of its edges.
|
||||
[See also edge definitions](../../Manual/Graphs/GeneralGraphs/Management.html#edge-definitions).
|
||||
|
||||
@RESTQUERYPARAMETERS
|
||||
|
||||
@RESTQUERYPARAM{waitForSync,boolean,optional}
|
||||
define if the request should wait until everything is synced to disc.
|
||||
Will change the success response code.
|
||||
|
||||
@RESTBODYPARAM{name,string,required,string}
|
||||
Name of the graph.
|
||||
|
||||
@RESTBODYPARAM{edgeDefinitions,string,optional,string}
|
||||
An array of definitions for the edge
|
||||
|
||||
@RESTBODYPARAM{orphanCollections,string,optional,string}
|
||||
An array of additional vertex collections.
|
||||
@RESTBODYPARAM{edgeDefinitions,array,optional,graph_edge_definition}
|
||||
An array of definitions for the relations of the graph.
|
||||
Each has the following type:
|
||||
|
||||
@RESTBODYPARAM{isSmart,boolean,optional,boolean}
|
||||
Define if the created graph should be smart.
|
||||
This only has effect in Enterprise Edition.
|
||||
|
||||
@RESTBODYPARAM{options,object,optional,post_api_gharial_create_opts}
|
||||
a JSON object which is only useful in Enterprise Edition and with isSmart set to true.
|
||||
a JSON object to define options for creating collections within this graph.
|
||||
It can contain the following attributes:
|
||||
|
||||
@RESTSTRUCT{smartGraphAttribute,post_api_gharial_create_opts,string,required,}
|
||||
@RESTSTRUCT{smartGraphAttribute,post_api_gharial_create_opts,string,optional,}
|
||||
Only has effect in Enterprise Edition and it is required if isSmart is true.
|
||||
The attribute name that is used to smartly shard the vertices of a graph.
|
||||
Every vertex in this Graph has to have this attribute.
|
||||
Every vertex in this SmartGraph has to have this attribute.
|
||||
Cannot be modified later.
|
||||
|
||||
@RESTSTRUCT{numberOfShards,post_api_gharial_create_opts,integer,required,}
|
||||
The number of shards that is used for every collection within this graph.
|
||||
Cannot be modified later.
|
||||
|
||||
@RESTSTRUCT{replicationFactor,post_api_gharial_create_opts,integer,required,}
|
||||
The replication factor used when initially creating collections for this graph.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{201}
|
||||
Is returned if the graph could be created and waitForSync is enabled
|
||||
for the `_graphs` collection. The response body contains the
|
||||
graph configuration that has been stored.
|
||||
for the `_graphs` collection, or given in the request.
|
||||
The response body contains the graph configuration that has been stored.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{graph,object,required,graph_representation}
|
||||
The information about the newly created graph.
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Is returned if the graph could be created and waitForSync is disabled
|
||||
for the `_graphs` collection. The response body contains the
|
||||
graph configuration that has been stored.
|
||||
for the `_graphs` collection and not given in the request.
|
||||
The response body contains the graph configuration that has been stored.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{graph,object,required,graph_representation}
|
||||
The information about the newly created graph.
|
||||
|
||||
@RESTRETURNCODE{400}
|
||||
Returned if the request is in a wrong format.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{403}
|
||||
Returned if your user has insufficient rights.
|
||||
In order to create a graph you at least need to have the following privileges:
|
||||
|
||||
1. `Administrate` access on the Database.
|
||||
2. `Read Only` access on every collection used within this graph.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{409}
|
||||
Returned if there is a conflict storing the graph. This can occur
|
||||
|
@ -53,6 +117,19 @@ edge definition with a the same
|
|||
[edge collection](../../Manual/Appendix/Glossary.html#edge-collection) but a
|
||||
different signature used in any other graph.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@EXAMPLE_ARANGOSH_RUN{HttpGharialCreate}
|
||||
|
@ -94,6 +171,7 @@ different signature used in any other graph.
|
|||
}],
|
||||
isSmart: true,
|
||||
options: {
|
||||
replicationFactor: 2,
|
||||
numberOfShards: 9,
|
||||
smartGraphAttribute: "region"
|
||||
}
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
@startDocuBlock general_graph_drop_http_examples
|
||||
@brief delete an existing graph
|
||||
|
||||
@RESTHEADER{DELETE /_api/gharial/{graph-name}, Drop a graph}
|
||||
@RESTHEADER{DELETE /_api/gharial/{graph}, Drop a graph}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Removes a graph from the collection *_graphs*.
|
||||
Drops an existing graph object by name.
|
||||
Optionally all collections not used by other graphs
|
||||
can be dropped as well.
|
||||
|
||||
@RESTURLPARAMETERS
|
||||
|
||||
@RESTURLPARAM{graph-name,string,required}
|
||||
@RESTURLPARAM{graph,string,required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTQUERYPARAMETERS
|
||||
|
@ -21,15 +23,46 @@ dropped if they are not used in other graphs.
|
|||
|
||||
@RESTRETURNCODE{201}
|
||||
Is returned if the graph could be dropped and waitForSync is enabled
|
||||
for the `_graphs` collection.
|
||||
for the `_graphs` collection, or given in the request.
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the graph could be dropped and waitForSync is disabled
|
||||
for the `_graphs` collection.
|
||||
Is returned if the graph could be dropped and waitForSync is disabled
|
||||
for the `_graphs` collection and not given in the request.
|
||||
|
||||
@RESTRETURNCODE{403}
|
||||
Returned if your user has insufficient rights.
|
||||
In order to drop a graph you at least need to have the following privileges:
|
||||
1. `Administrate` access on the Database.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name could be found.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@EXAMPLE_ARANGOSH_RUN{HttpGharialDrop}
|
||||
|
|
|
@ -1,21 +1,20 @@
|
|||
|
||||
@startDocuBlock general_graph_edge_create_http_examples
|
||||
@brief Creates an edge in an existing graph
|
||||
|
||||
@RESTHEADER{POST /_api/gharial/{graph-name}/edge/{collection-name}, Create an edge}
|
||||
@RESTHEADER{POST /_api/gharial/{graph}/edge/{collection}, Create an edge}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Creates a new edge in the collection.
|
||||
Within the body the has to contain a *_from* and *_to* value referencing to valid vertices in the graph.
|
||||
Furthermore the edge has to be valid in the definition of this
|
||||
Within the body the edge has to contain a *_from* and *_to* value referencing to valid vertices in the graph.
|
||||
Furthermore the edge has to be valid in the definition of the used
|
||||
[edge collection](../../Manual/Appendix/Glossary.html#edge-collection).
|
||||
|
||||
@RESTURLPARAMETERS
|
||||
|
||||
@RESTURLPARAM{graph-name,string,required}
|
||||
@RESTURLPARAM{graph,string,required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTURLPARAM{collection-name,string,required}
|
||||
@RESTURLPARAM{collection,string,required}
|
||||
The name of the edge collection the edge belongs to.
|
||||
|
||||
@RESTQUERYPARAMETERS
|
||||
|
@ -23,23 +22,113 @@ The name of the edge collection the edge belongs to.
|
|||
@RESTQUERYPARAM{waitForSync,boolean,optional}
|
||||
Define if the request should wait until synced to disk.
|
||||
|
||||
@RESTQUERYPARAM{_from,string,required}
|
||||
@RESTQUERYPARAM{returnNew,boolean,optional}
|
||||
Define if the response should contain the complete
|
||||
new version of the document.
|
||||
|
||||
@RESTQUERYPARAM{_to,string,required}
|
||||
@RESTBODYPARAM{_from,string,required,}
|
||||
The source vertex of this edge. Has to be valid within
|
||||
the used edge definition.
|
||||
|
||||
@RESTALLBODYPARAM{storeThisJsonObject,object,required}
|
||||
The body has to be the JSON object to be stored.
|
||||
@RESTBODYPARAM{_to,string,required,}
|
||||
The target vertex of this edge. Has to be valid within
|
||||
the used edge definition.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{201}
|
||||
Returned if the edge could be created.
|
||||
Returned if the edge could be created and waitForSync is true.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{edge,object,required,edge_representation}
|
||||
The internal attributes for the edge.
|
||||
|
||||
@RESTREPLYBODY{new,object,optional,edge_representation}
|
||||
The complete newly written edge document.
|
||||
Includes all written attributes in the request body
|
||||
and all internal attributes generated by ArangoDB.
|
||||
Will only be present if returnNew is true.
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the request was successful but waitForSync is false.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{edge,object,required,edge_representation}
|
||||
The internal attributes for the edge.
|
||||
|
||||
@RESTREPLYBODY{new,object,optional,edge_representation}
|
||||
The complete newly written edge document.
|
||||
Includes all written attributes in the request body
|
||||
and all internal attributes generated by ArangoDB.
|
||||
Will only be present if returnNew is true.
|
||||
|
||||
@RESTRETURNCODE{400}
|
||||
Returned if the input document is invalid.
|
||||
This can for instance be the case if `_from` or `_to` is mising.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{403}
|
||||
Returned if your user has insufficient rights.
|
||||
In order to insert edges into the graph you at least need to have the following privileges:
|
||||
|
||||
1. `Read Only` access on the Database.
|
||||
2. `Write` access on the given collection.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name, no edge collection or no edge with this id could be found.
|
||||
Returned in any of the following cases:
|
||||
* no graph with this name could be found.
|
||||
* this edge collection is not part of the graph.
|
||||
* either `_from` or `_to` vertex does not exist.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
|
@ -64,4 +153,3 @@ Returned if no graph with this name, no edge collection or no edge with this id
|
|||
examples.dropGraph("social");
|
||||
@END_EXAMPLE_ARANGOSH_RUN
|
||||
@endDocuBlock
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@startDocuBlock general_graph_edge_definition_add_http_examples
|
||||
@brief Add a new edge definition to the graph
|
||||
|
||||
@RESTHEADER{POST /_api/gharial/{graph-name}/edge, Add edge definition}
|
||||
@RESTHEADER{POST /_api/gharial/{graph}/edge, Add edge definition}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Adds an additional edge definition to the graph.
|
||||
|
@ -15,7 +15,7 @@ from "v2" to "v1" in the other graph.
|
|||
|
||||
@RESTURLPARAMETERS
|
||||
|
||||
@RESTURLPARAM{graph-name,string,required}
|
||||
@RESTURLPARAM{graph,string,required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTBODYPARAM{collection,string,required,string}
|
||||
|
@ -32,18 +32,86 @@ One or many vertex collections that can contain target vertices.
|
|||
@RESTRETURNCODE{201}
|
||||
Returned if the definition could be added successfully and
|
||||
waitForSync is enabled for the `_graphs` collection.
|
||||
The response body contains the graph configuration that has been stored.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{graph,object,required,graph_representation}
|
||||
The information about the modified graph.
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the definition could be added successfully and
|
||||
waitForSync is disabled for the `_graphs` collection.
|
||||
The response body contains the graph configuration that has been stored.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{graph,object,required,graph_representation}
|
||||
The information about the modified graph.
|
||||
|
||||
@RESTRETURNCODE{400}
|
||||
Returned if the defininition could not be added, the edge collection
|
||||
is used in an other graph with a different signature.
|
||||
Returned if the definition could not be added.
|
||||
This could be because it is ill-formed, or
|
||||
if the definition is used in an other graph with a different signature.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{403}
|
||||
Returned if your user has insufficient rights.
|
||||
In order to modify a graph you at least need to have the following privileges:
|
||||
|
||||
1. `Administrate` access on the Database.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name could be found.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@EXAMPLE_ARANGOSH_RUN{HttpGharialAddEdgeCol}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@startDocuBlock general_graph_edge_definition_modify_http_examples
|
||||
@brief Replace an existing edge definition
|
||||
|
||||
@RESTHEADER{PUT /_api/gharial/{graph-name}/edge/{definition-name}, Replace an edge definition}
|
||||
@RESTHEADER{PUT /_api/gharial/{graph}/edge/{definition}, Replace an edge definition}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Change one specific edge definition.
|
||||
|
@ -9,12 +9,21 @@ This will modify all occurrences of this definition in all graphs known to your
|
|||
|
||||
@RESTURLPARAMETERS
|
||||
|
||||
@RESTURLPARAM{graph-name,string,required}
|
||||
@RESTURLPARAM{graph,string,required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTURLPARAM{definition-name,string,required}
|
||||
@RESTURLPARAM{definition,string,required}
|
||||
The name of the edge collection used in the definition.
|
||||
|
||||
@RESTQUERYPARAMETERS
|
||||
|
||||
@RESTQUERYPARAM{waitForSync,boolean,optional}
|
||||
Define if the request should wait until synced to disk.
|
||||
|
||||
@RESTQUERYPARAM{dropCollections,boolean,optional}
|
||||
Drop the collection as well.
|
||||
Collection will only be dropped if it is not used in other graphs.
|
||||
|
||||
@RESTBODYPARAM{collection,string,required,string}
|
||||
The name of the edge collection to be used.
|
||||
|
||||
|
@ -29,15 +38,80 @@ One or many vertex collections that can contain target vertices.
|
|||
@RESTRETURNCODE{201}
|
||||
Returned if the request was successful and waitForSync is true.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{graph,object,required,graph_representation}
|
||||
The information about the modified graph.
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the request was successful but waitForSync is false.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{graph,object,required,graph_representation}
|
||||
The information about the modified graph.
|
||||
|
||||
@RESTRETURNCODE{400}
|
||||
Returned if no edge definition with this name is found in the graph.
|
||||
Returned if no edge definition with this name is found in the graph,
|
||||
or of the new definition is ill-formed and cannot be used.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{403}
|
||||
Returned if your user has insufficient rights.
|
||||
In order to drop a vertex you at least need to have the following privileges:
|
||||
1. `Administrate` access on the Database.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name could be found.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@EXAMPLE_ARANGOSH_RUN{HttpGharialReplaceEdgeCol}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@startDocuBlock general_graph_edge_definition_remove_http_examples
|
||||
@brief Remove an edge definition form the graph
|
||||
|
||||
@RESTHEADER{DELETE /_api/gharial/{graph-name}/edge/{definition-name}, Remove an edge definition from the graph}
|
||||
@RESTHEADER{DELETE /_api/gharial/{graph}/edge/{definition}, Remove an edge definition from the graph}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Remove one edge definition from the graph. This will only remove the
|
||||
|
@ -10,14 +10,17 @@ be used in your queries.
|
|||
|
||||
@RESTURLPARAMETERS
|
||||
|
||||
@RESTURLPARAM{graph-name,string,required}
|
||||
@RESTURLPARAM{graph,string,required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTURLPARAM{definition-name,string,required}
|
||||
@RESTURLPARAM{definition,string,required}
|
||||
The name of the edge collection used in the definition.
|
||||
|
||||
@RESTQUERYPARAMETERS
|
||||
|
||||
@RESTQUERYPARAM{waitForSync,boolean,optional}
|
||||
Define if the request should wait until synced to disk.
|
||||
|
||||
@RESTQUERYPARAM{dropCollections,boolean,optional}
|
||||
Drop the collection as well.
|
||||
Collection will only be dropped if it is not used in other graphs.
|
||||
|
@ -28,15 +31,64 @@ Collection will only be dropped if it is not used in other graphs.
|
|||
Returned if the edge definition could be removed from the graph
|
||||
and waitForSync is true.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{graph,object,required,graph_representation}
|
||||
The information about the modified graph.
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the edge definition could be removed from the graph and
|
||||
waitForSync is false.
|
||||
|
||||
@RESTRETURNCODE{400}
|
||||
Returned if no edge definition with this name is found in the graph.
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{graph,object,required,graph_representation}
|
||||
The information about the modified graph.
|
||||
|
||||
@RESTRETURNCODE{403}
|
||||
Returned if your user has insufficient rights.
|
||||
In order to drop a vertex you at least need to have the following privileges:
|
||||
1. `Administrate` access on the Database.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name could be found.
|
||||
Returned if no graph with this name could be found,
|
||||
or if no edge definition with this name is found in the graph.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
|
||||
@startDocuBlock general_graph_edge_delete_http_examples
|
||||
@brief removes an edge from graph
|
||||
|
||||
@RESTHEADER{DELETE /_api/gharial/{graph-name}/edge/{collection-name}/{edge-key}, Remove an edge}
|
||||
@RESTHEADER{DELETE /_api/gharial/{graph}/edge/{collection}/{edge}, Remove an edge}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Removes an edge from the collection.
|
||||
|
||||
@RESTURLPARAMETERS
|
||||
|
||||
@RESTURLPARAM{graph-name,string,required}
|
||||
@RESTURLPARAM{graph,string,required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTURLPARAM{collection-name,string,required}
|
||||
@RESTURLPARAM{collection,string,required}
|
||||
The name of the edge collection the edge belongs to.
|
||||
|
||||
@RESTURLPARAM{edge-key,string,required}
|
||||
The *_key* attribute of the vertex.
|
||||
@RESTURLPARAM{edge,string,required}
|
||||
The *_key* attribute of the edge.
|
||||
|
||||
@RESTQUERYPARAMETERS
|
||||
|
||||
|
@ -39,14 +38,93 @@ you can supply the Etag in an attribute rev in the URL.
|
|||
@RESTRETURNCODE{200}
|
||||
Returned if the edge could be removed.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{removed,boolean,required,}
|
||||
Is set to true if the remove was successful.
|
||||
|
||||
@RESTREPLYBODY{old,object,optional,edge_representation}
|
||||
The complete deleted edge document.
|
||||
Includes all attributes stored before this operation.
|
||||
Will only be present if returnOld is true.
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the request was successful but waitForSync is false.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{removed,boolean,required,}
|
||||
Is set to true if the remove was successful.
|
||||
|
||||
@RESTREPLYBODY{old,object,optional,edge_representation}
|
||||
The complete deleted edge document.
|
||||
Includes all attributes stored before this operation.
|
||||
Will only be present if returnOld is true.
|
||||
|
||||
@RESTRETURNCODE{403}
|
||||
Returned if your user has insufficient rights.
|
||||
In order to delete vertices in the graph you at least need to have the following privileges:
|
||||
|
||||
1. `Read Only` access on the Database.
|
||||
2. `Write` access on the given collection.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name, no edge collection or no edge with this id could be found.
|
||||
Returned in the following cases:
|
||||
* No graph with this name could be found.
|
||||
* This collection is not part of the graph.
|
||||
* The edge to remove does not exist.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{412}
|
||||
Returned if if-match header is given, but the documents revision is different.
|
||||
Returned if if-match header is given, but the stored documents revision is different.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
|
@ -64,4 +142,3 @@ Returned if if-match header is given, but the documents revision is different.
|
|||
examples.dropGraph("social");
|
||||
@END_EXAMPLE_ARANGOSH_RUN
|
||||
@endDocuBlock
|
||||
|
||||
|
|
|
@ -1,22 +1,29 @@
|
|||
|
||||
@startDocuBlock general_graph_edge_get_http_examples
|
||||
@brief fetch an edge
|
||||
|
||||
@RESTHEADER{GET /_api/gharial/{graph-name}/edge/{collection-name}/{edge-key}, Get an edge}
|
||||
@RESTHEADER{GET /_api/gharial/{graph}/edge/{collection}/{edge}, Get an edge}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Gets an edge from the given collection.
|
||||
|
||||
@RESTURLPARAMETERS
|
||||
|
||||
@RESTURLPARAM{graph-name,string,required}
|
||||
@RESTURLPARAM{graph,string,required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTURLPARAM{collection-name,string,required}
|
||||
@RESTURLPARAM{collection,string,required}
|
||||
The name of the edge collection the edge belongs to.
|
||||
|
||||
@RESTURLPARAM{edge-key,string,required}
|
||||
The *_key* attribute of the vertex.
|
||||
@RESTURLPARAM{edge,string,required}
|
||||
The *_key* attribute of the edge.
|
||||
|
||||
@RESTQUERYPARAMETERS
|
||||
|
||||
@RESTQUERYPARAM{rev,string,optional}
|
||||
Must contain a revision.
|
||||
If this is set a document is only returned if
|
||||
it has exactly this revision.
|
||||
Also see if-match header as an alternative to this.
|
||||
|
||||
@RESTHEADERPARAMETERS
|
||||
|
||||
|
@ -25,16 +32,98 @@ If the "If-Match" header is given, then it must contain exactly one Etag. The do
|
|||
if it has the same revision as the given Etag. Otherwise a HTTP 412 is returned. As an alternative
|
||||
you can supply the Etag in an attribute rev in the URL.
|
||||
|
||||
@RESTHEADERPARAM{if-none-match,string,optional}
|
||||
If the "If-None-Match" header is given, then it must contain exactly one Etag. The document is returned,
|
||||
only if it has a different revision as the given Etag. Otherwise a HTTP 304 is returned.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Returned if the edge could be found.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{edge,object,required,edge_representation}
|
||||
The complete edge.
|
||||
|
||||
@RESTRETURNCODE{304}
|
||||
Returned if the if-none-match header is given and the
|
||||
currently stored edge still has this revision value.
|
||||
So there was no update between the last time the edge
|
||||
was fetched by the caller.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{403}
|
||||
Returned if your user has insufficient rights.
|
||||
In order to update vertices in the graph you at least need to have the following privileges:
|
||||
|
||||
1. `Read Only` access on the Database.
|
||||
2. `Read Only` access on the given collection.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name, no edge collection or no edge with this id could be found.
|
||||
Returned in the following cases:
|
||||
* No graph with this name could be found.
|
||||
* This collection is not part of the graph.
|
||||
* The edge does not exist.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{412}
|
||||
Returned if if-match header is given, but the documents revision is different.
|
||||
Returned if if-match header is given, but the stored documents revision is different.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
|
|
|
@ -1,21 +1,20 @@
|
|||
|
||||
@startDocuBlock general_graph_edge_modify_http_examples
|
||||
@brief modify an existing edge
|
||||
|
||||
@RESTHEADER{PATCH /_api/gharial/{graph-name}/edge/{collection-name}/{edge-key}, Modify an edge}
|
||||
@RESTHEADER{PATCH /_api/gharial/{graph}/edge/{collection}/{edge}, Modify an edge}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Updates the data of the specific edge in the collection.
|
||||
|
||||
@RESTURLPARAMETERS
|
||||
|
||||
@RESTURLPARAM{graph-name,string,required}
|
||||
@RESTURLPARAM{graph,string,required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTURLPARAM{collection-name,string,required}
|
||||
@RESTURLPARAM{collection,string,required}
|
||||
The name of the edge collection the edge belongs to.
|
||||
|
||||
@RESTURLPARAM{edge-key,string,required}
|
||||
@RESTURLPARAM{edge,string,required}
|
||||
The *_key* attribute of the vertex.
|
||||
|
||||
@RESTQUERYPARAMETERS
|
||||
|
@ -24,31 +23,134 @@ The *_key* attribute of the vertex.
|
|||
Define if the request should wait until synced to disk.
|
||||
|
||||
@RESTQUERYPARAM{keepNull,boolean,optional}
|
||||
Define if values set to null should be stored. By default the key is not removed from the document.
|
||||
Define if values set to null should be stored.
|
||||
By default (true) the given documents attribute(s) will be set to null.
|
||||
If this parameter is false the attribute(s) will instead be deleted from the
|
||||
document.
|
||||
|
||||
@RESTQUERYPARAM{returnOld,boolean,optional}
|
||||
Define if a presentation of the deleted document should
|
||||
be returned within the response object.
|
||||
|
||||
@RESTQUERYPARAM{returnNew,boolean,optional}
|
||||
Define if a presentation of the newly create
|
||||
Define if a presentation of the new document should
|
||||
be returned within the response object.
|
||||
|
||||
@RESTQUERYPARAM{keepNull,boolean,optional}
|
||||
Define if values set to null should be stored. By default the key is not removed from the document.
|
||||
@RESTHEADERPARAMETERS
|
||||
|
||||
@RESTALLBODYPARAM{updateAttributes,object,required}
|
||||
The body has to be a JSON object containing the attributes to be updated.
|
||||
@RESTHEADERPARAM{if-match,string,optional}
|
||||
If the "If-Match" header is given, then it must contain exactly one Etag. The document is updated,
|
||||
if it has the same revision as the given Etag. Otherwise a HTTP 412 is returned. As an alternative
|
||||
you can supply the Etag in an attribute rev in the URL.
|
||||
|
||||
@RESTALLBODYPARAM{edge,object,required}
|
||||
The body has to contain a JSON object containing exactly the attributes that should be overwritten, all other attributes remain unchanged.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Returned if the edge could be updated.
|
||||
Returned if the edge could be updated, and waitForSync is false.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{edge,object,required,edge_representation}
|
||||
The internal attributes for the edge.
|
||||
|
||||
@RESTREPLYBODY{new,object,optional,edge_representation}
|
||||
The complete newly written edge document.
|
||||
Includes all written attributes in the request body
|
||||
and all internal attributes generated by ArangoDB.
|
||||
Will only be present if returnNew is true.
|
||||
|
||||
@RESTREPLYBODY{old,object,optional,edge_representation}
|
||||
The complete overwritten edge document.
|
||||
Includes all attributes stored before this operation.
|
||||
Will only be present if returnOld is true.
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the request was successful but waitForSync is false.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{edge,object,required,edge_representation}
|
||||
The internal attributes for the edge.
|
||||
|
||||
@RESTREPLYBODY{new,object,optional,edge_representation}
|
||||
The complete newly written edge document.
|
||||
Includes all written attributes in the request body
|
||||
and all internal attributes generated by ArangoDB.
|
||||
Will only be present if returnNew is true.
|
||||
|
||||
@RESTREPLYBODY{old,object,optional,edge_representation}
|
||||
The complete overwritten edge document.
|
||||
Includes all attributes stored before this operation.
|
||||
Will only be present if returnOld is true.
|
||||
|
||||
@RESTRETURNCODE{403}
|
||||
Returned if your user has insufficient rights.
|
||||
In order to update edges in the graph you at least need to have the following privileges:
|
||||
|
||||
1. `Read Only` access on the Database.
|
||||
2. `Write` access on the given collection.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name, no edge collection or no edge with this id could be found.
|
||||
Returned in the following cases:
|
||||
* No graph with this name could be found.
|
||||
* This collection is not part of the graph.
|
||||
* The edge to update does not exist.
|
||||
* either `_from` or `_to` vertex does not exist (if updated).
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{412}
|
||||
Returned if if-match header is given, but the stored documents revision is different.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
|
@ -68,4 +170,3 @@ Returned if no graph with this name, no edge collection or no edge with this id
|
|||
examples.dropGraph("social");
|
||||
@END_EXAMPLE_ARANGOSH_RUN
|
||||
@endDocuBlock
|
||||
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
@startDocuBlock general_graph_edge_replace_http_examples
|
||||
@brief replace the content of an existing edge
|
||||
|
||||
@RESTHEADER{PUT /_api/gharial/{graph-name}/edge/{collection-name}/{edge-key}, Replace an edge}
|
||||
@RESTHEADER{PUT /_api/gharial/{graph}/edge/{collection}/{edge}, Replace an edge}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Replaces the data of an edge in the collection.
|
||||
|
||||
@RESTURLPARAMETERS
|
||||
|
||||
@RESTURLPARAM{graph-name,string,required}
|
||||
@RESTURLPARAM{graph,string,required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTURLPARAM{collection-name,string,required}
|
||||
@RESTURLPARAM{collection,string,required}
|
||||
The name of the edge collection the edge belongs to.
|
||||
|
||||
@RESTURLPARAM{edge-key,string,required}
|
||||
@RESTURLPARAM{edge,string,required}
|
||||
The *_key* attribute of the vertex.
|
||||
|
||||
@RESTQUERYPARAMETERS
|
||||
|
@ -30,7 +30,8 @@ Define if a presentation of the deleted document should
|
|||
be returned within the response object.
|
||||
|
||||
@RESTQUERYPARAM{returnNew,boolean,optional}
|
||||
Define if a presentation of the newly create
|
||||
Define if a presentation of the new document should
|
||||
be returned within the response object.
|
||||
|
||||
@RESTHEADERPARAMETERS
|
||||
|
||||
|
@ -39,22 +40,120 @@ If the "If-Match" header is given, then it must contain exactly one Etag. The do
|
|||
if it has the same revision as the given Etag. Otherwise a HTTP 412 is returned. As an alternative
|
||||
you can supply the Etag in an attribute rev in the URL.
|
||||
|
||||
@RESTALLBODYPARAM{storeThisJsonObject,object,required}
|
||||
The body has to be the JSON object to be stored.
|
||||
@RESTBODYPARAM{_from,string,required,}
|
||||
The source vertex of this edge. Has to be valid within
|
||||
the used edge definition.
|
||||
|
||||
@RESTBODYPARAM{_to,string,required,}
|
||||
The target vertex of this edge. Has to be valid within
|
||||
the used edge definition.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{201}
|
||||
Returned if the request was successful but waitForSync is true.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{edge,object,required,edge_representation}
|
||||
The internal attributes for the edge
|
||||
|
||||
@RESTREPLYBODY{new,object,optional,edge_representation}
|
||||
The complete newly written edge document.
|
||||
Includes all written attributes in the request body
|
||||
and all internal attributes generated by ArangoDB.
|
||||
Will only be present if returnNew is true.
|
||||
|
||||
@RESTREPLYBODY{old,object,optional,edge_representation}
|
||||
The complete overwritten edge document.
|
||||
Includes all attributes stored before this operation.
|
||||
Will only be present if returnOld is true.
|
||||
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the request was successful but waitForSync is false.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{edge,object,required,edge_representation}
|
||||
The internal attributes for the edge
|
||||
|
||||
@RESTREPLYBODY{new,object,optional,edge_representation}
|
||||
The complete newly written edge document.
|
||||
Includes all written attributes in the request body
|
||||
and all internal attributes generated by ArangoDB.
|
||||
Will only be present if returnNew is true.
|
||||
|
||||
@RESTREPLYBODY{old,object,optional,edge_representation}
|
||||
The complete overwritten edge document.
|
||||
Includes all attributes stored before this operation.
|
||||
Will only be present if returnOld is true.
|
||||
|
||||
@RESTRETURNCODE{403}
|
||||
Returned if your user has insufficient rights.
|
||||
In order to replace edges in the graph you at least need to have the following privileges:
|
||||
|
||||
1. `Read Only` access on the Database.
|
||||
2. `Write` access on the given collection.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name, no edge collection or no edge with this id could be found.
|
||||
Returned in the following cases:
|
||||
* No graph with this name could be found.
|
||||
* This collection is not part of the graph.
|
||||
* The edge to replace does not exist.
|
||||
* either `_from` or `_to` vertex does not exist.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{412}
|
||||
Returned if if-match header is given, but the documents revision is different.
|
||||
Returned if if-match header is given, but the stored documents revision is different.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
|
|
|
@ -2,25 +2,50 @@
|
|||
@startDocuBlock general_graph_get_http_examples
|
||||
@brief Get a graph from the graph module.
|
||||
|
||||
@RESTHEADER{GET /_api/gharial/{graph-name}, Get a graph}
|
||||
@RESTHEADER{GET /_api/gharial/{graph}, Get a graph}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Gets a graph from the collection *_graphs*.
|
||||
Returns the definition content of this graph.
|
||||
Selects information for a given graph.
|
||||
Will return the edge definitions as well as the orphan collections.
|
||||
Or returns a 404 if the graph does not exist.
|
||||
|
||||
@RESTURLPARAMETERS
|
||||
|
||||
@RESTURLPARAM{graph-name,string,required}
|
||||
@RESTURLPARAM{graph,string,required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Returned if the graph could be found.
|
||||
Returns the graph if it could be found.
|
||||
The result will have the following format:
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{graph,object,required,graph_representation}
|
||||
The information about the newly created graph
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name could be found.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@EXAMPLE_ARANGOSH_RUN{HttpGharialGetGraph}
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
@startDocuBlock general_graph_list_edge_http_examples
|
||||
@brief Lists all edge definitions
|
||||
|
||||
@RESTHEADER{GET /_api/gharial/{graph-name}/edge, List edge definitions}
|
||||
@RESTHEADER{GET /_api/gharial/{graph}/edge, List edge definitions}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Lists all edge collections within this graph.
|
||||
|
||||
@RESTURLPARAMETERS
|
||||
|
||||
@RESTURLPARAM{graph-name,string,required}
|
||||
@RESTURLPARAM{graph,string,required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
@ -17,9 +17,33 @@ The name of the graph.
|
|||
@RESTRETURNCODE{200}
|
||||
Is returned if the edge definitions could be listed.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{collections,array,required,string}
|
||||
The list of all vertex collections within this graph.
|
||||
Includes collections in edgeDefinitions as well as orphans.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name could be found.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@EXAMPLE_ARANGOSH_RUN{HttpGharialListEdge}
|
||||
|
|
|
@ -5,13 +5,58 @@
|
|||
@RESTHEADER{GET /_api/gharial, List all graphs}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Lists all graph names stored in this database.
|
||||
Lists all graphs stored in this database.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Is returned if the module is available and the graphs could be listed.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{graphs,array,required,graph_list}
|
||||
|
||||
@RESTSTRUCT{graph,graph_list,object,optional,graph_representation}
|
||||
The information about the newly created graph
|
||||
|
||||
@RESTSTRUCT{name,graph_representation,string,required,}
|
||||
The name of the graph
|
||||
|
||||
@RESTSTRUCT{edgeDefinitions,graph_representation,array,required,graph_edge_definition}
|
||||
An array of definitions for the relations of the graph.
|
||||
Each has the following type:
|
||||
|
||||
@RESTSTRUCT{orphanCollections,graph_representation,array,required,string}
|
||||
An array of additional vertex collections.
|
||||
Documents within these collections do not have edges within this graph.
|
||||
|
||||
@RESTSTRUCT{numberOfShards,graph_representation,integer,required,}
|
||||
Number of shards created for every new collection in the graph.
|
||||
|
||||
@RESTSTRUCT{replicationFactor,graph_representation,integer,required,}
|
||||
The replication factor used for every new collection in the graph.
|
||||
|
||||
@RESTSTRUCT{_id,graph_representation,string,required,}
|
||||
The internal id value of this graph.
|
||||
|
||||
@RESTSTRUCT{_rev,graph_representation,string,required,}
|
||||
The revision of this graph. Can be used to make sure to not override
|
||||
concurrent modifications to this graph.
|
||||
|
||||
@RESTSTRUCT{replicationFactor,graph_representation,integer,required,}
|
||||
The replication factor used for every new collection in the graph.
|
||||
|
||||
@RESTSTRUCT{isSmart,graph_representation,boolean,required,}
|
||||
Flag if the graph is a SmartGraph (Enterprise only) or not.
|
||||
|
||||
@RESTSTRUCT{smartGraphAttribute,graph_representation,string,optional,}
|
||||
The name of the sharding attribute in smart graph case (Enterprise Only)
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@EXAMPLE_ARANGOSH_RUN{HttpGharialList}
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
|
||||
@startDocuBlock general_graph_list_vertex_http_examples
|
||||
@brief Lists all vertex collections used in this graph.
|
||||
|
||||
@RESTHEADER{GET /_api/gharial/{graph-name}/vertex, List vertex collections}
|
||||
@RESTHEADER{GET /_api/gharial/{graph}/vertex, List vertex collections}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Lists all vertex collections within this graph.
|
||||
|
||||
@RESTURLPARAMETERS
|
||||
|
||||
@RESTURLPARAM{graph-name,string,required}
|
||||
@RESTURLPARAM{graph,string,required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
@ -17,9 +16,33 @@ The name of the graph.
|
|||
@RESTRETURNCODE{200}
|
||||
Is returned if the collections could be listed.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{collections,array,required,string}
|
||||
The list of all vertex collections within this graph.
|
||||
Includes collections in edgeDefinitions as well as orphans.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name could be found.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@EXAMPLE_ARANGOSH_RUN{HttpGharialListVertex}
|
||||
|
@ -35,4 +58,3 @@ Returned if no graph with this name could be found.
|
|||
~ examples.dropGraph("social");
|
||||
@END_EXAMPLE_ARANGOSH_RUN
|
||||
@endDocuBlock
|
||||
|
||||
|
|
|
@ -1,30 +1,101 @@
|
|||
@startDocuBlock general_graph_vertex_collection_add_http_examples
|
||||
@brief Add an additional vertex collection to the graph.
|
||||
|
||||
@RESTHEADER{POST /_api/gharial/{graph-name}/vertex, Add vertex collection}
|
||||
@RESTHEADER{POST /_api/gharial/{graph}/vertex, Add vertex collection}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Adds a vertex collection to the set of collections of the graph. If
|
||||
the collection does not exist, it will be created.
|
||||
Adds a vertex collection to the set of orphan collections of the graph.
|
||||
If the collection does not exist, it will be created.
|
||||
|
||||
@RESTURLPARAMETERS
|
||||
|
||||
@RESTURLPARAM{graph-name,string,required}
|
||||
@RESTURLPARAM{graph,string,required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{201}
|
||||
Returned if the edge collection could be added successfully and
|
||||
waitForSync is true.
|
||||
Is returned if the collection could be created and waitForSync is enabled
|
||||
for the `_graphs` collection, or given in the request.
|
||||
The response body contains the graph configuration that has been stored.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{graph,object,required,graph_representation}
|
||||
The information about the modified graph.
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the edge collection could be added successfully and
|
||||
waitForSync is false.
|
||||
Is returned if the collection could be created and waitForSync is disabled
|
||||
for the `_graphs` collection, or given in the request.
|
||||
The response body contains the graph configuration that has been stored.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{graph,object,required,graph_representation}
|
||||
The information about the newly created graph
|
||||
|
||||
@RESTRETURNCODE{400}
|
||||
Returned if the request is in an invalid format.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{403}
|
||||
Returned if your user has insufficient rights.
|
||||
In order to modify a graph you at least need to have the following privileges:
|
||||
|
||||
1. `Administrate` access on the Database.
|
||||
2. `Read Only` access on every collection used within this graph.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name could be found.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@EXAMPLE_ARANGOSH_RUN{HttpGharialAddVertexCol}
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
@startDocuBlock general_graph_vertex_collection_remove_http_examples
|
||||
@brief Remove a vertex collection form the graph.
|
||||
|
||||
@RESTHEADER{DELETE /_api/gharial/{graph-name}/vertex/{collection-name}, Remove vertex collection}
|
||||
@RESTHEADER{DELETE /_api/gharial/{graph}/vertex/{collection}, Remove vertex collection}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Removes a vertex collection from the graph and optionally deletes the collection,
|
||||
if it is not used in any other graph.
|
||||
It can only remove vertex collections that are no longer part of edge definitions,
|
||||
if they are used in edge definitions you are required to modify those first.
|
||||
|
||||
@RESTURLPARAMETERS
|
||||
|
||||
@RESTURLPARAM{graph-name,string,required}
|
||||
@RESTURLPARAM{graph,string,required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTURLPARAM{collection-name,string,required}
|
||||
@RESTURLPARAM{collection,string,required}
|
||||
The name of the vertex collection.
|
||||
|
||||
@RESTQUERYPARAMETERS
|
||||
|
@ -23,21 +25,85 @@ Collection will only be dropped if it is not used in other graphs.
|
|||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{201}
|
||||
@RESTRETURNCODE{200}
|
||||
Returned if the vertex collection was removed from the graph successfully
|
||||
and waitForSync is true.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{graph,object,required,graph_representation}
|
||||
The information about the newly created graph
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the request was successful but waitForSync is false.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{graph,object,required,graph_representation}
|
||||
The information about the newly created graph
|
||||
|
||||
@RESTRETURNCODE{400}
|
||||
Returned if the vertex collection is still used in an edge definition.
|
||||
In this case it cannot be removed from the graph yet, it has to be
|
||||
removed from the edge definition first.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{403}
|
||||
Returned if your user has insufficient rights.
|
||||
In order to drop a vertex you at least need to have the following privileges:
|
||||
1. `Administrate` access on the Database.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name could be found.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
You can remove vertex collections that are not used in any edge collection:
|
||||
|
|
|
@ -1,26 +1,29 @@
|
|||
|
||||
@startDocuBlock general_graph_vertex_create_http_examples
|
||||
@brief create a new vertex
|
||||
|
||||
@RESTHEADER{POST /_api/gharial/{graph-name}/vertex/{collection-name}, Create a vertex}
|
||||
@RESTHEADER{POST /_api/gharial/{graph}/vertex/{collection}, Create a vertex}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Adds a vertex to the given collection.
|
||||
|
||||
@RESTURLPARAMETERS
|
||||
|
||||
@RESTURLPARAM{graph-name,string,required}
|
||||
@RESTURLPARAM{graph,string,required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTURLPARAM{collection-name,string,required}
|
||||
The name of the vertex collection the vertex belongs to.
|
||||
@RESTURLPARAM{collection,string,required}
|
||||
The name of the vertex collection the vertex should be inserted into.
|
||||
|
||||
@RESTQUERYPARAMETERS
|
||||
|
||||
@RESTQUERYPARAM{waitForSync,boolean,optional}
|
||||
Define if the request should wait until synced to disk.
|
||||
|
||||
@RESTALLBODYPARAM{storeThisObject,object,required}
|
||||
@RESTQUERYPARAM{returnNew,boolean,optional}
|
||||
Define if the response should contain the complete
|
||||
new version of the document.
|
||||
|
||||
@RESTALLBODYPARAM{vertex,object,required}
|
||||
The body has to be the JSON object to be stored.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
@ -28,11 +31,78 @@ The body has to be the JSON object to be stored.
|
|||
@RESTRETURNCODE{201}
|
||||
Returned if the vertex could be added and waitForSync is true.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{vertex,object,required,vertex_representation}
|
||||
The internal attributes for the vertex.
|
||||
|
||||
@RESTREPLYBODY{new,object,optional,vertex_representation}
|
||||
The complete newly written vertex document.
|
||||
Includes all written attributes in the request body
|
||||
and all internal attributes generated by ArangoDB.
|
||||
Will only be present if returnNew is true.
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the request was successful but waitForSync is false.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{vertex,object,required,vertex_representation}
|
||||
The internal attributes generated while storing the vertex.
|
||||
Does not include any attribute given in request body.
|
||||
|
||||
@RESTREPLYBODY{new,object,optional,vertex_representation}
|
||||
The complete newly written vertex document.
|
||||
Includes all written attributes in the request body
|
||||
and all internal attributes generated by ArangoDB.
|
||||
Will only be present if returnNew is true.
|
||||
|
||||
@RESTRETURNCODE{403}
|
||||
Returned if your user has insufficient rights.
|
||||
In order to insert vertices into the graph you at least need to have the following privileges:
|
||||
|
||||
1. `Read Only` access on the Database.
|
||||
2. `Write` access on the given collection.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph or no vertex collection with this name could be found.
|
||||
Returned if no graph with this name could be found.
|
||||
Or if a graph is found but this collection is not part of the graph.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
|
|
|
@ -1,21 +1,20 @@
|
|||
|
||||
@startDocuBlock general_graph_vertex_delete_http_examples
|
||||
@brief removes a vertex from a graph
|
||||
|
||||
@RESTHEADER{DELETE /_api/gharial/{graph-name}/vertex/{collection-name}/{vertex-key}, Remove a vertex}
|
||||
@RESTHEADER{DELETE /_api/gharial/{graph}/vertex/{collection}/{vertex}, Remove a vertex}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Removes a vertex from the collection.
|
||||
|
||||
@RESTURLPARAMETERS
|
||||
|
||||
@RESTURLPARAM{graph-name,string,required}
|
||||
@RESTURLPARAM{graph,string,required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTURLPARAM{collection-name,string,required}
|
||||
@RESTURLPARAM{collection,string,required}
|
||||
The name of the vertex collection the vertex belongs to.
|
||||
|
||||
@RESTURLPARAM{vertex-key,string,required}
|
||||
@RESTURLPARAM{vertex,string,required}
|
||||
The *_key* attribute of the vertex.
|
||||
|
||||
@RESTQUERYPARAMETERS
|
||||
|
@ -27,10 +26,6 @@ Define if the request should wait until synced to disk.
|
|||
Define if a presentation of the deleted document should
|
||||
be returned within the response object.
|
||||
|
||||
@RESTQUERYPARAM{returnNew,boolean,optional}
|
||||
Define if a presentation of the newly created document
|
||||
should be returned within the response object.
|
||||
|
||||
@RESTHEADERPARAMETERS
|
||||
|
||||
@RESTHEADERPARAM{if-match,string,optional}
|
||||
|
@ -43,14 +38,93 @@ you can supply the Etag in an attribute rev in the URL.
|
|||
@RESTRETURNCODE{200}
|
||||
Returned if the vertex could be removed.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{removed,boolean,required,}
|
||||
Is set to true if the remove was successful.
|
||||
|
||||
@RESTREPLYBODY{old,object,optional,vertex_representation}
|
||||
The complete deleted vertex document.
|
||||
Includes all attributes stored before this operation.
|
||||
Will only be present if returnOld is true.
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the request was successful but waitForSync is false.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{removed,boolean,required,}
|
||||
Is set to true if the remove was successful.
|
||||
|
||||
@RESTREPLYBODY{old,object,optional,vertex_representation}
|
||||
The complete deleted vertex document.
|
||||
Includes all attributes stored before this operation.
|
||||
Will only be present if returnOld is true.
|
||||
|
||||
@RESTRETURNCODE{403}
|
||||
Returned if your user has insufficient rights.
|
||||
In order to delete vertices in the graph you at least need to have the following privileges:
|
||||
|
||||
1. `Read Only` access on the Database.
|
||||
2. `Write` access on the given collection.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name, no vertex collection or no vertex with this id could be found.
|
||||
Returned in the following cases:
|
||||
* No graph with this name could be found.
|
||||
* This collection is not part of the graph.
|
||||
* The vertex to remove does not exist.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{412}
|
||||
Returned if if-match header is given, but the documents revision is different.
|
||||
Returned if if-match header is given, but the stored documents revision is different.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
|
@ -67,4 +141,3 @@ Returned if if-match header is given, but the documents revision is different.
|
|||
examples.dropGraph("social");
|
||||
@END_EXAMPLE_ARANGOSH_RUN
|
||||
@endDocuBlock
|
||||
|
||||
|
|
|
@ -1,40 +1,129 @@
|
|||
|
||||
@startDocuBlock general_graph_vertex_get_http_examples
|
||||
@brief fetches an existing vertex
|
||||
|
||||
@RESTHEADER{GET /_api/gharial/{graph-name}/vertex/{collection-name}/{vertex-key}, Get a vertex}
|
||||
@RESTHEADER{GET /_api/gharial/{graph}/vertex/{collection}/{vertex}, Get a vertex}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Gets a vertex from the given collection.
|
||||
|
||||
@RESTURLPARAMETERS
|
||||
|
||||
@RESTURLPARAM{graph-name,string,required}
|
||||
@RESTURLPARAM{graph,string,required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTURLPARAM{collection-name,string,required}
|
||||
@RESTURLPARAM{collection,string,required}
|
||||
The name of the vertex collection the vertex belongs to.
|
||||
|
||||
@RESTURLPARAM{vertex-key,string,required}
|
||||
@RESTURLPARAM{vertex,string,required}
|
||||
The *_key* attribute of the vertex.
|
||||
|
||||
@RESTQUERYPARAMETERS
|
||||
|
||||
@RESTQUERYPARAM{rev,string,optional}
|
||||
Must contain a revision.
|
||||
If this is set a document is only returned if
|
||||
it has exactly this revision.
|
||||
Also see if-match header as an alternative to this.
|
||||
|
||||
@RESTHEADERPARAMETERS
|
||||
|
||||
@RESTHEADERPARAM{if-match,string,optional}
|
||||
If the "If-Match" header is given, then it must contain exactly one Etag. The document is returned,
|
||||
if it has the same revision as the given Etag. Otherwise a HTTP 412 is returned. As an alternative
|
||||
you can supply the Etag in an attribute rev in the URL.
|
||||
you can supply the Etag in an query parameter *rev*.
|
||||
|
||||
@RESTHEADERPARAM{if-none-match,string,optional}
|
||||
If the "If-None-Match" header is given, then it must contain exactly one Etag. The document is returned,
|
||||
only if it has a different revision as the given Etag. Otherwise a HTTP 304 is returned.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Returned if the vertex could be found.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{vertex,object,required,vertex_representation}
|
||||
The complete vertex.
|
||||
|
||||
@RESTRETURNCODE{304}
|
||||
Returned if the if-none-match header is given and the
|
||||
currently stored vertex still has this revision value.
|
||||
So there was no update between the last time the vertex
|
||||
was fetched by the caller.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{403}
|
||||
Returned if your user has insufficient rights.
|
||||
In order to update vertices in the graph you at least need to have the following privileges:
|
||||
|
||||
1. `Read Only` access on the Database.
|
||||
2. `Read Only` access on the given collection.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name, no vertex collection or no vertex with this id could be found.
|
||||
Returned in the following cases:
|
||||
* No graph with this name could be found.
|
||||
* This collection is not part of the graph.
|
||||
* The vertex does not exist.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{412}
|
||||
Returned if if-match header is given, but the documents revision is different.
|
||||
Returned if if-match header is given, but the stored documents revision is different.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
|
@ -51,4 +140,3 @@ Returned if if-match header is given, but the documents revision is different.
|
|||
examples.dropGraph("social");
|
||||
@END_EXAMPLE_ARANGOSH_RUN
|
||||
@endDocuBlock
|
||||
|
||||
|
|
|
@ -1,21 +1,20 @@
|
|||
|
||||
@startDocuBlock general_graph_vertex_modify_http_examples
|
||||
@brief replace an existing vertex
|
||||
@brief update an existing vertex
|
||||
|
||||
@RESTHEADER{PATCH /_api/gharial/{graph-name}/vertex/{collection-name}/{vertex-key}, Modify a vertex}
|
||||
@RESTHEADER{PATCH /_api/gharial/{graph}/vertex/{collection}/{vertex}, Update a vertex}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Updates the data of the specific vertex in the collection.
|
||||
|
||||
@RESTURLPARAMETERS
|
||||
|
||||
@RESTURLPARAM{graph-name,string,required}
|
||||
@RESTURLPARAM{graph,string,required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTURLPARAM{collection-name,string,required}
|
||||
@RESTURLPARAM{collection,string,required}
|
||||
The name of the vertex collection the vertex belongs to.
|
||||
|
||||
@RESTURLPARAM{vertex-key,string,required}
|
||||
@RESTURLPARAM{vertex,string,required}
|
||||
The *_key* attribute of the vertex.
|
||||
|
||||
@RESTQUERYPARAMETERS
|
||||
|
@ -24,14 +23,18 @@ The *_key* attribute of the vertex.
|
|||
Define if the request should wait until synced to disk.
|
||||
|
||||
@RESTQUERYPARAM{keepNull,boolean,optional}
|
||||
Define if values set to null should be stored. By default the key is not removed from the document.
|
||||
Define if values set to null should be stored.
|
||||
By default (true) the given documents attribute(s) will be set to null.
|
||||
If this parameter is false the attribute(s) will instead be delete from the
|
||||
document.
|
||||
|
||||
@RESTQUERYPARAM{returnOld,boolean,optional}
|
||||
Define if a presentation of the deleted document should
|
||||
be returned within the response object.
|
||||
|
||||
@RESTQUERYPARAM{returnNew,boolean,optional}
|
||||
Define if a presentation of the newly create
|
||||
Define if a presentation of the new document should
|
||||
be returned within the response object.
|
||||
|
||||
@RESTHEADERPARAMETERS
|
||||
|
||||
|
@ -40,22 +43,113 @@ If the "If-Match" header is given, then it must contain exactly one Etag. The do
|
|||
if it has the same revision as the given Etag. Otherwise a HTTP 412 is returned. As an alternative
|
||||
you can supply the Etag in an attribute rev in the URL.
|
||||
|
||||
@RESTALLBODYPARAM{replaceAttributes,object,required}
|
||||
The body has to contain a JSON object containing exactly the attributes that should be replaced.
|
||||
@RESTALLBODYPARAM{vertex,object,required}
|
||||
The body has to contain a JSON object containing exactly the attributes that should be overwritten, all other attributes remain unchanged.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Returned if the vertex could be updated.
|
||||
Returned if the vertex could be updated, and waitForSync is true.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{vertex,object,required,vertex_representation}
|
||||
The internal attributes for the vertex.
|
||||
|
||||
@RESTREPLYBODY{new,object,optional,vertex_representation}
|
||||
The complete newly written vertex document.
|
||||
Includes all written attributes in the request body
|
||||
and all internal attributes generated by ArangoDB.
|
||||
Will only be present if returnNew is true.
|
||||
|
||||
@RESTREPLYBODY{old,object,optional,vertex_representation}
|
||||
The complete overwritten vertex document.
|
||||
Includes all attributes stored before this operation.
|
||||
Will only be present if returnOld is true.
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the request was successful but waitForSync is false.
|
||||
Returned if the request was successful, and waitForSync is false.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{vertex,object,required,vertex_representation}
|
||||
The internal attributes for the vertex.
|
||||
|
||||
@RESTREPLYBODY{new,object,optional,vertex_representation}
|
||||
The complete newly written vertex document.
|
||||
Includes all written attributes in the request body
|
||||
and all internal attributes generated by ArangoDB.
|
||||
Will only be present if returnNew is true.
|
||||
|
||||
@RESTREPLYBODY{old,object,optional,vertex_representation}
|
||||
The complete overwritten vertex document.
|
||||
Includes all attributes stored before this operation.
|
||||
Will only be present if returnOld is true.
|
||||
|
||||
@RESTRETURNCODE{403}
|
||||
Returned if your user has insufficient rights.
|
||||
In order to update vertices in the graph you at least need to have the following privileges:
|
||||
|
||||
1. `Read Only` access on the Database.
|
||||
2. `Write` access on the given collection.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name, no vertex collection or no vertex with this id could be found.
|
||||
Returned in the following cases:
|
||||
* No graph with this name could be found.
|
||||
* This collection is not part of the graph.
|
||||
* The vertex to update does not exist.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{412}
|
||||
Returned if if-match header is given, but the documents revision is different.
|
||||
Returned if if-match header is given, but the stored documents revision is different.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
|
@ -75,4 +169,3 @@ Returned if if-match header is given, but the documents revision is different.
|
|||
examples.dropGraph("social");
|
||||
@END_EXAMPLE_ARANGOSH_RUN
|
||||
@endDocuBlock
|
||||
|
||||
|
|
|
@ -1,21 +1,20 @@
|
|||
|
||||
@startDocuBlock general_graph_vertex_replace_http_examples
|
||||
@brief replaces an existing vertex
|
||||
|
||||
@RESTHEADER{PUT /_api/gharial/{graph-name}/vertex/{collection-name}/{vertex-key}, Replace a vertex}
|
||||
@RESTHEADER{PUT /_api/gharial/{graph}/vertex/{collection}/{vertex}, Replace a vertex}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Replaces the data of a vertex in the collection.
|
||||
|
||||
@RESTURLPARAMETERS
|
||||
|
||||
@RESTURLPARAM{graph-name,string,required}
|
||||
@RESTURLPARAM{graph,string,required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTURLPARAM{collection-name,string,required}
|
||||
@RESTURLPARAM{collection,string,required}
|
||||
The name of the vertex collection the vertex belongs to.
|
||||
|
||||
@RESTURLPARAM{vertex-key,string,required}
|
||||
@RESTURLPARAM{vertex,string,required}
|
||||
The *_key* attribute of the vertex.
|
||||
|
||||
@RESTQUERYPARAMETERS
|
||||
|
@ -31,7 +30,8 @@ Define if a presentation of the deleted document should
|
|||
be returned within the response object.
|
||||
|
||||
@RESTQUERYPARAM{returnNew,boolean,optional}
|
||||
Define if a presentation of the newly create
|
||||
Define if a presentation of the new document should
|
||||
be returned within the response object.
|
||||
|
||||
@RESTHEADERPARAMETERS
|
||||
|
||||
|
@ -40,22 +40,113 @@ If the "If-Match" header is given, then it must contain exactly one Etag. The do
|
|||
if it has the same revision as the given Etag. Otherwise a HTTP 412 is returned. As an alternative
|
||||
you can supply the Etag in an attribute rev in the URL.
|
||||
|
||||
@RESTALLBODYPARAM{storeThisJsonObject,object,required}
|
||||
@RESTALLBODYPARAM{vertex,object,required}
|
||||
The body has to be the JSON object to be stored.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Returned if the vertex could be replaced.
|
||||
Returned if the vertex could be replaced, and waitForSync is true.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{vertex,object,required,vertex_representation}
|
||||
The internal attributes for the vertex.
|
||||
|
||||
@RESTREPLYBODY{new,object,optional,vertex_representation}
|
||||
The complete newly written vertex document.
|
||||
Includes all written attributes in the request body
|
||||
and all internal attributes generated by ArangoDB.
|
||||
Will only be present if returnNew is true.
|
||||
|
||||
@RESTREPLYBODY{old,object,optional,vertex_representation}
|
||||
The complete overwritten vertex document.
|
||||
Includes all attributes stored before this operation.
|
||||
Will only be present if returnOld is true.
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the request was successful but waitForSync is false.
|
||||
Returned if the vertex could be replaced, and waitForSync is false.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is false in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{vertex,object,required,vertex_representation}
|
||||
The internal attributes for the vertex.
|
||||
|
||||
@RESTREPLYBODY{new,object,optional,vertex_representation}
|
||||
The complete newly written vertex document.
|
||||
Includes all written attributes in the request body
|
||||
and all internal attributes generated by ArangoDB.
|
||||
Will only be present if returnNew is true.
|
||||
|
||||
@RESTREPLYBODY{old,object,optional,vertex_representation}
|
||||
The complete overwritten vertex document.
|
||||
Includes all attributes stored before this operation.
|
||||
Will only be present if returnOld is true.
|
||||
|
||||
@RESTRETURNCODE{403}
|
||||
Returned if your user has insufficient rights.
|
||||
In order to replace vertices in the graph you at least need to have the following privileges:
|
||||
|
||||
1. `Read Only` access on the Database.
|
||||
2. `Write` access on the given collection.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name, no vertex collection or no vertex with this id could be found.
|
||||
Returned in the following cases:
|
||||
* No graph with this name could be found.
|
||||
* This collection is not part of the graph.
|
||||
* The vertex to replace does not exist.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@RESTRETURNCODE{412}
|
||||
Returned if if-match header is given, but the documents revision is different.
|
||||
Returned if if-match header is given, but the stored documents revision is different.
|
||||
|
||||
@RESTREPLYBODY{error,boolean,required,}
|
||||
Flag if there was an error (true) or not (false).
|
||||
It is true in this response.
|
||||
|
||||
@RESTREPLYBODY{code,integer,required,}
|
||||
The response code.
|
||||
|
||||
@RESTREPLYBODY{errorNum,integer,required,}
|
||||
ArangoDB error number for the error that occured.
|
||||
|
||||
@RESTREPLYBODY{errorMessage,string,required,}
|
||||
A message created for this error.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
|
@ -76,4 +167,3 @@ Returned if if-match header is given, but the documents revision is different.
|
|||
examples.dropGraph("social");
|
||||
@END_EXAMPLE_ARANGOSH_RUN
|
||||
@endDocuBlock
|
||||
|
||||
|
|
|
@ -789,7 +789,7 @@ def restallbodyparam(cargo, r=Regexen()):
|
|||
################################################################################
|
||||
|
||||
def reststruct(cargo, r=Regexen()):
|
||||
global swagger, operation, httpPath, method, restBodyParam, restSubBodyParam
|
||||
global swagger, operation, httpPath, method, restBodyParam, restSubBodyParam, fn
|
||||
(fp, last) = cargo
|
||||
|
||||
try:
|
||||
|
@ -808,7 +808,8 @@ def reststruct(cargo, r=Regexen()):
|
|||
swagger['definitions'][className] = {
|
||||
'type': 'object',
|
||||
'properties' : {},
|
||||
'description': ''
|
||||
'description': '',
|
||||
'x-filename': fn
|
||||
}
|
||||
|
||||
swagger['definitions'][className]['properties'][name] = {
|
||||
|
@ -1016,6 +1017,8 @@ def restreplybody(cargo, r=Regexen()):
|
|||
setRequired(swagger['definitions'][rcBlock], name)
|
||||
|
||||
if len(name) > 0:
|
||||
if 'description' not in swagger['definitions'][rcBlock]['properties']:
|
||||
swagger['definitions'][rcBlock]['properties'][name]['description'] = ''
|
||||
return generic_handler_desc(cargo, r, "restreplybody", None,
|
||||
swagger['definitions'][rcBlock]['properties'][name],
|
||||
'description')
|
||||
|
|
Loading…
Reference in New Issue