Create an item collection

Creates an item collection in the specified knowledge store. An item collection is a named collection of items. Use item collections to organize and reference subsets of items together.

Authentication

x-api-keystring
Your API key. <Note title="Note"> You can find your API key on the <a href="https://playground.twelvelabs.io/dashboard/api-keys" target="_blank">API Keys</a> page. </Note>

Path parameters

knowledge_store_idstringRequired
The unique identifier of the knowledge store.

Request

This endpoint expects an object.
namestringRequired1-255 characters
The name of the item collection. Must be unique within the knowledge store.
descriptionstringOptional<=2000 characters
An optional description of the item collection.
metadatamap from strings to strings or integers or doubles or booleans or lists of stringsOptional
Custom metadata for the item collection, as user-defined key-value pairs. Up to 10 pairs, keys up to 128 characters, string values up to 2048 characters. Keys are strings; values can be a string, a number, a boolean, or an array of strings. A nested object, an array containing anything other than strings, and a null value are rejected. An integer must fit in 53 bits (-9007199254740991 to 9007199254740991). Send a wider integer, or an identifier that must be preserved verbatim, as a string.

Response headers

LocationstringOptional

The URL of the newly created item collection. Format: /knowledge-stores/{knowledge_store_id}/item-collections/{collection_id}.

Response

The item collection has been successfully created.
_idstringOptional
The unique identifier of the item collection.
knowledge_store_idstringOptional
The unique identifier of the knowledge store this collection belongs to.
namestringOptional
The name of the item collection.
descriptionstringOptional
The description of the item collection.
metadatamap from strings to strings or integers or doubles or booleans or lists of stringsOptional

Custom metadata for the item collection. Keys are strings; each value is a string, a number, a boolean, or an array of strings.

member_countintegerOptionalRead-only
The number of items in the collection.
created_atstringOptionalformat: "date-time"
The date and time when the item collection was created, in the RFC 3339 format.
updated_atstringOptionalformat: "date-time"
The date and time when the item collection was last updated, in the RFC 3339 format.

Errors

400
Bad Request Error