{ "basePath": "/", "swaggerVersion": "1.1", "apiVersion": "0.1", "apis": [ { "operations": [ { "errorResponses": [ { "reason": "is returned if the graph was created successfully and waitForSync was true. ", "code": "201" }, { "reason": "is returned if the graph was created successfully and waitForSync was false. ", "code": "202" }, { "reason": "is returned if it failed. The response body contains an error document in this case. ", "code": "400" } ], "parameters": [ { "dataType": "Boolean", "paramType": "query", "name": "waitForSync", "description": "Wait until document has been sync to disk. " }, { "dataType": "Json", "paramType": "body", "required": "true", "name": "graph", "description": "The call expects a JSON hash array as body with the following attributes: _key: The name of the new graph. vertices: The name of the vertices collection. edges: The name of the egde collection. " } ], "notes": "Creates a new graph.

Returns an object with an attribute graph containing a list of all graph properties.

", "summary": "create graph", "httpMethod": "POST", "examples": "

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/\n{\"_key\":\"graph\",\"vertices\":\"vertices\",\"edges\":\"edges\"}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: 129712551\n\n{ \n  \"graph\" : { \n    \"_id\" : \"_graphs/graph\", \n    \"_rev\" : \"129712551\", \n    \"_key\" : \"graph\", \n    \"edges\" : \"edges\", \n    \"vertices\" : \"vertices\" \n  }, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", "nickname": "createGraph" } ], "path": "/_api/graph" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the graph was found (in case graph-name was specified) or the list of graphs was assembled successfully (in case graph-name was not specified). ", "code": "200" }, { "reason": "is returned if the graph was not found. This response code may only be returned if graph-name is specified in the request. The response body contains an error document in this case. ", "code": "404" }, { "reason": "\"If-None-Match\" header is given and the current graph has not a different version. This response code may only be returned if graph-name is specified in the request. ", "code": "304" }, { "reason": "\"If-Match\" header or rev is given and the current graph has a different version. This response code may only be returned if graph-name is specified in the request. ", "code": "412" } ], "parameters": [ { "dataType": "String", "paramType": "path", "required": "false", "name": "graph-name", "description": "The name of the graph. " }, { "dataType": "String", "paramType": "header", "name": "If-None-Match", "description": "If graph-name is specified, then this header can be used to check whether a specific graph has changed or not. " }, { "dataType": "String", "paramType": "header", "name": "If-Match", "description": "If graph-name is specified, then this header can be used to check whether a specific graph has changed or not. " } ], "notes": "

If graph-name is specified, returns an object with an attribute graph containing a JSON hash with all properties of the specified graph.

If graph-name is not specified, returns a list of graph objects.

", "summary": "get the properties of a specific or all graphs", "httpMethod": "GET", "examples": "get graph by name

unix> curl --dump - http://localhost:8529/_api/graph/graph\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 132006311\n\n{ \n  \"graph\" : { \n    \"_id\" : \"_graphs/graph\", \n    \"_rev\" : \"132006311\", \n    \"_key\" : \"graph\", \n    \"edges\" : \"edges\", \n    \"vertices\" : \"vertices\" \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

get all graphs

unix> curl --dump - http://localhost:8529/_api/graph\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"graphs\" : [ \n    { \n      \"_id\" : \"_graphs/graph2\", \n      \"_rev\" : \"136462759\", \n      \"_key\" : \"graph2\", \n      \"edges\" : \"edges2\", \n      \"vertices\" : \"vertices2\" \n    }, \n    { \n      \"_id\" : \"_graphs/graph1\", \n      \"_rev\" : \"134365607\", \n      \"_key\" : \"graph1\", \n      \"edges\" : \"edges1\", \n      \"vertices\" : \"vertices1\" \n    } \n  ], \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "getThePropertiesOfASpecificOrAllGraphs" } ], "path": "/_api/graph/{graph-name}" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the graph was deleted and waitForSync was true. ", "code": "200" }, { "reason": "is returned if the graph was deleted and waitForSync was false. ", "code": "202" }, { "reason": "is returned if the graph was not found. The response body contains an error document in this case. ", "code": "404" }, { "reason": "\"If-Match\" header or rev is given and the current graph has a different version ", "code": "412" } ], "parameters": [ { "dataType": "String", "paramType": "path", "required": "true", "name": "graph-name", "description": "The name of the graph " }, { "dataType": "String", "paramType": "header", "name": "If-Match", "description": "If the \"If-Match\" header is given, then it must contain exactly one etag. The document is returned, if it has the same revision ad the given etag. Otherwise a HTTP 412 is returned. As an alternative you can supply the etag in an attribute rev in the URL. " } ], "notes": "Deletes graph, edges and vertices

", "summary": "delete graph", "httpMethod": "DELETE", "examples": "delete graph by name

unix> curl -X DELETE --dump - http://localhost:8529/_api/graph/graph\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"deleted\" : true, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "deleteGraph" } ], "path": "/_api/graph/{graph-name}" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the graph was created successfully and waitForSync was true. ", "code": "201" }, { "reason": "is returned if the graph was created successfully and waitForSync was false. ", "code": "202" } ], "parameters": [ { "dataType": "String", "paramType": "path", "required": "true", "name": "graph-name", "description": "The name of the graph " }, { "dataType": "Boolean", "paramType": "query", "name": "waitForSync", "description": "Wait until document has been sync to disk. " }, { "dataType": "Json", "paramType": "body", "required": "true", "name": "vertex", "description": "The call expects a JSON hash array as body with the vertex properties: - _key: The name of the vertex (optional). - further optional attributes. " } ], "notes": "Creates a vertex in a graph.

Returns an object with an attribute vertex containing a list of all vertex properties.

", "summary": "create vertex", "httpMethod": "POST", "examples": "

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/vertex\n{\"_key\":\"v1\",\"optional1\":\"val1\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 142229927\n\n{ \n  \"vertex\" : { \n    \"_id\" : \"vertices/v1\", \n    \"_rev\" : \"142229927\", \n    \"_key\" : \"v1\", \n    \"optional1\" : \"val1\" \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

", "nickname": "createVertex" } ], "path": "/_api/graph/{graph-name}/vertex" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the graph was found ", "code": "200" }, { "reason": "\"If-Match\" header is given and the current graph has not a different version ", "code": "304" }, { "reason": "is returned if the graph or vertex was not found. The response body contains an error document in this case. ", "code": "404" }, { "reason": "\"If-None-Match\" header or rev is given and the current graph has a different version ", "code": "412" } ], "parameters": [ { "dataType": "String", "paramType": "path", "required": "true", "name": "graph-name", "description": "The name of the graph " }, { "dataType": "String", "paramType": "query", "name": "rev", "description": "Revision of a vertex " }, { "dataType": "String", "paramType": "header", "name": "If-None-Match", "description": "If the \"If-None-Match\" header is given, then it must contain exactly one etag. The document is returned, if it has a different revision than the given etag. Otherwise a HTTP 304 is returned. " }, { "dataType": "String", "paramType": "header", "name": "If-Match", "description": "If the \"If-Match\" header is given, then it must contain exactly one etag. The document is returned, if it has the same revision ad the given etag. Otherwise a HTTP 412 is returned. As an alternative you can supply the etag in an attribute rev in the URL. " } ], "notes": "Returns an object with an attribute vertex containing a list of all vertex properties.

", "summary": "get vertex", "httpMethod": "GET", "examples": "get vertex properties by name

unix> curl --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 145047975\n\n{ \n  \"vertex\" : { \n    \"_id\" : \"vertices/v1\", \n    \"_rev\" : \"145047975\", \n    \"_key\" : \"v1\", \n    \"optional1\" : \"val1\" \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "getVertex" } ], "path": "/_api/graph/{graph-name}/vertex" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the vertex was deleted and waitForSync was true. ", "code": "200" }, { "reason": "is returned if the vertex was deleted and waitForSync was false. ", "code": "202" }, { "reason": "is returned if the graph or the vertex was not found. The response body contains an error document in this case. ", "code": "404" }, { "reason": "\"If-Match\" header or rev is given and the current vertex has a different version ", "code": "412" } ], "parameters": [ { "dataType": "String", "paramType": "path", "required": "true", "name": "graph-name", "description": "The name of the graph " }, { "dataType": "Boolean", "paramType": "query", "name": "waitForSync", "description": "Wait until document has been sync to disk. " }, { "dataType": "String", "paramType": "query", "name": "rev", "description": "Revision of a vertex " }, { "dataType": "String", "paramType": "header", "name": "If-Match", "description": "If the \"If-Match\" header is given, then it must contain exactly one etag. The document is returned, if it has the same revision ad the given etag. Otherwise a HTTP 412 is returned. As an alternative you can supply the etag in an attribute rev in the URL. " } ], "notes": "Deletes vertex and all in and out edges of the vertex

