> Documentation index: https://nao-rs.lukaloehr.com/llms.txt, a list of every page in this documentation.

# Power

> REST API: Wake and rest. Generated from the OpenAPI document.

> **Warning:** No motion in this phase
>
> nao-rs doesn't drive the motors yet, and the robot must not move during
> bring-up without a person present. These operations exist and are
> documented for completeness; don't use them on a robot.

## Power state

`GET /v1/power`

The robot's primary state from the latest state.

**Token:** required · **Lease:** not needed

| Status | Meaning | Body |
| --- | --- | --- |
| 200 | Current primary state | [PowerStatus](https://nao-rs.lukaloehr.com/reference/rest-api/schemas.md#powerstatus) |
| 401 | Missing or wrong token | [ErrorBody](https://nao-rs.lukaloehr.com/reference/rest-api/schemas.md#errorbody) |

```bash
curl -H "Authorization: Bearer $TOKEN" http://$ROBOT:7702/v1/power
```

## Wake or rest

`PUT /v1/power`

`wake` makes the robot stiff and ready to move, `rest` unstiff. The death switch overrides stiffness whatever is requested.

**Token:** required · **Lease:** required (`Nao-Lease` header)

**Request body** (`application/json`)

[PowerRequest](https://nao-rs.lukaloehr.com/reference/rest-api/schemas.md#powerrequest)

| Field | Type | Required | Meaning |
| --- | --- | --- | --- |
| `state` | [PowerState](https://nao-rs.lukaloehr.com/reference/rest-api/schemas.md#powerstate) | yes |  |

| Status | Meaning | Body |
| --- | --- | --- |
| 202 | Requested; watch `primary_state` for the result | [PowerRequest](https://nao-rs.lukaloehr.com/reference/rest-api/schemas.md#powerrequest) |
| 409 | Not the active lease | [ErrorBody](https://nao-rs.lukaloehr.com/reference/rest-api/schemas.md#errorbody) |
| 422 | Invalid input | [ErrorBody](https://nao-rs.lukaloehr.com/reference/rest-api/schemas.md#errorbody) |
| 428 | No `Nao-Lease` header | [ErrorBody](https://nao-rs.lukaloehr.com/reference/rest-api/schemas.md#errorbody) |

## Related topics

- [REST API](https://nao-rs.lukaloehr.com/reference/rest-api.md)
- [System](https://nao-rs.lukaloehr.com/reference/rest-api/system.md)
- [Robot](https://nao-rs.lukaloehr.com/reference/rest-api/robot.md)
- [State](https://nao-rs.lukaloehr.com/reference/rest-api/state.md)
- [Events](https://nao-rs.lukaloehr.com/reference/rest-api/events.md)
- [Safety](https://nao-rs.lukaloehr.com/reference/rest-api/safety.md)
- [Control](https://nao-rs.lukaloehr.com/reference/rest-api/control.md)
- [LEDs](https://nao-rs.lukaloehr.com/reference/rest-api/leds.md)
- [Audio](https://nao-rs.lukaloehr.com/reference/rest-api/audio.md)
- [Cameras](https://nao-rs.lukaloehr.com/reference/rest-api/cameras.md)
- [Motion](https://nao-rs.lukaloehr.com/reference/rest-api/motion.md)
- [Schemas](https://nao-rs.lukaloehr.com/reference/rest-api/schemas.md)
- Previous: [Cameras](https://nao-rs.lukaloehr.com/reference/rest-api/cameras.md)
- Next: [Motion](https://nao-rs.lukaloehr.com/reference/rest-api/motion.md)
