Queries time templates.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | QueryTimeTemplate |
The operation that you want to perform. Set the value to QueryTimeTemplate. |
PageSize | Integer | No | 10 |
The number of entries to return on each page. Valid values: 1 to 50. Default value: 10. |
CurrentPage | Integer | No | 1 |
The number of the page to return. Pages start from page 1. |
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 error code returned if the call failed. For more information, see Error codes. |
Data | Struct |
The data returned if the call was successful. |
|
List | Array of List |
The list of returned templates. |
|
AllDay | Integer | 1 |
Indicates whether videos are continuously recorded 24/7.
|
Default | Integer | 1 |
The type of the time template. Valid values:
|
Name | String | exampleName |
The name of the time template. |
TemplateId | String | adxxx |
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 | 20000 |
The time when video recording starts every day. Unit: seconds. |
DayOfWeek | Integer | 0 |
The day of each week for video recording. Valid values: 0 to 6, indicating Sunday to Saturday. |
End | Integer | 60000 |
The time when video recording ends every day. Unit: seconds. |
Page | Integer | 1 |
The page number of the returned page. |
PageCount | Integer | 1 |
The total number of pages returned. |
PageSize | Integer | 10 |
The number of entries returned per page. |
Total | Integer | 1 |
The total number of entries returned. |
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=QueryTimeTemplate
&CurrentPage=1
&PageSize=10
&<Common request parameters>
Sample success responses
XML
format
<QueryTimeTemplateResponse>
<RequestId>06DC77A0-4622-42DB-9EE0-25FIOHS82JK1</RequestId>
<Data>
<Total>2</Total>
<PageCount>1</PageCount>
<Page>1</Page>
<PageSize>10</PageSize>
<List>
<TemplateId>joijoz***</TemplateId>
<Name>testtime1</Name>
<AllDay>0</AllDay>
<Default>0</Default>
<TimeSectionList>
<DayOfWeek>0</DayOfWeek>
<Begin>20000</Begin>
<End>60000</End>
</TimeSectionList>
<TimeSectionList>
<DayOfWeek>1</DayOfWeek>
<Begin>20000</Begin>
<End>60000</End>
</TimeSectionList>
</List>
<List>
<TemplateId>joijoz***</TemplateId>
<Name>testtime2</Name>
<AllDay>0</AllDay>
<Default>0</Default>
<TimeSectionList>
<DayOfWeek>1</DayOfWeek>
<Begin>20000</Begin>
<End>60000</End>
</TimeSectionList>
<TimeSectionList>
<DayOfWeek>2</DayOfWeek>
<Begin>20000</Begin>
<End>60000</End>
</TimeSectionList>
</List>
</Data>
</QueryTimeTemplateResponse>
JSON
format
{
"RequestId":"06DC77A0-4622-42DB-9EE0-25FIOHS82JK1",
"Data": {
"Total": 2,
"PageCount": 1,
"Page": 1,
"PageSize":10,
"List": [{
"TemplateId": "joijoz***",
"Name": "testtime1",
"AllDay": 0,
"Default": 0,
"TimeSectionList": [{
"DayOfWeek": 0,
"Begin": 20000,
"End": 60000
},
{
"DayOfWeek": 1,
"Begin": 20000,
"End": 60000
}
]
},
{
"TemplateId": "joijoz***",
"Name": "testtime2",
"AllDay": 0,
"Default": 0,
"TimeSectionList": [{
"DayOfWeek": 1,
"Begin": 20000,
"End": 60000
},
{
"DayOfWeek": 2,
"Begin": 20000,
"End": 60000
}
]
}
]
}
}
Error codes
For a list of error codes, visit the API Error Center.