Queries the URL of a video file based on the ID of the video file.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | QueryRecordByRecordId |
The operation that you want to perform. Set the value to QueryRecordByRecordId. |
RecordId | String | Yes | 2c5bf5b6a8704bd3a6a1517fd125**** |
The ID of the video file. You can call the QueryRecord operation to query the ID of the video file. |
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 | zLZyi6aOLyOSHa9hsPyD00**** |
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.
|
IotInstanceId | String | No | iot-060a01**** |
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. |
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 | Array of Data |
The returned message. |
|
BeginTime | String | 2020-10-12 14:07:20 |
The time when the video recording started. |
EndTime | String | 2020-10-12 14:07:31 |
The time when the video recording ended. |
FileName | String | test |
The name of the video file. |
VodUrl | String | https://iotx-vision-vod-vpc-hz-pre.aliyun-inc.com/vod/device/localrecord/flv/play/1****668.flv?token=e9****a9e14482c56be52&session=470e****3d015 |
The URL of the video file. |
ErrorMessage | String | RecordId is mandatory for this action. |
The error message returned if the call failed. |
RequestId | String | F46E12A5-633D-4761-80F2-285752A052D5 |
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=QueryRecordByRecordId
&IotId=zLZyi6aOLyOSHa9hsPyD00****
&RecordId=2c5bf5b6a8704bd3a6a1517fd125****
&IotInstanceId=iot-060a01****
&<Common request parameters>
Sample success responses
XML
format
<QueryRecordByRecordIdResponse>
<RequestId>F46E12A5-633D-4761-80F2-285752A052D5</RequestId>
<Data>
<EndTime>2020-10-12 14:07:31</EndTime>
<FileName>test</FileName>
<BeginTime>2020-10-12 14:07:20</BeginTime>
<VodUrl>https://iotx-vision-vod-vpc-hz-pre.aliyun-inc.com/vod/device/localrecord/flv/play/1****668.flv?token=e9****a9e14482c56be52&session=470e****3d015</VodUrl>
</Data>
<Code>200</Code>
<Success>true</Success>
</QueryRecordByRecordIdResponse>
JSON
format
{
"RequestId": "F46E12A5-633D-4761-80F2-285752A052D5",
"Data": [
{
"EndTime": "2020-10-12 14:07:31",
"FileName": "test",
"BeginTime": "2020-10-12 14:07:20",
"VodUrl": "https://iotx-vision-vod-vpc-hz-pre.aliyun-inc.com/vod/device/localrecord/flv/play/1****668.flv?token=e9****a9e14482c56be52&session=470e****3d015"
}
],
"Code": "200",
"Success": true
}
Error codes
For a list of error codes, visit the API Error Center.