App API specification (1.14.1)

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

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
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

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

Response samples

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

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
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

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

Response samples

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

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

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

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
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

application/json
Copy
Expand all Collapse all
{
  • "isDisabled": 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)

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}

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}