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โ
| Endpoint | Method | Purpose |
|---|---|---|
/api/durable-entity/{deviceId} | GET | Get the current state of a single camera's durable entity |
/api/durable-entities | GET | List 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โ
| Endpoint | Method | Purpose |
|---|---|---|
/api/purge-all-orchestrations | POST | Purge all orchestration instances and their history |
/api/purge-single-orchestration/{instanceId} | POST | Purge 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โ
| Endpoint | Method | Purpose |
|---|---|---|
/api/reset-all-orchestrations | POST | Terminate and restart all orchestrations |
/api/reset-failed-orchestrations | POST | Terminate 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