Creating Labels

With the Backlot API, you can create top-level and child labels.

To create labels:

  1. Create a top-level label. The following example creates a "Hobbies" label.
    [POST]/v2/labels{  
       "name":"Hobbies"
    }

    Backlot returns a response similar to the following.

    {
       "name": "Hobbies",
       "id": "Yh98G7hsaß",
       "full_name": "/Hobbies"
    }
    Note:

    Try out the code samples using your account credentials in the Ooyala Scratchpad. For information about using the Scratchpad, see Practice Making Requests with the Scratchpad. To launch the scratchpad, go to Ooyala API Scratchpad.

  2. Create a child label. The following example creates a "Hockey" label under the "Hobbies" parent label by specifying the ID of Hobbies label.
    [POST] /v2/labels{
       "parent_id":"Yh98G7hsaß",
       "name":"Hockey"
    }

    Backlot returns a response similar to the following.

    {
       "name": "Hockey",
       "id": "Yh98G7hsaß",
       "full_name": "/Hobbies/Hockey",
       "parent_id": "Hwe8G7hrt5"
    }
    Note:

    Try out the code samples using your account credentials in the Ooyala Scratchpad. For information about using the Scratchpad, see Practice Making Requests with the Scratchpad. To launch the scratchpad, go to Ooyala API Scratchpad.

Was this article helpful?