Missing Flows API call
fbalak opened this issue · 6 comments
Document docs/overview.adoc describes Flows
API call but when I call:
curl -H "Authorization: bearer valid_token" -XGET http://127.0.0.1/api/1.0/Flows
I receive:
404 Not Found
Documentation should be updated or the API call should be provided properly.
IIRC it used to list all possible REST endpoints at top level ....
Looks like this was removed back in September. Not sure about the motives.
https://github.com/Tendrl/api/pull/265/files#diff-f6042ba19178936a392b7082cf00c9e5L8
Earlier the pattern of RESt endpoints was different and as per discussion it was changed.
For example the endpoint for importing the cluster was http://{host}/api/1.0/ImportCluster
with data {'TendrlContext.integration_id': <int-id>, "Node[]": <list of node-ids>}
.
Later the endpoints were reformed and now import cluster endpoint looks like http://{host}/api/1.0/clusters/{int-id}/import
.
I remember the endpoint /Flows
was required in old style of endpoint and same is not required anymore. I feel that was motive to remove the endpoint. @nthomas-redhat @r0h4n comments
Motive seems to be moving flows to jobs as well. Earlier, jobs were called flows in the code.
As far as usmqe/usmqe-tests#128 is concerned, the right way would be to use the documented API for checking authentication, i.e. /current_user
: https://github.com/Tendrl/api/blob/eccd387c42f17c910a6f7104bcba7e88390a154d/docs/users.adoc#current-user
usmqe/usmqe-tests#129 can also be closed, unless there is a specific need for exposing Flows as API.
@shirshendu Functionality of listing all endpoints on a given API level is not covered by any other API call that is available now but I agree that there is no need to have API call /Flows
now after change of pattern of REST endpoints. I will close usmqe/usmqe-tests#129.