HTTP API

Node Neighbors

Get the Neighbors of a Node By Node Type

Retrieve the neighbors an existing node has by type and key

:GET /db/{graph}/node/{type}/{key}/neighbors
:GET /db/{graph}/node/{type}/{key}/neighbors/{direction [all, in, out]}
:GET /db/{graph}/node/{type}/{key}/neighbors/{direction [all, in, out]}/{type TYPE_ONE}
:GET /db/{graph}/node/{type}/{key}/neighbors/{direction [all, in, out]}/{type(s) TYPE_ONE&TYPE_TWO}

Example Request:

:GET /db/rage/nodes/User/max/neighbors/all/LOVES

Example Response:

[{"id": 1026, "type": "User", "key": "Helene", "properties": { "age": 41, "name": "helene" }}]

Get the Neighbors of a Node By Node ID

Retrieve the neighbors an existing node has by id

:GET /db/{graph}/node/{id}/neighbors
:GET /db/{graph}/node/{id}/neighbors/{direction [all, in, out]}
:GET /db/{graph}/node/{id}/neighbors/{direction [all, in, out]}/{type TYPE_ONE}
:GET /db/{graph}/node/{id}/neighbors/{direction [all, in, out]}/{type(s) TYPE_ONE&TYPE_TWO}

Example Request:

:GET /db/rage/nodes/1027/neighbors/all/LOVES

Example Response:

[{"id": 1026, "type": "User", "key": "Helene", "properties": { "age": 41, "name": "helene" }}]