setSwitches

This endpoint requires Authentication.

Updates a (Priority) Power Switch.

URL

All fields are optional, but you must specify at least one field.

Request Body

All fields are optional (except ID), but at least one field must be specified. An array of objects can be passed to update multiple (Priority) Power Switches simultaneously.

Name Type Required? Description

ID

String

Yes

ID of the (Priority) Power Switch

name

String

No

Switch Name

priority

Integer

No

Priority Group (0-8).
It only works for Priority Power Switches.

status

Boolean

No

Switch Status (true = Enabled, false = Disabled).

Response Body

All fields are optional, only the updated fields and the ID field are included in the response body.

Name Type Description

ID

String

ID of the (Priority) Power Switch

Name

String

Updated Name.

Priority

Integer

Updated Priority.

Status

Boolean

Updated Status (true = Enabled, false = Disabled).

Example Request

curl -X POST 'http://localhost:8080/setSwitches' \
-H 'Content-Type: application/json' \
-H 'X-FRM-Authorization: <your access token>' \
--data-raw '{ \
  "ID":"Build_PriorityPowerSwitch_C_2147423102", \
  "name": "My Power Switch", \
  "priority": 1, \
  "status": true \
}'

Example Response

[
  {
    "ID": "Build_PriorityPowerSwitch_C_2147423102",
    "Name": "My Power Switch",
    "Status": true,
    "Priority": 1
  }
]