Update Timer Task Group Information

Last Updated on : 2023-12-07 03:33:48download

Update the information about a specified timer task group under a device.

API address

PUT: /v1.0/devices/{devId}/timers/groups/{groupId}

Request parameter

Parameter nameTypeINRequiredDescription
devIdStringuritrueThe device ID.
groupIdStringuritrueThe ID of a specified timer task group.

Description of body

Parameter nameTypeINRequiredDescription
loopsStringbodytrueThe running time of a timer task. A seven-digit number consisting of 0 and 1. 0 means disabled and 1 means enabled.
categoryStringbodytrueThe category of a specified timer task.
time_zoneStringbodytrueThe time zone.
timezone_idStringbodytrueThe ID of the time zone.
instructobjectbodytrueThe specific time and device instructions of the timer task. Support setting multiple timer tasks that run simultaneously.
alias_nameStringbodytrueThe alias.

Return parameter

Parameter nameTypeDescription
resultBooleanIndicates whether the operation is successful. Valid values:
  • true: The operation succeeded.
  • false: The operation failed.
successBooleanIndicates whether the API is called successfully. Valid values:
  • true: The API call succeeded.
  • false: The API call failed.
tLongThe timestamp.
tidStringThe link ID.

Request example

PUT: /v1.0/devices/vdevo15445800464****/timers/groups/000***2ftg
{
  "alias_name": "",
  "category": "timer",
  "timezone_id": "Europe/Vienna",
  "instruct": [
    {
      "functions": [
        {
          "code": "switch",
          "value": false
        }
      ],
      "date": "",
      "time": "4:0"
    }
  ],
  "loops": "1111111"
}

Return example

{
    "tid": "f6444ebb7ddb11eea7ba0a96cea2****",
    "result": true,
    "t": 1699409417912,
    "success": true
}

Error code

For more information, see error code.