Schedules

Schedules allow you to schedule an API call for a given point in time in the future. You can schedule any Hue bridge API call.

List all schedules

All you receive from this command is the schedule id and it’s name.

GET /api/username/schedules

Response

{
  "1": {
    "name": "Frukost on f 423043           "
  },
  "2": {
    "name": "Frukost on 607775             "
  }
}

Create a new scheduled operation

POST /api/username/schedules

Parameters

name (optional)
a name to give to your schedule. Does not need to be unique. Must be between 1 and 32 characters. If not specified it defaults to “schedule”.
description (optional)
a description to give your schedule. Must be between 1 and 64 characters.
time
a time, specified in UTC, formatted as YYYY-MM-DDTHH:MM:SS, when the scheduled operation should be performed. Once performed, the scheduled operation is removed from the Hue. Values earlier than the current time will result in an error.
command
a command object, describing the request to be performed when the scheduled operation is invoked. You can invoke pretty much any URL with any method, as long as all parameters have been defined.
action
a bridge API resource to which the operation should be invoked on.
method
the HTTP method the operation should be invoked with.
body
body that the operation should be sent with, {} if it should be empty.

Input

{
  "name": "Good night",
  "description": "I should really go to bed by now.",
  "command": {
    "address": "/api/24e04807fe143caeb52b4ccb305635f8/groups/0/action",
    "method": "PUT",
    "body": {
      "on": false
    }
  },
  "time": "2013-03-02T00:00:00"
}

Response

The id given is the id number for the newly created schedule.

[
  {
    "success": {
      "id": "1"
    }
  }
]

Show schedule information

GET /api/username/schedules/number

Parameters

number
group number you wish to retrieve information from.

Response

{
  "name": "Good night",
  "description": "I should really go to bed by now.",
  "command": {
    "address": "/api/burgestrand/groups/0/action",
    "body": {
      "on": false
    },
    "method": "PUT"
  },
  "time": "2013-03-02T00:00:00"
}

Update an existing scheduled operation

PUT /api/username/schedules/number

Parameters

See the parameters for “Create a new scheduled operation”.

Input

{
  "name": "Hey"
}

Response

[
  {
    "success": {
      "/schedules/1/name": "Hey"
    }
  }
]

Delete a previously scheduled operation

DELETE /api/username/schedules/number

Parameters

number
group number you wish to delete.

Response

[
  {
    "success": "/schedules/6 deleted"
  }
]