Messaging API specification (1.21.2)

Download OpenAPI specification:Download

The messaging service implements all functions for message-management in GroupAlarm

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

user

UpsertEscalation

Creates or updates an existing escalation configuration for the passed user

Request Body schema: application/json
escalations
required
Array of object (Escalation)

configured escalations

organizationID
integer <int64>

organization id for editing escalation as an organization administrator

userID
integer <int64>

assigned user for this escalation configuration for organization administrator editing

Responses

200

user was successfully removed from organization

400

parameters missing or in the wrong format

403

the last organization admin can not leave the organization

500

unexpected error

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

Request samples

application/json
Copy
Expand all Collapse all
{
  • "escalations":
    [
    ],
  • "organizationID": 0,
  • "userID": 0
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "message": "escalation saved"
}

GetEscalation

Returns the escalation configuration for the passed user

path Parameters
userID
required
int64

user id for the requested escalation

Responses

200

requested escalation configuration for the passed userID

400

userID missing or in the wrong format

500

unexpected error

get /escalation/{userID}
https://app.groupalarm.com/api/v1/escalation/{userID}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "escalations":
    [
    ],
  • "organizationID": 0,
  • "userID": 0
}

alarm

GetAlarmMessageStatus

Returns the current alarm message status for the user in the given alarm

path Parameters
alarm_id
required
int64

alarmID this request is about

query Parameters
organization_id
required
int64

associated organization requesting the information (used for rbac-check)

user_id
required
int64

requested user status

unit_id
required
int64

unit this user is assigned to in this alarm

label_id
required
int64

label this user is assigned to in this alarm

Responses

200

requested alarm message status for the user in the given alarm

400

alarmID / userID / unitID / labelID missing or in wrong format

500

unexpected error

get /messagestatus/{alarm_id}
https://app.groupalarm.com/api/v1/messagestatus/{alarm_id}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "devices":
    [
    ],
  • "messageId": "string"
}

feedback

UserFeedback

Sets the user feedback for a specific alarm using the api

Request Body schema: application/json
alarmID
required
integer <int64>

AlarmID associated to the feedback

response
required
boolean

Response should be true if the user gave positive feedback and false if not

userID
required
integer <int64>

UserID of the user that is sending this feedback

Responses

200

feedback was successfully set

400

userID missing or in the wrong format or not matching with the requests userID

500

unexpected error

post /messaging/feedback
https://app.groupalarm.com/api/v1/messaging/feedback

Request samples

application/json
Copy
Expand all Collapse all
{
  • "alarmID": 0,
  • "response": true,
  • "userID": 0
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "success": true
}

organization

GetTimeout

Returns the timeout of an message in the organization

path Parameters
organizationID
required
int64

organization id for the requested timeout

Responses

200

requested timeout configured for the passed organizationID

400

organizationID missing or in the wrong format

500

unexpected error

get /messaging/timeout/{organizationID}
https://app.groupalarm.com/api/v1/messaging/timeout/{organizationID}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "timeout": 0
}

SetTimeout

Sets the timeout of an message in the organization

path Parameters
organizationID
required
int64

organization id for the requested timeout

Request Body schema: application/json
timeout
required
integer <int64>

Timeout of any message for the given organization

Responses

200

requested timeout configured for the passed organizationID

400

organizationID missing or in the wrong format

500

unexpected error

post /messaging/timeout/{organizationID}
https://app.groupalarm.com/api/v1/messaging/timeout/{organizationID}

Request samples

application/json
Copy
Expand all Collapse all
{
  • "timeout": 0
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "timeout": 0
}