Skip to content

getSegments

Get the segments of a device.

Request

The API expects a GET request with no parameters.

Response

Content-Type: application/json

The API responds with a JSON object containing the following fields:

Name Type Description
segments array Array of all the segments in the device

Segment Object

Name Type Description
start int Start LED index of the segment
len int Length of LEDs in the segment
pin array Pin numbers of the segment
rev bool Direction of the segment. (Reversed)
type int LED type of the segment

Example

Example Request

GET /getSegments
Content-Type: Content-Type: application/json

Example Response

{
  "segments": [
    {
      "start": 0,
      "len": 300,
      "pin": [
        0
      ],
      "rev": false,
      "type": 22
    },
    {
      "start": 310,
      "len": 55,
      "pin": [
        11
      ],
      "rev": false,
      "type": 22
    }
  ]
}