Journal API specification (2.14.0)

Download OpenAPI specification:Download

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

categories

ListCategories

Returns created categories

query Parameters
organization_id
required
int64

Responses

200

all created categories

400

no or invalid organization_id in request

401

unauthorized user

500

unexpected database error

get /categories
https://app.groupalarm.com/api/v1/journal/categories

Response samples

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

CreateCategory

Creates a new category

Request Body schema: application/json
description
required
string
id
integer <int64>
name
required
string
organizationId
required
integer <int64>

Responses

201

category created

400

no or invalid category in request

401

unauthorized user

500

unexpected database error

post /categories
https://app.groupalarm.com/api/v1/journal/categories

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "description": "string",
  • "id": 0,
  • "name": "string",
  • "organizationId": 0
}

GetCategory

Returns requested category

path Parameters
categoryID
required
int64

Responses

200

requested categories

400

no or invalid categoryID in request

401

unauthorized user

404

category not found

500

unexpected database error

get /categories/{categoryID}
https://app.groupalarm.com/api/v1/journal/categories/{categoryID}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "description": "string",
  • "id": 0,
  • "name": "string",
  • "organizationId": 0
}

UpdateCategory

Updates an existing category

path Parameters
categoryID
required
int64
Request Body schema: application/json
description
required
string
id
integer <int64>
name
required
string
organizationId
required
integer <int64>

Responses

200

category updated

400

no or invalid category in request

401

unauthorized user

500

unexpected database error

put /categories/{categoryID}
https://app.groupalarm.com/api/v1/journal/categories/{categoryID}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "description": "string",
  • "id": 0,
  • "name": "string",
  • "organizationId": 0
}

DeleteCategory

Deletes an existing category

path Parameters
categoryID
required
int64

Responses

200

category updated

400

no or invalid category in request

401

unauthorized user

403

category already used, can not delete

500

unexpected database error

delete /categories/{categoryID}
https://app.groupalarm.com/api/v1/journal/categories/{categoryID}

journals

GetJournal

Returns the requested journal including all entries with pagination

query Parameters
organization_id
int64

add this parameter to query the journal of the given organization

event_id
int64

add this parameter to query the journal of the given event

limit
int64 [ 1 .. 50 ]
Default: 10

limits paginated output to passed amount

offset
int64 >= 0
Default: 0

defines the offset for pagination

Responses

200

requested journal

400

no or invalid organization_id / event_id in request

401

unauthorized user

500

unexpected database error

get /journals
https://app.groupalarm.com/api/v1/journal/journals

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "closed": true,
  • "entryList":
    {
    },
  • "eventId": 0,
  • "id": 0,
  • "locked":
    {
    },
  • "organizationId": 0
}

LockJournal

Locks an existing journal

path Parameters
journalID
required
int64

Responses

200

journal locked

400

no or invalid journalID in request

401

unauthorized user

403

journal already locked or closed

500

unexpected database error

put /journals/{journalID}/lock
https://app.groupalarm.com/api/v1/journal/journals/{journalID}/lock

UnlockJournal

Unlocks an existing journal

path Parameters
journalID
required
int64

Responses

200

journal unlocked

400

no or invalid journalID in request

401

unauthorized user

403

journal not locked or locked by other user or closed

500

unexpected database error

delete /journals/{journalID}/lock
https://app.groupalarm.com/api/v1/journal/journals/{journalID}/lock

entries

CreateEntry

Creates a new entry in an existing journal

path Parameters
journalID
required
int64
Request Body schema: application/json
attachment
string
categoryId
required
integer <int64>
customTime
string <date-time>
journalId
required
integer <int64>
location
string
text
required
string

Responses

200

entry created

400

no or invalid journalID / entry in request

401

unauthorized user

403

journal not locked or locked by other user

500

unexpected database error

post /journals/{journalID}/entries
https://app.groupalarm.com/api/v1/journal/journals/{journalID}/entries

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "attachment": "string",
  • "categoryId": 0,
  • "customTime": "2020-07-03T15:44:56Z",
  • "journalId": 0,
  • "location": "string",
  • "text": "string"
}

DeleteEntry

Deletes an existing journal entry

path Parameters
journalID
required
int64
entryID
required
int64

Responses

200

entry deleted

400

no or invalid journalID / entryID in request

401

unauthorized user

403

journal not locked or locked by other user

500

unexpected database error

delete /journals/{journalID}/entries/{entryID}
https://app.groupalarm.com/api/v1/journal/journals/{journalID}/entries/{entryID}