1
0
Fork 0
arangodb/Documentation/Books/Users/HttpGharial/Edges.mdpp

153 lines
3.7 KiB
Plaintext

!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.
@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.
@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{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.
@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.
@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.
@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{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.
@RESTBODYPARAMS
The body has to be the JSON object to be stored.
@RESTRETURNCODES
@RESTRETURNCODE{200}
Returned if the edge could be replaced.
@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_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.
@RESTRETURNCODES
@RESTRETURNCODE{200}
Returned if the edge could be removed.
@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_delete_http_examples