> ## Documentation Index
> Fetch the complete documentation index at: https://crsdk.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Actions

> Shooting commands, video recording, zoom, and focus control

Shooting, focus, zoom, and movie-record commands. All actions require the camera to be connected and `priority-key` set to `pc-remote`.

See the auto-generated [API reference](/web-api/overview) for full request/response schemas.

## Shutter

`POST /api/cameras/{cameraId}/actions/shutter` — take a single photo, or control continuous shooting with `{"action": "down"}` / `{"action": "up"}`.

<CodeGroup>
  ```bash curl (Single Shot) theme={null}
  curl -X POST http://localhost:8080/api/cameras/D10F60149B0C/actions/shutter
  ```

  ```bash curl (Continuous Start) theme={null}
  curl -X POST http://localhost:8080/api/cameras/D10F60149B0C/actions/shutter \
    -H "Content-Type: application/json" \
    -d '{"action": "down"}'
  ```

  ```bash curl (Continuous Stop) theme={null}
  curl -X POST http://localhost:8080/api/cameras/D10F60149B0C/actions/shutter \
    -H "Content-Type: application/json" \
    -d '{"action": "up"}'
  ```
</CodeGroup>

<Note>For continuous shooting, set drive mode to a continuous mode first (e.g. `Continuous Hi`).</Note>

***

## Half-Press (Focus Lock)

`POST /api/cameras/{cameraId}/actions/half-press` — half-press the shutter button to lock autofocus (S1 press). No body required.

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST http://localhost:8080/api/cameras/D10F60149B0C/actions/half-press
  ```
</CodeGroup>

***

## AF + Shutter

`POST /api/cameras/{cameraId}/actions/af-shutter` — autofocus then immediately capture in one operation. No body required.

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST http://localhost:8080/api/cameras/D10F60149B0C/actions/af-shutter
  ```
</CodeGroup>

***

## Zoom

`POST /api/cameras/{cameraId}/actions/zoom` — control power zoom lenses. Requires a power zoom lens to be attached.

Body: `direction` (`in` or `out`), `speed` (`normal` or `fast`).

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST http://localhost:8080/api/cameras/D10F60149B0C/actions/zoom \
    -H "Content-Type: application/json" \
    -d '{"direction": "in", "speed": "normal"}'
  ```
</CodeGroup>

***

## Focus Near/Far

`POST /api/cameras/{cameraId}/actions/focus-near-far` — move focus in discrete steps. Range: `-7` (near, max speed) to `+7` (far, max speed). Magnitude controls speed. `0` is not valid.

<CodeGroup>
  ```bash curl (Focus Near) theme={null}
  curl -X POST http://localhost:8080/api/cameras/D10F60149B0C/actions/focus-near-far \
    -H "Content-Type: application/json" \
    -d '{"step": -1}'
  ```

  ```bash curl (Focus Far) theme={null}
  curl -X POST http://localhost:8080/api/cameras/D10F60149B0C/actions/focus-near-far \
    -H "Content-Type: application/json" \
    -d '{"step": 7}'
  ```
</CodeGroup>

<Tip>
  For absolute focus positioning, use `PUT /api/cameras/{id}/properties/focus-position` with a value from 0 (infinity) to 65535 (closest).
</Tip>

***

## Movie Recording

`POST /api/cameras/{cameraId}/actions/movie-rec` — start or stop video recording. This is a toggle action — call once to start recording, call again to stop. Uses the SDK's hold-style command (Down to start, Up to stop).

Monitor recording state via the [`recording-state`](/web-api/properties#recording-state) property or [`propertyChanged`](/web-api/events#propertychanged) SSE events.

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST http://localhost:8080/api/cameras/D10F60149B0C/actions/movie-rec
  ```
</CodeGroup>

<Note>
  Ensure the camera is in a video-capable exposure mode (e.g. Movie mode `0x8050`–`0x8055`) before triggering. Check `recording-state` to confirm the current state.
</Note>

<Note>
  For typed action helpers, use the SDK pages: [TypeScript](/sdk/typescript), [Python](/sdk/python), or [Swift](/sdk/swift).
</Note>
