App API specification (2edd00a12d1526fe015f6c4cb060180ce8923456)

Download OpenAPI specification:Download

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

device

List

Returns all devices for queried owner

Authorizations:
API_TokenPersonal-Access-Token
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

Authorizations:
API_TokenPersonal-Access-Token
Request Body schema: application/json
required

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

Authorizations:
API_TokenPersonal-Access-Token
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

Authorizations:
API_TokenPersonal-Access-Token
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
required

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

Authorizations:
API_TokenPersonal-Access-Token
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

Authorizations:
API_TokenPersonal-Access-Token
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.

Authorizations:
API_TokenPersonal-Access-Token
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 and get the permissions of the user and the organization

Authorizations:
API_TokenPersonal-Access-Token
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,
  • "organizationPermission": true,
  • "userPermission": true
}

Returns the current main-device for the requesting user.

Authorizations:
API_TokenPersonal-Access-Token

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

Authorizations:
API_TokenPersonal-Access-Token
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

Authorizations:
API_TokenPersonal-Access-Token
query Parameters
organization_id
required
integer

requesting organization

Request Body schema: application/json
required

isDisabled payload

isDisabled
boolean

Responses

Request samples

Content type
application/json
{
  • "isDisabled": true
}

feedback

Feedback

Sets the user feedback for a specific alarm

Authorizations:
API_TokenPersonal-Access-Token
Request Body schema: application/json
required

the users feedback

alarmID
required
integer <int64>

AlarmID of the alarm that should be answered

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
}

push

Answered

Sets a push's alarm answer

Authorizations:
API_TokenPersonal-Access-Token
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

Authorizations:
API_TokenPersonal-Access-Token
path Parameters
token
required
string

confirmToken associated with this push

Responses

user-permissions

GetPermission

Returns true if there is an active permission for the passed organization or specifically for the passed user in an organization.

Authorizations:
API_TokenPersonal-Access-Token
query Parameters
organization_id
required
integer

ID of an organization

user_id
integer

optional ID of a user in this organization

Responses

Allows a specific user in a specific organization to use this service's alarming-type.

Authorizations:
API_TokenPersonal-Access-Token
Request Body schema: application/json
required

restriction configuration with user and organization id

organizationID
integer <int64>
userID
integer <int64>

Responses

Request samples

Content type
application/json
{
  • "organizationID": 0,
  • "userID": 0
}

Removes a specific user's permission to use this service's alarming-type in an organization.

Authorizations:
API_TokenPersonal-Access-Token
path Parameters
organizationID
required
integer

ID of an organization

userID
required
integer

ID of a user in this organization

Responses