diff --git a/docs/api.rst b/docs/api.rst --- a/docs/api.rst +++ b/docs/api.rst @@ -31,6 +31,12 @@ sub-directories when traversing the forward graph, but the same restriction allows following edges from sub-directories to parent directories. + We can also specify how many edges a visit can traversed, in order to avoid Dos. + +- **Node filtering**: a textual specification of which type of nodes can be printed after a request. + Either ``*`` to denote that all types of nodes can be printed or a comma separated list of + node types to allow following only those nodes. + Examples ~~~~~~~~ @@ -45,6 +51,7 @@ - ``"rev:rev,dir:*"`` node types allowing edges from revisions to revisions nodes, or from directories nodes. - ``"*:rel"`` node types allowing all edges to releases. +- ``"cnt,snp"`` node types allowed the swhid of content and snapshot nodes to be printed in the request response. Leaves @@ -61,6 +68,8 @@ ``"*"`` :query string direction: direction in which graph edges will be followed; can be either ``forward`` or ``backward``, default to ``forward`` + :query integer max_edges: how many edges can be traversed during the visit; default to 0 (not restricted) + :query string return_types: types of nodes we want to be displayed; default to ``"*"`` :statuscode 200: success :statuscode 400: invalid query string provided @@ -99,6 +108,8 @@ to ``"*"`` :query string direction: direction in which graph edges will be followed; can be either ``forward`` or ``backward``, default to ``forward`` + :query integer max_edges: how many edges can be traversed during the visit; default to 0 (not restricted) + :query string return_types: types of nodes we want to be displayed; default to ``"*"`` :statuscode 200: success :statuscode 400: invalid query string provided @@ -143,6 +154,8 @@ ``bfs``, default to ``dfs`` :query string direction: direction in which graph edges will be followed; can be either ``forward`` or ``backward``, default to ``forward`` + :query string return_types: types of nodes we want to be displayed; default to ``"*"`` + :statuscode 200: success :statuscode 400: invalid query string provided @@ -229,6 +242,7 @@ ----- .. http:get:: /graph/visit/nodes/:src + :query string return_types: types of nodes we want to be displayed; default to ``"*"`` .. http:get:: /graph/visit/edges/:src .. http:get:: /graph/visit/paths/:src @@ -241,6 +255,7 @@ ``"*"`` :query string direction: direction in which graph edges will be followed; can be either ``forward`` or ``backward``, default to ``forward`` + :query integer max_edges: how many edges can be traversed during the visit; default to 0 (not restricted) :statuscode 200: success :statuscode 400: invalid query string provided