Changeset View
Changeset View
Standalone View
Standalone View
docs/api.rst
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | - ``swh:1:rev:f39d7d78b70e0f39facb1e4fab77ad3df5c52a35`` the PID of a node of | ||||
'x86/urgent' branch on 31 December 2017. | 'x86/urgent' branch on 31 December 2017. | ||||
- ``"dir:dir,dir:cnt"`` node types allowing edges from directories to | - ``"dir:dir,dir:cnt"`` node types allowing edges from directories to | ||||
directories nodes, or directories to contents nodes. | directories nodes, or directories to contents nodes. | ||||
- ``"rev:rev,dir:*"`` node types allowing edges from revisions to revisions | - ``"rev:rev,dir:*"`` node types allowing edges from revisions to revisions | ||||
nodes, or from directories nodes. | nodes, or from directories nodes. | ||||
- ``"*:rel"`` node types allowing all edges to releases. | - ``"*:rel"`` node types allowing all edges to releases. | ||||
Node & edge existence | |||||
--------------------- | |||||
.. http:get:: /graph/node/:src | |||||
Check whether a given node exists in the graph or not. | |||||
:param string src: source node specified as a SWH PID | |||||
:statuscode 200: success | |||||
:statuscode 400: invalid PID | |||||
:statuscode 404: node not found | |||||
.. sourcecode:: http | |||||
GET /graph/node/swh:1:rev:f39d7d78b70e0f39facb1e4fab77ad3df5c52a35 | |||||
HTTP/1.1 200 OK | |||||
Content-Type: text/plain | |||||
swh:1:rev:f39d7d78b70e0f39facb1e4fab77ad3df5c52a35 | |||||
.. http:get:: /graph/edge/:src/:dst | |||||
Check whether a given edge exists in the graph or not. | |||||
:param string src: source node specified as a SWH PID | |||||
:param string dst: destination node specified as a SWH PID | |||||
:statuscode 200: success | |||||
:statuscode 400: invalid PID(s) | |||||
:statuscode 404: node(s) not found | |||||
.. sourcecode:: http | |||||
GET /graph/node/swh:1:rev:f39d7d78b70e0f39facb1e4fab77ad3df5c52a35/swh:1:dir:b5d2aa0746b70300ebbca82a8132af386cc5986d | |||||
HTTP/1.1 200 OK | |||||
Content-Type: text/plain | |||||
swh:1:rev:f39d7d78b70e0f39facb1e4fab77ad3df5c52a35 swh:1:dir:b5d2aa0746b70300ebbca82a8132af386cc5986d | |||||
Leaves | Leaves | ||||
------ | ------ | ||||
.. http:get:: /graph/leaves/:src | .. http:get:: /graph/leaves/:src | ||||
Performs a graph traversal and returns the leaves of the subgraph rooted at | Performs a graph traversal and returns the leaves of the subgraph rooted at | ||||
the specified source node. | the specified source node. | ||||
▲ Show 20 Lines • Show All 280 Lines • Show Last 20 Lines |