Customer Sign In

upLynk

Integration APIs: Library

Overview

The purpose of the library service is to manage shared libraries.

API Methods

This service supports the following methods:

MethodDescription
getRetrieves information on one or more shared libraries.
updateUpdates a library's description/name.
listLists each of your libraries.
assetsLists the assets associated with a library.

add

Adds an asset to a library.

remove

Removes an asset from a library.

/api2/library/get

Retrieves information on one or more shared libraries.

Request body parameters are described below.

Request ParameterTypeRequiredDescription
idStringSee below.Identify the desired library by its unique ID.
idsListSee below.Identify each desired library by its unique ID.

Please specify either the id or the ids parameter when requesting this endpoint.

Response body parameters are described below.

Response ParameterTypeDescription
errorIntegerIndicates whether an error occurred.
library|librariesObjectContains settings for each requested library.

created

IntegerIndicates the Unix time at which the libary was created.

desc

StringIndicates a library's description/name.

id

StringIdentifies a library by its system-defined ID.

lastmod

IntegerIndicates the Unix time at which the libary was last modified.

owner

StringIdentifies the library's owner by its system-defined ID.
Example (Get 1 Library)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
Call('/api2/library/get', id='587ed6b0074178ad8691f1f31ec1c1')
{	
	'library' : {
		'created' : 1409936370109,
		'desc' : 'My Library',
		'id' : '587ed6b0074178ad8691f1f31ec1c1',
		'lastmod' : 1466462446415,
		'owner' : '52a3024c963a4e5191a1b03c84b10420'
	}
	'error' : 0,
}
Example (Get 2 Libraries)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
Call('/api2/library/get', ids=['49ldf2g89ab92lec71cda0238c73cd9e', '587ed6b0074178ad8691f1f31ec1c1'])
{
	'libraries' : [{
			'owner' : '52a3024c963a4e5191a1b03c84b10420',
			'lastmod' : 1466615279440,
			'created' : 1479996375109,
			'id' : '49ldf2g89ab92lec71cda0238c73cd9e',
			'desc' : 'My 2nd Library'
		}, {
			'owner' : '52a3024c963a4e5191a1b03c84b10420',
			'lastmod' : 1466462446415,
			'created' : 1409936370109,
			'id' : '587ed6b0074178ad8691f1f31ec1c1',
			'desc' : 'My Library'
		}
	],
	'error' : 0
}

/api2/library/update

Updates a library's description/name.

Request body parameters are described below.

Request ParameterTypeRequiredDescription
idStringRequiredIdentify the desired library by its unique ID.
descStringRequiredUpdate the library's description/name to the specified value.

Response body parameters are described below.

Response ParameterTypeDescription
errorIntegerIndicates whether an error occurred.
libraryObjectContains settings for the modified library.

created

IntegerIndicates the Unix time at which the libary was created.

desc

StringIndicates the library's description/name.

id

StringIdentifies the library by its system-defined ID.

lastmod

IntegerIndicates the Unix time at which the libary was last modified.

owner

StringIdentifies the library's owner by its system-defined ID.
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
Call('/api2/library/update', id='587ed6b0074178ad8691f1f31ec1c1', desc='My 1st Library')
{
	'error' : 0,
	'library' : {
		'created' : 1409936370109,
		'desc' : 'My 1st Library',
		'id' : '587ed6b0074178ad8691f1f31ec1c1',
		'lastmod' : 1466462446415,
		'owner' : '52a3024c963a4e5191a1b03c84b10420'
	}
}

/api2/library/list

Lists each of your libraries.

Request body parameters are described below.

Request ParameterTypeRequiredDescription
searchStringOptionalFilters the response to libraries whose description, system-defined ID, or external ID matches the specified keyword(s).
limitIntegerOptionalDefines the maximum number of libraries that may be included in the response.

This parameter should not be set above 100.

skipIntegerOptionalSkips the first N results where N represents the value defined by this parameter.

Use the skip and the limit parameters to generate paginated results.

orderStringOptionalSort the results by one of the following fields: desc, created, lastmod, duration, state, and external_id. Prepend a minus sign to the field name to sort the results in reverse order (e.g., order='-desc' to sort values in reverse alphabetical order).

Response body parameters are described below.

Response ParameterTypeDescription
errorIntegerIndicates whether an error occurred.
librariesObjectContains settings for each of your libraries.

created

IntegerIndicates the Unix time at which the libary was created.

desc

StringIndicates a library's description/name.

id

StringIdentifies a library by its system-defined ID.

lastmod

IntegerIndicates the Unix time at which the libary was last modified.

owner