", "summary": "delete vertex", "httpMethod": "DELETE", "examples": "

unix> curl -X DELETE --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"deleted\" : true, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

", "nickname": "deleteVertex" } ], "path": "/_api/graph/{graph-name}/vertex" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the vertex was updated successfully and waitForSync was true. ", "code": "201" }, { "reason": "is returned if the vertex was updated successfully and waitForSync was false. ", "code": "202" }, { "reason": "is returned if the graph or the vertex was not found. The response body contains an error document in this case. ", "code": "404" }, { "reason": "\"If-Match\" header or rev is given and the current vertex has a different version ", "code": "412" } ], "parameters": [ { "dataType": "String", "paramType": "path", "required": "true", "name": "graph-name", "description": "The name of the graph " }, { "dataType": "Boolean", "paramType": "query", "name": "waitForSync", "description": "Wait until vertex has been sync to disk. " }, { "dataType": "String", "paramType": "query", "name": "rev", "description": "Revision of a vertex " }, { "dataType": "Json", "paramType": "body", "required": "true", "name": "vertex", "description": "The call expects a JSON hash array as body with the new vertex properties. " }, { "dataType": "String", "paramType": "header", "name": "if-match", "description": "If the \"If-Match\" header is given, then it must contain exactly one etag. The document is updated, if it has the same revision ad the given etag. Otherwise a HTTP 412 is returned. As an alternative you can supply the etag in an attribute rev in the URL. " } ], "notes": "Replaces the vertex properties.

