Modes

Get a specific Mode from a Location, including the Mode's client-facing permissions (if any), id, label, and name.

get/locations/{locationId}/modes/{modeId}

Request

Headers

Accept-Languagestring

Language header representing the client's preferred language. The format of the Accept-Language header follows what is defined in RFC 7231, section 5.3.5

Response

The Mode

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> w:modes - the user can edit the Mode <li> d:modes - the user can delete the Mode </ul>
idstring ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$ required

Globally unique id for the Mode.

labelstring required

A user-readable label used to identify the mode in the app. If the user has not set a label and the name of the mode is one of "Home", "Away", or "Night", then the returned label will be translated from the name based on the Accept-Language header. If the user has not set a label and the name of the mode is anything else, then the label will be the same as the name. Unique per Location.

namestring ^[a-zA-Z0-9.-_]+$ required

An internal name for the Mode. Unique per Location.

Example response

{
  "id": "9206ea57-2e2e-414c-a792-9087117ca3d8",
  "label": "Vacation",
  "name": "Home"
}

Changes