v2
Retrieves one or more assets from any of your libraries.
A maximum of 1000 assets may be retrieved per request.
An asset will only be reported a single time per request. Duplicate requests for the same asset are ignored.
Request
Request syntax:
GET /api2/asset/get
Request parameters:
Pass the following parameters through the msg parameter:
A valid request must identify one or more assets by including only one of the following request parameters.
| Request Parameter | Type | Description |
|---|---|---|
| id | String | Specify a single asset by its asset ID. This unique ID identifies an asset. View this ID by navigating to the Content tab, selecting the desired asset, and then viewing the GUID option from the Details tab. |
| external_id | String | Specify a single asset by its external ID. |
| ids | List | Specify one or more assets by their asset IDs. |
| external_ids | List | Specify one or more assets by their external IDs. |
Response
A successful response returns error: 0 and one of:
asset— An object containing the asset's properties (when a single asset is requested).assets— A list of asset objects (when multiple IDs are requested viaidsorexternal_ids). An entry isnullif the corresponding ID was not found.
Key response fields:
| Response Field | Type | Description |
|---|---|---|
| id | String | The asset's unique identifier (GUID). |
| desc | String | The asset's description/title. |
| external_id | String | The external ID assigned to the asset, if any. |
| state | String | The asset's current state (e.g., ready, waiting, slicing, deleted). |
| duration | Float | The asset's duration in seconds. |
| mp4_url | String | The download URL of the highest-ray MP4 export. Empty string if not exported. |
| exported_urls | Object | URLs for the highest-ray export. May include keys such as mp4 and ttml_cc_transcripts. Empty object if not exported. |
| exports | List | A per-ray list of all exports on the asset. Each entry contains ray (the encoding ray identifier, e.g. a through h), mp4 (the download URL), and — when available — ttml_cc_transcripts, captions (keyed by format and track), and transcript (same structure as captions). Provides access to every exported ray, unlike mp4_url and exported_urls which only surface the highest. |
Sample Request/Response
The following sample request retrieves an asset whose external ID is id1234.
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/asset/get', external_id='id1234'))
{
"asset": {
"orig_filename": null,
"rays": 8,
"require_drm": 0,
"require_studio_drm": 0,
"slices": 22,
"autoexpire": 0,
'break_offsets': [{
'break_type': 'AD BREAK',
'duration': 19.202916666666667,
'offset': 17.024
}, {
'break_type': 'BOUNDARY',
'duration': 20.352,
'name': 'c4',
'offset': 24.96
}, {
'break_type': 'AD BREAK',
'duration': 29.953729166666665,
'offset': 55.424
}
],
"created": 1345730768265,
"job_type": "vod",
"libraries": [],
"test_player_url": "https://content.uplynk.com/player5/Hak3zjnPLSW5o0j8GMpzRMsa.html",
"test_players": [{
"desc": "Monitoring Test Player",
"id": "Hak3zjnPLSW5o0j8GMpzRMsa",
"url": "https://content.uplynk.com/player5/Hak3zjnPLSW5o0j8GMpzRMsa.html"
}, {
"desc": "Affiliate Test Player",
"id": "3fqeYp0yrG5Pk4bDqazn79",
"url": "https://content.uplynk.com/player5/3fqeYp0yrG5Pk4bDqazn79sa.html"
}
],
"state": "ready",
"duration": 88.88598639455783,
"embed_player_url": "https://content.uplynk.com/player5/2aZeCWBZd0FVXmU95BGKnjea.html",
"external_id": "id1234",
"id": "5915d84829405cb4db1bc3f71c10fc83",
"thumb_url": "http://storage.uplynk.com/slices/.../00000014.jpg",
"desc": "foux du fu fa fa",
"mp4_url": "http://storage.uplynk.com/slices/.../8e37519b10c8408d879d619760baaee0_g.mp4",
"exports": [
{"ray": "c", "mp4": "http://storage.uplynk.com/slices/.../8e37519b10c8408d879d619760baaee0_c.mp4"},
{"ray": "e", "mp4": "http://storage.uplynk.com/slices/.../8e37519b10c8408d879d619760baaee0_e.mp4", "ttml_cc_transcripts": "http://storage.uplynk.com/slices/.../8e37519b10c8408d879d619760baaee0_e.mp4.ttml"},
{"ray": "g", "mp4": "http://storage.uplynk.com/slices/.../8e37519b10c8408d879d619760baaee0_g.mp4", "ttml_cc_transcripts": "http://storage.uplynk.com/slices/.../8e37519b10c8408d879d619760baaee0_g.mp4.ttml"}
],
"ttml_url": "http://storage.uplynk.com/slices/.../8e37519b10c8408d879d619760baaee0_g.mp4.ttml"
},
"error": 0
}