Returns an object with an attribute vertex containing a list of all vertex properties.

", "summary": "update vertex", "httpMethod": "PUT", "examples": "

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{\"optional1\":\"val2\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 151863719\n\n{ \n  \"vertex\" : { \n    \"_id\" : \"vertices/v1\", \n    \"_rev\" : \"151863719\", \n    \"_key\" : \"v1\", \n    \"optional1\" : \"val2\" \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

", "nickname": "updateVertex" } ], "path": "/_api/graph/{graph-name}/vertex" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the vertex was updated successfully and waitForSync was true. ", "code": "201" }, { "reason": "is returned if the vertex was updated successfully and waitForSync was false. ", "code": "202" }, { "reason": "is returned if the graph or the vertex was not found. The response body contains an error document in this case. ", "code": "404" }, { "reason": "\"If-Match\" header or rev is given and the current vertex has a different version ", "code": "412" } ], "parameters": [ { "dataType": "String", "paramType": "path", "required": "true", "name": "graph-name", "description": "The name of the graph " }, { "dataType": "Boolean", "paramType": "query", "name": "waitForSync", "description": "Wait until vertex has been sync to disk. " }, { "dataType": "String", "paramType": "query", "name": "rev", "description": "Revision of a vertex " }, { "dataType": "Boolean", "paramType": "query", "name": "keepNull", "description": "Modify the behavior of the patch command to remove any attribute " }, { "dataType": "Json", "paramType": "body", "required": "true", "name": "graph", "description": "The call expects a JSON hash array as body with the properties to patch. " }, { "dataType": "String", "paramType": "header", "name": "if-match", "description": "If the \"If-Match\" header is given, then it must contain exactly one etag. The document is updated, if it has the same revision ad the given etag. Otherwise a HTTP 412 is returned. As an alternative you can supply the etag in an attribute rev in the URL. " } ], "notes": "Partially updates the vertex properties.

Setting an attribute value to null in the patch document will cause a value of null be saved for the attribute by default. If the intention is to delete existing attributes with the patch command, the URL parameter keepNull can be used with a value of false. This will modify the behavior of the patch command to remove any attributes from the existing document that are contained in the patch document with an attribute value of null.

Returns an object with an attribute vertex containing a list of all vertex properties.

", "summary": "update vertex", "httpMethod": "PATCH", "examples": "

