Skip to content

List pins and default status value #245

@flea89

Description

@flea89

Hi, first of all, thanks for putting this together, it's extremely useful.

I'm fixing some of the reported issues on web3.storage API, but there's one specifically that might be a bit tricky, specifically, the test Can retrieve pin with name 'aCid' via the 'exact' TextMatchingStrategy

The tool sends a

GET https://api.web3.storage/pins?name=1b1c9a55-9abf-4514-8bb2-9d2494d19184&match=exact

and expects some results.

The challenge with that, according to the spec

status 
Array of strings (Status) non-empty
Items Enum: "queued" "pinning" "pinned" "failed"
Example: status=queued,pinning
Return pin objects for pins with the specified status (when missing, service should default to pinned only)

is that if status is not provided should default to "pinned".

I wonder if here we should send a

GET https://api.web3.storage/pins?name=1b1c9a55-9abf-4514-8bb2-9d2494d19184&match=exact&status=queued,pinning,pinned,failed

instead, given we can't assume the service has the given pin request pinned by the time the endpoint is hit by the tool.

What do you think?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions