Rooms

Create a Room for a given Location.

post/locations/{locationId}/rooms

Request

Query parameters

allowedstring

If set to true, the response may contain the allowed list property. Note that setting this to true may significantly slow the response time. If you are creating a room for your own account, then you know you will have all these permissions and can avoid the trouble of passing in this parameter.

Request body

namestring required

A name for the room (e.g. Living Room)

Example request

{
  "name": "Living Room",
  "indoorMap": {
    "mapRoomId": "6b3d1909-1e1c-43ec-adc2-5f941de4fbf8",
    "color": "some color code"
  }
}

Response

Created successfully.

allowedstring[]

List of client-facing action identifiers that are currently permitted for the user. If the value of this property is not null, then any action not included in the list value of the property is currently prohibited for the user. If the value of this property is null (or absent), then no permission-related information is being provided.

<ul> <li> d:rooms - the user can delete the room <li> w:rooms - the user can edit the room </ul>
roomIdstring uuid required

The ID of the room.

locationIdstring required

A unique location identifier. This is not guaranteed to be a valid UUID.

namestring required

A name for the room (e.g. Living Room)

backgroundImagestring

Not currently in use.

createdstring date-time

The timestamp of when a room was created in UTC.

lastModifiedstring date-time

The timestamp of when a room was last updated in UTC.

Example response

{
  "roomId": "bdd8a15f-33d4-41fc-b33c-75ce85e99d24",
  "locationId": "6b3d1909-1e1c-43ec-adc2-5f941de4fbf9",
  "name": "Living Room",
  "created": 1547920800,
  "lastModified": 1548007200,
  "indoorMap": {
    "mapRoomId": "6b3d1909-1e1c-43ec-adc2-5f941de4fbf8",
    "color": "some color code"
  }
}

Changes