Last Updated on : 2023-07-25 06:00:32download
Modify a scheduled task of the specified device.
PUT: /v2.0/cloud/timer/device/{device_id}
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
device_id | String | path | true | The device ID. |
Description of body
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
timer_id | String | body | true | The ID of the specified scheduled task. |
alias_name | String | body | true | The alias of the specified scheduled task. |
time | String | body | true | The time when the specified scheduled task is run. |
timezone_id | String | body | true | The ID of the specified time zone. Example: Asia/Shanghai. |
date | String | body | false | The date when the specified scheduled task is run. |
loops | String | body | false | If a request failed, the return value is a seven-digit number consisting of 0 and 1 . 0 indicates that the scheduled task is disabled, and 1 indicates that the scheduled task is enabled. For example, 0000001 means that the scheduled task is disabled on Sunday, Monday, Tuesday, Wednesday, Thursday, and Friday, and enabled on Saturday. |
functions | List | body | true | The command to be executed at the specified time. |
category | String | body | false | The timer category. |
Description of functions
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
code | String | body | true | The code of the specified command to be executed. |
value | object | body | true | The value of the specified command to be executed. |
Parameter name | Type | Description |
---|---|---|
result | Boolean | The returned result. |
PUT: /v2.0/cloud/timer/device/6ccb7dc348****
{
"timer_id": "1****",
"alias_name": "Scheduled Task Test 3",
"time": "14:52",
"timezone_id": "Asia/shanghai",
"date": "20230330",
"functions": [
{
"code": "switch_1",
"value": true
}
]
}
{
"tid": "a4934650d1e811ed9850525400d83734",
"t": 1680503264570,
"success": false
}
For more information, see error code.
For more information, see Limits on API Request Frequency.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback