mirror of https://gitee.com/bigwinds/arangodb
Move documentation into the source files.
This commit is contained in:
parent
bbb8198d2b
commit
f5d301a814
|
@ -1,213 +1,11 @@
|
|||
!CHAPTER Handling Edges
|
||||
|
||||
@RESTHEADER{POST /system/gharial/graph-name/edge/collection-name, 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 [edge collection](../Glossary/index.html#edge_collection).
|
||||
|
||||
@RESTURLPARAMS
|
||||
|
||||
@RESTPARAM{graph-name, string, required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTPARAM{collection-name, string, required}
|
||||
The name of the edge collection the edge belongs to.
|
||||
|
||||
@RESTQUERYPARAMS
|
||||
|
||||
@RESTPARAM{waitForSync, boolean, optional}
|
||||
Define if the request should wait until synced to disk.
|
||||
|
||||
@RESTBODYPARAMS
|
||||
|
||||
@RESTPARAM{_from, string, required}
|
||||
|
||||
@RESTPARAM{_to, string, required}
|
||||
|
||||
The body has to be the JSON object to be stored.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{201}
|
||||
Returned if the edge could be created.
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the request was successful but waitForSync is false.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name, no edge collection or no edge with this id could be found.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlock JSF_general_graph_edge_create_http_examples
|
||||
|
||||
@RESTHEADER{GET /system/gharial/graph-name/edge/collection-name/edge-key, Get an edge}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Gets an edge from the given collection.
|
||||
|
||||
@RESTURLPARAMS
|
||||
|
||||
@RESTPARAM{graph-name, string, required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTPARAM{collection-name, string, required}
|
||||
The name of the edge collection the edge belongs to.
|
||||
|
||||
@RESTPARAM{edge-key, string, required}
|
||||
The *_key* attribute of the vertex.
|
||||
|
||||
@RESTHEADERPARAMS
|
||||
|
||||
@RESTPARAM{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.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Returned if the edge could be found.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name, no edge collection or no edge with this id could be found.
|
||||
|
||||
@RESTRETURNCODE{412}
|
||||
Returned if if-match header is given, but the documents revision is different.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlock JSF_general_graph_edge_get_http_examples
|
||||
|
||||
@RESTHEADER{PATCH /system/gharial/graph-name/edge/collection-name/edge-key, Modify an edge}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Updates the data of the specific edge in the collection.
|
||||
|
||||
@RESTURLPARAMS
|
||||
|
||||
@RESTPARAM{graph-name, string, required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTPARAM{collection-name, string, required}
|
||||
The name of the edge collection the edge belongs to.
|
||||
|
||||
@RESTPARAM{edge-key, string, required}
|
||||
The *_key* attribute of the vertex.
|
||||
|
||||
@RESTQUERYPARAMS
|
||||
|
||||
@RESTPARAM{waitForSync, boolean, optional}
|
||||
Define if the request should wait until synced to disk.
|
||||
|
||||
@RESTPARAM{keepNull, boolean, optional}
|
||||
Define if values set to null should be stored. By default the key is removed from the document.
|
||||
|
||||
@RESTBODYPARAMS
|
||||
The body has to be a JSON object containing the attributes to be updated.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Returned if the edge could be updated.
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the request was successful but waitForSync is false.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name, no edge collection or no edge with this id could be found.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlock JSF_general_graph_edge_modify_http_examples
|
||||
|
||||
@RESTHEADER{PUT /system/gharial/graph-name/edge/collection-name/edge-key, Replace an edge}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Replaces the data of an edge in the collection.
|
||||
|
||||
@RESTURLPARAMS
|
||||
|
||||
@RESTPARAM{graph-name, string, required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTPARAM{collection-name, string, required}
|
||||
The name of the edge collection the edge belongs to.
|
||||
|
||||
@RESTPARAM{edge-key, string, required}
|
||||
The *_key* attribute of the vertex.
|
||||
|
||||
@RESTQUERYPARAMS
|
||||
|
||||
@RESTPARAM{waitForSync, boolean, optional}
|
||||
Define if the request should wait until synced to disk.
|
||||
|
||||
@RESTHEADERPARAMS
|
||||
|
||||
@RESTPARAM{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.
|
||||
|
||||
@RESTBODYPARAMS
|
||||
The body has to be the JSON object to be stored.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Returned if the edge could be replaced.
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the request was successful but waitForSync is false.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name, no edge collection or no edge with this id could be found.
|
||||
|
||||
@RESTRETURNCODE{412}
|
||||
Returned if if-match header is given, but the documents revision is different.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlock JSF_general_graph_edge_replace_http_examples
|
||||
|
||||
@RESTHEADER{DELETE /system/gharial/graph-name/edge/collection-name/edge-key, Remove an edge}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Removes an edge from the collection.
|
||||
|
||||
@RESTURLPARAMS
|
||||
|
||||
@RESTPARAM{graph-name, string, required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTPARAM{collection-name, string, required}
|
||||
The name of the edge collection the edge belongs to.
|
||||
|
||||
@RESTPARAM{edge-key, string, required}
|
||||
The *_key* attribute of the vertex.
|
||||
|
||||
@RESTQUERYPARAMS
|
||||
|
||||
@RESTPARAM{waitForSync, boolean, optional}
|
||||
Define if the request should wait until synced to disk.
|
||||
|
||||
@RESTHEADERPARAMS
|
||||
|
||||
@RESTPARAM{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.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Returned if the edge could be removed.
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the request was successful but waitForSync is false.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name, no edge collection or no edge with this id could be found.
|
||||
|
||||
@RESTRETURNCODE{412}
|
||||
Returned if if-match header is given, but the documents revision is different.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlock JSF_general_graph_edge_delete_http_examples
|
||||
|
|
|
@ -10,333 +10,14 @@ collection (so edges can be used as vertices). Which collections are used within
|
|||
a graph is defined via *edge definitions*. A graph can contain more than one edge
|
||||
definition, at least one is needed.
|
||||
|
||||
@brief Lists all graphs known to the graph module.
|
||||
|
||||
@RESTHEADER{GET /_api/gharial, List all graphs}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Lists all graph names stored in this database.ssss
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Is returned if the module is available and the graphs could be listed.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlock JSF_general_graph_list_http_examples
|
||||
|
||||
@brief Create a new graph in the graph module.
|
||||
|
||||
@RESTHEADER{POST /_api/gharial, Create a graph}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
The creation of a graph requires the name of the graph and a definition of its edges.
|
||||
|
||||
@RESTBODYPARAMS
|
||||
|
||||
@RESTPARAM{name, string, required}
|
||||
Name of the graph.
|
||||
|
||||
@RESTPARAM{edgeDefinitions, string, optional}
|
||||
An array of definitions for the edges, see [edge definitions](../General-Graphs/Management.md#edge_definitions).
|
||||
|
||||
@RESTPARAM{orphanCollections, string, optional}
|
||||
An array of additional vertex collections.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{201}
|
||||
Is returned if the graph could be created.
|
||||
The body contains the graph configuration that has been stored.
|
||||
|
||||
@RESTRETURNCODE{409}
|
||||
Returned if there is a conflict storing the graph.
|
||||
This can occur either if a graph with this name is already stored, or if there is one edge definition with a the same [edge collection](../Glossary/index.html#edge_collection) but a different signature used in any other graph.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlock JSF_general_graph_create_http_examples
|
||||
|
||||
@brief Get a graph from the graph module.
|
||||
|
||||
@RESTHEADER{GET /_api/gharial/graph-name, Get a graph}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Gets a graph from the collection *\_graphs*.
|
||||
Returns the definition content of this graph.
|
||||
|
||||
@RESTURLPARAMS
|
||||
|
||||
@RESTPARAM{graph-name, string, required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Returned if the graph could be found.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name could be found.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlock JSF_general_graph_get_http_examples
|
||||
|
||||
@RESTHEADER{DELETE /_api/gharial/graph-name, Drop a graph}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Removes a graph from the collection *\_graphs*.
|
||||
|
||||
@RESTURLPARAMS
|
||||
|
||||
@RESTPARAM{graph-name, string, required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTQUERYPARAMS
|
||||
|
||||
@RESTPARAM{dropCollections, boolean, optional}
|
||||
Drop collections of this graph as well.
|
||||
Collections will only be dropped if they are not used in other graphs.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Returned if the graph could be dropped.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name could be found.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlock JSF_general_graph_drop_http_examples
|
||||
|
||||
@brief Lists all vertex collections used in this graph.
|
||||
|
||||
@RESTHEADER{GET /_api/gharial/graph-name/vertex, List vertex collections}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Lists all vertex collections within this graph.
|
||||
|
||||
@RESTURLPARAMS
|
||||
|
||||
@RESTPARAM{graph-name, string, required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Is returned if the collections could be listed.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name could be found.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlock JSF_general_graph_list_vertex_http_examples
|
||||
|
||||
@brief Add an additional vertex collection to the graph.
|
||||
|
||||
@RESTHEADER{POST /_api/gharial/graph-name/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.
|
||||
|
||||
@RESTURLPARAMS
|
||||
|
||||
@RESTPARAM{graph-name, string, required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{201}
|
||||
Returned if the edge collection could be added successfully.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name could be found.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlock JSF_general_graph_vertex_collection_add_http_examples
|
||||
|
||||
@brief Remove a vertex collection form the graph.
|
||||
|
||||
@RESTHEADER{DELETE /_api/gharial/graph-name/vertex/collection-name, 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.
|
||||
|
||||
@RESTURLPARAMS
|
||||
|
||||
@RESTPARAM{graph-name, string, required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTPARAM{collection-name, string, required}
|
||||
The name of the vertex collection.
|
||||
|
||||
@RESTQUERYPARAMS
|
||||
|
||||
@RESTPARAM{dropCollection, boolean, optional}
|
||||
Drop the collection as well.
|
||||
Collection will only be dropped if it is not used in other graphs.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Returned if the vertex collection was removed from the graph successfully.
|
||||
|
||||
@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.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name could be found.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlock JSF_general_graph_vertex_collection_remove_http_examples
|
||||
|
||||
@brief Lists all edge definitions
|
||||
|
||||
@RESTHEADER{GET /_api/gharial/graph-name/edge, List edge definitions}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Lists all edge collections within this graph.
|
||||
|
||||
@RESTURLPARAMS
|
||||
|
||||
@RESTPARAM{graph-name, string, required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Is returned if the edge definitions could be listed.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name could be found.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlock JSF_general_graph_list_edge_http_examples
|
||||
|
||||
@brief Add a new edge definition to the graph
|
||||
|
||||
@RESTHEADER{POST /_api/gharial/graph-name/edge, Add edge definition}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Adds an additional edge definition to the graph.
|
||||
This edge definition has to contain a *collection* and an array of each *from* and *to* vertex collections.
|
||||
An edge definition can only be added if this definition is either not used in any other graph, or it is used with exactly the same definition.
|
||||
It is not possible to store a definition "e" from "v1" to "v2" in the one graph, and "e" from "v2" to "v1" in the other graph.
|
||||
|
||||
@RESTURLPARAMS
|
||||
|
||||
@RESTPARAM{graph-name, string, required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTBODYPARAMS
|
||||
|
||||
@RESTPARAM{collection, string, required}
|
||||
The name of the edge collection to be used.
|
||||
|
||||
@RESTPARAM{from, string|array, required}
|
||||
One or many vertex collections that can contain source vertices.
|
||||
|
||||
@RESTPARAM{to, string|array, required}
|
||||
One or many edge collections that can contain target vertices.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Returned if the definition could be added successfully.
|
||||
|
||||
@RESTRETURNCODE{400}
|
||||
Returned if the defininition could not be added, the edge collection is used in an other graph with a different signature.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name could be found.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlock JSF_general_graph_edge_definition_add_http_examples
|
||||
|
||||
@brief Replace an existing edge definition
|
||||
|
||||
@RESTHEADER{POST /_api/gharial/graph-name/edge/definition-name, Replace an edge definition}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Change one specific edge definition.
|
||||
This will modify all occurrences of this definition in all graphs known to your database.
|
||||
|
||||
@RESTURLPARAMS
|
||||
|
||||
@RESTPARAM{graph-name, string, required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTPARAM{definition-name, string, required}
|
||||
The name of the edge collection used in the definition.
|
||||
|
||||
@RESTBODYPARAMS
|
||||
|
||||
@RESTPARAM{collection, string, required}
|
||||
The name of the edge collection to be used.
|
||||
|
||||
@RESTPARAM{from, string|array, required}
|
||||
One or many vertex collections that can contain source vertices.
|
||||
|
||||
@RESTPARAM{to, string|array, required}
|
||||
One or many edge collections that can contain target vertices.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Returned if the edge definition could be replaced.
|
||||
|
||||
@RESTRETURNCODE{400}
|
||||
Returned if no edge definition with this name is found in the graph.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name could be found.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlock JSF_general_graph_edge_definition_modify_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}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Remove one edge definition from the graph.
|
||||
This will only remove the edge collection, the vertex collections remain untouched and can still be used in your queries.
|
||||
|
||||
@RESTURLPARAMS
|
||||
|
||||
@RESTPARAM{graph-name, string, required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTPARAM{definition-name, string, required}
|
||||
The name of the edge collection used in the definition.
|
||||
|
||||
@RESTQUERYPARAMS
|
||||
|
||||
@RESTPARAM{dropCollection, boolean, optional}
|
||||
Drop the collection as well.
|
||||
Collection will only be dropped if it is not used in other graphs.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Returned if the edge definition could be removed from the graph.
|
||||
|
||||
@RESTRETURNCODE{400}
|
||||
Returned if no edge definition with this name is found in the graph.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name could be found.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlock JSF_general_graph_edge_definition_remove_http_examples
|
||||
|
|
|
@ -1,214 +1,7 @@
|
|||
!CHAPTER Handling Vertices
|
||||
|
||||
@RESTHEADER{POST /system/gharial/graph-name/vertex/collection-name, Create a vertex}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Adds a vertex to the given collection.
|
||||
|
||||
@RESTURLPARAMS
|
||||
|
||||
@RESTPARAM{graph-name, string, required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTPARAM{collection-name, string, required}
|
||||
The name of the vertex collection the vertex belongs to.
|
||||
|
||||
@RESTQUERYPARAMS
|
||||
|
||||
@RESTPARAM{waitForSync, boolean, optional}
|
||||
Define if the request should wait until synced to disk.
|
||||
|
||||
@RESTBODYPARAMS
|
||||
The body has to be the JSON object to be stored.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{201}
|
||||
Returned if the vertex could be added and waitForSync is true.
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the request was successful but waitForSync is false.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph or no vertex collection with this name could be found.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlock JSF_general_graph_vertex_create_http_examples
|
||||
|
||||
@RESTHEADER{GET /system/gharial/graph-name/vertex/collection-name/vertex-key, Get a vertex}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Gets a vertex from the given collection.
|
||||
|
||||
@RESTURLPARAMS
|
||||
|
||||
@RESTPARAM{graph-name, string, required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTPARAM{collection-name, string, required}
|
||||
The name of the vertex collection the vertex belongs to.
|
||||
|
||||
@RESTPARAM{vertex-key, string, required}
|
||||
The *_key* attribute of the vertex.
|
||||
|
||||
@RESTHEADERPARAMS
|
||||
|
||||
@RESTPARAM{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.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Returned if the vertex could be found.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name, no vertex collection or no vertex with this id could be found.
|
||||
|
||||
@RESTRETURNCODE{412}
|
||||
Returned if if-match header is given, but the documents revision is different.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlock JSF_general_graph_vertex_get_http_examples
|
||||
|
||||
@RESTHEADER{PATCH /system/gharial/graph-name/vertex/collection-name/vertex-key, Modify a vertex}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Updates the data of the specific vertex in the collection.
|
||||
|
||||
@RESTURLPARAMS
|
||||
|
||||
@RESTPARAM{graph-name, string, required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTPARAM{collection-name, string, required}
|
||||
The name of the vertex collection the vertex belongs to.
|
||||
|
||||
@RESTPARAM{vertex-key, string, required}
|
||||
The *_key* attribute of the vertex.
|
||||
|
||||
@RESTQUERYPARAMS
|
||||
|
||||
@RESTPARAM{waitForSync, boolean, optional}
|
||||
Define if the request should wait until synced to disk.
|
||||
|
||||
@RESTPARAM{keepNull, boolean, optional}
|
||||
Define if values set to null should be stored. By default the key is removed from the document.
|
||||
|
||||
@RESTHEADERPARAMS
|
||||
|
||||
@RESTPARAM{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.
|
||||
|
||||
@RESTBODYPARAMS
|
||||
The body has to contain a JSON object containing exactly the attributes that should be replaced.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Returned if the vertex could be updated.
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the request was successful but waitForSync is false.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name, no vertex collection or no vertex with this id could be found.
|
||||
|
||||
@RESTRETURNCODE{412}
|
||||
Returned if if-match header is given, but the documents revision is different.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlock JSF_general_graph_vertex_modify_http_examples
|
||||
|
||||
@RESTHEADER{PUT /system/gharial/graph-name/vertex/collection-name/vertex-key, Replace a vertex}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Replaces the data of a vertex in the collection.
|
||||
|
||||
@RESTURLPARAMS
|
||||
|
||||
@RESTPARAM{graph-name, string, required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTPARAM{collection-name, string, required}
|
||||
The name of the vertex collection the vertex belongs to.
|
||||
|
||||
@RESTPARAM{vertex-key, string, required}
|
||||
The *_key* attribute of the vertex.
|
||||
|
||||
@RESTQUERYPARAMS
|
||||
|
||||
@RESTPARAM{waitForSync, boolean, optional}
|
||||
Define if the request should wait until synced to disk.
|
||||
|
||||
@RESTHEADERPARAMS
|
||||
|
||||
@RESTPARAM{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.
|
||||
|
||||
@RESTBODYPARAMS
|
||||
The body has to be the JSON object to be stored.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Returned if the vertex could be replaced.
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the request was successful but waitForSync is false.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name, no vertex collection or no vertex with this id could be found.
|
||||
|
||||
@RESTRETURNCODE{412}
|
||||
Returned if if-match header is given, but the documents revision is different.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlock JSF_general_graph_vertex_replace_http_examples
|
||||
|
||||
@RESTHEADER{DELETE /system/gharial/graph-name/vertex/collection-name/vertex-key, Remove a vertex}
|
||||
|
||||
@RESTDESCRIPTION
|
||||
Removes a vertex from the collection.
|
||||
|
||||
@RESTURLPARAMS
|
||||
|
||||
@RESTPARAM{graph-name, string, required}
|
||||
The name of the graph.
|
||||
|
||||
@RESTPARAM{collection-name, string, required}
|
||||
The name of the vertex collection the vertex belongs to.
|
||||
|
||||
@RESTPARAM{vertex-key, string, required}
|
||||
The *_key* attribute of the vertex.
|
||||
|
||||
@RESTQUERYPARAMS
|
||||
|
||||
@RESTPARAM{waitForSync, boolean, optional}
|
||||
Define if the request should wait until synced to disk.
|
||||
|
||||
@RESTHEADERPARAMS
|
||||
|
||||
@RESTPARAM{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.
|
||||
|
||||
@RESTRETURNCODES
|
||||
|
||||
@RESTRETURNCODE{200}
|
||||
Returned if the vertex could be removed.
|
||||
|
||||
@RESTRETURNCODE{202}
|
||||
Returned if the request was successful but waitForSync is false.
|
||||
|
||||
@RESTRETURNCODE{404}
|
||||
Returned if no graph with this name, no vertex collection or no vertex with this id could be found.
|
||||
|
||||
@RESTRETURNCODE{412}
|
||||
Returned if if-match header is given, but the documents revision is different.
|
||||
|
||||
@EXAMPLES
|
||||
|
||||
@startDocuBlock JSF_general_graph_vertex_delete_http_examples
|
||||
|
|
|
@ -67,5 +67,8 @@ dispose the server-side cursor afterwards.
|
|||
<!-- js/actions/api-simple.js -->
|
||||
@startDocuBlock JSA_put_api_simple_within
|
||||
|
||||
<!-- js/actions/api-simple.js -->
|
||||
@startDocuBlock JSA_put_api_simple_within_rectangle
|
||||
|
||||
<!-- js/actions/api-simple.js -->
|
||||
@startDocuBlock JSA_put_api_simple_fulltext
|
||||
|
|
|
@ -207,6 +207,20 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_list_http_examples
|
||||
/// @brief Lists all graphs known to the graph module.
|
||||
///
|
||||
/// @RESTHEADER{GET /_api/gharial, List all graphs}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Lists all graph names stored in this database.ssss
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{200}
|
||||
/// Is returned if the module is available and the graphs could be listed.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{HttpGharialList}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// examples.loadGraph("social");
|
||||
|
@ -234,6 +248,38 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_create_http_examples
|
||||
/// @brief Create a new graph in the graph module.
|
||||
///
|
||||
/// @RESTHEADER{POST /_api/gharial, Create a graph}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// The creation of a graph requires the name of the graph and a definition of its edges.
|
||||
///
|
||||
/// @RESTBODYPARAMS
|
||||
///
|
||||
/// @RESTPARAM{name, string, required}
|
||||
/// Name of the graph.
|
||||
///
|
||||
/// @RESTPARAM{edgeDefinitions, string, optional}
|
||||
/// An array of definitions for the edges, see [edge definitions](../General-Graphs/Management.md#edge_definitions).
|
||||
///
|
||||
/// @RESTPARAM{orphanCollections, string, optional}
|
||||
/// An array of additional vertex collections.
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{201}
|
||||
/// Is returned if the graph could be created.
|
||||
/// The body contains the graph configuration that has been stored.
|
||||
///
|
||||
/// @RESTRETURNCODE{409}
|
||||
/// Returned if there is a conflict storing the graph.
|
||||
/// This can occur either if a graph with this name is already stored, or if there is one edge definition with a
|
||||
/// the same [edge collection](../Glossary/index.html#edge_collection)
|
||||
/// but a different signature used in any other graph.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{HttpGharialCreate}
|
||||
/// var graph = require("org/arangodb/general-graph");
|
||||
/// | if (graph._exists("myGraph")) {
|
||||
|
@ -294,7 +340,30 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_get_http_examples
|
||||
/// @EXAMPLE_ARANGOSH_RUN{HttpGharialGetGraph}
|
||||
/// @brief Get a graph from the graph module.
|
||||
///
|
||||
/// @RESTHEADER{GET /_api/gharial/graph-name, Get a graph}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Gets a graph from the collection *\_graphs*.
|
||||
/// Returns the definition content of this graph.
|
||||
///
|
||||
/// @RESTURLPARAMS
|
||||
///
|
||||
/// @RESTPARAM{graph-name, string, required}
|
||||
/// The name of the graph.
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{200}
|
||||
/// Returned if the graph could be found.
|
||||
///
|
||||
/// @RESTRETURNCODE{404}
|
||||
/// Returned if no graph with this name could be found.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// /// @EXAMPLE_ARANGOSH_RUN{HttpGharialGetGraph}
|
||||
/// var graph = require("org/arangodb/general-graph");
|
||||
/// | if (graph._exists("myGraph")) {
|
||||
/// | graph._drop("myGraph", true);
|
||||
|
@ -337,6 +406,34 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_drop_http_examples
|
||||
/// @brief delete an existing graph
|
||||
///
|
||||
/// @RESTHEADER{DELETE /_api/gharial/graph-name, Drop a graph}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Removes a graph from the collection *\_graphs*.
|
||||
///
|
||||
/// @RESTURLPARAMS
|
||||
///
|
||||
/// @RESTPARAM{graph-name, string, required}
|
||||
/// The name of the graph.
|
||||
///
|
||||
/// @RESTQUERYPARAMS
|
||||
///
|
||||
/// @RESTPARAM{dropCollections, boolean, optional}
|
||||
/// Drop collections of this graph as well.
|
||||
/// Collections will only be dropped if they are not used in other graphs.
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{200}
|
||||
/// Returned if the graph could be dropped.
|
||||
///
|
||||
/// @RESTRETURNCODE{404}
|
||||
/// Returned if no graph with this name could be found.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{HttpGharialDrop}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// examples.loadGraph("social");
|
||||
|
@ -382,6 +479,28 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_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}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Lists all vertex collections within this graph.
|
||||
///
|
||||
/// @RESTURLPARAMS
|
||||
///
|
||||
/// @RESTPARAM{graph-name, string, required}
|
||||
/// The name of the graph.
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{200}
|
||||
/// Is returned if the collections could be listed.
|
||||
///
|
||||
/// @RESTRETURNCODE{404}
|
||||
/// Returned if no graph with this name could be found.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{HttpGharialListVertex}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// examples.loadGraph("social");
|
||||
|
@ -427,6 +546,29 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_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}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Adds a vertex collection to the set of collections of the graph. If the
|
||||
/// collection does not exist, it will be created.
|
||||
///
|
||||
/// @RESTURLPARAMS
|
||||
///
|
||||
/// @RESTPARAM{graph-name, string, required}
|
||||
/// The name of the graph.
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{201}
|
||||
/// Returned if the edge collection could be added successfully.
|
||||
///
|
||||
/// @RESTRETURNCODE{404}
|
||||
/// Returned if no graph with this name could be found.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{HttpGharialAddVertexCol}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// examples.loadGraph("social");
|
||||
|
@ -484,7 +626,43 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_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}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Removes a vertex collection from the graph and optionally deletes the collection,
|
||||
/// if it is not used in any other graph.
|
||||
///
|
||||
/// @RESTURLPARAMS
|
||||
///
|
||||
/// @RESTPARAM{graph-name, string, required}
|
||||
/// The name of the graph.
|
||||
///
|
||||
/// @RESTPARAM{collection-name, string, required}
|
||||
/// The name of the vertex collection.
|
||||
///
|
||||
/// @RESTQUERYPARAMS
|
||||
///
|
||||
/// @RESTPARAM{dropCollection, boolean, optional}
|
||||
/// Drop the collection as well.
|
||||
/// Collection will only be dropped if it is not used in other graphs.
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{200}
|
||||
/// Returned if the vertex collection was removed from the graph successfully.
|
||||
///
|
||||
/// @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.
|
||||
///
|
||||
/// @RESTRETURNCODE{404}
|
||||
/// Returned if no graph with this name could be found.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// ///
|
||||
/// You can remove vertex collections that are not used in any edge collection:
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{HttpGharialRemoveVertexCollection}
|
||||
|
@ -571,6 +749,28 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_list_edge_http_examples
|
||||
/// @brief Lists all edge definitions
|
||||
///
|
||||
/// @RESTHEADER{GET /_api/gharial/graph-name/edge, List edge definitions}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Lists all edge collections within this graph.
|
||||
///
|
||||
/// @RESTURLPARAMS
|
||||
///
|
||||
/// @RESTPARAM{graph-name, string, required}
|
||||
/// The name of the graph.
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{200}
|
||||
/// Is returned if the edge definitions could be listed.
|
||||
///
|
||||
/// @RESTRETURNCODE{404}
|
||||
/// Returned if no graph with this name could be found.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{HttpGharialListEdge}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// examples.loadGraph("social");
|
||||
|
@ -607,6 +807,47 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_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}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Adds an additional edge definition to the graph.
|
||||
/// This edge definition has to contain a *collection* and an array of each *from* and *to* vertex collections.
|
||||
/// An edge definition can only be added if this definition is either not used in any other graph, or it is used
|
||||
/// with exactly the same definition. It is not possible to store a definition "e" from "v1" to "v2" in the one
|
||||
/// graph, and "e" from "v2" to "v1" in the other graph.
|
||||
///
|
||||
/// @RESTURLPARAMS
|
||||
///
|
||||
/// @RESTPARAM{graph-name, string, required}
|
||||
/// The name of the graph.
|
||||
///
|
||||
/// @RESTBODYPARAMS
|
||||
///
|
||||
/// @RESTPARAM{collection, string, required}
|
||||
/// The name of the edge collection to be used.
|
||||
///
|
||||
/// @RESTPARAM{from, string|array, required}
|
||||
/// One or many vertex collections that can contain source vertices.
|
||||
///
|
||||
/// @RESTPARAM{to, string|array, required}
|
||||
/// One or many edge collections that can contain target vertices.
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{200}
|
||||
/// Returned if the definition could be added successfully.
|
||||
///
|
||||
/// @RESTRETURNCODE{400}
|
||||
/// Returned if the defininition could not be added, the edge collection is used in an other graph with
|
||||
/// a different signature.
|
||||
///
|
||||
/// @RESTRETURNCODE{404}
|
||||
/// Returned if no graph with this name could be found.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{HttpGharialAddEdgeCol}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// examples.loadGraph("social");
|
||||
|
@ -668,6 +909,46 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_edge_definition_modify_http_examples
|
||||
/// @brief Replace an existing edge definition
|
||||
///
|
||||
/// @RESTHEADER{POST /_api/gharial/graph-name/edge/definition-name, Replace an edge definition}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Change one specific edge definition.
|
||||
/// This will modify all occurrences of this definition in all graphs known to your database.
|
||||
///
|
||||
/// @RESTURLPARAMS
|
||||
///
|
||||
/// @RESTPARAM{graph-name, string, required}
|
||||
/// The name of the graph.
|
||||
///
|
||||
/// @RESTPARAM{definition-name, string, required}
|
||||
/// The name of the edge collection used in the definition.
|
||||
///
|
||||
/// @RESTBODYPARAMS
|
||||
///
|
||||
/// @RESTPARAM{collection, string, required}
|
||||
/// The name of the edge collection to be used.
|
||||
///
|
||||
/// @RESTPARAM{from, string|array, required}
|
||||
/// One or many vertex collections that can contain source vertices.
|
||||
///
|
||||
/// @RESTPARAM{to, string|array, required}
|
||||
/// One or many edge collections that can contain target vertices.
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{200}
|
||||
/// Returned if the edge definition could be replaced.
|
||||
///
|
||||
/// @RESTRETURNCODE{400}
|
||||
/// Returned if no edge definition with this name is found in the graph.
|
||||
///
|
||||
/// @RESTRETURNCODE{404}
|
||||
/// Returned if no graph with this name could be found.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{HttpGharialReplaceEdgeCol}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// examples.loadGraph("social");
|
||||
|
@ -742,6 +1023,42 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_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}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Remove one edge definition from the graph.
|
||||
/// This will only remove the edge collection, the vertex collections remain untouched and can still be used
|
||||
/// in your queries.
|
||||
///
|
||||
/// @RESTURLPARAMS
|
||||
///
|
||||
/// @RESTPARAM{graph-name, string, required}
|
||||
/// The name of the graph.
|
||||
///
|
||||
/// @RESTPARAM{definition-name, string, required}
|
||||
/// The name of the edge collection used in the definition.
|
||||
///
|
||||
/// @RESTQUERYPARAMS
|
||||
///
|
||||
/// @RESTPARAM{dropCollection, boolean, optional}
|
||||
/// Drop the collection as well.
|
||||
/// Collection will only be dropped if it is not used in other graphs.
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{200}
|
||||
/// Returned if the edge definition could be removed from the graph.
|
||||
///
|
||||
/// @RESTRETURNCODE{400}
|
||||
/// Returned if no edge definition with this name is found in the graph.
|
||||
///
|
||||
/// @RESTRETURNCODE{404}
|
||||
/// Returned if no graph with this name could be found.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{HttpGharialEdgeDefinitionRemove}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// examples.loadGraph("social");
|
||||
|
@ -803,6 +1120,42 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_vertex_create_http_examples
|
||||
/// @brief create a new vertex
|
||||
///
|
||||
/// @RESTHEADER{POST /system/gharial/graph-name/vertex/collection-name, Create a vertex}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Adds a vertex to the given collection.
|
||||
///
|
||||
/// @RESTURLPARAMS
|
||||
///
|
||||
/// @RESTPARAM{graph-name, string, required}
|
||||
/// The name of the graph.
|
||||
///
|
||||
/// @RESTPARAM{collection-name, string, required}
|
||||
/// The name of the vertex collection the vertex belongs to.
|
||||
///
|
||||
/// @RESTQUERYPARAMS
|
||||
///
|
||||
/// @RESTPARAM{waitForSync, boolean, optional}
|
||||
/// Define if the request should wait until synced to disk.
|
||||
///
|
||||
/// @RESTBODYPARAMS
|
||||
/// The body has to be the JSON object to be stored.
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{201}
|
||||
/// Returned if the vertex could be added and waitForSync is true.
|
||||
///
|
||||
/// @RESTRETURNCODE{202}
|
||||
/// Returned if the request was successful but waitForSync is false.
|
||||
///
|
||||
/// @RESTRETURNCODE{404}
|
||||
/// Returned if no graph or no vertex collection with this name could be found.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{HttpGharialAddVertex}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// examples.loadGraph("social");
|
||||
|
@ -858,6 +1211,44 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_vertex_get_http_examples
|
||||
/// @brief fetches an existing vertex
|
||||
///
|
||||
/// @RESTHEADER{GET /system/gharial/graph-name/vertex/collection-name/vertex-key, Get a vertex}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Gets a vertex from the given collection.
|
||||
///
|
||||
/// @RESTURLPARAMS
|
||||
///
|
||||
/// @RESTPARAM{graph-name, string, required}
|
||||
/// The name of the graph.
|
||||
///
|
||||
/// @RESTPARAM{collection-name, string, required}
|
||||
/// The name of the vertex collection the vertex belongs to.
|
||||
///
|
||||
/// @RESTPARAM{vertex-key, string, required}
|
||||
/// The *_key* attribute of the vertex.
|
||||
///
|
||||
/// @RESTHEADERPARAMS
|
||||
///
|
||||
/// @RESTPARAM{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.
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{200}
|
||||
/// Returned if the vertex could be found.
|
||||
///
|
||||
/// @RESTRETURNCODE{404}
|
||||
/// Returned if no graph with this name, no vertex collection or no vertex with this id could be found.
|
||||
///
|
||||
/// @RESTRETURNCODE{412}
|
||||
/// Returned if if-match header is given, but the documents revision is different.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{HttpGharialGetVertex}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// examples.loadGraph("social");
|
||||
|
@ -906,6 +1297,55 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_vertex_replace_http_examples
|
||||
/// @brief replaces an existing vertex
|
||||
///
|
||||
/// @RESTHEADER{PUT /system/gharial/graph-name/vertex/collection-name/vertex-key, Replace a vertex}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Replaces the data of a vertex in the collection.
|
||||
///
|
||||
/// @RESTURLPARAMS
|
||||
///
|
||||
/// @RESTPARAM{graph-name, string, required}
|
||||
/// The name of the graph.
|
||||
///
|
||||
/// @RESTPARAM{collection-name, string, required}
|
||||
/// The name of the vertex collection the vertex belongs to.
|
||||
///
|
||||
/// @RESTPARAM{vertex-key, string, required}
|
||||
/// The *_key* attribute of the vertex.
|
||||
///
|
||||
/// @RESTQUERYPARAMS
|
||||
///
|
||||
/// @RESTPARAM{waitForSync, boolean, optional}
|
||||
/// Define if the request should wait until synced to disk.
|
||||
///
|
||||
/// @RESTHEADERPARAMS
|
||||
///
|
||||
/// @RESTPARAM{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.
|
||||
///
|
||||
/// @RESTBODYPARAMS
|
||||
/// The body has to be the JSON object to be stored.
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{200}
|
||||
/// Returned if the vertex could be replaced.
|
||||
///
|
||||
/// @RESTRETURNCODE{202}
|
||||
/// Returned if the request was successful but waitForSync is false.
|
||||
///
|
||||
/// @RESTRETURNCODE{404}
|
||||
/// Returned if no graph with this name, no vertex collection or no vertex with this id could be found.
|
||||
///
|
||||
/// @RESTRETURNCODE{412}
|
||||
/// Returned if if-match header is given, but the documents revision is different.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{HttpGharialReplaceVertex}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// examples.loadGraph("social");
|
||||
|
@ -968,6 +1408,58 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_vertex_modify_http_examples
|
||||
/// @brief replace an existing vertex
|
||||
///
|
||||
/// @RESTHEADER{PATCH /system/gharial/graph-name/vertex/collection-name/vertex-key, Modify a vertex}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Updates the data of the specific vertex in the collection.
|
||||
///
|
||||
/// @RESTURLPARAMS
|
||||
///
|
||||
/// @RESTPARAM{graph-name, string, required}
|
||||
/// The name of the graph.
|
||||
///
|
||||
/// @RESTPARAM{collection-name, string, required}
|
||||
/// The name of the vertex collection the vertex belongs to.
|
||||
///
|
||||
/// @RESTPARAM{vertex-key, string, required}
|
||||
/// The *_key* attribute of the vertex.
|
||||
///
|
||||
/// @RESTQUERYPARAMS
|
||||
///
|
||||
/// @RESTPARAM{waitForSync, boolean, optional}
|
||||
/// Define if the request should wait until synced to disk.
|
||||
///
|
||||
/// @RESTPARAM{keepNull, boolean, optional}
|
||||
/// Define if values set to null should be stored. By default the key is removed from the document.
|
||||
///
|
||||
/// @RESTHEADERPARAMS
|
||||
///
|
||||
/// @RESTPARAM{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.
|
||||
///
|
||||
/// @RESTBODYPARAMS
|
||||
/// The body has to contain a JSON object containing exactly the attributes that should be replaced.
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{200}
|
||||
/// Returned if the vertex could be updated.
|
||||
///
|
||||
/// @RESTRETURNCODE{202}
|
||||
/// Returned if the request was successful but waitForSync is false.
|
||||
///
|
||||
/// @RESTRETURNCODE{404}
|
||||
/// Returned if no graph with this name, no vertex collection or no vertex with this id could be found.
|
||||
///
|
||||
/// @RESTRETURNCODE{412}
|
||||
/// Returned if if-match header is given, but the documents revision is different.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{HttpGharialModifyVertex}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// examples.loadGraph("social");
|
||||
|
@ -1032,6 +1524,52 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_vertex_delete_http_examples
|
||||
/// @brief removes a vertex from a graph
|
||||
///
|
||||
/// @RESTHEADER{DELETE /system/gharial/graph-name/vertex/collection-name/vertex-key, Remove a vertex}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Removes a vertex from the collection.
|
||||
///
|
||||
/// @RESTURLPARAMS
|
||||
///
|
||||
/// @RESTPARAM{graph-name, string, required}
|
||||
/// The name of the graph.
|
||||
///
|
||||
/// @RESTPARAM{collection-name, string, required}
|
||||
/// The name of the vertex collection the vertex belongs to.
|
||||
///
|
||||
/// @RESTPARAM{vertex-key, string, required}
|
||||
/// The *_key* attribute of the vertex.
|
||||
///
|
||||
/// @RESTQUERYPARAMS
|
||||
///
|
||||
/// @RESTPARAM{waitForSync, boolean, optional}
|
||||
/// Define if the request should wait until synced to disk.
|
||||
///
|
||||
/// @RESTHEADERPARAMS
|
||||
///
|
||||
/// @RESTPARAM{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.
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{200}
|
||||
/// Returned if the vertex could be removed.
|
||||
///
|
||||
/// @RESTRETURNCODE{202}
|
||||
/// Returned if the request was successful but waitForSync is false.
|
||||
///
|
||||
/// @RESTRETURNCODE{404}
|
||||
/// Returned if no graph with this name, no vertex collection or no vertex with this id could be found.
|
||||
///
|
||||
/// @RESTRETURNCODE{412}
|
||||
/// Returned if if-match header is given, but the documents revision is different.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{HttpGharialDeleteVertex}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// examples.loadGraph("social");
|
||||
|
@ -1088,6 +1626,50 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_edge_create_http_examples
|
||||
/// @brief Creates an edge in an existing graph
|
||||
///
|
||||
/// @RESTHEADER{POST /system/gharial/graph-name/edge/collection-name, 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
|
||||
/// [edge collection](../Glossary/index.html#edge_collection).
|
||||
///
|
||||
/// @RESTURLPARAMS
|
||||
///
|
||||
/// @RESTPARAM{graph-name, string, required}
|
||||
/// The name of the graph.
|
||||
///
|
||||
/// @RESTPARAM{collection-name, string, required}
|
||||
/// The name of the edge collection the edge belongs to.
|
||||
///
|
||||
/// @RESTQUERYPARAMS
|
||||
///
|
||||
/// @RESTPARAM{waitForSync, boolean, optional}
|
||||
/// Define if the request should wait until synced to disk.
|
||||
///
|
||||
/// @RESTBODYPARAMS
|
||||
///
|
||||
/// @RESTPARAM{_from, string, required}
|
||||
///
|
||||
/// @RESTPARAM{_to, string, required}
|
||||
///
|
||||
/// The body has to be the JSON object to be stored.
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{201}
|
||||
/// Returned if the edge could be created.
|
||||
///
|
||||
/// @RESTRETURNCODE{202}
|
||||
/// Returned if the request was successful but waitForSync is false.
|
||||
///
|
||||
/// @RESTRETURNCODE{404}
|
||||
/// Returned if no graph with this name, no edge collection or no edge with this id could be found.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{HttpGharialAddEdge}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// examples.loadGraph("social");
|
||||
|
@ -1165,6 +1747,44 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_edge_get_http_examples
|
||||
/// @brief fetch an edge
|
||||
///
|
||||
/// @RESTHEADER{GET /system/gharial/graph-name/edge/collection-name/edge-key, Get an edge}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Gets an edge from the given collection.
|
||||
///
|
||||
/// @RESTURLPARAMS
|
||||
///
|
||||
/// @RESTPARAM{graph-name, string, required}
|
||||
/// The name of the graph.
|
||||
///
|
||||
/// @RESTPARAM{collection-name, string, required}
|
||||
/// The name of the edge collection the edge belongs to.
|
||||
///
|
||||
/// @RESTPARAM{edge-key, string, required}
|
||||
/// The *_key* attribute of the vertex.
|
||||
///
|
||||
/// @RESTHEADERPARAMS
|
||||
///
|
||||
/// @RESTPARAM{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.
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{200}
|
||||
/// Returned if the edge could be found.
|
||||
///
|
||||
/// @RESTRETURNCODE{404}
|
||||
/// Returned if no graph with this name, no edge collection or no edge with this id could be found.
|
||||
///
|
||||
/// @RESTRETURNCODE{412}
|
||||
/// Returned if if-match header is given, but the documents revision is different.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{HttpGharialGetEdge}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// examples.loadGraph("social");
|
||||
|
@ -1216,6 +1836,55 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_edge_replace_http_examples
|
||||
/// @brief replace the content of an existing edge
|
||||
///
|
||||
/// @RESTHEADER{PUT /system/gharial/graph-name/edge/collection-name/edge-key, Replace an edge}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Replaces the data of an edge in the collection.
|
||||
///
|
||||
/// @RESTURLPARAMS
|
||||
///
|
||||
/// @RESTPARAM{graph-name, string, required}
|
||||
/// The name of the graph.
|
||||
///
|
||||
/// @RESTPARAM{collection-name, string, required}
|
||||
/// The name of the edge collection the edge belongs to.
|
||||
///
|
||||
/// @RESTPARAM{edge-key, string, required}
|
||||
/// The *_key* attribute of the vertex.
|
||||
///
|
||||
/// @RESTQUERYPARAMS
|
||||
///
|
||||
/// @RESTPARAM{waitForSync, boolean, optional}
|
||||
/// Define if the request should wait until synced to disk.
|
||||
///
|
||||
/// @RESTHEADERPARAMS
|
||||
///
|
||||
/// @RESTPARAM{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.
|
||||
///
|
||||
/// @RESTBODYPARAMS
|
||||
/// The body has to be the JSON object to be stored.
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{200}
|
||||
/// Returned if the edge could be replaced.
|
||||
///
|
||||
/// @RESTRETURNCODE{202}
|
||||
/// Returned if the request was successful but waitForSync is false.
|
||||
///
|
||||
/// @RESTRETURNCODE{404}
|
||||
/// Returned if no graph with this name, no edge collection or no edge with this id could be found.
|
||||
///
|
||||
/// @RESTRETURNCODE{412}
|
||||
/// Returned if if-match header is given, but the documents revision is different.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{HttpGharialPutEdge}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// examples.loadGraph("social");
|
||||
|
@ -1277,6 +1946,48 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_edge_modify_http_examples
|
||||
/// @brief modify an existing edge
|
||||
///
|
||||
/// @RESTHEADER{PATCH /system/gharial/graph-name/edge/collection-name/edge-key, Modify an edge}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Updates the data of the specific edge in the collection.
|
||||
///
|
||||
/// @RESTURLPARAMS
|
||||
///
|
||||
/// @RESTPARAM{graph-name, string, required}
|
||||
/// The name of the graph.
|
||||
///
|
||||
/// @RESTPARAM{collection-name, string, required}
|
||||
/// The name of the edge collection the edge belongs to.
|
||||
///
|
||||
/// @RESTPARAM{edge-key, string, required}
|
||||
/// The *_key* attribute of the vertex.
|
||||
///
|
||||
/// @RESTQUERYPARAMS
|
||||
///
|
||||
/// @RESTPARAM{waitForSync, boolean, optional}
|
||||
/// Define if the request should wait until synced to disk.
|
||||
///
|
||||
/// @RESTPARAM{keepNull, boolean, optional}
|
||||
/// Define if values set to null should be stored. By default the key is removed from the document.
|
||||
///
|
||||
/// @RESTBODYPARAMS
|
||||
/// The body has to be a JSON object containing the attributes to be updated.
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{200}
|
||||
/// Returned if the edge could be updated.
|
||||
///
|
||||
/// @RESTRETURNCODE{202}
|
||||
/// Returned if the request was successful but waitForSync is false.
|
||||
///
|
||||
/// @RESTRETURNCODE{404}
|
||||
/// Returned if no graph with this name, no edge collection or no edge with this id could be found.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{HttpGharialPatchEdge}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// examples.loadGraph("social");
|
||||
|
@ -1341,6 +2052,52 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @startDocuBlock JSF_general_graph_edge_delete_http_examples
|
||||
/// @brief removes an edge from graph
|
||||
///
|
||||
/// @RESTHEADER{DELETE /system/gharial/graph-name/edge/collection-name/edge-key, Remove an edge}
|
||||
///
|
||||
/// @RESTDESCRIPTION
|
||||
/// Removes an edge from the collection.
|
||||
///
|
||||
/// @RESTURLPARAMS
|
||||
///
|
||||
/// @RESTPARAM{graph-name, string, required}
|
||||
/// The name of the graph.
|
||||
///
|
||||
/// @RESTPARAM{collection-name, string, required}
|
||||
/// The name of the edge collection the edge belongs to.
|
||||
///
|
||||
/// @RESTPARAM{edge-key, string, required}
|
||||
/// The *_key* attribute of the vertex.
|
||||
///
|
||||
/// @RESTQUERYPARAMS
|
||||
///
|
||||
/// @RESTPARAM{waitForSync, boolean, optional}
|
||||
/// Define if the request should wait until synced to disk.
|
||||
///
|
||||
/// @RESTHEADERPARAMS
|
||||
///
|
||||
/// @RESTPARAM{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.
|
||||
///
|
||||
/// @RESTRETURNCODES
|
||||
///
|
||||
/// @RESTRETURNCODE{200}
|
||||
/// Returned if the edge could be removed.
|
||||
///
|
||||
/// @RESTRETURNCODE{202}
|
||||
/// Returned if the request was successful but waitForSync is false.
|
||||
///
|
||||
/// @RESTRETURNCODE{404}
|
||||
/// Returned if no graph with this name, no edge collection or no edge with this id could be found.
|
||||
///
|
||||
/// @RESTRETURNCODE{412}
|
||||
/// Returned if if-match header is given, but the documents revision is different.
|
||||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @EXAMPLE_ARANGOSH_RUN{HttpGharialDeleteEdge}
|
||||
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
|
||||
/// examples.loadGraph("social");
|
||||
|
|
Loading…
Reference in New Issue