Label Management API (Deprecated)

The Backlot Label API allows for programmatic control of labels. Included in the API are calls for label creation and deletion, association and removal of labels and content, and renaming of a label.

Note: This software is deprecated. Use the latest version.

As in the Query API example, interactions with the Backlot Label API are through signed REST-style GET requests to http://api.ooyala.com/partner/labels.

Responses are XML with the following structure

<?xml version="1.0" encoding="UTF-8"?>
<result code="success">ok</result>

The code will be one of success, failure, params_missing. The xml response of the <result> tag will be 'ok' on success or an explanation of the error on failure.

Required Parameters

  • pcode – Provider Code
  • expires – Query expiration time in seconds since epoch (00:00:00 1/1/1970 GMT)
  • mode – One of listLabels, createLabels, deleteLabels, assignLabels, unassignLabels, renameLabel, or clearLabels
  • signature – The digital signature of the request. The signature should be calculated using SHA-256 with the signature generation rules.

listLabels

Returns a list of labels in the given account.

Optional parameters: label - If this is provided, the sublabels of the specified label are returned. If this is not provided, all labels in the account are returned.

Example:

http://www.ooyala.com/partner/labels?pcode=<pcode>&expires=<expiration>
&mode=listLabels&signature=<signature>

createLabels and deleteLabels

Additional required parameter: a comma-separated list of labels or a list of label[<id>]=label parameters

createLabels and deleteLabels allow for the creation and deletion of labels, respectively. Labels must start with a forward slash '/' and a tree structure can be specified in the usual manner: /grandparent/parent/child. Labels can be specified in one of two formats:

  1. labels=<label1>,<label2>,<label3>
  2. label[1]=<label1>&label[2]=<label2>&label[3]=<label3>

For label paths with multiple elements, such as /labelParent/labelChild, the entire path will be created including parent labels as needed.

Examples:

http://api.ooyala.com/partner/labels?pcode=<pcode>&expires=<expiration>&labels=/hello&
mode=createLabels&signature=<signature>

http://api.ooyala.com/partner/labels?pcode=<pcode>&expires=<expiration>&labels=/hello&mode=
deleteLabels&signature=<signature>

assignLabels and unassignLabels

Additional required parameters: embedCodes, labels (or label[<id>]'s)

Optional parameters:

  • includeSublabels=true

    For unassignLabels, remove any labels lower in the path. For example, if you have content associated with labels /parent and /parent/child, and remove /parent, /parent/child will be removed as well. Default is false.

  • ignoreNotFound=true

    For unassignLabels, force a success return ('OK') if the specified label is not present. Default is false.

  • createLabels=false

    For assignLabels, do not create the label if it does not exist. Default is true.

assignLabels and unassignLabels allow the assignment or removal of labels, respectively, with a set of videos. Labels can be specified in the same manner as above. Videos are specified as a comma-separated list of embed codes.

Examples:

http://api.ooyala.com/partner/labels?pcode=<pcode>&embedCodes=<embedCode1>,<embedCode2>
&expires=<expiration>&labels=/hello,/bye&mode=assignLabels&signature=<signature>

http://api.ooyala.com/partner/labels?pcode=<pcode>&embedCodes=<embedCode1>,<embedCode2>
&expires=<expiration>&labels=/hello,/bye&mode=unassignLabels&signature=<signature>

renameLabel

Additional required parameters: oldlabel, newlabel

renameLabel allows you to rename or move a label without losing its associated videos. If newlabel has different ancestors from oldlabel, it will be moved appropriately. If the name is different, it will be renamed appropriately.

Example:

http://api.ooyala.com/partner/labels?pcode=<pcode>&embedCodes=<embedCode1>,<embedCode2>
&expires=<expiration>&mode=renameLabel&newlabel=/bye&oldlabel=/hello&signature=<signature>

clearLabels

Additional required parameter: embedCodes

clearLabels allows the removal of all associated labels from a set of videos without enumerating the labels individually. Videos are specified as a comma-seperated list of embedCodes as with the assignLabels and unassignLabels modes.

Example:

http://api.ooyala.com/partner/labels?pcode=<pcode>&embedCodes=<embedCode1>&
expires=<expiration>&mode=clearLabels&signature=<signature>

Was this article helpful?