-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List endpoint and pagination #61
Comments
In discussion today we decided:
|
Should the
|
I implemented examples of these here: |
Example implemented here: https://seqcolapi.databio.org/docs#/Discovering%20data/list_collections_by_offset_list_collections_get |
I could see an alternative argument that it should be |
I'd personally keep As for the items in the original version around pagination and with v4 GA4GH guide in mind
Overall though list endpoint gets my thumbs up |
Ok.Which of these would you use for the query param names?
I guess they are equivalent, just with different variable names. (and Here's the spec I've written, then: 3.3 List
Example return value
|
I agree with I'm not however of generalising to pangenomes just yet especially in the specs. I think it will make the specs harder to understand for to the reader considering, we're not working on the pangenome yet. We can generalise later when pangenome is defined. |
One should really try to avoid verbs in RESTful APIs, and limit the verbs to the HTTP methods. However, "list" can also be read as a noun, e.g. "list of collections". So using the HTTP GET method could be read as the sentence "get the list of collections", which is (I believe) as RESTful as it gets. This is in line with our previous choice to use |
Number two for me. Also yes but with an associative array for |
It's come up repeatedly that we will need some kind of
list
endpoint that will provide information about the available objects in the server. This will be required for a meta- aggregator-type service that would span services, to be aware of what each service provides.Because there could be a large number of collections, the result must be paged. We intend to follow the GA4GH paging guidelines (which are still being developed).
Proposed API
GET /list
with query parameters:?page_token=abc123&page_size=1000
page_token
would default to None, which indicates starting from the most recent collectionpage_size
could have a server-defined default, which recommendation of 1000 ?Proposed return value
Here's a proposal for return value of list endpoint, using token-based paging. The terms are following a google standard for paging:
items
orcollection_identifiers
orcollection_digests
?total_size
be optional?prev_page_token
be optional?API thoughts
Our current API uses:
/collection
/comparison
Should this be:
/list_collections
, or/list
, or simply/collections
or/collections/list
?The text was updated successfully, but these errors were encountered: