Recovering after disconnections and failed webhooks - OnSight Knowledgebase

Recovering after disconnections and failed webhooks

Back to API & integrations — Reliability & limits Browse product

A restored Command live connection does not automatically recover missed events. Live subscriptions and historical queries are separate operations.

Recommended recovery procedure

  1. Record the last successfully persisted reading timestamp for each relevant asset and measurement.
  2. Reconnect and restore subscriptions.
  3. Query sensor history over the missing period, including an overlap with previously fetched data.
  4. Merge historical results using asset, device mapping, measurement, aggregation, interval and point time.
  5. Refresh current asset and alert state separately.

Keep aggregation intervals and window alignment consistent when reconciling results. Historical aggregates cannot reproduce every original live event. Handle concurrent live arrivals while reconciliation is in progress.

Additional Command endpoints

Use these paths under /company/{companyId}/project/{projectId}:

GET /Asset/{assetId}/lastSeen/{start}/{end}
GET /Asset/{assetId}/alert/breaches/recent

The recent-breaches endpoint returns up to 10 matching breaches and applies hardware-association filters. It is insufficient as a complete alert replay mechanism after a long outage.

The inspected Command hub has no replay cursor. Sensor history cannot recreate every missed breach notification, zone event or webhook.

Webhook delivery is a separate contract

Command live events use SignalR. Core device and zone telemetry webhooks have their own payload and delivery contract; do not send the Command event examples to a webhook parser unchanged.

The existing OnSight Webhooks: Integration and Delivery Guide documents batched telemetry delivery, whole-batch 2xx acknowledgement, retry after failure and at-least-once delivery.

For those documented telemetry webhooks, accept the entire batch durably before returning a success response and make processing idempotent. A timeout or lost acknowledgement can produce duplicate deliveries.

Do not infer that the same retry behaviour applies to every alert webhook configured through Command.

Draft review: delivery behaviour requires reconciliation

The published Core webhook guide describes queue restoration and retries. The local worker source inspected during preparation did not establish that same delivery implementation or an explicit retry schedule. Confirm the deployed implementation before extending those guarantees to Command alert webhooks.

Confirm:

  • which webhook type the integration uses;
  • retry timing and attempt limits;
  • how long failed deliveries are retained;
  • whether an operator can replay failures;
  • how receivers can detect permanent gaps.

Do not publish a retry count, replay window or exactly-once guarantee without that confirmation.

When complete recovery is required

Agree a supported history or replay API for every required event type. The current Command sensor aggregate endpoint and limited recent-breach endpoint do not establish complete recovery of individual sensor messages and all alerts after any outage.

More in this category

Related guides for this topic.

Need a hand?

Tell us which product you use, what you’re trying to do, and what happened.

Contact support