Changeset View
Changeset View
Standalone View
Standalone View
docs/api.rst
Show First 20 Lines • Show All 221 Lines • ▼ Show 20 Lines | .. sourcecode:: http | ||||
swh:1:ori:98aa0e71f5c789b12673717a97f6e9fa20aa1161 | swh:1:ori:98aa0e71f5c789b12673717a97f6e9fa20aa1161 | ||||
swh:1:snp:a511810642b7795e725033febdd82075064ed863 | swh:1:snp:a511810642b7795e725033febdd82075064ed863 | ||||
Visit | Visit | ||||
----- | ----- | ||||
.. http:get:: /graph/visit/nodes/:src | .. http:get:: /graph/visit/nodes/:src | ||||
.. http:get:: /graph/visit/edges/:src | |||||
.. http:get:: /graph/visit/paths/:src | .. http:get:: /graph/visit/paths/:src | ||||
Performs a graph traversal and returns explored nodes or paths (in the order | Performs a graph traversal and returns explored nodes, edges or paths (in | ||||
of the traversal). | the order of the traversal). | ||||
:param string src: starting node specified as a SWHID | :param string src: starting node specified as a SWHID | ||||
:query string edges: edges types the traversal can follow; default to | :query string edges: edges types the traversal can follow; default to | ||||
``"*"`` | ``"*"`` | ||||
:query string direction: direction in which graph edges will be followed; | :query string direction: direction in which graph edges will be followed; | ||||
can be either ``forward`` or ``backward``, default to ``forward`` | can be either ``forward`` or ``backward``, default to ``forward`` | ||||
Show All 25 Lines | .. sourcecode:: http | ||||
swh:1:cnt:cc407b7e24dd300d2e1a77d8f04af89b3f962a51 | swh:1:cnt:cc407b7e24dd300d2e1a77d8f04af89b3f962a51 | ||||
swh:1:cnt:701bd0a63e11b3390a547ce8515d28c6bab8a201 | swh:1:cnt:701bd0a63e11b3390a547ce8515d28c6bab8a201 | ||||
... | ... | ||||
**Example:** | **Example:** | ||||
.. sourcecode:: http | .. sourcecode:: http | ||||
GET /graph/visit/nodes/swh:1:dir:644dd466d8ad527ea3a609bfd588a3244e6dafcb HTTP/1.1 | GET /graph/visit/edges/swh:1:snp:40f9f177b8ab0b7b3d70ee14bbc8b214e2b2dcfc HTTP/1.1 | ||||
Content-Type: text/plain | |||||
Transfer-Encoding: chunked | |||||
.. sourcecode:: http | |||||
HTTP/1.1 200 OK | |||||
swh:1:snp:40f9f177b8ab0b7b3d70ee14bbc8b214e2b2dcfc swh:1:rev:61f92a7db95f5a6d1fcb94d2b897ed3797584d7b | |||||
swh:1:snp:40f9f177b8ab0b7b3d70ee14bbc8b214e2b2dcfc swh:1:rev:00e81c89c29ff3e58745fdaf7abb68daa1389e85 | |||||
swh:1:snp:40f9f177b8ab0b7b3d70ee14bbc8b214e2b2dcfc swh:1:rev:7596fdc31c9aa00aed281ccb026a74cabf2383bb | |||||
swh:1:snp:40f9f177b8ab0b7b3d70ee14bbc8b214e2b2dcfc swh:1:rev:ec7a2341ac3d9d8b571bbdfb90a089d4e54dea56 | |||||
swh:1:snp:40f9f177b8ab0b7b3d70ee14bbc8b214e2b2dcfc swh:1:rev:1c5b5eac61eda2454034a43eb124ab490885ef3a | |||||
swh:1:snp:40f9f177b8ab0b7b3d70ee14bbc8b214e2b2dcfc swh:1:rev:4dfa88ca55e04e8afe05e8543ddddee32dde7236 | |||||
swh:1:snp:40f9f177b8ab0b7b3d70ee14bbc8b214e2b2dcfc swh:1:rev:d56ae79e43ff1b37534370911c8a78ec7f38d437 | |||||
swh:1:snp:40f9f177b8ab0b7b3d70ee14bbc8b214e2b2dcfc swh:1:rev:19ba5d6203a040a39ecc4a77b165d3f097c1e662 | |||||
swh:1:snp:40f9f177b8ab0b7b3d70ee14bbc8b214e2b2dcfc swh:1:rev:9c56102eefea23c95405533e1de23da4b873ecc4 | |||||
swh:1:snp:40f9f177b8ab0b7b3d70ee14bbc8b214e2b2dcfc swh:1:rev:3f54e816b46c2e179cd164e17fea93b3013a9db4 | |||||
... | |||||
**Example:** | |||||
.. sourcecode:: http | |||||
GET /graph/visit/paths/swh:1:dir:644dd466d8ad527ea3a609bfd588a3244e6dafcb HTTP/1.1 | |||||
Content-Type: application/x-ndjson | Content-Type: application/x-ndjson | ||||
Transfer-Encoding: chunked | Transfer-Encoding: chunked | ||||
.. sourcecode:: http | .. sourcecode:: http | ||||
HTTP/1.1 200 OK | HTTP/1.1 200 OK | ||||
▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines |