Skip to content
Snippets Groups Projects
Commit 3c3f0043 authored by Stefano Zacchiroli's avatar Stefano Zacchiroli
Browse files

REST API: disable /walk

we need to fix T1969 before opening this up, and in most cases what one wants
is really /randomwalk anyway
parent acb78fb9
No related branches found
No related tags found
No related merge requests found
......@@ -110,39 +110,39 @@ Neighbors
Walk
----
.. http:get:: /graph/walk/:src/:dst
Performs a graph traversal and returns the first found path from source to
destination (final destination node included).
:param string src: starting node specified as a SWH PID
:param string dst: destination node, either as a node PID or a node type.
The traversal will stop at the first node encountered matching the
desired destination.
:query string edges: edges types the traversal can follow; default to
``"*"``
:query string traversal: traversal algorithm; can be either ``dfs`` or
``bfs``, default to ``dfs``
:query string direction: direction in which graph edges will be followed;
can be either ``forward`` or ``backward``, default to ``forward``
:statuscode 200: success
:statuscode 400: invalid query string provided
:statuscode 404: starting node cannot be found
.. sourcecode:: http
HTTP/1.1 200 OK
Content-Type: text/plain
Transfer-Encoding: chunked
swh:1:rev:f39d7d78b70e0f39facb1e4fab77ad3df5c52a35
swh:1:rev:52c90f2d32bfa7d6eccd66a56c44ace1f78fbadd
swh:1:rev:cea92e843e40452c08ba313abc39f59efbb4c29c
swh:1:rev:8d517bdfb57154b8a11d7f1682ecc0f79abf8e02
...
..
.. http:get:: /graph/walk/:src/:dst
Performs a graph traversal and returns the first found path from source to
destination (final destination node included).
:param string src: starting node specified as a SWH PID
:param string dst: destination node, either as a node PID or a node type.
The traversal will stop at the first node encountered matching the
desired destination.
:query string edges: edges types the traversal can follow; default to
``"*"``
:query string traversal: traversal algorithm; can be either ``dfs`` or
``bfs``, default to ``dfs``
:query string direction: direction in which graph edges will be followed;
can be either ``forward`` or ``backward``, default to ``forward``
:statuscode 200: success
:statuscode 400: invalid query string provided
:statuscode 404: starting node cannot be found
.. sourcecode:: http
HTTP/1.1 200 OK
Content-Type: text/plain
Transfer-Encoding: chunked
swh:1:rev:f39d7d78b70e0f39facb1e4fab77ad3df5c52a35
swh:1:rev:52c90f2d32bfa7d6eccd66a56c44ace1f78fbadd
swh:1:rev:cea92e843e40452c08ba313abc39f59efbb4c29c
swh:1:rev:8d517bdfb57154b8a11d7f1682ecc0f79abf8e02
...
.. http:get:: /graph/randomwalk/:src/:dst
......
......@@ -200,8 +200,11 @@ def make_app(backend, **kwargs):
app.router.add_get('/graph/visit/nodes/{src}',
get_simple_traversal_handler('visit_nodes'))
app.router.add_get('/graph/visit/paths/{src}', visit_paths)
app.router.add_get('/graph/walk/{src}/{dst}',
get_walk_handler(random=False))
# temporarily disabled in wait of a proper fix for T1969
# app.router.add_get('/graph/walk/{src}/{dst}',
# get_walk_handler(random=False))
app.router.add_get('/graph/randomwalk/{src}/{dst}',
get_walk_handler(random=True))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment