Queries the download URL of a video file that is stored in IoT Platform.
Usage notes
It takes time to generate video files in IoT Platform. The download URL of a video file is available only after the video file is generated. This operation also returns the progress of generating a video file. You can call this operation to check the progress before the download URL is available.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | QueryRecordDownloadUrl |
The operation that you want to perform. Set the value to QueryRecordDownloadUrl. |
| FileName | String | Yes | 1623999491_LYPsmZGeEN8GdKzMtYNiBXXXXXXXXX_0/c0064411-2065-400a-a13e-******** |
The name of the video file. You can call the QueryRecord operation to query the name of the video file. |
| IotInstanceId | String | No | iot-cn-n6w1y59**** |
The ID of the instance. You can view the instance ID on the Overview page in the IoT Platform console. Notice
For more information, see Overview. |
| ProductKey | String | No | a1BwAGV**** |
The ProductKey of the product to which the IP camera belongs. You can view the information about all products within the current account on the Products page of the IoT Platform console or by calling the QueryProductList operation. Notice If you specify this parameter, you must also specify the DeviceName parameter.
|
| DeviceName | String | No | camera1 |
The DeviceName of the IP camera. You can view the DeviceName of the IP camera on the Devices page of the IoT Platform console. Notice If you specify this parameter, you must also specify the ProductKey parameter.
|
| IotId | String | No | C47T6xwp6ms4bNlkHRWR**** |
The ID of the IP camera. IoT Platform allocates an ID to each IP camera to uniquely identify the IP camera. You can call the QueryDeviceDetail operation of IoT Platform to query the ID of the IP camera. Notice If you specify this parameter, you do not need to specify the ProductKey or DeviceName parameter. The IotId parameter specifies a GUID of the IP camera, which corresponds to a combination of
the ProductKey and DeviceName parameters. If you specify both the IotId parameter and the combination of the ProductKey and DeviceName parameters, the IotId parameter takes precedence.
|
In addition to the preceding operation-specific request parameters, you must specify common request parameters when you call this operation. For more information, see Common request parameters.
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| Code | String | 200 |
The response code.
|
| Data | Struct |
The query result. |
|
| Progress | Integer | 0 |
The progress of generating the video file. Valid values: 0 to 100. |
| Status | Integer | 0 |
The status of the video file. Valid values:
|
| Url | String | https://link-vision-storage-online.oss-cn-shanghai.aliyuncs.com/transcode%2Fgk-********.mp4?OSSAccessKeyId=LTA*****TTTTTTTT&Expires=16****804&Signature=**** |
The download URL of the video file. This field is valid only when the value of the Status parameter is 0 and the value of the Progress parameter is 100. |
| ErrorMessage | String | XXX is mandatory for this action |
The error message returned if the call failed. |
| RequestId | String | 06DC77A0-4622-42DB-9EE0-25FIOHS82JK1 |
The ID of the request. |
| Success | Boolean | true |
Indicates whether the call was successful.
|
Examples
Sample requests
http(s)://linkvisual.cn-shanghai.aliyuncs.com/?Action=QueryRecordDownloadUrl
&FileName=1623999491_LYPsmZGeEN8GdKzMtYNiBXXXXXXXXX_0/c0064411-2065-400a-a13e-********
&IotId=C47T6xwp6ms4bNlkHRWR****
&IotInstanceId=iot-cn-n6w1y59****
&<Common request parameters>Sample success responses
XML format
<QueryRecordDownloadUrlResponse>
<RequestId>06DC77A0-4622-42DB-9EE0-25FIOHS82JK1</RequestId>
<Data>
<Status>0</Status>
<Progress>0</Progress>
<Url>https://link-vision-storage-online.oss-cn-shanghai.aliyuncs.com/transcode%2Fgk-********.mp4?OSSAccessKeyId=LTA*****TTTTTTTT&Expires=16****804&Signature=****</Url>
</Data>
<Code>200</Code>
<Success>true</Success>
</QueryRecordDownloadUrlResponse>JSON format
{
"RequestId": "06DC77A0-4622-42DB-9EE0-25FIOHS82JK1",
"Data": {
"Status": 0,
"Progress": 0,
"Url": "https://link-vision-storage-online.oss-cn-shanghai.aliyuncs.com/transcode%2Fgk-********.mp4?OSSAccessKeyId=LTA*****TTTTTTTT&Expires=16****804&Signature=****"
},
"Code": "200",
"Success": true
}Error codes
For a list of error codes, visit the API Error Center.