Preferences

Update Preference by ID

Changed on

Update a preference by preference ID.

put/devicepreferences/{preferenceId}

Request

Headers

X-ST-Organizationstring ^(?:([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}))$

Organization id. If not provided, default user organization will be used.

Request body

preferenceIdstring

The ID of the preference. When explicit flag is true this field is required.

namestring required

An alphanumeric English language name for this preference. Will be appended to a namespace to generate the full preference id.

titlestring required

A short description for this preference.

descriptionstring

A long description for this preference.

explicitboolean

A flag describing whether this preference is explicit, or inline. When set to true a preferenceId is required.

requiredboolean

A flag describing whether this property is required or not.

preferenceType'integer' | 'number' | 'boolean' | 'string' | 'enumeration' required

The type of preference this is.

Example request

{
  "title": "Temperature Offset",
  "description": "The offset for a particular temperature setting",
  "required": false,
  "preferenceType": "number",
  "definition": {
    "minimum": -10,
    "maximum": 10,
    "default": 0
  }
}

Response

successful return of preference

preferenceIdstring

The ID of the preference

namestring

An alphanumeric English language name for this preference.

titlestring required

A short description for this preference.

descriptionstring

A long description for this preference.

requiredboolean

A flag describing whether this property is required or not.

explicitboolean

A flag describing whether this preference is explicit, or inline.

preferenceType'integer' | 'number' | 'boolean' | 'string' | 'enumeration' required

The type of preference this is.

Example response

{
  "title": "Temperature Offset",
  "description": "The offset for a particular temperature setting"
}

Changes