1
0
Fork 0
arangodb/js/apps/system/_admin/aardvark/APP/api-docs/edges.json

57 lines
4.5 KiB
JSON

{
"basePath": "/",
"swaggerVersion": "1.1",
"apiVersion": "0.1",
"apis": [
{
"operations": [
{
"errorResponses": [
{
"reason": "is returned if the edge collection was found and edges were retrieved. <br><br>",
"code": "200"
},
{
"reason": "is returned if the request contains invalid parameters. <br><br>",
"code": "400"
},
{
"reason": "is returned if the edge collection was not found. <br><br>",
"code": "404"
}
],
"parameters": [
{
"dataType": "String",
"paramType": "path",
"required": true,
"name": "collection-id",
"description": "The id of the collection. <br><br>"
},
{
"dataType": "String",
"paramType": "query",
"required": true,
"name": "vertex",
"description": "The id of the start vertex. <br><br>"
},
{
"dataType": "String",
"paramType": "query",
"required": false,
"name": "direction",
"description": "Selects <em>in</em> or <em>out</em> direction for edges. If not set, any edges are returned. <br><br>"
}
],
"notes": "Returns an array of edges starting or ending in the vertex identified by <em>vertex-handle</em>. <br><br>",
"summary": " Read in- or outbound edges",
"httpMethod": "GET",
"examples": "<br><br> Any direction <br><br><br><br><pre><code class=\"json\">shell&gt; curl --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"edges\" : [ \n { \n \"_id\" : \"edges/6\", \n \"_key\" : \"6\", \n \"_rev\" : \"1454056501\", \n \"_from\" : \"vertices/2\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v2 -&gt; v1\" \n }, \n { \n \"_id\" : \"edges/7\", \n \"_key\" : \"7\", \n \"_rev\" : \"1454580789\", \n \"_from\" : \"vertices/4\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v4 -&gt; v1\" \n }, \n { \n \"_id\" : \"edges/5\", \n \"_key\" : \"5\", \n \"_rev\" : \"1453532213\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/3\", \n \"$label\" : \"v1 -&gt; v3\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> In edges <br><br><br><br><pre><code class=\"json\">shell&gt; curl --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&amp;direction=in\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"edges\" : [ \n { \n \"_id\" : \"edges/6\", \n \"_key\" : \"6\", \n \"_rev\" : \"1458775093\", \n \"_from\" : \"vertices/2\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v2 -&gt; v1\" \n }, \n { \n \"_id\" : \"edges/7\", \n \"_key\" : \"7\", \n \"_rev\" : \"1459299381\", \n \"_from\" : \"vertices/4\", \n \"_to\" : \"vertices/1\", \n \"$label\" : \"v4 -&gt; v1\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br> Out edges <br><br><br><br><pre><code class=\"json\">shell&gt; curl --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&amp;direction=out\n\nHTTP/1.1 200 OK\ncontent-type: application/json; charset=utf-8\n\n{ \n \"edges\" : [ \n { \n \"_id\" : \"edges/5\", \n \"_key\" : \"5\", \n \"_rev\" : \"1462969397\", \n \"_from\" : \"vertices/1\", \n \"_to\" : \"vertices/3\", \n \"$label\" : \"v1 -&gt; v3\" \n } \n ], \n \"error\" : false, \n \"code\" : 200 \n}\n</code></pre><br><br><br>",
"nickname": "ReadIn-OrOutboundEdges"
}
],
"path": "/_api/edges/{collection-id}"
}
]
}