E-Mail API specification (9e074e34355a5facbece3910d74e59e0e26c61fd)

Download OpenAPI specification:Download

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

email

List

Returns all configured alarm-notification email addresses of an user

query Parameters
owner_id
required
integer

ID of an user

organization_id
integer

requesting organization, not required if user accesses his own resources

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create

Creates an email configuration

query Parameters
organization_id
integer

requesting organization, not required if user accesses his own resources

Request Body schema: application/json

email configuration payload

active
boolean

defines, if this email is active for alarm notifications

email
string

email address

id
integer <int64>

id of this email

name
string

user defined name for this address (e.g. private)

ownerID
integer <int64>

assinged user id for this email

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "email": "string",
  • "id": 0,
  • "name": "string",
  • "ownerID": 0
}

Response samples

Content type
application/json
{
  • "active": true,
  • "email": "string",
  • "id": 0,
  • "name": "string",
  • "ownerID": 0
}

Get

Creates an email configuration

path Parameters
emailID
required
integer

ID of an email 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,
  • "email": "string",
  • "id": 0,
  • "name": "string",
  • "ownerID": 0
}

Update

Updates an email configuration

path Parameters
emailID
required
integer

ID of an email configuration

query Parameters
organization_id
integer

requesting organization, not required if user accesses his own resources

Request Body schema: application/json

email configuration payload

active
boolean

defines, if this email is active for alarm notifications

email
string

email address

id
integer <int64>

id of this email

name
string

user defined name for this address (e.g. private)

ownerID
integer <int64>

assinged user id for this email

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "email": "string",
  • "id": 0,
  • "name": "string",
  • "ownerID": 0
}

Response samples

Content type
application/json
{
  • "active": true,
  • "email": "string",
  • "id": 0,
  • "name": "string",
  • "ownerID": 0
}

Delete

Deletes an email configuration

path Parameters
emailID
required
integer

ID of an email 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"
}

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
}

emails

AnyActive

Check if any email 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
}

email-settings

GetSettings

Gets the configured organization email settings

path Parameters
organizationID
required
integer

Responses

Response samples

Content type
application/json
{
  • "backgroundColor": "string",
  • "footerText": "string"
}

UpsertSettings

Creates or updates the email settings for the passed organization

path Parameters
organizationID
required
integer
Request Body schema: application/json
backgroundColor
string
footerText
string

Responses

Request samples

Content type
application/json
{
  • "backgroundColor": "string",
  • "footerText": "string"
}