Custom Metadata

You can add up to 100 name-value pairs to any type of asset.

The metadata name must follow these restrictions:
  • Maximum length: 128 characters
  • Digits or letters (a to z, A to Z, 0 to 9) and any of the following special characters: - _ ! @ # $ % & ^ * ( ) . ?
  • The following characters must be escaped, as shown:
    Character Escape Sequence
    ! %21
    # %23
    $ %24
    ^ %5E

The value is limited to 2,048 characters.

Set/Replace Custom Metadata

[PUT]/v2/assets/asset_id/metadata{
   "name1" : "value1",
   "name2" : "value2",
   "name3" : "value3",
    .
    .
    .
   "name100" : "value100"
}

Modify Custom Metadata

[PATCH]/v2/assets/asset_id/metadata{
   "name1" : "value1",
   "name2" : "value2",
   "name3" : "value3",
    .
    .
    .
   "name100" : "value100"
}

Get Custom Metadata

[GET]/v2/assets/asset_id/metadata

Delete A Single Custom Metadatum for Player

[PATCH]/v2/assets/asset_id/metadata{
      "name" : "null"
}

Delete All Custom Metadata for Asset

[DELETE]/v2/assets/asset_id/metadata

Examples

This example creates custom metadata for the IzNnllMjphu2XF3_UgPROoCi9B2rtWs asset:

[PUT]/v2/assets/IzNnllMjphu2XF3_UgPROoCi9B2rtWs/metadata{  
   "director":"Michel Gondry",
   "year":"2004",
   "rating":"R"
}
.
.
.

Backlot returns a response similar to the following:

{  
   "rating":"R",
   "director":"Michel Gondry",
   "year":"2004"
}
.
.
.
Note:

Try out the code samples using your account credentials in the Ooyala Scratchpad. For information about using the Scratchpad, see The Scratchpad.

해당 내용이 도움 되었습니까?