Editing Asset Information: PATCH

To change an asset's information, use PATCH /v2/assets/asset_id.

Note: For more information about Backlot REST API commands, see the Backlot API Reference.

To edit asset information:

Use the PATCH method with the /v2/assets route, with the properties to be changed in the request body. The following example changes the name, hosted at URL, and description of an asset.
Note: Properties in the body of the PATCH vary by asset type.
[PATCH]/v2/assets/Y1dTdvMjq9QtOM{  
   "name":"My Awesome Video",
   "hosted_at":"http://www.mydomain.com",
   "description":"The next Internet meme."
}

Backlot returns a response similar to the following.

{  
   "asset_type":"video",
   "duration":30,
   "name":"My Awesome Video",
   "preview_image_url":null,
   "created_at":"2011-07-22T18:54:19+00:00",
   "embed_code":"Y1dTdvMjq9QtOM",
   "time_restrictions":null,
   "updated_at":"2011-07-22T20:51:07+00:00",
   "external_id":null,
   "hosted_at":"http://www.mydomain.com",
   "original_file_name":"my_video.avi",
   "description":"The next Internet meme.",
   "status":"live"
}
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.

The asset's information is successfully changed.

Was this article helpful?