!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/README.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