Queries the intelligent alert event-triggered recording plan with which an IP camera is associated based on the ID of the IP camera.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | QueryEventRecordPlanDeviceByDevice |
The operation that you want to perform. Set the value to QueryEventRecordPlanDeviceByDevice. |
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 | 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.
|
StreamType | Integer | No | 0 |
The type of the stream. Valid values:
|
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. |
|
Name | String | planAA |
The name of the intelligent alert event-triggered recording plan. |
PlanId | String | 5b60bf0dd55944c19d7817442bc9**** |
The ID of the intelligent alert event-triggered recording plan. |
PreRecordDuration | Integer | 5 |
The prerecording duration. Unit: seconds. |
RecordDuration | Integer | 120 |
The recording duration, including the prerecording duration. Unit: seconds. |
TemplateId | String | 36f06322442e4e3f85a5ae8862c9**** |
The ID of the time template. |
TemplateInfo | Struct |
The details of the time template. |
|
AllDay | Integer | 0 |
Indicates whether videos are continuously recorded 24/7.
|
Default | Integer | 0 |
The type of the time template. Valid values:
|
Name | String | testtime1 |
The name of the time template. |
TemplateId | String | 36f06322442e4e3f85a5ae8862c9**** |
The ID of the time template. |
TimeSectionList | Array of TimeSectionList |
The details of the time template if the value of the AllDay parameter is 0. |
|
Begin | Integer | 0 |
The time when video recording starts every day. Valid values: 0 to 86399. Unit: seconds. |
DayOfWeek | Integer | 0 |
The day of each week for video recording. Valid values: 0 to 6, indicating Sunday to Saturday. |
End | Integer | 86399 |
The time when video recording ends every day. Valid values: 1 to 86399. Unit: seconds. |
ErrorMessage | String | tenant auth error |
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=QueryEventRecordPlanDeviceByDevice
&IotId=zLZyi6aOLyOSHa9hsPyD00****
&IotInstanceId=iot-cn-n6w1y59****
&<Common request parameters>
Sample success responses
XML
format
<QueryEventRecordPlanByDeviceResponse>
<RequestId>06DC77A0-4622-42DB-9EE0-25FIOHS82JK1</RequestId>
<Data>
<PlanId>5b60bf0dd55944c19d7817442bc9****</PlanId>
<Name>planAA</Name>
<PreRecordDuration>5</PreRecordDuration>
<RecordDuration>120</RecordDuration>
<TemplateId>36f06322442e4e3f85a5ae8862c9****</TemplateId>
<TemplateInfo>
<TemplateId>36f06322442e4e3f85a5ae8862c9****</TemplateId>
<Name>testtime1</Name>
<AllDay>0</AllDay>
<Default>0</Default>
<TimeSectionList>
<DayOfWeek>1</DayOfWeek>
<Begin>0</Begin>
<End>86399</End>
</TimeSectionList>
<TimeSectionList>
<DayOfWeek>5</DayOfWeek>
<Begin>0</Begin>
<End>40000</End>
</TimeSectionList>
</TemplateInfo>
</Data>
<Code>200</Code>
<Success>true</Success>
</QueryEventRecordPlanByDeviceResponse>
JSON
format
{
"RequestId": "06DC77A0-4622-42DB-9EE0-25FIOHS82JK1",
"Data": {
"PlanId": "5b60bf0dd55944c19d7817442bc9****",
"Name": "planAA",
"PreRecordDuration": 5,
"RecordDuration": 120,
"TemplateId": "36f06322442e4e3f85a5ae8862c9****",
"TemplateInfo": {
"TemplateId": "36f06322442e4e3f85a5ae8862c9****",
"Name": "testtime1",
"AllDay": 0,
"Default": 0,
"TimeSectionList": [
{
"DayOfWeek": 1,
"Begin": 0,
"End": 86399
},
{
"DayOfWeek": 5,
"Begin": 0,
"End": 40000
}
]
}
},
"Code": "200",
"Success": true
}
Error codes
For a list of error codes, visit the API Error Center.