PT EN

Alarmes

URL base: $BUSINESS_API

O objecto

idstring · opcional
rule_idstring · opcional
sensor_idstring · opcional
sample_idstring · opcional
titlestring · opcional
severitystring · opcional
event_typestring · opcional
statusstring · opcional

um de open, acknowledged, resolved

valuenumber · opcional
peak_valuenumber · opcional
unitstring · opcional
opened_atstring (date-time) · opcional
last_observed_atstring (date-time) · opcional
acknowledged_atstring (date-time) · opcional
acknowledged_bystring · opcional
resolved_atstring (date-time) · opcional
resolution_notesstring · opcional
resolution_codestring · opcional

Stable code of a resolution the server wrote (alarm.auto_cleared); clients word it and fall back to resolution_notes. Absent for notes people typed.

O objecto
{
  "id": "ala_2NbIUPJ8YXJkm1LiQVXgqjxIYd7",
  "rule_id": "rul_2aARlSaHxSk1Z6Yp9aKdnemXRyk",
  "sensor_id": "sen_28o3p46TDQsRdq8pzycV5cIxbMg",
  "sample_id": "sam_2U07jOAhTYQNV60Pd6W5x8IZHUU",
  "title": "Fuga na Rua 3",
  "severity": "severity",
  "event_type": "event type",
  "status": "open",
  "value": 13.42,
  "peak_value": 13.42,
  "unit": "unit",
  "opened_at": "2026-11-19T09:30:00Z",
  "last_observed_at": "2026-11-19T09:30:00Z",
  "acknowledged_at": "2026-11-19T09:30:00Z",
  "acknowledged_by": "acknowledged by",
  "resolved_at": "2026-11-19T09:30:00Z",
  "resolution_notes": "resolution notes",
  "resolution_code": "RES-2026-000142"
}

Listar alarmes

Registos

GET /alarms

Returns the tenant's alarms, newest first, with cursor pagination (limit defaults to 20, at most 100; pass next_cursor as after). Filters combine, so you can ask for the open alarms of one rule at one sensor.

Parâmetros

statusstring · consulta · opcional

Return only alarms in this state: open, acknowledged or resolved; omit for all states.

rule_idstring · consulta · opcional

Return only alarms raised by this alarm rule (prefix mrl_).

sensor_idstring · consulta · opcional

Return only alarms raised at this location: the sensor ID for telemetry rules, or the asset or DMA ID of the sample for quality rules.

limitinteger · consulta · opcional

Maximum resources to return (default 20, maximum 100).

afterstring · consulta · opcional

Opaque cursor returned by the previous page.

Devolve

200 OK

Mostrar atributos
dataarray of Alarm · opcional
Mostrar atributos filhos
idstring · opcional
rule_idstring · opcional
sensor_idstring · opcional
sample_idstring · opcional
titlestring · opcional
severitystring · opcional
event_typestring · opcional
statusstring · opcional

um de open, acknowledged, resolved

valuenumber · opcional
peak_valuenumber · opcional
unitstring · opcional
opened_atstring (date-time) · opcional
last_observed_atstring (date-time) · opcional
acknowledged_atstring (date-time) · opcional
acknowledged_bystring · opcional
resolved_atstring (date-time) · opcional
resolution_notesstring · opcional
resolution_codestring · opcional

Stable code of a resolution the server wrote (alarm.auto_cleared); clients word it and fall back to resolution_notes. Absent for notes people typed.

has_moreboolean · opcional
next_cursorstring · opcional

Erros 400 · 403

Permissões business:monitoring:read · Funções: admin, analyst, field_supervisor, operations, owner, viewer

