{ "basePath": "/", "swaggerVersion": "1.1", "apiVersion": "0.1", "apis": [ { "operations": [ { "errorResponses": [ { "reason": "is returned if the graph was created sucessfully and `waitForSync` was `true`. ", "code": "201" }, { "reason": "is returned if the graph was created sucessfully 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": "String", "paramType": "body", "required": "false", "name": "body", "description": "A valid json document for your data, for instance {\"hello\": \"world\"}." }, { "dataType": "Boolean", "paramType": "query", "required": "false", "name": "waitForSync", "description": "Wait until document has been sync to disk. " } ], "notes": "Creates a new graph.

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.

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

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

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

", "nickname": "createGraph" } ], "path": "/_api/graph" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the graph was found ", "code": "200" }, { "reason": "is returned if the graph was not found. 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 ", "code": "304" }, { "reason": "\"If-Match\" header or rev is given and the current graph has a different version ", "code": "412" } ], "parameters": [ { "dataType": "String", "paramType": "query", "required": "false", "name": "rev", "description": "Revision of a graph " } ], "notes": "

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

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.

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.

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

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

", "nickname": "getGraphProperties" } ], "path": "/_api/graph" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the graph was deleted ", "code": "204" }, { "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": "Boolean", "paramType": "query", "required": "false", "name": "waitForSync", "description": "Wait until document has been sync to disk. " }, { "dataType": "String", "paramType": "query", "required": "false", "name": "rev", "description": "Revision of a graph " } ], "notes": "Deletes graph, edges and vertices

If the \"If-Match\" header is given, then it must contain exactly one etag. The document is deleted, 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.

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

> curl -X DELETE --dump - http://localhost:8529/_api/graph/graph1\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

", "nickname": "deleteGraph" } ], "path": "/_api/graph" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the graph was created sucessfully and `waitForSync` was `true`. ", "code": "201" }, { "reason": "is returned if the graph was created sucessfully and `waitForSync` was `false`. ", "code": "202" } ], "parameters": [ { "dataType": "String", "paramType": "body", "required": "false", "name": "body", "description": "A valid json document for your data, for instance {\"hello\": \"world\"}." }, { "dataType": "Boolean", "paramType": "query", "required": "false", "name": "waitForSync", "description": "Wait until document has been sync to disk. " } ], "notes": "Creates a vertex in a graph.

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

- _key: The name of the vertex (optional).
- further optional attributes.

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

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

> curl --data @- -X POST --dump - http://localhost:8529/_api/graph/graph1/vertex\n{\"_key\" : \"v1\", \"optional1\" : \"val1\", \"optional2\" : \"val2\"}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: 24332177\n\n{\n  \"vertex\": {\n    \"_id\": \"v/v1\",\n    \"_rev\": \"24332177\",\n    \"_key\": \"v1\",\n    \"optional1\": \"val1\",\n    \"optional2\": \"val2\"\n  },\n  \"error\": false,\n  \"code\": 201\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": "query", "required": "false", "name": "rev", "description": "Revision of a vertex " } ], "notes": "Returns an object with an attribute vertex containing a list of all vertex properties.

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.

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.

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

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

", "nickname": "getVertex" } ], "path": "/_api/graph/{graph-name}/vertex" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the vertex was deleted ", "code": "200" }, { "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": "Boolean", "paramType": "query", "required": "false", "name": "waitForSync", "description": "Wait until document has been sync to disk. " }, { "dataType": "String", "paramType": "query", "required": "false", "name": "rev", "description": "Revision of a vertex " } ], "notes": "Deletes vertex and all in and out edges of the vertex

If the \"If-Match\" header is given, then it must contain exactly one etag. The document is deleted, 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.

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

> curl -X DELETE --dump - http://localhost:8529/_api/graph/graph1/vertex/v1\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

", "nickname": "deleteVertex" } ], "path": "/_api/graph/{graph-name}/vertex" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the vertex was updated sucessfully and `waitForSync` was `true`. ", "code": "201" }, { "reason": "is returned if the vertex was updated sucessfully 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": "Boolean", "paramType": "query", "required": "false", "name": "waitForSync", "description": "Wait until vertex has been sync to disk. " }, { "dataType": "String", "paramType": "query", "required": "false", "name": "rev", "description": "Revision of a vertex " } ], "notes": "Replaces the vertex properties.

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

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

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.

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

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

