pinning-services-api-spec icon indicating copy to clipboard operation
pinning-services-api-spec copied to clipboard

Feature proposal: ability to get bulk pin statuses by request IDs

Open lidel opened this issue 4 years ago • 0 comments

Context

Right now, it is possible to check only one ID at a time via HTTP GET tot /pins/{requestid}

Proposed enhancement

@whyrusleeping suggested adding ability to query status for multiple requestids.

It sounds like a sensible enhancement, that potentially lowers the number or HTTP requests that need to be sent to the pinning service when tracking pinning status of multiple datasets at the same time.

To make it aligned with existing conventions, we could add it as a new filter, similar to cid one:

/pins?requestid=123123,43234,234237

cc @ipfs/wg-pinning-services @obo20 @hsanjuan thoughts?

Open questions

  • is this the best way to do this?
  • is this useful enough to add to the spec? (i think yes, but lmk)
  • what should be max number of ids allowed per request?
    • existing cid filter allows max 10 CIDS per request, I think this was suggested by Pinata and we may want to use the same limit for requestid
    • if we define no limit, this will fall back to max of limit parameter, which is implicit 1000

lidel avatar Aug 30 '21 13:08 lidel