Get Asset(s) by ID

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 ParameterTypeDescription
idStringSpecify 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_idStringSpecify a single asset by its external ID.
idsListSpecify one or more assets by their asset IDs.
external_idsListSpecify 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 via ids or external_ids). An entry is null if the corresponding ID was not found.

Key response fields:

Response FieldTypeDescription
idStringThe asset's unique identifier (GUID).
descStringThe asset's description/title.
external_idStringThe external ID assigned to the asset, if any.
stateStringThe asset's current state (e.g., ready, waiting, slicing, deleted).
durationFloatThe asset's duration in seconds.
mp4_urlStringThe download URL of the highest-ray MP4 export. Empty string if not exported.
exported_urlsObjectURLs for the highest-ray export. May include keys such as mp4 and ttml_cc_transcripts. Empty object if not exported.
exportsListA 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
}