App API specification (9a89ba6e24b0983281c900c3ceebd05b7a285c59)

Download OpenAPI specification:Download

The app service is used to configure and manage users' mobile devices.

Authentication

API_Token

You can generate an API-Token in the permissions-settings of your organization. All requests will be performed in the scope of this organization. Requests regarding users will fail.

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

Personal-Access-Token

You can generate a Personal Access Token in your profile settings. All requests will be performed as the user who created the token, with permissions as configured in each organization.

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

device

List

Returns all devices for queried owner

query Parameters
owner_id
required
integer

requested owner by using his userID

organization_id
integer

requesting organization, not required if user accesses his own resources

Responses

Response samples

Content type
application/json
[
  • {
    }
]

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.

name
required
string

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

os
required
string

The device's OS (e.g. iOS 12). 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 (FCM / Apple Push) used by the previously defined OS.

pushTokenDevelopment
required
boolean

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

Responses

Request samples

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

Response samples

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

Get

Gets a device configuration

path Parameters
deviceID
required
integer

ID of a device configuration

query Parameters
organization_id
integer

requesting organization, not required if user accesses his own resources

Responses

Response samples

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

Update

Updates an existing device configuration

path Parameters
deviceID
required
integer

ID of an existing device configuration

query Parameters
organization_id
integer

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.

name
required
string

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

os
required
string

The device's OS (e.g. iOS 12). 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 (FCM / Apple Push) used by the previously defined OS.

pushTokenDevelopment
required
boolean

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

Responses

Request samples

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

Response samples

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

Test

Send a test push to a device

path Parameters
deviceID
required
integer

ID of a device configuration

query Parameters
organization_id
integer

requesting organization, not required if user accesses his own resources

Responses

Delete

Delete an existing device configuration

path Parameters
deviceID
required
integer

ID of an existing device configuration

query Parameters
organization_id
integer

requesting organization, not required if user accesses his own resources

Responses

Response samples

Content type
application/json
{
  • "status": "deleted"
}

Sets the given device as main-device for the owning user.

path Parameters
deviceID
required
integer

ID of an existing device configuration

Responses

devices

AnyActive

Check if any device is active for the passed owner id in the passed organization id

query Parameters
user_id
required
integer

id of the user

organization_id
required
integer

id of the organization

Responses

Response samples

Content type
application/json
{
  • "activeCount": 0,
  • "anyActive": true
}

Returns the current main-device for the requesting user.

Responses

Response samples

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

organizations

GetDisabledOrganization

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

query Parameters
organization_id
required
integer

requesting organization

Responses

Response samples

Content type
application/json
[
  • {
    }
]

SetDisabledOrganization

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

query Parameters
organization_id
required
integer

requesting organization

Request Body schema: application/json

isDisabled payload

isDisabled
boolean

Responses

Request samples

Content type
application/json
{
  • "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

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

Request samples

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

Response samples

Content type
application/json
{
  • "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

Request samples

Content type
application/json
{
  • "distance": 0,
  • "duration": 0
}

Delivered

Sets a push's status to delivered

path Parameters
token
required
string

confirmToken associated with this push

Responses