REST API: LED groups, single LEDs, presets. Generated from the OpenAPI document.
All LED overrides
GET /v1/leds
Groups that are null show the robot's own status. The groups and their LEDs are on LEDs.
Token: required · Lease: not needed
Replace all LED overrides
PUT /v1/leds
Groups left out or null go back to the robot.
Token: required · Lease: required (Nao-Lease header)
Request body (application/json)
LedOverrides. Every LED group's override. null (or absent) hands the group back to the robot.
| Field | Type | Required | Meaning |
|---|---|---|---|
chest | Color or null | no | |
left_ear | array of 10 × number or null | no | 10 brightness levels 0..1 (the ears are blue only). |
left_eye | array of 8 × Color or null | no | 8 colors, index 0 at the top, clockwise as seen from the front. |
left_foot | Color or null | no | |
right_ear | array of 10 × number or null | no | |
right_eye | array of 8 × Color or null | no | |
right_foot | Color or null | no |
| Status | Meaning | Body |
|---|---|---|
| 200 | All overrides replaced | LedStatus |
| 409 | Not the active lease | ErrorBody |
| 422 | Invalid input | ErrorBody |
| 428 | No Nao-Lease header | ErrorBody |
Hand all LEDs back
DELETE /v1/leds
The robot's own status LEDs return.
Token: required · Lease: required (Nao-Lease header)
| Status | Meaning | Body |
|---|---|---|
| 204 | Every group handed back to the robot | |
| 409 | Not the active lease | ErrorBody |
| 428 | No Nao-Lease header | ErrorBody |
Running LED animations
GET /v1/leds/animations
Token: required · Lease: not needed
| Status | Meaning | Body |
|---|---|---|
| 200 | Animations the ticker is running | array of ActiveAnimation |
| 401 | Missing or wrong token | ErrorBody |
List LED presets
GET /v1/leds/presets
Token: required · Lease: not needed
Apply an LED preset
PUT /v1/leds/presets/{name}
Sets every group at once.
Token: required · Lease: required (Nao-Lease header)
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
name | path | string | yes | Preset name from GET /v1/leds/presets |
| Status | Meaning | Body |
|---|---|---|
| 200 | Preset applied to every group | LedStatus |
| 404 | Unknown preset | ErrorBody |
| 409 | Not the active lease | ErrorBody |
| 428 | No Nao-Lease header | ErrorBody |
Set one LED group
PUT /v1/leds/{group}
Eyes take color or colors (8), ears brightness or levels (10), chest and feet color. eyes, ears and feet set both sides.
Token: required · Lease: required (Nao-Lease header)
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
group | path | Group | yes | LED group |
Request body (application/json)
LedSetting. What to show on a group or a single LED. Exactly one field:
eyes take color or colors (8), ears take brightness or levels (10), chest and feet take
color; a single LED takes color (eye) or brightness (ear).
| Field | Type | Required | Meaning |
|---|---|---|---|
brightness | number or null | no | One brightness 0..1 for every ear segment. |
color | Color or null | no | One color for every LED of the group. |
colors | array of 8 × Color or null | no | One color per eye segment (8). |
levels | array of 10 × number or null | no | One brightness 0..1 per ear segment (10). |
| Status | Meaning | Body |
|---|---|---|
| 200 | Group set | LedStatus |
| 404 | Unknown group | ErrorBody |
| 409 | Not the active lease | ErrorBody |
| 422 | Invalid input (e.g. a color for an ear) | ErrorBody |
| 428 | No Nao-Lease header | ErrorBody |
Hand one LED group back
DELETE /v1/leds/{group}
Token: required · Lease: required (Nao-Lease header)
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
group | path | Group | yes | LED group |
| Status | Meaning | Body |
|---|---|---|
| 200 | Group handed back to the robot | LedStatus |
| 404 | Unknown group | ErrorBody |
| 409 | Not the active lease | ErrorBody |
| 428 | No Nao-Lease header | ErrorBody |
Animate an LED group
PUT /v1/leds/{group}/animation
Breathe, blink, rainbow (not ears) or progress, computed on the robot at 20 Hz. Replaces an animation on an overlapping group. Any LED write to the group cancels it, and it ends with the lease. Animation frames are no heartbeat: keep sending heartbeats.
Token: required · Lease: required (Nao-Lease header)
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
group | path | Group | yes | LED group |
Request body (application/json)
LedAnimation. An animation for one group.
| Field | Type | Required | Meaning |
|---|---|---|---|
brightness | number or null | no | Ears: peak brightness 0..1 (default 1). Not for the color groups. |
color | Color or null | no | Eyes, chest and feet (default white). Not for ears, which are blue only. |
kind | AnimationKind | yes | |
period_ms | integer or null | no | One cycle, 100 to 60000 ms (default: breathe 3000, blink 1000, rainbow 4000). (100 to 60000) |
value | number or null | no | Progress only (required there): 0..1. |
| Status | Meaning | Body |
|---|---|---|
| 200 | Animation running | array of ActiveAnimation |
| 404 | Unknown group | ErrorBody |
| 409 | Not the active lease | ErrorBody |
| 422 | Invalid input (e.g. a rainbow on the ears) | ErrorBody |
| 428 | No Nao-Lease header | ErrorBody |
Stop an LED animation
DELETE /v1/leds/{group}/animation
The group keeps its last frame; DELETE /v1/leds/{group} hands it back to the robot.
Token: required · Lease: required (Nao-Lease header)
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
group | path | Group | yes | LED group |
| Status | Meaning | Body |
|---|---|---|
| 200 | Animations still running | array of ActiveAnimation |
| 404 | Unknown group | ErrorBody |
| 409 | Not the active lease | ErrorBody |
| 428 | No Nao-Lease header | ErrorBody |
Set a single LED
PUT /v1/leds/{group}/{index}
One eye segment (color, index 0 to 7 from the top, clockwise as seen from the front) or one ear segment (brightness, index 0 to 9). The index order is on LEDs.
Token: required · Lease: required (Nao-Lease header)
| Parameter | In | Type | Required | Meaning |
|---|---|---|---|---|
group | path | Group | yes | left_eye, right_eye, left_ear or right_ear |
index | path | integer | yes | Segment: eyes 0..7 from the top clockwise, ears 0..9 |
Request body (application/json)
LedSetting. What to show on a group or a single LED. Exactly one field:
eyes take color or colors (8), ears take brightness or levels (10), chest and feet take
color; a single LED takes color (eye) or brightness (ear).
| Field | Type | Required | Meaning |
|---|---|---|---|
brightness | number or null | no | One brightness 0..1 for every ear segment. |
color | Color or null | no | One color for every LED of the group. |
colors | array of 8 × Color or null | no | One color per eye segment (8). |
levels | array of 10 × number or null | no | One brightness 0..1 per ear segment (10). |
| Status | Meaning | Body |
|---|---|---|
| 200 | Segment set | LedStatus |
| 404 | Unknown group | ErrorBody |
| 409 | Not the active lease | ErrorBody |
| 422 | Invalid input (index out of range, wrong kind of value) | ErrorBody |
| 428 | No Nao-Lease header | ErrorBody |