", "nickname": "updateVertex" } ], "path": "/_api/graph/{graph-name}/vertex" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the vertex was updated sucessfully and `waitForSync` was `true`. ", "code": "201" }, { "reason": "is returned if the vertex was updated sucessfully 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": "Boolean", "paramType": "query", "required": "false", "name": "waitForSync", "description": "Wait until vertex has been sync to disk. " }, { "dataType": "String", "paramType": "query", "required": "false", "name": "rev", "description": "Revision of a vertex " }, { "dataType": "Boolean", "paramType": "query", "required": "false", "name": "keepNull", "description": "Modify the behavior of the patch command to remove any attribute " } ], "notes": "Partially updates the vertex properties.

The call expects a JSON hash array as body with the properties to patch.

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. 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.

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

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

> curl --data @- -X PATCH --dump - http://localhost:8529/_api/graph/graph1/vertex/v1\n{\"optional2\" : \"vertexPatch2\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 24332193\n\n{\n  \"vertex\": {\n    \"_id\": \"v/v1\",\n    \"_rev\": \"24332193\",\n    \"_key\": \"v1\",\n    \"optional1\": \"val2\",\n    \"optional2\": \"vertexPatch2\"\n  },\n  \"error\": false,\n  \"code\": 200\n}\n\n> curl --data @- -X PATCH --dump - http://localhost:8529/_api/graph/graph1/vertex/v1?keepNull=false\n{\"optional2\" : null}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 24332199\n\n{\n  \"vertex\": {\n    \"_id\": \"v/v1\",\n    \"_rev\": \"24332199\",\n    \"_key\": \"v1\",\n    \"optional1\": \"val2\"\n  },\n  \"error\": false,\n  \"code\": 200\n}\n

", "nickname": "updateVertex" } ], "path": "/_api/graph/{graph-name}/vertex" }, { "operations": [ { "errorResponses": [], "parameters": [ { "dataType": "String", "paramType": "body", "required": "false", "name": "body", "description": "A valid json document for your data, for instance {\"hello\": \"world\"}." } ], "notes": "", "summary": "get vertices", "httpMethod": "POST", "examples": "", "nickname": "getVertices" } ], "path": "/_api/graph/{graph-name}/vertices" }, { "operations": [ { "errorResponses": [], "parameters": [ { "dataType": "String", "paramType": "body", "required": "false", "name": "body", "description": "A valid json document for your data, for instance {\"hello\": \"world\"}." } ], "notes": "", "summary": "get vertices", "httpMethod": "POST", "examples": "", "nickname": "getVertices" } ], "path": "/_api/graph/{graph-name}/vertices/{vertice-name}" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the edge was created sucessfully and `waitForSync` was `true`. ", "code": "201" }, { "reason": "is returned if the edge was created sucessfully and `waitForSync` was `false`. ", "code": "202" } ], "parameters": [ { "dataType": "String", "paramType": "body", "required": "false", "name": "body", "description": "A valid json document for your data, for instance {\"hello\": \"world\"}." }, { "dataType": "Boolean", "paramType": "query", "required": "false", "name": "waitForSync", "description": "Wait until edge has been sync to disk. " } ], "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": "

> curl --data @- -X POST --dump - http://localhost:8529/_api/graph/graph1/edge\n{\"_key\" : \"edge1\", \"_from\" : \"vert2\", \"_to\" : \"vert1\", \"optional1\" : \"val1\"}\n\nHTTP/1.1 201 Created\ncontent-type: application/json; charset=utf-8\netag: 57595366\n\n{\n  \"edge\": {\n    \"_id\": \"e/edge1\",\n    \"_rev\": \"57595366\",\n    \"_key\": \"edge1\",\n    \"_from\": \"v/vert2\",\n    \"_to\": \"v/vert1\",\n    \"$label\": null,\n    \"optional1\": \"val1\"\n  },\n  \"error\": false,\n  \"code\": 201\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": "query", "required": "false", "name": "rev", "description": "Revision of an edge " } ], "notes": "Returns an object with an attribute edge containing a list of all edge properties.

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.

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.

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

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

