v1

latestOpenAPI 3.0.32026-07-24434977.4 KB
Alerts

Creating an Generic Alert

Creates a new generic alert that will be displayed in FlockOS

post/alerts

Request body

titlestring required

The title for the alert. Example: "An Attempted Break-In Occurred"

descriptionstring

A description for the alert. Example: "There was an attempted break-in detected at 123 Main St."

type'vehicle' | 'person' | 'drone' | 'other' required
subTypestring

A developer provided type that helps differentiate and organize the various alert types within the UI. You can use alphanumeric characters and dashes as part of the string.

priorityinteger required

The priority of the alert. A priority must be between 1 and 5, where 1 is the highest priority.

eventTimestring date-time required

The timestamp (RFC3339 UTC format) of when the event related to this alert occurred.

subjectIdstring

The subjectId from the Geo API from which this alert was generated.

ttlinteger

The amount of time (in seconds) that the alert should be visible for. If a TTL is not provided, the alert will remain visible until closed.

metadataobject

Custom metadata for the alert

Example request

{
  "eventTime": "2023-12-31T23:59:59.999999Z",
  "location": {
    "latitude": 33.786147,
    "longitude": -84.412822,
    "address": "1170 Howell Mill Rd NW, Atlanta, GA 30318"
  }
}

Response

The alert was successfully created.

titlestring required

The title for the alert. Example: "An Attempted Break-In Occurred"

descriptionstring

A description for the alert. Example: "There was an attempted break-in detected at 123 Main St."

type'vehicle' | 'person' | 'drone' | 'other' required
subTypestring

A developer provided type that helps differentiate and organize the various alert types within the UI. You can use alphanumeric characters and dashes as part of the string.

priorityinteger required

The priority of the alert. A priority must be between 1 and 5, where 1 is the highest priority.

eventTimestring date-time required

The timestamp (RFC3339 UTC format) of when the event related to this alert occurred.

subjectIdstring

The subjectId from the Geo API from which this alert was generated.

ttlinteger

The amount of time (in seconds) that the alert should be visible for. If a TTL is not provided, the alert will remain visible until closed.

metadataobject

Custom metadata for the alert

Example response

{
  "eventTime": "2023-12-31T23:59:59.999999Z",
  "location": {
    "latitude": 33.786147,
    "longitude": -84.412822,
    "address": "1170 Howell Mill Rd NW, Atlanta, GA 30318"
  }
}