ipfs / pinning-services-api-spec

Standalone, vendor-agnostic Pinning Service API for IPFS ecosystem
https://ipfs.github.io/pinning-services-api-spec/
Creative Commons Zero v1.0 Universal
100 stars 27 forks source link

Add metadata filter and examples #32

Closed lidel closed 3 years ago

lidel commented 4 years ago

This PR enables filtering by free-form metadata attached to Pin object. It makes it possible for apps to attach arbitrary tags to Pin and then ask Pinning Service only for tagged pins. Without this, apps have to fetch all Pins and filter them out locally.

Assuming we want to find Pin objects created with Pin.meta[foo] = "bar", the query would be GET /pins?meta={"foo":"bar"}

cc @obo20 this is a simplified version of your metadata[keyvalues] filter