Skip to navigation

Update an item tag

This method updates the range or the tag_metadata of the specified tag and returns the tag. Send at least one field. A field you omit keeps its current value. To clear the end of the range, send end_sec as null. The tag becomes a single moment. The platform merges your changes to tag_metadata with the existing metadata:

  • A key with a value creates or replaces that key.
  • A key set to null deletes that key.
  • A key set to an empty string ("") or an empty array ([]) is ignored.
  • A key you omit from the request keeps its current value.

The tag must keep at least one key in tag_metadata, and it holds up to 50 pairs. If the merged result breaks either limit, the request fails.

Authentication

x-api-keystring

Your API key.

Note

You can find your API key on the API Keys page.

Path parameters

knowledge_store_idstringRequired
The unique identifier of the knowledge store.
item_idstringRequired
The unique identifier of the knowledge store item.
tag_idstringRequired
The unique identifier of the item tag.

Request

This endpoint expects an object.
start_secdoubleOptional>=0
The new start of the tag, in seconds from the start of the video. It must be less than the duration of the video. The tag must still end after it starts.
end_secdouble or nullOptional

The new end of the range, in seconds from the start of the video. It must be greater than start_sec. It must not exceed the duration of the video. Send null to clear the end, which turns a range into a single moment. Omit the field to keep the current end.

tag_metadatamap from strings to nullable strings or integers or doubles or booleans or lists of stringsOptional

The keys to change. Send at least one key. Keys are strings of up to 128 characters. String values can have up to 8192 characters. Values can be a string, a number, a boolean, an array of strings, or null to delete the key. A key you omit keeps its current value. A nested object and an array containing anything other than strings are rejected. The tag holds up to 50 pairs after the merge. 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

The item tag has been successfully updated.
_idstringRead-only
The unique identifier of the item tag.
knowledge_store_idstring
The unique identifier of the knowledge store.
item_idstring
The unique identifier of the knowledge store item that holds the tag.
start_secdouble
The start of the tag, in seconds from the start of the video.
end_secdouble or null

The end of the range, in seconds from the start of the video. The value is null for a tag on a single moment.

tag_metadatamap from strings to strings or integers or doubles or booleans or lists of strings
The custom metadata of the tag. Keys are strings. Each value is a string, a number, a boolean, or an array of strings.
created_atstringRead-onlyformat: "date-time"
The date and time when the tag was created, in the RFC 3339 format.
updated_atstringRead-onlyformat: "date-time"
The date and time when the tag was last updated, in the RFC 3339 format.

Errors

400
Bad Request Error
404
Not Found Error
422
Unprocessable Entity Error