unix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{\"optional1\":\"vertexPatch\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 155206055\n\n{ \n  \"vertex\" : { \n    \"_id\" : \"vertices/v1\", \n    \"_rev\" : \"155206055\", \n    \"_key\" : \"v1\", \n    \"optional1\" : \"vertexPatch\" \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\nunix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/graph/graph/vertex/v1\n{\"optional1\":null}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 155730343\n\n{ \n  \"vertex\" : { \n    \"_id\" : \"vertices/v1\", \n    \"_rev\" : \"155730343\", \n    \"_key\" : \"v1\", \n    \"optional1\" : null \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

", "nickname": "updateVertex" } ], "path": "/_api/graph/{graph-name}/vertex" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the cursor was created ", "code": "201" } ], "parameters": [ { "dataType": "String", "paramType": "path", "required": "true", "name": "graph-name", "description": "The name of the graph " }, { "dataType": "Json", "paramType": "body", "required": "true", "name": "filter", "description": "The call expects a JSON hash array as body to filter the result: " } ], "notes": "Returns a cursor.

The call expects a JSON hash array as body to filter the result:

- batchSize: the batch size of the returned cursor- limit: limit the result size- count: return the total number of results (default \"false\")- filter: a optional filter

The attributes of filter - properties: filter by an array of vertex properties

The attributes of a property filter - key: filter the result vertices by a key value pair- value: the value of the key- compare: a compare operator

", "summary": "get vertices", "httpMethod": "POST", "examples": "Select all vertices

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/vertices\n{\"batchSize\":100}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"vertices/v5\", \n      \"_rev\" : \"159859111\", \n      \"_key\" : \"v5\", \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"vertices/v4\", \n      \"_rev\" : \"159531431\", \n      \"_key\" : \"v4\", \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"vertices/v1\", \n      \"_rev\" : \"158482855\", \n      \"_key\" : \"v1\", \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"vertices/v3\", \n      \"_rev\" : \"159203751\", \n      \"_key\" : \"v3\", \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"vertices/v2\", \n      \"_rev\" : \"158876071\", \n      \"_key\" : \"v2\", \n      \"optional1\" : \"val1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", "nickname": "getVertices" } ], "path": "/_api/graph/{graph-name}/vertices" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the cursor was created ", "code": "201" } ], "parameters": [ { "dataType": "String", "paramType": "path", "required": "true", "name": "graph-name", "description": "The name of the graph " }, { "dataType": "Json", "paramType": "body", "required": "true", "name": "graph", "description": "The call expects a JSON hash array as body to filter the result: " } ], "notes": "Returns a cursor.

The call expects a JSON hash array as body to filter the result:

