Labels
When added to external publishing targets, labels specify which videos, channels, and channel sets to publish externally. Additionally, labels are also useful for organizing your video library, searching for videos, and retrieving targeted analytics.
Create a Label
[POST] /v2/labels
{
properties
}
Create multiple labels using full label name
The full paths of labels must be CGI-escaped (URL-encoded) and must begin with a leading slash. All components of the path are created.
[POST] /v2/labels/by_full_path//full/path/label1,/full/path/label2,...
List Labels
[GET] /v2/labels
Get assets assigned to a label
[GET] /v2/labels/label_id/assets
View Label Information
[GET] /v2/labels/label_id
View Label Information by Full Path Names
The full paths of labels must be CGI-escaped (URL-encoded). The services returns 400 if any paths do not exist. The response body states which components of the paths already exist or are missing.
[GET] /v2/labels/by_full_path//full/path/label1,/full/path/label2
Delete a Label
[DELETE] /v2/labels/label_id
Route Attributes
The following table describes all attributes that can be expressed through the route.
| Route Attribute | Description |
|---|---|
| label_id |
The ID of the label. To get a list of labels, perform a get against the /v2/labels route. Type: String Default: None Example: /labels/r28ertfe44ea4e648fd07d4509123254 |
Properties
The following table describes all properties that can be associated with a label.
| Attribute | Description | Required? |
|---|---|---|
| asset_count |
Read-only. Specifies the number of assets using the label. Returned when you make a get request against a specific label ID. Type: Integer Example: 42 |
No |
| full_name |
Full path to the label, including any parents. Type: String Example: "/Sports/Motorcycle Racing" |
Yes |
| id |
Read only. ID of a label. Type: String Example: "814efb109416490a98ee3f4fcd673244" |
Yes |
| items |
Array containing labels. Returned by a get request to /v2/labels. Type: Array Example: n/a |
No |
| name |
Name of a label. To use non-Latin characters, make sure they are UTF-8 and URI-encoded. Type: String Example: "Motorcycle Racing" |
Yes |
| parent_id |
ID of the parent label. Type: String Condition: Required when adding a child label to a parent label. Example: "Sports" |
Conditional |
Examples
This example creates a top-level label:
[POST] /v2/labels
{
"name":"Hobbies"
}
Backlot returns a response similar to the following:
{
"name": "Hobbies",
"id": "d5751b77a0c24972888bf906734d4522",
"full_name": "/Hobbies",
"parent_id": null
}
This example adds a child label to a parent label:
[POST] /v2/labels
{
"name": "Hockey",
"parent_id": "d5751b77a0c24972888bf906734d4522"
}
Backlot returns a response similar to the following:
{
"name": "Hockey",
"id": "85042f300fc143c093e8f4ee01894355",
"full_name": "/Hobbies/Hockey",
"parent_id": "d5751b77a0c24972888bf906734d4522"
}
[POST] /v2/labels/by_full_path//sports/football/NFL,/animal videos/buffaloes
This example lists all labels:
[GET] /v2/labels
Backlot returns a response similar to the following:
{
"items": [
{
"name": "Sports",
"id": "814efb109416490a98ee3f4fcd6784cf",
"parent_id": null,
"full_name": "/Sports"
},
{
"name": "Motorcycle Racing",
"id": "bace921fdea44cc18a5a273155514522",
"parent_id": "814efb109416490a98ee3f4fcd673244",
"full_name": "/Sports/Motorcycle Racing"
},
{
"name": "Hockey",
"id": "85042f300fc143c093e8f4ee01894355",
"parent_id": "d5751b77a0c24972888bf906734d8c34",
"full_name": "/Hobbies/Hockey"
},
{
"name": "Hobbies",
"id": "d5751b77a0c24972888bf906734d4522",
"parent_id": null,
"full_name": "/Hobbies"
}
]
}
This example deletes a label:
[DELETE] /v2/labels/85042f300fc143c093e8f4ee01894355
Backlot returns a 200 response.
Documentation
- Welcome
- Backlot Getting Started Guide
- Planning and Setup Guide
- Ooyala Ingestion Guide
- Player Developer Guide
- Core Platform Developer Guide
- Discovery Developer Guide
- Content Protection Developer Guide
- Backlot API Reference
- Player API Reference
- Rights Locker API Reference
- General Reference
- Glossary
- Archive
- Release Notes