curl -X GET "$BUSINESS_API/alarms" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "data": [
    {
      "id": "ala_2NbIUPJ8YXJkm1LiQVXgqjxIYd7",
      "rule_id": "rul_2aARlSaHxSk1Z6Yp9aKdnemXRyk",
      "sensor_id": "sen_28o3p46TDQsRdq8pzycV5cIxbMg",
      "sample_id": "sam_2U07jOAhTYQNV60Pd6W5x8IZHUU",
      "title": "Fuga na Rua 3",
      "severity": "severity",
      "event_type": "event type",
      "status": "open",
      "value": 13.42,
      "peak_value": 13.42,
      "unit": "unit",
      "opened_at": "2026-11-19T09:30:00Z",
      "last_observed_at": "2026-11-19T09:30:00Z",
      "acknowledged_at": "2026-11-19T09:30:00Z",
      "acknowledged_by": "acknowledged by",
      "resolved_at": "2026-11-19T09:30:00Z",
      "resolution_notes": "resolution notes",
      "resolution_code": "RES-2026-000142"
    }
  ],
  "has_more": true,
  "next_cursor": "next cursor"
}

Obter um alarme

Registos

GET /alarms/{id}

Returns one alarm with its current, peak and unit values, timestamps for opening, last observation, acknowledgement and resolution, and the resolution notes or code (auto-cleared alarms carry a resolution code). Answers 404 when the alarm is not in the caller's tenant.

Parâmetros

idstring · caminho · obrigatório

Identifier of the alarm (prefix alm_).

Devolve

200 OK

Mostrar atributos
idstring · opcional
rule_idstring · opcional
sensor_idstring · opcional
sample_idstring · opcional
titlestring · opcional
severitystring · opcional
event_typestring · opcional
statusstring · opcional

um de open, acknowledged, resolved

valuenumber · opcional
peak_valuenumber · opcional
unitstring · opcional
opened_atstring (date-time) · opcional
last_observed_atstring (date-time) · opcional
acknowledged_atstring (date-time) · opcional
acknowledged_bystring · opcional
resolved_atstring (date-time) · opcional
resolution_notesstring · opcional
resolution_codestring · opcional

Stable code of a resolution the server wrote (alarm.auto_cleared); clients word it and fall back to resolution_notes. Absent for notes people typed.

Erros 400 · 403

Permissões business:monitoring:read · Funções: admin, analyst, field_supervisor, operations, owner, viewer

curl -X GET "$BUSINESS_API/alarms/{id}" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "id": "ala_2NbIUPJ8YXJkm1LiQVXgqjxIYd7",
  "rule_id": "rul_2aARlSaHxSk1Z6Yp9aKdnemXRyk",
  "sensor_id": "sen_28o3p46TDQsRdq8pzycV5cIxbMg",
  "sample_id": "sam_2U07jOAhTYQNV60Pd6W5x8IZHUU",
  "title": "Fuga na Rua 3",
  "severity": "severity",
  "event_type": "event type",
  "status": "open",
  "value": 13.42,
  "peak_value": 13.42,
  "unit": "unit",
  "opened_at": "2026-11-19T09:30:00Z",
  "last_observed_at": "2026-11-19T09:30:00Z",
  "acknowledged_at": "2026-11-19T09:30:00Z",
  "acknowledged_by": "acknowledged by",
  "resolved_at": "2026-11-19T09:30:00Z",
  "resolution_notes": "resolution notes",
  "resolution_code": "RES-2026-000142"
}

Reconhecer um alarme

Registos

POST /alarms/{id}/acknowledge

Moves an open alarm to acknowledged and records who acknowledged it and when. Acknowledging an alarm that is already acknowledged returns it unchanged; acknowledging a resolved alarm answers 409. The alarm can still auto-clear or be resolved afterwards.

Parâmetros

idstring · caminho · obrigatório

Identifier of the alarm to acknowledge (prefix alm_).

Devolve

200 OK

Mostrar atributos
idstring · opcional
rule_idstring · opcional
sensor_idstring · opcional
sample_idstring · opcional
titlestring · opcional
severitystring · opcional
event_typestring · opcional
statusstring · opcional

um de open, acknowledged, resolved

