Skip to navigation

See the result for each item you add to or remove from an item collection

You can now see the result for each item you add to or remove from an item collection. The response lists, for each identifier of an item in the request, whether the platform added, removed, or skipped the item. For a skipped item, it also gives the reason.

Removing items returns this response with a 200 status. Before, removing items returned a 204 status with no response body.

When you add items, every identifier must reference an existing item in the knowledge store. If one does not, the platform returns a 404 error and adds none of the items.

To use this feature, upgrade to the latest version of the Python or Node.js SDK:

pip install --upgrade twelvelabs

SDK type changes

In the Python and Node.js SDKs, the methods that add items to an item collection return a KnowledgeStoreItemCollectionMembershipResponse object. This type extends KnowledgeStoreItemCollection with the results array, so existing code keeps working. The methods that remove items returned no value before. They now return the same object.

For details, see the Add items to an item collection and Remove items from an item collection pages in the API Reference section, or the SDK reference for Python and Node.js.

Sort knowledge store items by supported metadata keys

When you list the items in a knowledge store, you can sort by these custom metadata keys: view_count, like_count, comment_count, share_count, video.view_count, video.like_count, video.comment_count, and video.share_count. Use the sort_by parameter with the metadata.<key> value. The platform sorts by numeric value. If the value is not a number, the platform treats the item as having no value for the key. For any other metadata key, the platform returns a 422 error with the parameter_invalid code. Sorting by created_at and updated_at does not change.

For details, see the List knowledge store items page in the API Reference section.

Video duration limits for knowledge store items

The platform now rejects a video that is shorter than 1.1 seconds or longer than 24 hours when you add the video to a knowledge store. The request returns a 422 error with the parameter_invalid code.

For details, see the Create a knowledge store item page in the API Reference section.