Skip to content
Developers

Get a collection

This endpoint returns the schema of a specific collection in Tallyfy Answers, found by its unique name. The schema lists the properties detected from the objects you’ve indexed. It doesn’t include an object count.

GET /collections/{collection_name}

This endpoint needs the API key.

ParameterTypeRequiredDescription
collection_namestringYesName of the collection to retrieve

On success, you’ll receive a 200 OK status code. message holds the collection’s class definition as Weaviate, the database behind Tallyfy Answers, returns it. The class name comes back title-cased, so products becomes Products, and each property carries a Weaviate data type. A shortened example:

{
"message": {
"class": "Products",
"properties": [
{ "name": "uid", "dataType": ["text"] },
{ "name": "title", "dataType": ["text"] }
]
},
"status": 200
}

Weaviate adds more settings to the class definition than this example shows.

FieldTypeDescription
messageobjectThe collection’s class definition from Weaviate, including its title-cased name and its properties
statusnumber200
StatusDescription
404Collection not found
400Invalid collection name format
403The Authorization header is missing or doesn’t match the API key
503The service couldn’t reach its database. Try again.
Terminal window
curl -X GET https://answers.tallyfy.com/collections/products \
-H "Authorization: Bearer your_api_key"
  • Checking a collection’s current schema
  • Retrieving collection details before performing operations
  • Confirming a collection exists before adding objects

To count the objects in a collection, use GET /collections/{collection_name}/objects/metadata instead. It needs no key and returns a count per source. It answers [] for a collection that doesn’t exist, the same as for an empty one.

Answers > Collections

Collections in Tallyfy Answers group similar objects together, like database tables. You can…

Answers > Objects

Objects are the JSON records you store in a Tallyfy Answers collection. They’re indexed in…