valuenumber · opcional
peak_valuenumber · opcional
unitstring · opcional
opened_atstring (date-time) · opcional
last_observed_atstring (date-time) · opcional
acknowledged_atstring (date-time) · opcional
acknowledged_bystring · opcional
resolved_atstring (date-time) · opcional
resolution_notesstring · opcional
resolution_codestring · opcional

Stable code of a resolution the server wrote (alarm.auto_cleared); clients word it and fall back to resolution_notes. Absent for notes people typed.

Erros 400 · 403

Permissões business:alarms:manage · Funções: admin, operations, owner

curl -X POST "$BUSINESS_API/alarms/{id}/acknowledge" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "id": "ala_2NbIUPJ8YXJkm1LiQVXgqjxIYd7",
  "rule_id": "rul_2aARlSaHxSk1Z6Yp9aKdnemXRyk",
  "sensor_id": "sen_28o3p46TDQsRdq8pzycV5cIxbMg",
  "sample_id": "sam_2U07jOAhTYQNV60Pd6W5x8IZHUU",
  "title": "Fuga na Rua 3",
  "severity": "severity",
  "event_type": "event type",
  "status": "open",
  "value": 13.42,
  "peak_value": 13.42,
  "unit": "unit",
  "opened_at": "2026-11-19T09:30:00Z",
  "last_observed_at": "2026-11-19T09:30:00Z",
  "acknowledged_at": "2026-11-19T09:30:00Z",
  "acknowledged_by": "acknowledged by",
  "resolved_at": "2026-11-19T09:30:00Z",
  "resolution_notes": "resolution notes",
  "resolution_code": "RES-2026-000142"
}

Fechar um alarme

Registos

POST /alarms/{id}/resolve

Closes an open or acknowledged alarm by hand, stamping the resolution time and storing the optional notes from the body (the body may be omitted). Resolving an alarm that is already resolved returns it unchanged. A later breach of the same rule at the same location opens a new alarm.

Parâmetros

idstring · caminho · obrigatório

Identifier of the alarm to resolve (prefix alm_).

Devolve

200 OK

Mostrar atributos
idstring · opcional
rule_idstring · opcional
sensor_idstring · opcional
sample_idstring · opcional
titlestring · opcional
severitystring · opcional
event_typestring · opcional
statusstring · opcional

um de open, acknowledged, resolved

valuenumber · opcional
peak_valuenumber · opcional
unitstring · opcional
opened_atstring (date-time) · opcional
last_observed_atstring (date-time) · opcional
acknowledged_atstring (date-time) · opcional
acknowledged_bystring · opcional
resolved_atstring (date-time) · opcional
resolution_notesstring · opcional
resolution_codestring · opcional

Stable code of a resolution the server wrote (alarm.auto_cleared); clients word it and fall back to resolution_notes. Absent for notes people typed.

Erros 400 · 403

Permissões business:alarms:manage · Funções: admin, operations, owner

curl -X POST "$BUSINESS_API/alarms/{id}/resolve" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "id": "ala_2NbIUPJ8YXJkm1LiQVXgqjxIYd7",
  "rule_id": "rul_2aARlSaHxSk1Z6Yp9aKdnemXRyk",
  "sensor_id": "sen_28o3p46TDQsRdq8pzycV5cIxbMg",
  "sample_id": "sam_2U07jOAhTYQNV60Pd6W5x8IZHUU",
  "title": "Fuga na Rua 3",
  "severity": "severity",
  "event_type": "event type",
  "status": "open",
  "value": 13.42,
  "peak_value": 13.42,
  "unit": "unit",
  "opened_at": "2026-11-19T09:30:00Z",
  "last_observed_at": "2026-11-19T09:30:00Z",
  "acknowledged_at": "2026-11-19T09:30:00Z",
  "acknowledged_by": "acknowledged by",
  "resolved_at": "2026-11-19T09:30:00Z",
  "resolution_notes": "resolution notes",
  "resolution_code": "RES-2026-000142"
}