Skip to main contentIBM Video Streaming Developers

Metadata fields

Get list of metadata fields

Get the list of the custom metadata fields for the current account.

GET https://api.video.ibm.com/custom-metadata-fields.json

Parameters

The query parameters for the GET request:

PARAMETERTYPEIMPORTANCEDESCRIPTION
filter[type]stringREQUIREDchannel if you need custom metadata for a channel, video if you need custom metadata for a video

Success response

Upon success a response with HTTP status “200 OK” is returned with the following key-value structures.

KEYTYPEDESCRIPTION
fieldsarrayArray of data for fields (see below)

The array of data for fields contains the following key-value structures.

KEYTYPEDESCRIPTION
idnumberThe unique ID of the field
display_namestringName displayed for the field
namestringName of the field
typestringData type of the field
content_typestringContent type of the field. Possible values are channel or video
descriptionstringDescription of the field
is_requiredbooleanValue is true if the field is required
enum_itemsarrayArray of enum values containing the field name with the item key
childrenarrayAn array of data for field children with the following attributes: name, display_name, content_type, type, description, is_required

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
400 Bad Requestbad_requestWhen filter[type] is missing
401 UnauthorizedThe provided access token is missing, revoked, expired or malformed
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Create new metadata field

Create a new custom metadata field.

POST https://api.video.ibm.com/custom-metadata-fields.json

Parameters

The parameters for the POST request:

PARAMETERTYPEIMPORTANCEDESCRIPTION
namestringREQUIREDName of the field
display_namestringREQUIREDDisplay name
content_typestringREQUIREDSupported values are channel or video
typestringREQUIREDData type of the field. Supported values: string, float, tag_list, bool, enum, group, datetime, link
is_requiredbooleanREQUIREDValue is true if the field is required
descriptionstringOPTIONALThe description of the field
enum_itemsarrayOPTIONALArray of enum items

Success response

Upon success a response with HTTP status “200 OK” is returned with a set of key-value structures under a field element.

KEYTYPEDESCRIPTION
idnumberThe unique ID of the field
namestringName of the field
typestringData type of the field
content_typestringContent type of the field. Possible values are channel or video
descriptionstringDescription of the field
is_requiredbooleanValue is true if the field is required
enum_itemsarrayArray of enum values containing the field name with the item key
childrenobjectAn array of data for field children with the following attributes: name, display_name, content_type, type, description, is_required

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
400 Bad Requestbad_requestMetadata field definition is not valid
401 UnauthorizedThe provided access token is missing, revoked, expired or malformed
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Delete metadata field

Delete a custom metadata field.

DELETE https://api.video.ibm.com/custom-metadata-fields/{field_id}.json

Parameters

This request has no parameters.

Success response

Upon success a response with HTTP status “200 OK” is returned.

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
401 UnauthorizedThe provided access token is missing, revoked, expired or malformed
404 Not Foundnot_foundMetadata field id is not valid
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request