User API specification (887cf3d4f37487346e33ee5d2c4aee5e8f74aa6e)

Download OpenAPI specification:Download

The user service implements all user 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

auth

Resends the activation email of the requesting user if the account is not activated yet.

Responses

Login

Handles the user login and returns a user payload with JWT token

Request Body schema: application/x-www-form-urlencoded
email
required
string

The email for this account

password
required
string

The password for this account

mfa
string

The user's current mfa code. This code is required if the user enabled mfa for his account, otherwise it can be left empty. To figure out if the user has mfa enabled, you need to login with username and password first. A http 401 error containing "MFA required" allows you to ask the user a current mfa code. Sending username and password again with the mfa code will finalize the login.

Responses

Response samples

Content type
application/json
{
  • "active": true,
  • "availablePreference": true,
  • "avatarURL": "string",
  • "chatToken": "string",
  • "editable": true,
  • "email": "string",
  • "id": 0,
  • "name": "string",
  • "pending": true,
  • "registrationDate": null,
  • "surname": "string",
  • "token": "string"
}

Returns a list of user sessions.

query Parameters
limit
integer [ 1 .. 50 ]
Default: 10

max. amount of entries in list

offset
integer
Default: 0

amount of entries to skip

Responses

Response samples

Content type
application/json
{
  • "tokens": [
    ],
  • "total": 0
}

Terminates a specific user session.

path Parameters
id
required
integer

id of user session

Responses

email-change

Return the current change request for the email-address of your personal user account.

query Parameters
userID
integer

optional userID of a standalone-user associated with the new email

Responses

Create a change request for the email-address of your personal user account.

Must include the new email-address and a current mfa-code if mfa is enabled.

Request Body schema: application/json
mfaCode
string

current mfa-code is required if mfa is enabled for the user's account

newEmail
required
string

new email-address for the user's account

userID
integer <int64>

optional userID of a standalone-user associated with the new email

Responses

Request samples

Content type
application/json
{
  • "mfaCode": "string",
  • "newEmail": "string",
  • "userID": 0
}

Abort the current change request for the email-address of your personal user account.

query Parameters
userID
integer

optional userID of a standalone-user associated with the new email

Responses

invitation-config

GetInvitationText

Get the organization's saved invitation text configuration

path Parameters
organizationID
required
integer

organization by it's ID

Responses

Response samples

Content type
application/json
{
  • "organization_id": 0,
  • "text": "string"
}

SetInvitationText

Set the organization's invitation text configuration

path Parameters
organizationID
required
integer

organization by it's ID

Request Body schema: application/json
organization_id
integer <int64>
text
string

Responses

Request samples

Content type
application/json
{
  • "organization_id": 0,
  • "text": "string"
}

mfa

MFAIsActive

Check if the current user has MFA enabled or not

query Parameters
organization
integer

id of the organization. This is required if the user is queried

user
integer

id of the user

Responses

Response samples

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

MFACreate

Creates a new, disabled MFA config for the current user

Responses

Response samples

Content type
application/json
{
  • "image": [
    ],
  • "secret": "string",
  • "url": "string"
}

MFAEnable

Enables a new MFA config for the current user

query Parameters
code
required
string

current MFA code

Responses

MFADisable

Disables the MFA config for the current user

query Parameters
code
required
string

current MFA code

Responses

MFAGenerateBackupCodes

Creates ten new, one-time-use backup codes

Responses

Response samples

Content type
application/json
{
  • "backupCodes": [
    ]
}

user

Deletes the current user irreversibly.

Can only be used after leaving all organizations.

Responses

GetUser

Gets the complete user payload from the passed JWT token

Responses

Response samples

Content type
application/json
{
  • "active": true,
  • "availablePreference": true,
  • "avatarURL": "string",
  • "chatToken": "string",
  • "editable": true,
  • "email": "string",
  • "id": 0,
  • "name": "string",
  • "pending": true,
  • "registrationDate": null,
  • "surname": "string",
  • "token": "string"
}

UpdateUser

Updates the user profile

Request Body schema: application/json

passed user update payload with new user preferences

organizationId
integer <int64>

id of the editing organization not needed if user is editing himself

required
object (User)

User is the comprehensive data structure containing all data of a single user

Responses

Request samples

Content type
application/json
{
  • "organizationId": 0,
  • "user": {
    }
}

InviteUser

Invites an existing or new user to an organization and sends an invitation email to the passed address

Request Body schema: application/json

invitation payload

createNewLabels
boolean

If set to true while importing a user with a label name but not an id, we will automatically create and assign this label. This setting will only work in conjunction with MapLabelsByName.

mapLabelsByName
boolean

If set to true while importing a user with a label name but not an id, we will try to find a label with this name and assign it.

required
object (Organization)

Organization defines an organization payload

required
Array of objects (BulkUserElement) [ items ]

array of user bulk elements

Responses

Request samples

Content type
application/json
{
  • "createNewLabels": true,
  • "mapLabelsByName": true,
  • "organization": {
    },
  • "users": [
    ]
}

Response samples

Content type
application/json
[
  • {
    }
]

InviteOwner

Invite the passed owner to the organization

Request Body schema: application/json

owner invite payload

organizationID
integer <int64>
ownerID
integer <int64>

Responses

Request samples

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

GetOrganizationAvailability

Returns all organization availabilities for the current user

Responses

ResendInvitation

Resends the invitation email of an existing user to an organization

Request Body schema: application/json

invitation payload

createNewLabels
boolean

If set to true while importing a user with a label name but not an id, we will automatically create and assign this label. This setting will only work in conjunction with MapLabelsByName.

mapLabelsByName
boolean

If set to true while importing a user with a label name but not an id, we will try to find a label with this name and assign it.

required
object (Organization)

Organization defines an organization payload

required
Array of objects (BulkUserElement) [ items ]

array of user bulk elements

Responses