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

215 lines
6.2 KiB
Plaintext

!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