Skip to content

Update a collection

Updating collection properties

This endpoint allows you to modify certain properties of an existing collection in Tallyfy Answers, such as its description or configuration settings. The collection name cannot be changed once it’s created.

API endpoint

PATCH /v1/collections/{collection_name}

Path parameters

ParameterTypeRequiredDescription
collection_namestringYesName of the collection to update

Request body

The request body should contain a JSON object with the properties you want to update:

ParameterTypeRequiredDescription
descriptionstringNoNew description for the collection

Example request body:

{
"description": "Updated collection of premium electronics products"
}

Response

A successful update returns a 200 OK status code and a JSON response containing the updated collection:

{
"name": "products",
"description": "Updated collection of premium electronics products",
"schema": {
"name": {
"type": "string"
},
"price": {
"type": "number"
},
"categories": {
"type": "string[]"
}
},
"created_at": "2023-08-15T14:32:21Z",
"updated_at": "2023-09-05T10:15:42Z"
}

Error scenarios

StatusDescription
404Collection not found
400Invalid request format or parameters

Example request

Terminal window
curl -X PATCH https://go.tallyfy.com/api/collections/products \
-H "X-Answers-API-Key: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"description": "Updated collection of premium electronics products"
}'

Common update scenarios

There are several situations where updating a collection is useful:

  • Improving documentation: Add or update the description to better explain the collection’s purpose
  • Adjusting configurations: Modify search settings or other configuration parameters
  • Refining metadata: Update metadata fields to provide better context for the collection

Limitations

  • The collection name cannot be changed after creation
  • Schema changes happen automatically as objects are indexed, not through this endpoint
  • Certain system-level properties cannot be modified

Best practices

  • Make incremental updates to avoid disrupting existing processes
  • Use descriptive descriptions to help users understand the collection’s purpose
  • Document changes to collection properties for future reference

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.

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.

Collections > Delete a collection

The DELETE endpoint permanently removes collections and all their objects from Tallyfy Answers with no recovery option and requires careful consideration of alternatives like data export or backup before execution.

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.