Organization API specification (5caf501793bd413a6da97d03c86941de96c6e935)

Download OpenAPI specification:Download

The organization service implements a the organization logic in 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

organization

UpdateOrganization

Update an existing organization with passed organization payload

Request Body schema: application/json

organization payload

object (AvailableUsersCount)

AvailableUsersCount payload

object (AvailableUsersCount)

AvailableUsersCount payload

avatarURL
string

AvatarURL

creationDate
any

CreationDate of the organization

description
string

user defined description

hasChildren
boolean

defines if it's the parent of any other organization

id
integer <int64>

ID of this organization

object (OrganizationLocation)

OrganizationLocation describes the location payload

name
string

user defined name

ownerIDs
Array of integers <int64> [ items <int64 > ]

user id of the organization owner/creator

parentID
integer <int64>

optional: ID of the parent organization

state
string (OrganizationState)

OrganizationState represents the current state of an organization, like trial, active, inactive

tags
Array of strings

Tags are used for internal purposes only

timezone
string

Canonical name of the timezone in the IANA time zone database (e.g. 'Europe/Berlin')

trialEndDate
any

TrialEndDate contains the timestamp when the organization's trial period expires

Responses

Request samples

Content type
application/json
{
  • "availableUsers": {
    },
  • "availableUsersTotal": {
    },
  • "avatarURL": "string",
  • "creationDate": null,
  • "description": "string",
  • "hasChildren": true,
  • "id": 0,
  • "location": {
    },
  • "name": "string",
  • "ownerIDs": [
    ],
  • "parentID": 0,
  • "state": "string",
  • "tags": [
    ],
  • "timezone": "string",
  • "trialEndDate": null
}

Response samples

Content type
application/json
{
  • "availableUsers": {
    },
  • "availableUsersTotal": {
    },
  • "avatarURL": "string",
  • "creationDate": null,
  • "description": "string",
  • "hasChildren": true,
  • "id": 0,
  • "location": {
    },
  • "name": "string",
  • "ownerIDs": [
    ],
  • "parentID": 0,
  • "state": "string",
  • "tags": [
    ],
  • "timezone": "string",
  • "trialEndDate": null
}

CreateOrganization

Create an organization with passed organization payload

Request Body schema: application/json

organization payload

object (AvailableUsersCount)

AvailableUsersCount payload

object (AvailableUsersCount)

AvailableUsersCount payload

avatarURL
string

AvatarURL

creationDate
any

CreationDate of the organization

description
string

user defined description

hasChildren
boolean

defines if it's the parent of any other organization

id
integer <int64>

ID of this organization

object (OrganizationLocation)

OrganizationLocation describes the location payload

name
string

user defined name

ownerIDs
Array of integers <int64> [ items <int64 > ]

user id of the organization owner/creator

parentID
integer <int64>

optional: ID of the parent organization

state
string (OrganizationState)

OrganizationState represents the current state of an organization, like trial, active, inactive

tags
Array of strings

Tags are used for internal purposes only

timezone
string

Canonical name of the timezone in the IANA time zone database (e.g. 'Europe/Berlin')

trialEndDate
any

TrialEndDate contains the timestamp when the organization's trial period expires

Responses

Request samples

Content type
application/json
{
  • "availableUsers": {
    },
  • "availableUsersTotal": {
    },
  • "avatarURL": "string",
  • "creationDate": null,
  • "description": "string",
  • "hasChildren": true,
  • "id": 0,
  • "location": {
    },
  • "name": "string",
  • "ownerIDs": [
    ],
  • "parentID": 0,
  • "state": "string",
  • "tags": [
    ],
  • "timezone": "string",
  • "trialEndDate": null
}

Response samples

Content type
application/json
{
  • "availableUsers": {
    },
  • "availableUsersTotal": {
    },
  • "avatarURL": "string",
  • "creationDate": null,
  • "description": "string",
  • "hasChildren": true,
  • "id": 0,
  • "location": {
    },
  • "name": "string",
  • "ownerIDs": [
    ],
  • "parentID": 0,
  • "state": "string",
  • "tags": [
    ],
  • "timezone": "string",
  • "trialEndDate": null
}

GetOrganization

Get specific organization by its ID

path Parameters
organizationID
required
integer

id of the requested organization

Responses

Response samples

Content type
application/json
{
  • "availableUsers": {
    },
  • "availableUsersTotal": {
    },
  • "avatarURL": "string",
  • "creationDate": null,
  • "description": "string",
  • "hasChildren": true,
  • "id": 0,
  • "location": {
    },
  • "name": "string",
  • "ownerIDs": [
    ],
  • "parentID": 0,
  • "state": "string",
  • "tags": [
    ],
  • "timezone": "string",
  • "trialEndDate": null
}

availability

GetAvailableUsers

Get available users and aggregated available users of the given organization and its child organizations

path Parameters
organizationID
required
integer

id of the requested organization

Responses

Response samples

Content type
application/json
{
  • "countInRoot": {
    },
  • "countTotal": {
    }
}

avatar

UploadAvatar

Uploads an Avatar for the Organization

path Parameters
organizationID
required
integer

id of the organization

Request Body schema: application/json

blob of the image

string

Responses

Request samples

Content type
application/json
"string"

children

GetChildren

Get paginated children of specific organization by its ID

path Parameters
organizationID
required
integer

id of the requested organization

query Parameters
limit
integer

max. amount of entries in list

offset
integer

amount of entries to skip

Responses

Response samples

Content type
application/json
{
  • "childs": [
    ],
  • "path": [
    ],
  • "totalChilds": 0
}

availability-history

GetAvailabilityHistory

Get organization's availability history of the last 14 days

path Parameters
organizationID
required
integer

id of the requested organization

query Parameters
limit
integer

max. amount of entries in list

offset
integer

amount of entries to skip

Responses

Response samples

Content type
application/json
{
  • "end_date": null,
  • "entries": [
    ],
  • "start_date": null
}

location

UpsertOrganizationLocation

Inserts or updates an organizations location

path Parameters
organizationID
required
integer

id of the organization

Request Body schema: application/json

location payload of the organization

address
string
latitude
number <double>
longitude
number <double>

Responses

Request samples

Content type
application/json
{
  • "address": "string",
  • "latitude": 0,
  • "longitude": 0
}

DeleteOrganizationLocation

Deletes an organizations location

path Parameters
organizationID
required
integer

id of the organization

Responses

owner

AddOwnerWithEmail

Update an existing organization by adding a new owner

path Parameters
organizationID
required
integer

id of the organization

Request Body schema: application/json

email address of the user

string

Responses

Request samples

Content type
application/json
"string"

GetOwnerInParentOrganization

Gets the topmost parent organization the given user is the owner of

path Parameters
organizationID
required
integer

id of the organization

userID
required
integer

id of the user

Responses

Response samples

Content type
application/json
{
  • "availableUsers": {
    },
  • "availableUsersTotal": {
    },
  • "avatarURL": "string",
  • "creationDate": null,
  • "description": "string",
  • "hasChildren": true,
  • "id": 0,
  • "location": {
    },
  • "name": "string",
  • "ownerIDs": [
    ],
  • "parentID": 0,
  • "state": "string",
  • "tags": [
    ],
  • "timezone": "string",
  • "trialEndDate": null
}

AddOwner

Update an existing organization by adding a new owner

path Parameters
organizationID
required
integer

id of the organization

userID
required
integer

id of the user

Responses