- batchSize: the batch size of the returned cursor- limit: limit the result size- count: return the total number of results (default \"false\")- filter: a optional filter

The attributes of filter - direction: Filter for inbound (value \"in\") or outbound (value \"out\") neighbors. Default value is \"any\". - labels: filter by an array of edge labels (empty array means no restriction)- properties: filter neighbors by an array of edge properties

The attributes of a property filter - key: filter the result vertices by a key value pair- value: the value of the key- compare: a compare operator

", "summary": "get vertices", "httpMethod": "POST", "examples": "Select all vertices

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/vertices/v2\n{\"batchSize\" : 100, \"filter\" : {\"direction\" : \"any\", \"properties\":[] }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"vertices/v1\", \n      \"_rev\" : \"162742695\", \n      \"_key\" : \"v1\", \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"vertices/v4\", \n      \"_rev\" : \"163791271\", \n      \"_key\" : \"v4\", \n      \"optional1\" : \"val1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

Select vertices by direction and property filter

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/vertices/v2\n{\"batchSize\" : 100, \"filter\" : {\"direction\" : \"out\", \"properties\":[ { \"key\": \"optional1\", \"value\": \"val2\", \"compare\" : \"==\" }, ] }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"vertices/v4\", \n      \"_rev\" : \"170934695\", \n      \"_key\" : \"v4\", \n      \"optional1\" : \"val2\" \n    }, \n    { \n      \"_id\" : \"vertices/v1\", \n      \"_rev\" : \"169886119\", \n      \"_key\" : \"v1\", \n      \"optional1\" : \"val1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", "nickname": "getVertices" } ], "path": "/_api/graph/{graph-name}/vertices/{vertice-name}" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the edge was created successfully and waitForSync was true. ", "code": "201" }, { "reason": "is returned if the edge was created successfully and waitForSync was false. ", "code": "202" } ], "parameters": [ { "dataType": "String", "paramType": "path", "required": "true", "name": "graph-name", "description": "The name of the graph " }, { "dataType": "Boolean", "paramType": "query", "name": "waitForSync", "description": "Wait until edge has been sync to disk. " }, { "dataType": "Json", "paramType": "body", "required": "true", "name": "edge", "description": "The call expects a JSON hash array as body with the edge properties: " } ], "notes": "Creates an edge in a graph.

The call expects a JSON hash array as body with the edge properties:

- _key: The name of the edge.- _from: The name of the from vertex.- _to: The name of the to vertex.- $label: A label for the edge (optional).- further optional attributes.

Returns an object with an attribute edge containing the list of all edge properties.

", "summary": "create edge", "httpMethod": "POST", "examples": "

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/edge\n{\"_key\":\"edge1\",\"_from\":\"vert2\",\"_to\":\"vert1\",\"optional1\":\"val1\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 178143655\n\n{ \n  \"edge\" : { \n    \"_id\" : \"edges/edge1\", \n    \"_rev\" : \"178143655\", \n    \"_key\" : \"edge1\", \n    \"_from\" : \"vertices/vert2\", \n    \"_to\" : \"vertices/vert1\", \n    \"$label\" : null, \n    \"optional1\" : \"val1\" \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

", "nickname": "createEdge" } ], "path": "/_api/graph/{graph-name}/edge" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the edge was found ", "code": "200" }, { "reason": "\"If-Match\" header is given and the current edge has not a different version ", "code": "304" }, { "reason": "is returned if the graph or edge was not found. The response body contains an error document in this case. ", "code": "404" }, { "reason": "\"If-None-Match\" header or rev is given and the current edge has a different version ", "code": "412" } ], "parameters": [ { "dataType": "String", "paramType": "path", "required": "true", "name": "graph-name", "description": "The name of the graph " }, { "dataType": "String", "paramType": "query", "name": "rev", "description": "Revision of an edge " }, { "dataType": "String", "paramType": "header", "name": "if-none-match", "description": "If the \"If-None-Match\" header is given, then it must contain exactly one etag. The document is returned, if it has a different revision than the given etag. Otherwise a HTTP 304 is returned. " }, { "dataType": "String", "paramType": "header", "name": "if-match", "description": "If the \"If-Match\" header is given, then it must contain exactly one etag. The document is returned, if it has the same revision ad the given etag. Otherwise a HTTP 412 is returned. As an alternative you can supply the etag in an attribute rev in the URL. " } ], "notes": "Returns an object with an attribute edge containing a list of all edge properties.

", "summary": "get edge", "httpMethod": "GET", "examples": "

unix> curl --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 182075815\n\n{ \n  \"edge\" : { \n    \"_id\" : \"edges/edge1\", \n    \"_rev\" : \"182075815\", \n    \"_key\" : \"edge1\", \n    \"_from\" : \"vertices/vert1\", \n    \"_to\" : \"vertices/vert2\", \n    \"$label\" : null, \n    \"optional1\" : \"val1\" \n  }, \n  \"error\" : false, \n  \"code\" : 200 \n}\n\n

", "nickname": "getEdge" } ], "path": "/_api/graph/{graph-name}/edge" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the edge was deletd successfully and waitForSync was true. ", "code": "200" }, { "reason": "is returned if the edge was deleted successfully and waitForSync was false. ", "code": "202" }, { "reason": "is returned if the graph or the edge was not found. The response body contains an error document in this case. ", "code": "404" }, { "reason": "\"If-Match\" header or rev is given and the current edge has a different version ", "code": "412" } ], "parameters": [ { "dataType": "String", "paramType": "path", "required": "true", "name": "graph-name", "description": "The name of the graph " }, { "dataType": "Boolean", "paramType": "query", "name": "waitForSync", "description": "Wait until edge has been sync to disk. " }, { "dataType": "String", "paramType": "query", "name": "rev", "description": "Revision of an edge " }, { "dataType": "String", "paramType": "header", "name": "if-match", "description": "If the \"If-Match\" header is given, then it must contain exactly one etag. The document is returned, if it has the same revision ad the given etag. Otherwise a HTTP 412 is returned. As an alternative you can supply the etag in an attribute rev in the URL. " } ], "notes": "Deletes an edge of the graph

", "summary": "delete edge", "httpMethod": "DELETE", "examples": "

unix> curl -X DELETE --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"deleted\" : true, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

