API reference Collections
List collections
Lists the workspace's collections, newest first, with how many Library assets each one holds.
GET
/api/v1/public/collectionsScope: read. The key's creator needs access to Collections.
Query parameters
qstringqueryMatch on the collection name (case-insensitive, part of the name matches). Up to 200 characters.
limitintegerquerydefault 25How many collections, 1 to 50.
Response
countintegerCollections returned.
collectionsarrayCollections, newest first.
collections[].idstringCollection UUID.
collections[].namestringName.
collections[].descriptionstring | nullDescription.
collections[].asset_countintegerLibrary assets in the collection (deleted and staged assets are not counted).
collections[].urlstringApp path of the collection.
Example request
curl "https://api.pipory.com/api/v1/public/collections?q=winners" \
-H "Authorization: Bearer pip_your_key"
Example response
{
"count": 1,
"collections": [
{
"id": "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
"name": "Q4 winners",
"description": "Top spenders for the holiday push",
"asset_count": 12,
"url": "/collections/5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9"
}
]
}
Errors
| Status | Code | Meaning |
|---|---|---|
401 | invalid_api_key | Missing, unknown, revoked or expired key |
403 | insufficient_scope | The key or its creator's role cannot read Collections |
403 | upgrade_required | The workspace is not on a paid plan |
422 | none | limit out of range |
429 | rate_limited | Over the key's rate limit |