", "nickname": "getEdge" } ], "path": "/_api/graph/{graph-name}/edge" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the edge was deletd sucessfully and `waitForSync` was `true`. ", "code": "200" }, { "reason": "is returned if the edge was deleted sucessfully 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": "Boolean", "paramType": "query", "required": "false", "name": "waitForSync", "description": "Wait until edge has been sync to disk. " }, { "dataType": "String", "paramType": "query", "required": "false", "name": "rev", "description": "Revision of an edge " } ], "notes": "Deletes an edge of the graph

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.

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

> curl -X DELETE --dump - http://localhost:8529/_api/graph/graph1/edge/edge1\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

", "nickname": "deleteEdge" } ], "path": "/_api/graph/{graph-name}/edge" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the edge was updated sucessfully and `waitForSync` was `true`. ", "code": "201" }, { "reason": "is returned if the edge was updated sucessfully 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": "Boolean", "paramType": "query", "required": "false", "name": "waitForSync", "description": "Wait until edge has been sync to disk. " }, { "dataType": "String", "paramType": "query", "required": "false", "name": "rev", "description": "Revision of an edge " } ], "notes": "Replaces the optional edge properties.

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

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.

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

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

> curl --data @- -X PUT --dump - http://localhost:8529/_api/graph/graph1/edge/edge1\n{\"optional2\" : \"val2\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 57595391\n\n{\n  \"edge\": {\n    \"_id\": \"e/edge1\",\n    \"_rev\": \"57595391\",\n    \"_key\": \"edge1\",\n    \"_from\": \"v/vert2\",\n    \"_to\": \"v/vert1\",\n    \"$label\": null,\n    \"optional2\": \"val2\"\n  },\n  \"error\": false,\n  \"code\": 200\n}\n

", "nickname": "updateEdge" } ], "path": "/_api/graph/{graph-name}/edge" }, { "operations": [ { "errorResponses": [ { "reason": "is returned if the edge was updated sucessfully and `waitForSync` was `true`. ", "code": "201" }, { "reason": "is returned if the edge was updated sucessfully 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": "Boolean", "paramType": "query", "required": "false", "name": "waitForSync", "description": "Wait until edge has been sync to disk. " }, { "dataType": "String", "paramType": "query", "required": "false", "name": "rev", "description": "Revision of an edge " }, { "dataType": "Boolean", "paramType": "query", "required": "false", "name": "keepNull", "description": "Modify the behavior of the patch command to remove any attribute " } ], "notes": "Partially updates the edge properties.

The call expects a JSON hash array as body with the properties to patch.

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.

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. Returns an object with an attribute edge containing a list of all edge properties.

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

> curl --data @- -X PATCH --dump - http://localhost:8529/_api/graph/graph1/edge/edge1\n{\"optional3\" : \"val3\"}\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\netag: 57595398\n\n{\n  \"edge\": {\n    \"_id\": \"e/edge1\",\n    \"_rev\": \"57595398\",\n    \"_key\": \"edge1\",\n    \"_from\": \"v/vert2\",\n    \"_to\": \"v/vert1\",\n    \"$label\": null,\n    \"optional2\": \"val2\",\n    \"optional3\": \"val3\"\n  },\n  \"error\": false,\n  \"code\": 200\n}\n

", "nickname": "updateEdge" } ], "path": "/_api/graph/{graph-name}/edge" }, { "operations": [ { "errorResponses": [], "parameters": [ { "dataType": "String", "paramType": "body", "required": "false", "name": "body", "description": "A valid json document for your data, for instance {\"hello\": \"world\"}." } ], "notes": "", "summary": "get edges", "httpMethod": "POST", "examples": "", "nickname": "getEdges" } ], "path": "/_api/graph/{graph-name}/edges" }, { "operations": [ { "errorResponses": [], "parameters": [ { "dataType": "String", "paramType": "body", "required": "false", "name": "body", "description": "A valid json document for your data, for instance {\"hello\": \"world\"}." } ], "notes": "", "summary": "get edges", "httpMethod": "POST", "examples": "", "nickname": "getEdges" } ], "path": "/_api/graph/{graph-name}/edges/{vertex-name}" } ] }