StringIdentifies the library's owner by its system-defined ID.
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Call('/api2/library/list', search='library', order='-created', limit=3)
{
	'error' : 0,
	'libraries' : {
		'created' : 1579996375109,
		'desc' : 'My 3rd Library',
		'id' : '123df2g89ab92lec71cda0238c73ba2c',
		'lastmod' : 1579996375109,
		'owner' : '52a3024c963a4e5191a1b03c84b10420'
	}, {
		'created' : 1479996375109,
		'desc' : 'My 2nd Library',
		'id' : '49ldf2g89ab92lec71cda0238c73cd9e',
		'lastmod' : 1479996375109,
		'owner' : '52a3024c963a4e5191a1b03c84b10420'
	}, {
		'created' : 1409936370109,
		'desc' : 'My Library',
		'id' : '587ed6b0074178ad8691f1f31ec1c1',
		'lastmod' : 1466462446415,
		'owner' : '52a3024c963a4e5191a1b03c84b10420'
	}
}

/api2/library/assets

Lists the assets associated with a library.

A request body parameter is described below.

Request ParameterTypeRequiredDescription
idStringRequiredIdentify the desired library by its unique ID.

Response body parameters are described below.

Response ParameterData TypeDescription
assetslistContains a list of assets associated with the specified library.
errorIntegerIndicates whether an error occurred.
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Call('/api2/library/assets', id='587ed6b0074178ad8691f1f31ec1c1')

{
	'assets' : [{
			'orig_filename' : None,
			'embed_player_url' : 'https://content.uplynk.com/player/A2331bc89.html',
			'test_player_url' : 'http://content.uplynk.com/player/84kL1s.html',
			'test_players' : [{
					'url' : 'http://content.uplynk.com/player/84kL1s.html',
					'expire' : None,
					'params' : '',
					'id' : '26nIkb1kUHsgH2TPZCJoxB',
					'desc' : '26nIkb1kUHsgH2TPZCJoxB'
				}
			],
			'require_drm' : 1,
			'created' : 1460137100103,
			'mp4_url' : 'http://stg-ec-ore-u.uplynk.com/slices/860/a12345c/b678910d/b678910d_g.mp4',
			'autoexpire' : 0,
			'slices' : 0,
			'job_type' : 'vod',
			'libraries' : [{
					'id' : '587ed6b0074178ad8691f1f31ec1c1',
					'desc' : 'My Library'
				}
			],
			'ttml_url' : '',
			'state' : 'ready',
			'rays' : 7,
			'poster_url' : 'https://stg-ec-ore-u.uplynk.com/slices/860/a12345c/b678910d/poster_789abc1.jpg',
			'duration' : 3.814,
			'lastmod' : 1466615288476,
			'external_id' : '',
			'id' : 'b678910d',
			'thumb_url' : 'https://stg-ec-ore-u.uplynk.com/slices/860/a12345c/b678910d/poster_789abc1.jpg',
			'desc' : 'MyVideo1'
		}, {
			'orig_filename' : None,
			'embed_player_url' : 'https://content.uplynk.com/player/1Kw5JDXfm0PX28mnrEjH4Sea.html',
			'test_player_url' : 'http://content.uplynk.com/player/2tYOgqT35WW2XkPw6id43Asa.html',
			'test_players' : [{
					'url' : 'http://content.uplynk.com/player/2tYOgqT35WW2XkPw6id43Asa.html',
					'expire' : None,
					'params' : '',
					'id' : '48849O1sf8',
					'desc' : '48849O1sf8'
				}
			],
			'require_drm' : 1,
			'created' : 1460137000322,
			'mp4_url' : 'http://stg-ec-ore-u.uplynk.com/slices/be3/a12345c/e543219f/e543219f_g.mp4',
			'autoexpire' : 0,
			'slices' : 1,
			'job_type' : 'vod',
			'libraries' : [{
					'id' : '587ed6b0074178ad8691f1f31ec1c1',
					'desc' : 'My Library'
				}
			],
			'ttml_url' : '',
			'state' : 'ready',
			'rays' : 7,
			'poster_url' : 'https://stg-ec-ore-u.uplynk.com/slices/be3/a12345c/e543219f/poster_456ae9.jpg',
			'duration' : 4.511541666666666,
			'lastmod' : 1466615291347,
			'external_id' : '',
			'id' : 'e543219f',
			'thumb_url' : 'https://stg-ec-ore-u.uplynk.com/slices/be3/a12345c/e543219f/poster_456ae9.jpg',
			'desc' : 'Office'
		}
	],
	'error' : 0
}

/api2/library/assets/add

Adds one or more assets to a library.

Request body parameters are described below.

Request ParameterTypeRequiredDescription
idStringRequiredIdentify the desired library by its unique ID.
assetsListRequiredIdentify each asset that will be added to the library by its system-defined ID.

Response body parameters are described below.

Response ParameterData TypeDescription
assetslistDescribes each asset that was added to the library.
errorIntegerIndicates whether an error occurred.
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Call('/api2/library/assets/add', id='587ed6b0074178ad8691f1f31ec1c1', assets=['a24d10115', 'b243cd1465'])

