Skip to content

Create/Update alert

Request

Update an alert if it exists, create a new one otherwise.

Security
api_key
Bodyapplication/jsonrequired

The configuration for an alert to store.

alertTypestringrequired
Enum:"offline_alert""occupancy_alert""camera_health_summary_alert""people_count"
configurationDetailsobject

Type-specific alert configuration; its shape depends on alertType. For occupancy_alert see OccupancyAlertConfiguration. Validated server-side rather than by this (Swagger 2.0) schema.

emailsArray of strings or null, (email), non-empty
idstring or null, (uuid)
namestringrequired
organisationIdstring, (uuid)required
statestring
Enum:"active""deleted"
webhookobject
curl -i -X PUT \
  https://coreapi.hoxton.ai/_mock/v1/alerts \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "alertType": "offline_alert",
    "configurationDetails": {},
    "emails": [
      "user@example.com"
    ],
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "string",
    "organisationId": "c9b3f279-e3b5-4204-ad99-646257417f98",
    "state": "active",
    "webhook": {}
  }'

Responses

OK.

Bodyapplication/json
alertScopestringread-only

The scope level of the alert.

Enum:"mixed""organisation""resource""site"
alertTypestringrequired
Enum:"offline_alert""occupancy_alert""camera_health_summary_alert""people_count"
configurationDetailsobject

Type-specific alert configuration; its shape depends on alertType. For occupancy_alert see OccupancyAlertConfiguration. Validated server-side rather than by this (Swagger 2.0) schema.

createdAtstring, (date-time)read-only
deletedAtstring or null, (date-time)read-only
emailsArray of strings or null, (email), non-empty
idstring or null, (uuid)
namestringrequired
organisationIdstring, (uuid)required
statestring
Enum:"active""deleted"
webhookobject
Response
{ "alertScope": "mixed", "alertType": "offline_alert", "configurationDetails": {}, "createdAt": "2019-08-24T14:15:22Z", "deletedAt": "2019-08-24T14:15:22Z", "emails": [ "user@example.com" ], "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "organisationId": "c9b3f279-e3b5-4204-ad99-646257417f98", "state": "active", "webhook": {} }