application-research / estuary

A custom IPFS/Filecoin node that makes it easy to pin IPFS content and make Filecoin deals.
https://docs.estuary.tech
Other
240 stars 66 forks source link

Parameters missing in OpenAPI spec at `/pinning/pins` #994

Open kuzdogan opened 1 year ago

kuzdogan commented 1 year ago

While trying to get our all pins, I noticed the parameters for the endpoint /pinning/pins is missing in the OpenAPI spec (and SwaggerUI).

I figured out by looking at the code https://github.com/application-research/estuary/blob/38ab623009b0117093a28fbf9e8c2c062a7c4225/api/v1/pinning.go#L42-L49

but also it wasn't clear at first if there's pagination or not. I guess the way to paginate in a way is to use before and after right? When using before I also had trouble getting the date syntax right. This worked for me ?before=2023-06-28T15:00:00Z but it would be nice to have this in the docs as well.

Edit: An additional thing to make clear can be the pinid field. In the response it is requestId and not pinId. I assumed it is the pin.cid in the response which is the CID of the pin. In the Estuary dashboard it name "Pin ID" whereas in the API response it's requestId.