Adding Custom Metadata

You can add up to 100 name/value pairs to an asset.

Note: For more information about Backlot REST API commands, see the Backlot API Reference.
The name is limited to 128 characters, and the value to 2,048 characters.

To add custom metadata to an asset:

  1. To add metadata without replacing the current metadata, use PATCH with the /v2/assets route. The following example adds the director and copyright custom metadata to the JxbzdkMjqBEsO asset.
    [PATCH]/v2/assets/JxbzdkMjqBEsO/metadata{  
       "director":"Peter Jackson",
       "copyright":"2002"
    }

    Backlot returns a response similar to the following.

    {  
       "director":"Peter Jackson",
       "copyright":"2002",
       "category":"Adventure",
       "custom_id":"54678934"
    }
    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. To add metadata that entirely replaces the current metadata, use PUT with the /v2/assets route. The following example replaces custom metadata for the JxbzdkMjqBEsO asset.
    [PUT]/v2/assets/JxbzdkMjqBEsO/metadata{  
       "director":"Not Really Peter Jackson",
    }

    Backlot returns a response similar to the following.

    {  
       "director":"Not Really Peter Jackson",
    }
    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.

  3. To get the current custom metadata, you can perform a GET at any time.

Was this article helpful?