-
Notifications
You must be signed in to change notification settings - Fork 0
Description
While working on #6 it turned out that hierarchical API doesn't make much sense and only adds complexity both on server side (makes hard to share data access code) and client side (client has to carry a lot of context even if in fact not needed), so it would be better to switch to a flat structure and implement it as v2 API. This will also help to integrate auth #8 without immediately breaking the UI.
API v2 should follow the following principals:
-
only one level of hierarchy, filtering instead of nesting, e.g.
/tests
/tests/{test_id}
/tests?test-run-id={test_run_id}
/metrics?test_id={test_id} -
RPC-like "actions" are still allowed
POST /test/{test_id}/finish
-no redundant id's in request body, e.g. this should go awayPUT /projects/{project_id}/test-runs/{test_run_id}/tests/{test_id} { "project_id": ..., "test_run_id": ..., "test_id": ..., }in this case only an id of an immediate parent (
test_run_id) should be a part of the body -
all "plurals" should support paging by default with
page_sizeandpagearguments, sending backX-Total-Countheader along with the response