Collections > Get a collection
The GET endpoint retrieves detailed collection information including metadata schema and object counts by using a unique collection name through the /v1/collections/[collection_name] path.
This endpoint retrieves a summary of all collections in your Tallyfy Answers account. Collections are sorted by creation date in descending order (newest first), making it easy to find recently created collections.
GET /v1/collections
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
limit | integer | No | 20 | Maximum number of collections to return (1-100) |
offset | integer | No | 0 | Number of collections to skip (for pagination) |
A successful request returns a 200 OK
status code and a JSON response containing:
{ "collections": [ { "name": "products", "description": "Collection of product information", "object_count": 142, "created_at": "2023-08-15T14:32:21Z" }, { "name": "customers", "description": "Customer account information", "object_count": 1253, "created_at": "2023-07-28T09:15:33Z" } ], "meta": { "total_collections": 5, "limit": 20, "offset": 0 }}
Field | Type | Description |
---|---|---|
collections | array | List of collection summary objects |
meta.total_collections | integer | Total number of collections in your account |
meta.limit | integer | Limit value used in the request |
meta.offset | integer | Offset value used in the request |
Status | Description |
---|---|
400 | Invalid query parameters |
# Get first page of collections (default 20 per page)curl -X GET https://go.tallyfy.com/api/v1/collections \ -H "X-Answers-API-Key: your_api_key"
# Get second page with 10 collections per pagecurl -X GET "https://go.tallyfy.com/api/v1/collections?limit=10&offset=10" \ -H "X-Answers-API-Key: your_api_key"
To paginate through large numbers of collections:
limit
meta.total_collections
value to determine total pagesoffset
parameter by the limit
value for each subsequent pageExample pagination calculation:
Collections > Get a collection
Collections > Create a collection
Collections > Delete a collection