Skip to content

Actions

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 for full request/response schemas.

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

Terminal window
curl -X POST http://localhost:8080/api/cameras/D10F60149B0C/actions/shutter

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

Terminal window
curl -X POST http://localhost:8080/api/cameras/D10F60149B0C/actions/half-press

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

Terminal window
curl -X POST http://localhost:8080/api/cameras/D10F60149B0C/actions/af-shutter

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).

Terminal window
curl -X POST http://localhost:8080/api/cameras/D10F60149B0C/actions/zoom \
-H "Content-Type: application/json" \
-d '{"direction": "in", "speed": "normal"}'

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.

Terminal window
curl -X POST http://localhost:8080/api/cameras/D10F60149B0C/actions/focus-near-far \
-H "Content-Type: application/json" \
-d '{"step": -1}'

GET /api/cameras/{cameraId}/af-area-position — read the camera’s current autofocus frame(s), for drawing a focus box over live view.

Each frame reports its centre three ways: normalized (0–1, use this for overlays at any render size), position (the coordinate space PUT accepts, so a read feeds straight back), and raw (the camera’s own numerator/denominator pair). size.normalized_width / normalized_height give the box dimensions as a fraction of the frame. Drive box colour from statefocused, not-focused, moving, selection, and others.

Terminal window
curl http://localhost:8080/api/cameras/D10F60149B0C/af-area-position

PUT /api/cameras/{cameraId}/af-area-position — move the centre of the autofocus frame.

Field Default Description
x Frame centre X, 0639
y Frame centre Y, 0479
normalized { "x": 0–1, "y": 0–1 } as fractions of the live view — wins if both forms are sent

Send normalized when translating a tap or click on a live view; it saves converting into the SDK’s coordinate space.

Terminal window
curl -X PUT http://localhost:8080/api/cameras/D10F60149B0C/af-area-position \
-H "Content-Type: application/json" \
-d '{"x": 320, "y": 240}'

Measured on an ILCE-7M4 in Tracking Expand Flexible Spot — every corner was requested, and every one was pulled inward. Treat these numbers as illustrative, not a contract: a different body, aspect ratio, or AF area will inset differently.

Requested Landed
0, 0 65, 61
639, 0 574, 61
639, 479 574, 418
0, 479 65, 418
320, 240 320, 240

That is a usable area of x 65574, y 61418 — the middle 80% × 74% of the coordinate space. A write is also ignored outright when the focus area has no movable box.


Tap a point in the live-view frame to seed the camera’s own subject tracking, then read the tracked box back.

Method Path Description
POST /api/cameras/{id}/actions/touch Tap a point — seeds subject tracking
GET /api/cameras/{id}/tracking-frame The box the camera is tracking a subject in
POST /api/cameras/{id}/actions/touch-cancel Release a tracked subject

These are not interchangeable.

PUT /af-area-position drags the focus box and leaves it there. The frame stays where you put it until you move it again.

POST /actions/touch seeds the camera’s subject tracking. The camera locks onto whatever is at that point and follows it on its own as it moves — you cannot reproduce that by rewriting positions from a client, because the tracking runs on the camera. A touch also works in focus areas that have no movable box, such as Wide or face priority, where there is nothing for PUT /af-area-position to move.

Both endpoints return the same frame shape, so a single overlay renderer draws either.

POST /api/cameras/{cameraId}/actions/touch — tap a point, as if someone touched the camera’s own screen there. Same body shape as Move the AF Frame: x / y, or normalized.

Terminal window
curl -X POST http://localhost:8080/api/cameras/D10F60149B0C/actions/touch \
-H "Content-Type: application/json" \
-d '{"normalized": {"x": 0.5, "y": 0.5}}'

Set it on the body under MENU > Setup > Touch Operation > Touch Panel Settings > Shooting Screen. Both rows below were measured on an ILCE-7M4.

Touch Func. in Shooting What a touch does tracking-frame
Touch Focus (ILCE-7M4 default) Moves the AF frame, like PUT /af-area-position Stays empty
Touch Tracking Starts subject tracking at that point Reports the box

Touches also land close to where they are asked for, but not exactly — the camera snaps to the nearest feature it can hold. Measured on an ILCE-7M4, 320,240 landed at 320,239 and 200,300 at 209,297, while points near the edges pulled further in: 0,479 landed at 35,445.

A 400 means the camera reports remote touch as unavailable right now. On the ILCE-7SM3 and ILCE-7C it is movie-mode only; other bodies gate it on focus mode or on live view running.

GET /api/cameras/{cameraId}/tracking-frame — read the box the camera is tracking a subject in. Poll it to follow a moving subject; the camera updates the frame on its own once tracking has been seeded.

type is target-af for the subject being tracked, or non-target-af for a candidate the camera is showing but not acting on.

Terminal window
curl http://localhost:8080/api/cameras/D10F60149B0C/tracking-frame

Two ways to get a frame here, both measured on an ILCE-7M4:

  • A touch, with the body’s Touch Func. in Shooting set to Touch Tracking. Tracking then holds on its own with no button held.
  • The camera tracking for its own reasons — a tracking focus area with AF engaged. Holding af-on in Tracking: Expand Flexible Spot reports a target-af frame that disappears on release.

With the ILCE-7M4 default of Touch Focus, a touch moves the AF frame instead and nothing appears here — read AF Frame Position in that case.

POST /api/cameras/{cameraId}/actions/touch-cancel — release the subject a touch locked onto. No body required.

Terminal window
curl -X POST http://localhost:8080/api/cameras/D10F60149B0C/actions/touch-cancel

POST /api/cameras/{cameraId}/actions/button — press a physical button on the camera body, as if someone pressed it by hand.

Combined with live view and the OSD overlay, this is enough to drive the camera’s own menu system remotely and read the result back off the screen — reaching settings that have no property of their own.

Field Default Description
button Required. Which button to press
action press press for a full down-then-up, or down / up to hold and release

Buttons cover the D-pad and multi-selector, enter, menu, fn, playback, c1c7, movie, ael, af-on, mode, delete, display, home, clips, slot-select, cancel-back, and thumbnail. See the API reference for the authoritative list.

Holding a button uses the same down / up contract as Shutter.

Terminal window
curl -X POST http://localhost:8080/api/cameras/D10F60149B0C/actions/button \
-H "Content-Type: application/json" \
-d '{"button": "menu"}'

A rejected press returns 400 with the camera’s own operable list in data.supported_buttons, so the real set is discoverable at runtime — send a probe press and read the list back rather than hardcoding one.

{
"success": false,
"message": "Button not supported on this camera",
"data": {
"supported_buttons": ["up", "down", "left", "right", "enter", "menu", "fn", "playback", "c1", "c2", "c3", "c4", "movie", "ael", "af-on"]
}
}

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 property or propertyChanged SSE events.

Terminal window
curl -X POST http://localhost:8080/api/cameras/D10F60149B0C/actions/movie-rec