application-research/delta-dm

[Feature] Replications Pagination and Search

Closed this issue · 1 comments

jcace commented

Filtering

Each field will be a query param that is comma-delimited to specify the search terms

filters are AND-ed together

  • ?statuses=success,failure,pending <-- can specify multiple (comma delimited), returns any that match
  • ?datasets=bird-sounds,university-dataset-test
  • ?self_service=true <-- filter by self_service deals
  • ?providers=f012345,f045678 <-- can specify multiple (comma delimited), returns any that match
  • ?deal_time_start=1579343980
  • ?deal_time_end=1679343980
  • ?proposal_cid=bafyreib5sip7i4aflvxx3wpze4sdunsuo3ad7hfl3zu6n4mfontzxhviga <-- only one may be specified
  • ?piece_cid=baga6ea4seaqblmkqfesvijszk34r3j6oairnl4fhi2ehamt7f3knn3gwkyylmlq <-- only one may be specified
  • ?message=illegal <-- searches all messages for matching text

Example request
GET /api/v1/replications?statuses=success&providers=f012345&deal_time_start=1579343980&deal_time_end=1679343980

Paginating

There will be two additional query params to facilitate pagination

  • ?limit=100 <-- how many to return
  • ?offset=100 <-- where to start

Response

The response will be updated to include totalCount, which is the total number of records in the replications table

jcace commented

?deal_time_start=1579343980
?deal_time_end=1679343980

These should be in epoch seconds, not milliseconds @elijaharita