Organization API specification (1.15.0)

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
availableUsers
object (AvailableUsers)

AvailableUsers payload

availableUsersTotal
object (AvailableUsers)

AvailableUsers payload

description
string

user defined description

hasChildren
boolean

defines if it's the parent of any other organization

id
integer <int64>

ID of this organization

isDemo
boolean

is true, when there is no billing configuration for this organization

name
string

user defined name

ownerIDs
Array of integer <int64>

user id of the organization owner/creator

parentID
integer <int64>

optional: ID of the parent organization

Responses

200

updated organization payload

400

passed organization payload is missing or in a wrong format

500

database error

put /organization
https://app.groupalarm.com/api/v1/organization

Request samples

application/json
Copy
Expand all Collapse all
{
  • "availableUsers":
    {
    },
  • "availableUsersTotal":
    {
    },
  • "description": "string",
  • "hasChildren": true,
  • "id": 0,
  • "isDemo": true,
  • "name": "string",
  • "ownerIDs":
    [
    ],
  • "parentID": 0
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "availableUsers":
    {
    },
  • "availableUsersTotal":
    {
    },
  • "description": "string",
  • "hasChildren": true,
  • "id": 0,
  • "isDemo": true,
  • "name": "string",
  • "ownerIDs":
    [
    ],
  • "parentID": 0
}

CreateOrganization

Create an organization with passed organization payload

Request Body schema: application/json
availableUsers
object (AvailableUsers)

AvailableUsers payload

availableUsersTotal
object (AvailableUsers)

AvailableUsers payload

description
string

user defined description

hasChildren
boolean

defines if it's the parent of any other organization

id
integer <int64>

ID of this organization

isDemo
boolean

is true, when there is no billing configuration for this organization

name
string

user defined name

ownerIDs
Array of integer <int64>

user id of the organization owner/creator

parentID
integer <int64>

optional: ID of the parent organization

Responses

201

created organization payload

400

passed organization payload is missing or in a wrong format

500

database error

post /organization
https://app.groupalarm.com/api/v1/organization

Request samples

application/json
Copy
Expand all Collapse all
{
  • "availableUsers":
    {
    },
  • "availableUsersTotal":
    {
    },
  • "description": "string",
  • "hasChildren": true,
  • "id": 0,
  • "isDemo": true,
  • "name": "string",
  • "ownerIDs":
    [
    ],
  • "parentID": 0
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "availableUsers":
    {
    },
  • "availableUsersTotal":
    {
    },
  • "description": "string",
  • "hasChildren": true,
  • "id": 0,
  • "isDemo": true,
  • "name": "string",
  • "ownerIDs":
    [
    ],
  • "parentID": 0
}

GetOrganization

Get specific organization by its ID

path Parameters
organizationID
required
int64

id of the requested organization

Responses

200

requested organization payload

400

passed organization id is missing or in a wrong format

500

database error

get /organization/{organizationID}
https://app.groupalarm.com/api/v1/organization/{organizationID}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "availableUsers":
    {
    },
  • "availableUsersTotal":
    {
    },
  • "description": "string",
  • "hasChildren": true,
  • "id": 0,
  • "isDemo": true,
  • "name": "string",
  • "ownerIDs":
    [
    ],
  • "parentID": 0
}

children

GetChildren

Get paginated children of specific organization by its ID

path Parameters
organizationID
required
int64

id of the requested organization

query Parameters
limit
int64

max. amount of entries in list

offset
int64

amount of entries to skip

Responses

200

Paginated child organizations for the fiven ID

500

database error

get /organization/{organizationID}/children
https://app.groupalarm.com/api/v1/organization/{organizationID}/children

Response samples

application/json
Copy
Expand all Collapse all
{
  • "childs":
    [
    ],
  • "path":
    [
    ],
  • "totalChilds": 0
}

owner

GetOwnerInParentOrganization

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

path Parameters
organizationID
required
int64

id of the organization

userID
required
int64

id of the user

Responses

200

organization found

400

data is invalid

500

database error

get /organization/{organizationID}/owner/{userID}
https://app.groupalarm.com/api/v1/organization/{organizationID}/owner/{userID}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "availableUsers":
    {
    },
  • "availableUsersTotal":
    {
    },
  • "description": "string",
  • "hasChildren": true,
  • "id": 0,
  • "isDemo": true,
  • "name": "string",
  • "ownerIDs":
    [
    ],
  • "parentID": 0
}

AddOwner

Update an existing organization by adding a new owner

path Parameters
organizationID
required
int64

id of the organization

userID
required
int64

id of the user

Responses

200

updated organization owners

400

data is invalid

403

user is not allowed to update owners

500

database error

put /organization/{organizationID}/owner/{userID}
https://app.groupalarm.com/api/v1/organization/{organizationID}/owner/{userID}

RemoveOwner

Update an existing organization by removing an existing owner

path Parameters
organizationID
required
int64

id of the organization

userID
required
int64

id of the user

Responses

200

updated organization owners

400

data is invalid

403

user is not allowed to update owners

500

database error

delete /organization/{organizationID}/owner/{userID}
https://app.groupalarm.com/api/v1/organization/{organizationID}/owner/{userID}

organizationsByOwner

GetOwnedOrganizations

Get all organizations for user in JWT token where the user is the owner of

Responses

200

All organizations for logged in user

500

database error

get /organizations/owner
https://app.groupalarm.com/api/v1/organizations/owner

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

organizations

GetPaginatedOrganizations

Get paginated organizations for user with the passed JWT token

query Parameters
limit
int64

max. amount of entries in list

offset
int64

amount of entries to skip

Responses

200

Paginated organizations for logged in user

500

database error

get /organizations/paginated
https://app.groupalarm.com/api/v1/organizations/paginated

Response samples

application/json
Copy
Expand all Collapse all
{
  • "organizations":
    [
    ],
  • "totalOrganizations": 0
}