v2
Creates a job to export the specified asset as a downloadable MP4.
Request
Request syntax:
/jobs/create_export
Request parameters:
Pass the following parameters through the msg parameter:
Name | Data Type | Description |
|---|---|---|
asset | String | Identifies the asset that will be exported by its asset ID. Where can I find an asset ID?
|
aaclc | String | Optional. Set to 1 to export the file using AAC-LC audio encoding. If omitted, the default audio codec HE-AAC will be used. |
Response
The response for a successful request contains the following parameter.
| Name | Data Type | Description |
|---|---|---|
| job | Dictionary | Describes a Cloud Slicer job. |
Once an asset has been successfully exported, use the Get Cloud Slicer Job endpoint to find out the URL to the exported MP4 (hd_exported_url). If captions are present, a TTML file may be downloaded by appending .ttml to this URL.
Sample Request/Response
A sample request/response is provided below.
The Call function, which is imported from API Auth for V2 APIs (see below), prepares the message body and digital signature.
from uplynk_api2_auth import Call
print(Call('/api2/cloudslicer/jobs/create_export', asset='a29a0bf647454d70bbb9b13d6896a108'))
{
"job": {
"state": "assigned",
"last_error": "",
"args": {"export_mp4": True},
"attempts": 0,
"source": {},
"finished": 0,
"asset": "a29a0bf647454d70bbb9b13d6896a108",
"last_start": 0,
"owner": "a735c56ea4014685bc74c0a375236cc5",
"progress": "",
"id": "d0d05debde654249ae25b1c7f45a19fe"
},
"error": 0
}
print(Call('/api2/cloudslicer/jobs/get', id='d0d05debde654249ae25b1c7f45a19fe'))
{
"job": {
"state": "done",
"last_error": "",
"args": {"export_mp4": True},
"attempts": 1,
"source": {},
"finished": 1488565621330,
"hd_exported_url": "http://stg-ec-ore-u.uplynk.com/slices/5409e4c0c71444849ac6e07743ff20bd_g.mp4",
"asset": "a29a0bf647454d70bbb9b13d6896a108",
"last_start": 1488565611238,
"owner": "a735c56ea4014685bc74c0a971238cc5",
"progress": "Finished successfully",
"id": "d0d05debde654249ae25b1c7f45a19fe"
},
"error": 0
}