Skip to content

API v2 #13

@VaderZ

Description

@VaderZ

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 away

        PUT /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_size and page arguments, sending back X-Total-Count header along with the response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions