Delete an asset
Changed onThis method deletes the specified asset. This action cannot be undone.
The delete fails with a 409 Conflict error if other resources depend on the asset.
- If knowledge store items use the asset, in any status: the error code is asset_has_knowledge_store_items. The request fails even when you set the force query parameter to true. First delete the items with the DELETE method of the /knowledge-stores/{knowledge_store_id}/items/{item_id} endpoint. Then delete the asset.
- If indexed assets reference the asset: the error code is asset_has_linked_resources. To delete the asset and these indexed assets together, set the force query parameter to true. To list the indexed assets first, use the GET method of the /assets/{asset_id}/indexed-assets endpoint.
- If both apply: the error code is asset_has_knowledge_store_items.
If entities use the asset, a successful delete removes the asset from the asset_ids array of each entity. To list these entities, use the GET method of the /assets/{asset_id}/entities endpoint.
Request
- Base URL: https://api.twelvelabs.io/v1.3
- URL: https://api.twelvelabs.io/v1.3/assets/{asset_id}
- Auth: API key in header x-api-key
Path parameters
The unique identifier of the asset to delete.
Query parameters
Use this parameter to choose how the delete handles indexed assets that reference the asset:
- true: Deletes the asset and the indexed assets that reference it.
- false or omitted: Fails with 409 Conflict if indexed assets reference the asset.
If knowledge store items use the asset, the request fails with 409 Conflict for either value. Delete the items first.
Default: false.
Response
Successful response
Changes
- info
the response property
became required for the status - info
the response property
became required for the status
- info
- warning
deleted the
headerrequest parameterx-api-key - info
the endpoint scheme security
x-api-keywas added to the API
- warning