About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
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).
KEY | TYPE | DESCRIPTION |
---|---|---|
label_id | number | Unique ID of the label |
label_name | string | Label name |
label_color | string | Color 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 CODE | ERROR VALUE | ERROR CONDITIONS |
---|---|---|
401 Unauthorized | The provided access token is missing, revoked, expired or malformed | |
503 Service Unavailable | There 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:
PARAMETER | TYPE | IMPORTANCE | DESCRIPTION |
---|---|---|---|
label_name | string | REQUIRED | The 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).
KEY | TYPE | DESCRIPTION |
---|---|---|
label_id | number | Unique ID of the label |
label_name | string | Label name |
label_color | string | Color 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 CODE | ERROR VALUE | ERROR CONDITIONS |
---|---|---|
401 Unauthorized | The provided access token is missing, revoked, expired or malformed | |
503 Service Unavailable | There 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:
PARAMETER | TYPE | IMPORTANCE | DESCRIPTION |
---|---|---|---|
label_name | string | REQUIRED | The 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 CODE | ERROR VALUE | ERROR CONDITIONS |
---|---|---|
400 Bad Request | label_already_exists | |
401 Unauthorized | invalid_token | The provided access token is missing, revoked, expired or malformed |
503 Service Unavailable | There 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 CODE | ERROR VALUE | ERROR CONDITIONS |
---|---|---|
401 Unauthorized | invalid_token | The provided access token is missing, revoked, expired or malformed |
503 Service Unavailable | There 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.
KEY | TYPE | DESCRIPTION |
---|---|---|
label_id | number | Unique ID of the label |
label_name | string | Label name |
label_color | string | Color 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 CODE | ERROR VALUE | ERROR CONDITIONS |
---|---|---|
401 Unauthorized | The provided access token is missing, revoked, expired or malformed | |
503 Service Unavailable | There 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:
PARAMETER | TYPE | IMPORTANCE | DESCRIPTION |
---|---|---|---|
label_ids | array | REQUIRED | IDs 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 CODE | ERROR VALUE | ERROR CONDITIONS |
---|---|---|
404 Bad Request | bad_request | Label IDs are not an an array |
401 Unauthorized | The provided access token is missing, revoked, expired or malformed | |
404 Not Found | not_found | Video was not found |
503 Service Unavailable | There 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:
PARAMETER | TYPE | IMPORTANCE | DESCRIPTION |
---|---|---|---|
label_ids | array | REQUIRED | IDs 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 CODE | ERROR VALUE | ERROR CONDITIONS |
---|---|---|
401 Unauthorized | The provided access token is missing, revoked, expired or malformed | |
404 Not Found | not_found | Channel was not found |
503 Service Unavailable | There is a temporary error on the server which makes it impossible to serve the request |