Skip to content

Get a collection

Retrieving collection details

This endpoint allows you to fetch detailed information about a specific collection using its unique name. The response includes collection metadata, schema information, and object counts.

API endpoint

GET /v1/collections/{collection_name}

Path parameters

ParameterTypeRequiredDescription
collection_namestringYesName of the collection to retrieve

Response

A successful request returns a 200 OK status code and a JSON response containing:

{
"name": "products",
"description": "Collection of product information",
"schema": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"price": {
"type": "number"
},
"categories": {
"type": "string[]"
}
},
"object_count": 142,
"created_at": "2023-08-15T14:32:21Z",
"updated_at": "2023-09-01T09:45:33Z"
}

Response fields

FieldTypeDescription
namestringThe collection’s unique identifier
descriptionstringOptional description of the collection
schemaobjectAuto-detected schema based on indexed objects
object_countnumberTotal number of objects in the collection
created_atstringISO timestamp when the collection was created
updated_atstringISO timestamp when the collection was last modified

Error scenarios

StatusDescription
404Collection not found
400Invalid collection name format

Example request

Terminal window
curl -X GET https://go.tallyfy.com/api/v1/collections/products \
-H "X-Answers-API-Key: your_api_key"

Common uses

  • Checking a collection’s current schema
  • Verifying the number of objects in a collection
  • Retrieving collection metadata before performing operations
  • Confirming a collection exists before adding objects

Objects > Get an object

The API endpoint enables fetching specific objects from collections using unique identifiers through a GET request that returns complete object data with automatic system fields.

Collections > Get all collections

The GET /v1/collections endpoint lets users retrieve paginated summaries of collections sorted by creation date including object counts and metadata for each collection in their account.

Collections > Update a collection

The PATCH endpoint enables modification of collection properties like descriptions and configurations while maintaining immutable collection names through /v1/collections/[collection_name] and returns updated collection details upon success.

Collections > Create a collection

Collections must be created with unique names before adding objects to Tallyfy Answers which automatically detects data types like strings and string lists when indexing through a POST API endpoint.