Local integrations and Scripts

API

Connect a local application to the Camera Server integration API. This is a loopback-only pilot for valid PRO licenses and trials.

Cameras and direct actions

Start with a direct action

Choose the direct action you need:

  • Use POST /trigger with {} to capture the current selection, or add {"target":{"numbers":[1,2]}} for cameras 1 and 2.
  • Use POST /warmup to warm cameras without dispatching capture.
  • Use POST /autofocus with {} to start autofocus; enabled defaults to true.
  • For POST /settings, supply setting and value from the camera's setting descriptors.

Each route accepts an optional target, defaulting to the current selection.

Send JSON and an Idempotency-Key with each action. No saved Scripts or groups are needed. To execute the configured trigger button instead, use POST /trigger-managed with {}.

Discover the current cameras

Method and path Request Response
GET /cameras No body or query {items:[{serial,number,name,model,connected,userEnabled,abilities}]}
GET /cameras/{number} Assigned Camera List number, for example /cameras/1 {serial,number,name,model,connected,userEnabled,abilities,status,modes,settings}
GET /cameras/{number}/settings Assigned Camera List number, for example /cameras/1/settings {number,serial,settings:{settingName:descriptor}}

Address cameras by the numbers established in Camera List. Camera Server resolves numbers to internal serials. Clients and agents do not need to ask operators for serials or perform that translation. Never infer numbers from list position, hardware model, or connection order.

Optional fields can be absent when the node has not supplied them. The camera list's connected value uses the fleet's connection value, falling back to detection. Do not infer availability solely from a name, number, or model.

A number missing from Camera List gives 404 unknown_camera_number; conflicting assignments give 409 ambiguous_camera_number. Reading setting descriptors for a saved disconnected camera gives 409 camera_unavailable.

The camera list's model uses real model metadata, including cameraModel when supplied by the fleet; name uses the camera's available name metadata. abilities comes from the live descriptor when available. Individual camera status, modes, and settings also come from the live descriptor, not a saved camera-list snapshot. OpenAPI describes these camera read responses with Camera, CameraState, and SettingDescriptors schemas.

Read the individual camera for current state and modes. Read setting descriptors for legal values and writability.

Choose one target selector

{"numbers":[1,2]}
Target Meaning
{ "numbers": [1, 2] } Cameras 1 and 2 as assigned in Camera List; the preferred explicit selector
{ "all": true } Enabled members of the selected zone, the same default as omitting target; not all enabled cameras across zones
{ "zoneId": "…" } A persistent camera zone from /groups
{ "groupId": "…" } A generated fleet/model group, or a timeline-local group inside a saved timeline
{ "groupIds": ["…"] } Union of those group IDs, with duplicate resolved members removed
{ "serials": ["…"] } Compatibility selector for existing clients; not required for number-based use

Do not combine selectors. Number lists require 1 through 256 positive integers; duplicate numbers are removed. Empty number/serial/group lists and all:false are invalid.

Unknown or ambiguous numbers fail the entire selection before dispatch; they are never skipped to execute on a subset. Unknown zones resolve to no cameras; they do not fall back to all cameras. Zone/default resolution filters out disabled cameras.

Explicit numbered targets are not limited to the selected zone. External direct actions reject missing or disabled descriptors instead of silently excluding them. They also reject an empty resolved selection. A syntactically valid target does not reserve connected hardware.

Numbers resolve from the current Camera List when each action starts and stay pinned through that action's authorization and dispatch. Renumbering can change the camera addressed by a later action. Warmup-trigger pins its prepared cameras through capture and cleanup. Idempotent retries return the original operation, rather than triggering a newly numbered camera.

Generated model groups are not mutable /groups resources. There is no dedicated public model-group-list endpoint. Use only IDs established by the installed fleet/editor context, or prefer explicit camera numbers and public zone IDs. Timeline-local declarations can override model group IDs; see Timeline scripts.

Direct action reference

Send JSON and a fresh Idempotency-Key for each distinct intended action. Reuse the same key and identical payload only when retrying that action. Keys are shared across all API clients.

Method and path JSON body
POST /warmup {target?, burst?}; fixed warmup phase
POST /trigger {target?, burst?}; fixed capture phase
POST /autofocus {target?, enabled?}; boolean enabled defaults to true
POST /settings {target?, setting, value}
POST /trigger-managed {} only; configured button action
POST /captures/trigger {target?, phase?, burst?}; existing explicit-phase route
POST /captures/warmup-trigger {target?, warmupMs, countdownMs, phase?, burst?}; advanced photo preparation
POST /cameras/autofocus {target?, enabled?}; existing autofocus route
POST /cameras/settings {target?, setting, value}; existing setting route
POST /captures/managed {} only; working compatibility alias for /trigger-managed

