Get Download URLs
Service Address
http://api-az-cn.danghongyun.com/rest
Request Method
GET
Request Parameters
Parameter | Description | Type | Required |
---|---|---|---|
accessKey | The user access key | String | Required |
action | API name, this api is "getDownloadAddress" | String | Required |
version | API version, currently must be 2.0 | String | Required |
timestamp | Invoke time in milliseconds since january 1 1970, eg: 1466488681033 | String | Required |
signature | Signature generated by signature rule. | String | Required |
ids | video id, multiple IDs separated by ',', eg:"c82c3de31e594ab2ae58db37a92c1395,ff09ba247b9c432f8fe7527d7aaeb5a3" | String | Required |
type | the type of video after transcoding, 0 normal, 1 try, default 0 | Integer | Optional |
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
Field | Description |
---|---|
url | The stream url |
desc | The stream name |
width | The video width |
height | The video height |
size | The video file size in bytes |
encryptType | The type of encryption, 0: no encryption, 6: AES encryption, 7: arcvideo encryption, currently AES encryption only works for hls |
contentId | One of the keys used for arcvideo encryption |
customId | One of the keys used for arcvideo encryption |
aesKey | The key used for AES encryption |
defaultVideo | Is default playback stream or not, 0: No, 1: Yes |
Error Codes
Code | Message |
---|---|
0 | success |
10000 | exception |
10030 | no_cdn |
10201 | api_not_exists |