", "nickname": "deleteEdge" } ], "path": "/_api/graph/{graph-name}/edge" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the edge was updated successfully and waitForSync was true. ", "code": "201" }, { "reason": "is returned if the edge was updated successfully and waitForSync was false. ", "code": "202" }, { "reason": "is returned if the graph or the edge was not found. The response body contains an error document in this case. ", "code": "404" }, { "reason": "\"If-Match\" header or rev is given and the current edge has a different version ", "code": "412" } ], "parameters": [ { "dataType": "String", "paramType": "path", "required": "true", "name": "graph-name", "description": "The name of the graph " }, { "dataType": "Boolean", "paramType": "query", "name": "waitForSync", "description": "Wait until edge has been sync to disk. " }, { "dataType": "String", "paramType": "query", "name": "rev", "description": "Revision of an edge " }, { "dataType": "Json", "paramType": "body", "required": "true", "name": "edge", "description": "The call expects a JSON hash array as body with the new edge properties. " }, { "dataType": "String", "paramType": "header", "name": "if-match", "description": "If the \"If-Match\" header is given, then it must contain exactly one etag. The document is returned, if it has the same revision ad the given etag. Otherwise a HTTP 412 is returned. As an alternative you can supply the etag in an attribute rev in the URL. " } ], "notes": "Replaces the optional edge properties.

The call expects a JSON hash array as body with the new edge properties.

Returns an object with an attribute edge containing a list of all edge properties.

", "summary": "update edge", "httpMethod": "PUT", "examples": "

unix> curl -X PUT --data @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n{\"optional1\":\"val2\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 191054247\n\n{ \n  \"edge\" : { \n    \"_id\" : \"edges/edge1\", \n    \"_rev\" : \"191054247\", \n    \"_key\" : \"edge1\", \n    \"_from\" : \"vertices/vert1\", \n    \"_to\" : \"vertices/vert2\", \n    \"$label\" : null, \n    \"optional1\" : \"val2\" \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

", "nickname": "updateEdge" } ], "path": "/_api/graph/{graph-name}/edge" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the edge was updated successfully and waitForSync was true. ", "code": "201" }, { "reason": "is returned if the edge was updated successfully and waitForSync was false. ", "code": "202" }, { "reason": "is returned if the graph or the edge was not found. The response body contains an error document in this case. ", "code": "404" }, { "reason": "\"If-Match\" header or rev is given and the current edge has a different version ", "code": "412" } ], "parameters": [ { "dataType": "String", "paramType": "path", "required": "true", "name": "graph-name", "description": "The name of the graph " }, { "dataType": "Boolean", "paramType": "query", "name": "waitForSync", "description": "Wait until edge has been sync to disk. " }, { "dataType": "String", "paramType": "query", "name": "rev", "description": "Revision of an edge " }, { "dataType": "Boolean", "paramType": "query", "name": "keepNull", "description": "Modify the behavior of the patch command to remove any attribute " }, { "dataType": "Json", "paramType": "body", "required": "true", "name": "edge-properties", "description": "The call expects a JSON hash array as body with the properties to patch. " }, { "dataType": "String", "paramType": "header", "name": "if-match", "description": "If the \"If-Match\" header is given, then it must contain exactly one etag. The document is returned, if it has the same revision ad the given etag. Otherwise a HTTP 412 is returned. As an alternative you can supply the etag in an attribute rev in the URL. " } ], "notes": "Partially updates the edge properties.

Setting an attribute value to null in the patch document will cause a value of null be saved for the attribute by default. If the intention is to delete existing attributes with the patch command, the URL parameter keepNull can be used with a value of false. This will modify the behavior of the patch command to remove any attributes from the existing document that are contained in the patch document with an attribute value of null.

Returns an object with an attribute edge containing a list of all edge properties.

", "summary": "update edge", "httpMethod": "PATCH", "examples": "

unix> curl -X PATCH --data @- --dump - http://localhost:8529/_api/graph/graph/edge/edge1\n{\"optional3\":\"val3\"}\n\nHTTP/1.1 202 Accepted\ncontent-type: application/json; charset=utf-8\netag: 195576231\n\n{ \n  \"edge\" : { \n    \"_id\" : \"edges/edge1\", \n    \"_rev\" : \"195576231\", \n    \"_key\" : \"edge1\", \n    \"_from\" : \"vertices/vert1\", \n    \"_to\" : \"vertices/vert2\", \n    \"$label\" : null, \n    \"optional1\" : \"val1\", \n    \"optional3\" : \"val3\" \n  }, \n  \"error\" : false, \n  \"code\" : 202 \n}\n\n

