Skip to main contentIBM Video Streaming Developers

Manage video labels

A video can have multiple labels. With these API calls you can get information on the labels of a video. You can also add and remove labels to or from a video.

Get list of all labels

Returns all video labels in the current account.

GET https://api.video.ibm.com/users/self/labels.json

Parameters

This request has no parameters.

Success response

Upon success a response with HTTP status “200 OK” is returned with the following key-value pairs under a labels key (grouped by values of label IDs).

KEYTYPEDESCRIPTION
label_idnumberUnique ID of the label
label_namestringLabel name
label_colorstringColor of the label

Example of a success response:

{
"labels": {
"1771": {
"label_id": 1771,
"label_name": "marketing",
"label_color": "color-2"
},
"1772": {
"label_id": 1772,

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
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 a new label

Create a new video label for the current account.

POST https://api.video.ibm.com/users/self/labels.json

Parameters

The parameters for the POST request:

PARAMETERTYPEIMPORTANCEDESCRIPTION
label_namestringREQUIREDThe name of the label

Success response

Upon success a response with HTTP status “200 OK” is returned with the following key-value pairs under a label element (grouped by value of label ID).

KEYTYPEDESCRIPTION
label_idnumberUnique ID of the label
label_namestringLabel name
label_colorstringColor of the label

Example of a success response:

{
"label": {
"25187": {
"label_id": 25187,
"label_name": "some label",
"label_color": "color-6"
}
}
}

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
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

Modify a label

Change the name of a label.

PUT https://api.video.ibm.com/users/self/label/{label_id}.json

Parameters

The parameters for the PUT request:

PARAMETERTYPEIMPORTANCEDESCRIPTION
label_namestringREQUIREDThe name of the label

Success response

Upon success, a response with HTTP status “204 No Content” is returned.

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
400 Bad Requestlabel_already_exists
401 Unauthorizedinvalid_tokenThe 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 a label

Delete a video label from the current account.

DELETE https://api.video.ibm.com/users/self/label/{label_id}.json

Parameters

This request has no parameters.

Success response

Upon success, a response with HTTP status “204 No Content” is returned.

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
401 Unauthorizedinvalid_tokenThe 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

Get the labels of a video

Returns the labels assigned to a video.

GET https://api.video.ibm.com/videos/{video_id}/labels.json

Parameters

This request has no parameters.

Success response

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

KEYTYPEDESCRIPTION
label_idnumberUnique ID of the label
label_namestringLabel name
label_colorstringColor of the label

Example of a success response:

{
"labels": {
"1771": {
"label_id": 1771,
"label_name": "marketing",
"label_color": "color-2"
},
"1772": {
"label_id": 1772,

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
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

Add labels to a video

Add existing labels to a video.

PUT https://api.video.ibm.com/videos/{video_id}/labels.json

Parameters

The parameters for the PUT request:

PARAMETERTYPEIMPORTANCEDESCRIPTION
label_idsarrayREQUIREDIDs of labels to be added to the video

Success response

Upon success, a response with HTTP status “204 No Content” is returned.

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
404 Bad Requestbad_requestLabel IDs are not an an array
401 UnauthorizedThe provided access token is missing, revoked, expired or malformed
404 Not Foundnot_foundVideo was not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Remove labels from a video

Remove specific labels from a video.

DELETE https://api.video.ibm.com/videos/{video_id}/labels.json

Parameters

The parameters for the PUT request:

PARAMETERTYPEIMPORTANCEDESCRIPTION
label_idsarrayREQUIREDIDs of label to be removed from the video

Success response

Upon success, a response with HTTP status “204 No Content” 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_foundChannel was not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request