Skip to main content

Orchestration Management

The OrchestrationManagement/ folder contains HTTP-triggered functions for inspecting, purging, and resetting durable orchestrations. These are administrative tools used for debugging and maintenance.

Endpointsโ€‹

All endpoints require API key authentication via the x-api-key header.

Query Stateโ€‹

EndpointMethodPurpose
/api/durable-entity/{deviceId}GETGet the current state of a single camera's durable entity
/api/durable-entitiesGETList all durable entities and their states

Use these to inspect the internal state of a camera's orchestration โ€” current mode, PTZ position, command queue, timestamps, etc.

Purge Orchestrationsโ€‹

EndpointMethodPurpose
/api/purge-all-orchestrationsPOSTPurge all orchestration instances and their history
/api/purge-single-orchestration/{instanceId}POSTPurge a specific orchestration instance

Purging removes the orchestration history from the Durable Functions storage. Use this when:

  • Orchestration history has grown too large
  • A camera's orchestration is stuck in a corrupted state
  • Cleaning up after testing

Reset Orchestrationsโ€‹

EndpointMethodPurpose
/api/reset-all-orchestrationsPOSTTerminate and restart all orchestrations
/api/reset-failed-orchestrationsPOSTTerminate and restart only failed orchestrations

Resetting terminates existing orchestrations and starts fresh instances. Use this for recovery after system outages or when orchestrations enter an unexpected state.

DurableDataStoreServiceโ€‹

The DurableDataStoreService provides a monitoring layer that syncs durable entity state to Table Storage:

  • Runs as part of each orchestration iteration
  • Writes acquisition rate metrics per mode
  • Allows the Admin API to query aggregated orchestration health without direct Durable Functions access