{
	'assets' : [{
			'orig_filename' : None,
			'embed_player_url' : 'https://content.uplynk.com/player/Hk8Vmtwd6mYxmuBNVD5s123.html',
			'test_player_url' : 'http://content.uplynk.com/player/10v3Hy4dJC5saW.html',
			'test_players' : [{
					'url' : 'http://content.uplynk.com/player/10v3Hy4dJC5saW.html',
					'expire' : None,
					'params' : '',
					'id' : '10v3Hy4dJC5saW',
					'desc' : '10v3Hy4dJC5saW'
				}
			],
			'require_drm' : 1,
			'created' : 1453140382232,
			'mp4_url' : '',
			'autoexpire' : 0,
			'slices' : 123,
			'job_type' : 'live',
			'libraries' : [{
					'id' : '587ed6b0074178ad8691f1f31ec1c1',
					'desc' : 'My Library'
				}
			],
			'ttml_url' : '',
			'state' : 'ready',
			'rays' : 5,
			'poster_url' : 'https://stg-ec-norcal-u.uplynk.com/slices/517/c823490fca/a24d10115/00000014.jpg',
			'duration' : 500.859637188207,
			'lastmod' : 1466627632427,
			'external_id' : 'extid123',
			'id' : 'a24d10115',
			'thumb_url' : 'https://stg-ec-norcal-u.uplynk.com/slices/517/c823490fca/a24d10115/00000014.jpg',
			'desc' : 'Video21'
		}, {
			'orig_filename' : None,
			'embed_player_url' : 'https://content.uplynk.com/player/4949123123fasd.html',
			'test_player_url' : 'http://content.uplynk.com/player/bb72143aC743.html',
			'test_players' : [{
					'url' : 'http://content.uplynk.com/player/bb72143aC743.html',
					'expire' : None,
					'params' : '',
					'id' : 'b2123c947A',
					'desc' : 'b2123c947A'
				}
			],
			'require_drm' : 1,
			'created' : 1453140291155,
			'mp4_url' : '',
			'autoexpire' : 0,
			'slices' : 8,
			'job_type' : 'live',
			'libraries' : [{
					'id' : '587ed6b0074178ad8691f1f31ec1c1',
					'desc' : 'My Library'
				}
			],
			'ttml_url' : '',
			'state' : 'ready',
			'rays' : 5,
			'poster_url' : 'https://stg-ec-norcal-u.uplynk.com/slices/3da/c823490fca/b243cd1465/00000007.jpg',
			'duration' : 35.20145124716554,
			'lastmod' : 1466627632449,
			'external_id' : '',
			'id' : 'b243cd1465',
			'thumb_url' : 'https://stg-ec-norcal-u.uplynk.com/slices/3da/c823490fca/b243cd1465/00000007.jpg',
			'desc' : 'New'
		}
	],
	'error' : 0
}

/api2/library/assets/remove

Removes one or more assets from your library.

Request body parameters are described below.

Request ParameterTypeRequiredDescription
idStringRequiredIdentify the desired library by its unique ID.
assetsListRequiredIdentify each asset that will be removed from the library by its system-defined ID.

Response body parameters are described below.

Response ParameterData TypeDescription
assetslistDescribes each asset that was removed from the library.
errorIntegerIndicates whether an error occurred.
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Call('/api2/library/assets/remove', ids=['a24d10115'])
{
		'assets' : [{
			'orig_filename' : None,
			'embed_player_url' : 'https://content.uplynk.com/player/Hk8Vmtwd6mYxmuBNVD5s123.html',
			'test_player_url' : 'http://content.uplynk.com/player/10v3Hy4dJC5saW.html',
			'test_players' : [{
					'url' : 'http://content.uplynk.com/player/10v3Hy4dJC5saW.html',
					'expire' : None,
					'params' : '',
					'id' : '10v3Hy4dJC5saW',
					'desc' : '10v3Hy4dJC5saW'
				}
			],
			'require_drm' : 1,
			'created' : 1453140382232,
			'mp4_url' : '',
			'autoexpire' : 0,
			'slices' : 123,
			'job_type' : 'live',
			'libraries' : [],
			'ttml_url' : '',
			'state' : 'ready',
			'rays' : 5,
			'poster_url' : 'https://stg-ec-norcal-u.uplynk.com/slices/517/c823490fca/a24d10115/00000014.jpg',
			'duration' : 500.859637188207,
			'lastmod' : 1466627632427,
			'external_id' : 'extid123',
			'id' : 'a24d10115',
			'thumb_url' : 'https://stg-ec-norcal-u.uplynk.com/slices/517/c823490fca/a24d10115/00000014.jpg',
			'desc' : 'Video21'
		}
	],
	'error' : 0
}