Skip to content

Get all collections

Listing all collections

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.

API endpoint

GET /v1/collections

Query parameters

ParameterTypeRequiredDefaultDescription
limitintegerNo20Maximum number of collections to return (1-100)
offsetintegerNo0Number of collections to skip (for pagination)

Response

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
}
}

Response fields

FieldTypeDescription
collectionsarrayList of collection summary objects
meta.total_collectionsintegerTotal number of collections in your account
meta.limitintegerLimit value used in the request
meta.offsetintegerOffset value used in the request

Error scenarios

StatusDescription
400Invalid query parameters

Example request

Terminal window
# Get first page of collections
curl -X GET https://go.tallyfy.com/api/collections \
-H "X-Answers-API-Key: your_api_key"
# Get second page with 10 collections per page
curl -X GET "https://go.tallyfy.com/api/collections?limit=10&offset=10" \
-H "X-Answers-API-Key: your_api_key"

Pagination

To paginate through large numbers of collections:

  1. Make an initial request with desired limit
  2. Check the meta.total_collections value to determine total pages
  3. Increase the offset parameter by the limit value for each subsequent page
  4. Continue until you’ve processed all collections

Example pagination calculation:

  • If you have 45 total collections with a limit of 10:
    • Page 1: offset=0, limit=10 (collections 1-10)
    • Page 2: offset=10, limit=10 (collections 11-20)
    • Page 3: offset=20, limit=10 (collections 21-30)
    • Page 4: offset=30, limit=10 (collections 31-40)
    • Page 5: offset=40, limit=10 (collections 41-45)

Usage scenarios

  • Displaying a list of collections in a management interface
  • Generating reports on collection usage
  • Performing operations across all collections
  • Finding collections by name when browsing

Collections > Get a collection

The Tallyfy Answers API endpoint allows fetching detailed information about a specific collection including its metadata schema and object counts using a GET request with the collection name as a path parameter.

Answers > Collections

Tallyfy Answers collections are organizational structures that function like database tables to group related objects together while providing dynamic schema detection searchability and complete management capabilities for efficient data organization and retrieval.

Collections > Create a collection

Creating collections in Tallyfy Answers requires using a POST API endpoint with a unique collection name and optional description where the system automatically detects data types as objects are indexed.

Objects > Get an object

The Tallyfy Answers API provides a GET endpoint that retrieves individual objects from collections using their unique identifier and returns complete object data with all properties including system-generated timestamps.