App API specification (3.1.2)

Download OpenAPI specification:Download

The app service implements all app functions for 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

device

List

Returns all devices for queried owner

query Parameters
owner_id
required
int64

requested owner by using his userID

organization_id
int64

requesting organization, not required if user accesses his own resources

Responses

200

device configurations for passed user

400

owner_id is missing or in wrong format

500

Unexpected database error

get /device
https://app.groupalarm.com/api/v1/app/device

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Create

Create a device configuration for specific user, used by our iOS / Android app

Request Body schema: application/json

device configuration payload

active
required
boolean

Whether this device will be used for notifications or not.

id
integer <int64>

This device's ID. Will be set by the service on creation.

name
required
string

User-wide unique name for this device (e.g. Apple iPhone XS).

os
required
string

The device's OS (e.g. Android 9.0.1 / iOS 12). You should at least include the "android" or "ios" keyword to allow a distinction between our push services.

ownerID
required
integer <int64>

ID of the user this device is created for.

pushToken
required
string

The device's pushtoken (Catapush / Apple Push)

pushTokenDevelopment
required
boolean

Defines if the given push-token should be used in a development-environment or not (APNS only)

Responses

200

created device configuration

400

device configuration payload is missing or in wrong format

500

Unexpected database error

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

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "active": true,
  • "id": 0,
  • "name": "string",
  • "os": "string",
  • "ownerID": 0,
  • "pushToken": "string",
  • "pushTokenDevelopment": true
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "active": true,
  • "id": 0,
  • "name": "string",
  • "os": "string",
  • "ownerID": 0,
  • "pushToken": "string",
  • "pushTokenDevelopment": true
}

Get

Gets a device configuration

path Parameters
deviceID
required
int64

ID of a device configuration

query Parameters
organization_id
int64

requesting organization, not required if user accesses his own resources

Responses

200

requested device configuration

500

Unexpected database error

get /device/{deviceID}
https://app.groupalarm.com/api/v1/app/device/{deviceID}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "active": true,
  • "id": 0,
  • "name": "string",
  • "os": "string",
  • "ownerID": 0,
  • "pushToken": "string",
  • "pushTokenDevelopment": true
}

Update

Updates an existing device configuration

path Parameters
deviceID
required
int64

ID of an existing device configuration

query Parameters
organization_id
int64

requesting organization, not required if user accesses his own resources

Request Body schema: application/json

device configuration payload

active
required
boolean

Whether this device will be used for notifications or not.

id
integer <int64>

This device's ID. Will be set by the service on creation.

name
required
string

User-wide unique name for this device (e.g. Apple iPhone XS).

os
required
string

The device's OS (e.g. Android 9.0.1 / iOS 12). You should at least include the "android" or "ios" keyword to allow a distinction between our push services.

ownerID
required
integer <int64>

ID of the user this device is created for.

pushToken
required
string

The device's pushtoken (Catapush / Apple Push)

pushTokenDevelopment
required
boolean

Defines if the given push-token should be used in a development-environment or not (APNS only)

Responses

200

updated device configuration

400

device configuration payload is missing or in wrong format

500

Unexpected database error

put /device/{deviceID}
https://app.groupalarm.com/api/v1/app/device/{deviceID}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "active": true,
  • "id": 0,
  • "name": "string",
  • "os": "string",
  • "ownerID": 0,
  • "pushToken": "string",
  • "pushTokenDevelopment": true
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "active": true,
  • "id": 0,
  • "name": "string",
  • "os": "string",
  • "ownerID": 0,
  • "pushToken": "string",
  • "pushTokenDevelopment": true
}

Test

Send a test push to a device

path Parameters
deviceID
required
int64

ID of a device configuration

query Parameters
organization_id
int64

requesting organization, not required if user accesses his own resources

Responses

200

push successfully sent

500

Unexpected database error

post /device/{deviceID}
https://app.groupalarm.com/api/v1/app/device/{deviceID}

Delete

Delete an existing device configuration

path Parameters
deviceID
required
int64

ID of an existing device configuration

query Parameters
organization_id
int64

requesting organization, not required if user accesses his own resources

Responses

200

deleted device configuration

400

passed deviceID is missing or in wrong format

500

Unexpected database error

delete /device/{deviceID}
https://app.groupalarm.com/api/v1/app/device/{deviceID}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "status": "deleted"
}

organizations

GetDisabledOrganization

Returns whether the given organization has disabled this way of alarming or not

query Parameters
organization_id
required
int64

requesting organization

Responses

200

whether this way of alarming is disabled or not

400

organization_id is missing or in wrong format

500

Unexpected database error

get /disabled
https://app.groupalarm.com/api/v1/app/disabled

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

SetDisabledOrganization

Sets whether the given organization has this way of alarming disabled or not

query Parameters
organization_id
required
int64

requesting organization

Request Body schema: application/json

isDisabled payload

isDisabled
boolean

Responses

200

request successful

400

organization_id is missing or in wrong format

500

Unexpected database error

put /disabled
https://app.groupalarm.com/api/v1/app/disabled

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "isDisabled": true
}

feedback

Feedback

Sets the user feedback for a specific alarm

Request Body schema: application/json

the users feedback

alarmID
required
integer <int64>

AlarmID of the alarm that should be answered

answerData
required
object (AnswerData)

AnswerData is used to transmit additional data about a user's alarm answer

deviceID
required
integer <int64>

DeviceID which sends the feedback to show it on the alarm overview

response
boolean

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

Responses

200

feedback was successfully set

400

organizationID nor alarmID set

500

unexpected error

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

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "alarmID": 0,
  • "answerData":
    {
    },
  • "deviceID": 0,
  • "response": true
}

Response samples

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

push

Answered

Sets a push's alarm answer

path Parameters
token
required
string

confirmToken associated with this push

answer
required
string

answer given by the user (yes / no)

Request Body schema: application/json

additional data about user response

distance
integer <int64>

Distance to organization base in kilometers

duration
integer <int64>

Duration in traffic to organization in minutes

Responses

200

answer saved

400

token / answer not found or invalid

500

unexpected error

post /push/answered/{token}/{answer}
https://app.groupalarm.com/api/v1/app/push/answered/{token}/{answer}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "distance": 0,
  • "duration": 0
}

Delivered

Sets a push's status to delivered

path Parameters
token
required
string

confirmToken associated with this push

Responses

200

status saved

400

token not found or invalid

500

unexpected error

post /push/delivered/{token}
https://app.groupalarm.com/api/v1/app/push/delivered/{token}