Alarming API specification (3.1.12)

Download OpenAPI specification:Download

The alarming service implements the alarming logic and connected items, e.g. labels or units

Authentication

API_Token

To use this API, you need an API-Token from the RBAC settings of your GroupAlarm organization. Place the token inside the HTTP-Header API-Token for every request, otherwise the API will return an "401 Unauthorized" error for your request.

Security Scheme Type API Key
Header parameter name: API-TOKEN

Personal-Access-Token

To use this API, you need a Personal Access Token from your profile settings. Place the token inside the HTTP-Header Personal-Access-Token for every request, otherwise the API will return an "401 Unauthorized" error for your request.

Security Scheme Type API Key
Header parameter name: Personal-Access-Token

alarm

CreateAlarm

Creates an alarm for an event and calculate required user for a notification

Request Body schema: application/json
alarmResources
required
object (AlarmCreationResources contains an alarm's alarmed scenarios, units, labels and / or users.)

At least one of those arrays must contain data, otherwise the alarm can not be started.

alarmTemplateID
integer <int64>

Alarm message template ID given ID is used to replace alarm's message text while creating a new alarm either this or Message have to be set

creatorID
integer <int64>

id of the creator resource

creatorName
string

name of the creator resource

creatorType
string

type of the creator resource (user|api-token|tag)

eventID
integer <int64>

id of an existing event

eventName
string

Name of an event; if event name is passed, a new event will be created with the passed name

message
string

Alarm message text either this or AlarmTemplateID have to be set

mode
required
string

Alarm mode (strict|best-effort)

optionalContent
object (PropertyMap is used as container for additional and arbitrary data in alarms or messages.)

Currently supported: "address": "Willy-Brandt-Straße 1, 10557 Berlin" "latitude": 52.5201 "longitude": 13.3688

organizationID
required
integer <int64>

ID of the organization to create the alarm in

scenarioID
integer <int64>

id of the alarmed scenario

DEPRECATED: this property is deprecated and will be removed soon, please use alarmResources instead

scheduledEndTime
string <date-time>

Scheduled time for closing the Event

startTime
required
string <date-time>

Start time for this alarm

Responses

201

created alarm payload with passed parameters

400

Passed alarm payload was not in the correct format

403

No payment setup for this organization

500

Unexpected database error

post /alarm
https://app.groupalarm.com/api/v1/alarm

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "alarmResources":
    {
    },
  • "alarmTemplateID": 0,
  • "creatorID": 0,
  • "creatorName": "string",
  • "creatorType": "string",
  • "eventID": 0,
  • "eventName": "string",
  • "message": "string",
  • "mode": "string",
  • "optionalContent":
    {
    },
  • "organizationID": 0,
  • "scenarioID": 0,
  • "scheduledEndTime": "2020-11-25T17:12:22Z",
  • "startTime": "2020-11-25T17:12:22Z"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "alarmResources":
    {
    },
  • "creatorID": 0,
  • "creatorName": "string",
  • "creatorType": "string",
  • "endDate": "2020-11-25T17:12:22Z",
  • "event":
    {
    },
  • "feedback":
    [
    ],
  • "feedbackPercentage":
    {
    },
  • "id": 1,
  • "message": "string",
  • "mode": "string",
  • "optionalContent":
    {
    },
  • "organizationID": 0,
  • "startDate": "2020-11-25T17:12:22Z",
  • "strength":
    {
    },
  • "success": true
}

PreviewAlarm

Returns a preview of a planned alarm using the given resources

Request Body schema: application/json
alarmResources
required
object (AlarmCreationResources contains an alarm's alarmed scenarios, units, labels and / or users.)

At least one of those arrays must contain data, otherwise the alarm can not be started.

alarmTemplateID
integer <int64>

Alarm message template ID given ID is used to replace alarm's message text while creating a new alarm either this or Message have to be set

creatorID
integer <int64>

id of the creator resource

creatorName
string

name of the creator resource

creatorType
string

type of the creator resource (user|api-token|tag)

eventID
integer <int64>

id of an existing event

eventName
string

Name of an event; if event name is passed, a new event will be created with the passed name

message
string

Alarm message text either this or AlarmTemplateID have to be set

mode
required
string

Alarm mode (strict|best-effort)

optionalContent
object (PropertyMap is used as container for additional and arbitrary data in alarms or messages.)

Currently supported: "address": "Willy-Brandt-Straße 1, 10557 Berlin" "latitude": 52.5201 "longitude": 13.3688

organizationID
required
integer <int64>

ID of the organization to create the alarm in

scenarioID
integer <int64>

id of the alarmed scenario

DEPRECATED: this property is deprecated and will be removed soon, please use alarmResources instead

scheduledEndTime
string <date-time>

Scheduled time for closing the Event

startTime
required
string <date-time>

Start time for this alarm

Responses

200

preview created

400

invalid creationRequest

500

unexpected error

post /alarm/preview
https://app.groupalarm.com/api/v1/alarm/preview

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "alarmResources":
    {
    },
  • "alarmTemplateID": 0,
  • "creatorID": 0,
  • "creatorName": "string",
  • "creatorType": "string",
  • "eventID": 0,
  • "eventName": "string",
  • "message": "string",
  • "mode": "string",
  • "optionalContent":
    {
    },
  • "organizationID": 0,
  • "scenarioID": 0,
  • "scheduledEndTime": "2020-11-25T17:12:22Z",
  • "startTime":