HTTP API

Node Degrees

Get the Degree of a Node By Node Type

Retrieve the number of relationships an existing node has by type and key

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

Example Request:

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

Example Response:

{ "degree": 3 }

Get the Degree of a Node By Node Id

Retrieve the number of relationships an existing node has by id

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

Example Request:

:GET /db/rage/nodes/1026/degree/all/LOVES

Example Response:

{ "degree": 3 }