Unknown action fields are rejected. /warmup accepts only omitted phase or warmup; /trigger accepts only omitted phase or capture. Neither inherits button countdown, repeat, or a bound timeline. /captures/trigger defaults to capture and permits warmup, capture, or aborted. A warmup-trigger request permits only omitted phase or capture. Optional targets default to {all:true}; existing explicit number targets are unchanged.

An optional burst contains durationMs (greater than zero, at most 600000) and/or integer maxFrames (0 through 500). It overrides burst configuration for that trigger, where applicable to the current camera mode; it does not switch a camera into burst mode.

Successful admissions return {operation,replayed} with HTTP 200. Inspect operation.state, result, and error. A runner conflict, camera dispatch error, or authorization loss after admission can produce a failed operation inside that 200 response. Direct actions share the runner's executor and reject execution while a timeline is active.

Execute the configured trigger button

Send {} to /trigger-managed or /captures/managed. Both call the real managed-trigger service shared with Scripts, using the operator's current selection, warmup, countdown, repeat capture, movie modes, and configured timeline. There are no target, timing, phase, or burst overrides on these routes.

If a timeline is bound to the button, the service checks API entitlement and every referenced action against the public action policy before any effects. No extra credential or scope is required. The alias is neither deprecated nor error-only.

Managed operations stay running through pending dispatch, repeat completion, or movie end, or until the configured Script runner completes. This is capture timing/execution completion, not file or processed-output readiness.

Read the shared API operation through /runs/{id} or /operations/{id}. Request best-effort cancellation through /runs/{id}/abort with a new idempotency key. All API clients share run ownership, so confirm which work you are stopping. Already dispatched or scheduled camera commands may still finish; cancellation cannot promise physical recall.

Explicit standard-photo preparation

{
  "target":{"numbers":[1]},
  "warmupMs":1000,
  "countdownMs":0
}

Both delays are required integers: warmupMs is 0 through 5000; countdownMs is 0 through 8000. The action sends warmup, waits for the longer duration, then dispatches capture. These are caller-supplied delays. The action does not read dashboard delay values, run its selected main-trigger script, or promise countdown UI/audio behavior.

Before admission or warmup, this advanced /captures/warmup-trigger service rejects a configured main-trigger timeline, enabled repeat capture, movie or scheduled-movie targets, synchronized-frame mode, and non-default group sequences. It checks again immediately before warming cameras and before capture. These cases return configured_trigger_unsupported; use /trigger-managed for the real configured button, or an explicitly authored supported timeline instead. These restrictions do not apply to the managed route merely because it uses the button configuration.

The service pins the prepared camera selection. If authorization or configuration changes after warmup, it sends the shared aborted phase to those same cameras with the original operation request ID. Cleanup does not require renewed execution permission and cannot start a capture. The operation retains the original failure and separate cleanup outcomes, including abort transport failures.

/captures/trigger is the lower-level explicit phase action. It is not the dashboard managed trigger either. Capture allowance and peer fleet locking are checked before capture dispatch.

Setting values and partial failures

Choose setting from the camera's descriptor. A write rejects internal action names, missing settings, read-only settings, illegal enum choices, and numbers outside the descriptor's min/max/step range. value can be a primitive or a typed value such as { "numberValue": 200 }; use the actual descriptor's type and choice, not an assumed universal ISO value.

All targeted setting descriptors are checked before sending. Dispatch then records each camera's result:

  • requested: number of selected targets attempted.
  • applied: accepted setting dispatches.
  • failed: rejected dispatches.
  • outcomes: {number,serial,state,applied} with an error on failure, or an optional persistence warning. number is recorded from Camera List at dispatch; an unnumbered legacy target can omit it. Serial metadata remains available for diagnostics.

Some accepted targets produce partially_succeeded; none accepted produces failed. A timeline stops at a failed setting step and preserves these outcomes. No rollback is promised. A desired_setting_persistence_failed warning means dispatch was accepted but remembered-setting persistence failed.

Do not expect every action to produce a per-camera outcome array. The explicit setting path records those outcomes; trigger and autofocus success primarily mean dispatch returned. Neither guarantees physical exposure, focus, transfer completion, or an atomic transaction across cameras.

Operations and retries · Datasets and downloads

Updated

Page links