查看观察任务。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeWatchTasks |
系统规定参数。取值:DescribeWatchTasks。 |
PageNumber | Long | 是 | 1 |
获取第几个分页。 |
PageSize | Long | 是 | 10 |
获取的分页大小。最大100 |
WatchTaskIds | String | 否 | ["C1DAXXXX", "C5D0XXXX"] |
观察任务ID列表,JSON数组格式,一次最多输入100个ID。不指定时,返回本账号下的全部任务。 |
返回数据
示例
请求示例
http(s)://[Endpoint]/?Action=DescribeWatchTasks
&PageNumber=1
&PageSize=10
&WatchTaskIds=["C1DAXXXX", "C5D0XXXX"]
&公共请求参数
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeWatchTasksResponse>
<RequestId>46329898-489C-4E63-9BA1-C1DA5C5D0986</RequestId>
<Success>true</Success>
<Code>200</Code>
<Message>OK</Message>
<Data>
<TotalCount>10</TotalCount>
<PageSize>10</PageSize>
<PageNumber>1</PageNumber>
<Records>
<WatchTaskId>304E63XXXX</WatchTaskId>
<TaskName>example</TaskName>
<CorpId>44B0E0XXXX</CorpId>
<DeviceList>["1C44674CC97AXXXX", "915E4ACA5866XXXX"]</DeviceList>
<ScheduleType>EVERYDAY</ScheduleType>
<ScheduleCycleDates>[1, 4, 6]</ScheduleCycleDates>
<ScheduleTimes>[{"StartTime":"10:00:00","EndTime":"11:00:00"}]</ScheduleTimes>
<WatchPolicyIds>["30fXXXX","7c8XXXX","b48XXXX"]</WatchPolicyIds>
<MessageReceiver>{ "MessageQueue": "Kafka", "Config": { "BootstrapServers": "127.0.0.1:9092,127.0.0.2:9092", "Topic": "topic_for_put_message", "Authorization": "SASL", "SASL": { "Type": "PLAIN", "Username": "username_for_put_message" } } }</MessageReceiver>
<Description>闯入敏感区域</Description>
</Records>
</Data>
</DescribeWatchTasksResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "46329898-489C-4E63-9BA1-C1DA5C5D0986",
"Success" : true,
"Code" : "200",
"Message" : "OK",
"Data" : {
"TotalCount" : 10,
"PageSize" : 10,
"PageNumber" : 1,
"Records" : [ {
"WatchTaskId" : "304E63XXXX",
"TaskName" : "example",
"CorpId" : "44B0E0XXXX",
"DeviceList" : "[\"1C44674CC97AXXXX\", \"915E4ACA5866XXXX\"]",
"ScheduleType" : "EVERYDAY",
"ScheduleCycleDates" : "[1, 4, 6]",
"ScheduleTimes" : "[{\"StartTime\":\"10:00:00\",\"EndTime\":\"11:00:00\"}]",
"WatchPolicyIds" : "[\"30fXXXX\",\"7c8XXXX\",\"b48XXXX\"]",
"MessageReceiver" : "{ \"MessageQueue\": \"Kafka\", \"Config\": { \"BootstrapServers\": \"127.0.0.1:9092,127.0.0.2:9092\", \"Topic\": \"topic_for_put_message\", \"Authorization\": \"SASL\", \"SASL\": { \"Type\": \"PLAIN\", \"Username\": \"username_for_put_message\" } } }",
"Description" : "闯入敏感区域"
} ]
}
}
错误码
访问错误中心查看更多错误码。