Skip to main content

Get Download URLs

Service Address

http://api-az-cn.danghongyun.com/rest

Request Method

GET

Request Parameters

ParameterDescriptionTypeRequired
accessKeyThe user access keyStringRequired
actionAPI name, this api is "getDownloadAddress"StringRequired
versionAPI version, currently must be 2.0StringRequired
timestampInvoke time in milliseconds since january 1 1970, eg: 1466488681033StringRequired
signatureSignature generated by signature rule.StringRequired
idsvideo id, multiple IDs separated by ',', eg:"c82c3de31e594ab2ae58db37a92c1395,ff09ba247b9c432f8fe7527d7aaeb5a3"StringRequired
typethe type of video after transcoding, 0 normal, 1 try, default 0IntegerOptional

Response Example

{
"code": 0,
"message": "success",
"result": [{
"id": "e59034b72ccb4c7e9914eea84cf7c6b0",
"hls": [
{
"url": "http: //dc2vcvis.dl2.hongshiyun.dev/target/hls/2017/05/31/185_e59034b72ccb4c7e9914eea84cf7c6b0_10_1280x720.m3u8",
"desc: "high-quality",
"width": 1280,
"height": 720,
"size": 0,
"encryptType": 0,
"contentId": null,
"customId": null,
"aesKey": null,
"defaultVideo": 1
},
{
"url": "http://dc2vcvis.dl2.hongshiyun.dev/target/hls/2017/05/31/185_e59034b72ccb4c7e9914eea84cf7c6b0_20_854x480.m3u8",
"desc": "high-definition",
"width": 854,
"height": 480,
"size": 0,
"encryptType": 0,
"contentId": null,
"customId": null,
"aesKey": null,
"defaultVideo": 0
},
{
"url": "http://dc2vcvis.dl2.hongshiyun.dev/target/hls/2017/05/31/185_e59034b72ccb4c7e9914eea84cf7c6b0_30_640x360.m3u8",
"desc": "standard-definition",
"width": 640,
"height": 360,
"size": 0,
"encryptType": 0,
"contentId": null,
"customId": null,
"aesKey": null,
"defaultVideo": 0
}],
"mp4": null,
"flv": null,
"ts": null
},
{
"id": "f8e0221bf5ef4ee3b30d1bd4a25e61e2",
"hls": null,
"mp4": null,
"flv": null,
"ts": null
}],
"success": true
}

Failure returns the following content:

{
"code": 10000,
"message": "exception",
"success": false
}

Response Fields

FieldDescription
urlThe stream url
descThe stream name
widthThe video width
heightThe video height
sizeThe video file size in bytes
encryptTypeThe type of encryption, 0: no encryption, 6: AES encryption, 7: arcvideo encryption, currently AES encryption only works for hls
contentIdOne of the keys used for arcvideo encryption
customIdOne of the keys used for arcvideo encryption
aesKeyThe key used for AES encryption
defaultVideoIs default playback stream or not, 0: No, 1: Yes

Error Codes

CodeMessage
0success
10000exception
10030no_cdn
10201api_not_exists