", "nickname": "updateEdge" } ], "path": "/_api/graph/{graph-name}/edge" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the cursor was created ", "code": "201" } ], "parameters": [ { "dataType": "String", "paramType": "path", "required": "true", "name": "graph-name", "description": "The name of the graph " }, { "dataType": "Json", "paramType": "body", "required": "true", "name": "edge-properties", "description": "The call expects a JSON hash array as body to filter the result: " } ], "notes": "Returns a cursor.

The call expects a JSON hash array as body to filter the result:

- batchSize: the batch size of the returned cursor- limit: limit the result size- count: return the total number of results (default \"false\")- filter: a optional filter

The attributes of filter - labels: filter by an array of edge labels- properties: filter by an array of edge properties

The attributes of a property filter - key: filter the result edges by a key value pair- value: the value of the key- compare: a compare operator

", "summary": "get edges", "httpMethod": "POST", "examples": "Select all edges

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/edges\n{\"batchSize\":100}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"edges/edge4\", \n      \"_rev\" : \"202326439\", \n      \"_key\" : \"edge4\", \n      \"_from\" : \"vertices/v1\", \n      \"_to\" : \"vertices/v5\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"edges/edge1\", \n      \"_rev\" : \"200491431\", \n      \"_key\" : \"edge1\", \n      \"_from\" : \"vertices/v1\", \n      \"_to\" : \"vertices/v2\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"edges/edge2\", \n      \"_rev\" : \"201146791\", \n      \"_key\" : \"edge2\", \n      \"_from\" : \"vertices/v1\", \n      \"_to\" : \"vertices/v3\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"edges/edge3\", \n      \"_rev\" : \"201736615\", \n      \"_key\" : \"edge3\", \n      \"_from\" : \"vertices/v2\", \n      \"_to\" : \"vertices/v4\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", "nickname": "getEdges" } ], "path": "/_api/graph/{graph-name}/edges" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the cursor was created ", "code": "201" } ], "parameters": [ { "dataType": "String", "paramType": "path", "required": "true", "name": "graph-name", "description": "The name of the graph " }, { "dataType": "String", "paramType": "path", "required": "true", "name": "vertex-name", "description": "The name of the vertex " }, { "dataType": "Json", "paramType": "body", "required": "true", "name": "edge-properties", "description": "The call expects a JSON hash array as body to filter the result: " } ], "notes": "

Returns a cursor.

The call expects a JSON hash array as body to filter the result:

- batchSize: the batch size of the returned cursor- limit: limit the result size- count: return the total number of results (default \"false\")- filter: a optional filter

The attributes of filter - direction: Filter for inbound (value \"in\") or outbound (value \"out\") neighbors. Default value is \"any\". - labels: filter by an array of edge labels- properties: filter neighbors by an array of properties

The attributes of a property filter - key: filter the result vertices by a key value pair- value: the value of the key- compare: a compare operator

", "summary": "get edges", "httpMethod": "POST", "examples": "Select all edges

unix> curl -X POST --data @- --dump - http://localhost:8529/_api/graph/graph/edges/v2\n{\"batchSize\" : 100, \"filter\" : { \"direction\" : \"any\" }}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\n\n{ \n  \"result\" : [ \n    { \n      \"_id\" : \"edges/edge1\", \n      \"_rev\" : \"207372711\", \n      \"_key\" : \"edge1\", \n      \"_from\" : \"vertices/v1\", \n      \"_to\" : \"vertices/v2\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    }, \n    { \n      \"_id\" : \"edges/edge3\", \n      \"_rev\" : \"208617895\", \n      \"_key\" : \"edge3\", \n      \"_from\" : \"vertices/v2\", \n      \"_to\" : \"vertices/v4\", \n      \"$label\" : null, \n      \"optional1\" : \"val1\" \n    } \n  ], \n  \"hasMore\" : false, \n  \"error\" : false, \n  \"code\" : 201 \n}\n\n

", "nickname": "getEdges" } ], "path": "/_api/graph/{graph-name}/edges/{vertex-name}" } ] }