Adding URLs for an Asset

For a video asset that is remote, you must identify a URL for each format you have created for the movie. A video asset can have multiple formats so it can play on multiple devices, such as HLS for mobile devices and HDS for desktop.

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

API Server: https://api.ooyala.com/v2

The Backlot API is used to associate a remote movie asset with its URLs. Use standard authentication as described in Your API Credentials.

Update URLs

Identify the URLs for a remote movie asset:

POST /assets/asset_id/movie_urls

The body of the POST must contain a hash with the type of format as the key and the URL as the value. URLs used in the streams_urls field when creating the remote asset must be added again using this route.

Do not update more than 3 URLs at a time. To update more than 3 URLs, call the route more than once, each time with no more than 3 URLs, for example:

{ 
   "dash" : "https://dash.ooyala.com",
   "hls" : "https://hls.ooyala.com", 
   "hds" : "http://hds.ooyala.com" 
}

Upon success, the value 200 Success is returned, along with all the URLs for the movie, reflecting the update:

{ 
   "dash" : "https://dash.ooyala.com", 
   "hls" : "https://hls.ooyala.com", 
   "hds" : "http://hds.ooyala.com" 
}

If the route is called for an asset that does not exist, 404 Not Found is returned:

{ 
   "message": "No asset exists with the id X." 
}

If an unsupported format type is used, 400 Invalid Request is returned:

{ 
   "message" : "Invalid URL type X. Allowed types - dash,hds,hls,mp4..." 
} 

If you attempt to POST more than 3 URLs simultaneously, 400 Invalid Request is returned:

{ 
   "message": "You cannot update more than 3 urls at a time" 
}

Get URLs

Returns all URLs for a remote movie asset:

GET /assets/asset_id/movie_urls

Upon success, the value 200 Success is returned, along with all the URLs for the movie:

{ 
   "dash" : "https://dash.ooyala.com", 
   "hls" : "https://hls.ooyala.com", 
   "hds" : "http://hds.ooyala.com", 
   "smooth" : "http://smooth.ooyala.com" 
}

If the route is called for an asset that does not exist:

{ 
   "message": "No asset exists with the id X." 
} 

Delete URLs

Deletes the URL for the specified format:

DELETE /assets/asset_id/movie_urls/type

Upon success, the value 200 Success is returned, along with all the URLs for the movie excluding the deleted URL:

{ 
   "dash" : "https://dash.ooyala.com",
   "hls" : "https://hls.ooyala.com",
   "hds" : "http://hds.ooyala.com"
}

If the route is called for an asset that does not exist, 404 Not Found is returned:

{ 
   "message": "No asset exists with the id X."
} 

If an unsupported format type is used, 400 Invalid Request is returned:

{ 
   "message" : "Invalid URL type X. Allowed types - dash,hds,hls,mp4..." 
} 

Parameters

The following table describes all parameters.

Parameter Description
asset_id Unique identifier for the asset.

Type: String

type The format of the asset.

Type: String

Valid Values: dash, hds, hls, mp4, akamai_hd2_hds, akamai_hd2_hls, rtmp or smooth.

Default: None

Example: dash

Was this article helpful?