-
Notifications
You must be signed in to change notification settings - Fork 1
Description
The Ace Archive API currently supports paging through artifacts, but not sorting or filtering them. We should add that.
The API will look like this:
- Add a query param called
dirwith possible valuesascordesc. You can't specifydirwithoutsort, since the default sort order is unspecified. - Add a query param called
sortwith a single possible value ofyear, which sorts byfrom_year. If omitted, the default unspecified sort order is used (which currently sorts lexicographically by artifact ID). Sorting by year should sort by year first, then by ID, to make the sort stable. - Add a query param called
identities, which accepts the identity to filter by. It also accepts multiple comma-separated values. - Add a query param called
people, which accepts the person to filter by. It also accepts multiple comma-separated values. - Add a query param called
decades, which accepts the decade to filter by. It also accepts multiple comma-separated values. - Add a new endpoint
GET /identities/that returns a fill list of identities that currently appear in artifacts. This does not need to be paginated.
Changing the sort order, sort direction, or filters will invalidate the pagination cursor. To enforce this, the current sort/filter params should be used to construct a 32-bit hash that is stored in the cursor. We don't need to be able to reconstruct the sort/filter params from the cursor—only tell if they've changed.
This initial implementation does not need to support passing different kinds of filters at the same time. That would complicate the implementation, and is probably unnecessary given the small size of the dataset. Trying to pass multiple filter params should return 400 Bad Request with an error type as documented here.
Make sure you update the OpenAPI document as well as the implementation.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status