Skip to content

Action

An Action represents a preventive safety action defined within an office. Each action describes a compliance requirement: a training course, a medical examination, equipment maintenance, PPE provision, or an operational check procedure.

Hierarchy: Project (company) → Office (work location) → Action (compliance requirement).

Actions are the link between compliance requirements and the compliance schedule:

  • ActionSubscription (compliance schedule) records who must do what, linking an action to a person, equipment, work environment, substance, role, work group, office, PPE, or supplier
  • CertificateAction links a certificate to an action, proving the requirement has been fulfilled

Use this API to:

  • Find actions defined in an office (filter by subtenant_id with the office_id)
  • Find actions by type (e.g. action_type: TRAINING for training courses)
  • Create new preventive actions within an office
  • Get the action_id needed to create compliance schedule entries or link certificates

Action types (action_type):

  • TRAINING: training courses — applies to people
  • HEALTH: medical surveillance — applies to people
  • PER: personal protective equipment (PPE) — applies to people
  • CHECK: check procedures and checklists — applies to people, equipment, work environments, substances, roles, work groups, PPE, offices, suppliers
  • MAINTENANCE: maintenance — applies to equipment, work environments, PPE, offices

The action_type field cannot be changed after creation.

Version
2.0.0
OpenAPI version
3.0.0

Security scheme type: oauth2

Flow type: password

Token URL: https://auth.4hse.com/realms/4hse/protocol/openid-connect/token

Security scheme type: apiKey

Query parameter name: access-token

POST
/v2/action/index

Returns a paginated list of actions.

Most useful filters:

  • subtenant_id (office_id) + action_type: find all actions of a type in an office (e.g. all training courses at a construction site)
  • tenant_id (project_id) + action_type: find all actions of a type in the company
  • name: search an action by name

The response includes compliance counts:

  • countSubscribed: total number of subscribed resources
  • countValid: number with a valid certificate
  • countScheduled: number with a scheduled future session
  • countToDo: number without a valid certificate or scheduled session — the compliance gaps to resolve

Parameters for searching actions

object
filter
object
action_id

Unique identifier of the action.

string format: uuid
action_type

Type of preventive action. See Action schema for details.

string
Allowed values: TRAINING MAINTENANCE HEALTH CHECK PER
code

Identifier code for the action.

string
name

Descriptive name of the action.

string
description

Optional detailed description.

string
validity_unit

Unit for the certificate validity period.

string
Allowed values: YEAR MONTH DAY
validity

Number of validity units.

integer
expire_interval

Days before expiration to trigger EXPIRING status.

integer
manager

Action managers (JSON).

string format: json
assignee

Action assignees (JSON).

string format: json
watcher

Action watchers (JSON).

string format: json
subscriber_type

JSON array of allowed subscriber types. If null, determined by action_type.

string format: json
nullable
data

Additional structured data.

string format: json
subtenant_id

The office (work location) where this action is defined.

string format: uuid
tenant_id

The project (company) this action belongs to.

string format: uuid
countSubscribed

Total number of resources subscribed to this action.

integer
countValid

Number of subscribed resources with a currently valid certificate.

integer
countScheduled

Number of subscribed resources with a scheduled future session.

integer
countToDo

Number of subscribed resources without a valid certificate or scheduled session — compliance gaps to resolve.

integer
office_name

Name of the office where this action is defined.

string
project_name

Name of the project (company).

string
project_type

Type of the parent project.

string
owned_active

Whether this action is currently active in its validity period.

boolean
nullable
parent_active

Whether the parent office is currently active.

boolean
nullable
per-page
integer
default: 100 >= 1
page
integer
default: 1 >= 1
sort

Field to sort by. Prefix with minus for descending order (e.g. “-name”).

string
Allowed values: code name action_type office_name project_name
history

If true, includes historicized (no longer active) entries in the results. By default only current entries are returned.

boolean
Example
{
"filter": {
"subtenant_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"action_type": "TRAINING"
},
"per-page": 20,
"page": 1,
"sort": "name"
}

List of actions

Array<object>
object
action_id

Unique identifier of the action.

string format: uuid
action_type

Type of preventive action. See Action schema for details.

string
Allowed values: TRAINING MAINTENANCE HEALTH CHECK PER
code

Identifier code for the action.

string
name

Descriptive name of the action.

string
description

Optional detailed description.

string
validity_unit

Unit for the certificate validity period.

string
Allowed values: YEAR MONTH DAY
validity

Number of validity units.

integer
expire_interval

Days before expiration to trigger EXPIRING status.

integer
manager

Action managers (JSON).

string format: json
assignee

Action assignees (JSON).

string format: json
watcher

Action watchers (JSON).

string format: json
subscriber_type

JSON array of allowed subscriber types. If null, determined by action_type.

string format: json
nullable
data

Additional structured data.

string format: json
subtenant_id

The office (work location) where this action is defined.

string format: uuid
tenant_id

The project (company) this action belongs to.

string format: uuid
countSubscribed

Total number of resources subscribed to this action.

integer
countValid

Number of subscribed resources with a currently valid certificate.

integer
countScheduled

Number of subscribed resources with a scheduled future session.

integer
countToDo

Number of subscribed resources without a valid certificate or scheduled session — compliance gaps to resolve.

integer
office_name

Name of the office where this action is defined.

string
project_name

Name of the project (company).

string
project_type

Type of the parent project.

string
owned_active

Whether this action is currently active in its validity period.

boolean
nullable
parent_active

Whether the parent office is currently active.

boolean
nullable
Example
[
{
"action_id": "c4d5e6f7-a8b9-0c1d-2e3f-4a5b6c7d8e9f",
"action_type": "TRAINING",
"code": "FST-01",
"name": "Fire Safety Training Medium Risk",
"description": "Mandatory fire safety course for medium risk workers",
"validity_unit": "YEAR",
"validity": 5,
"expire_interval": 90,
"subtenant_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"tenant_id": "b5a7d602-3fc9-4e2a-9d1a-6e5b4c8f7a01",
"office_name": "Rome North Site",
"project_name": "Acme Construction Ltd",
"countSubscribed": 25,
"countValid": 18,
"countScheduled": 3,
"countToDo": 4,
"owned_active": true,
"parent_active": true
}
]
X-Pagination-Current-Page
integer

Current page

X-Pagination-Page-Count
integer

Total number of pages

X-Pagination-Per-Page
integer

Number of items per page

X-Pagination-Total-Count
integer

Total number of items

POST
/v2/action/create

Creates a new action within an office.

Requires action_type, name, subtenant_id (office_id), and tenant_id (project_id). The action_id is auto-generated if not provided.

Creating an action does not automatically create compliance schedule entries. To assign people, equipment, or other resources to this action, create ActionSubscription entries separately.

The validity + validity_unit fields define how long certificates linked to this action remain valid (e.g. validity: 5, validity_unit: YEAR = certificates expire 5 years after issue).

The subscriber_type field restricts which resource types can be subscribed to this action. If not specified, the allowed types are determined by the action_type.

Action object to be created

object
action_id

Unique identifier of the action. Auto-generated if not provided on creation. Compliance schedule entries (ActionSubscription) and certificate links (CertificateAction) reference the action via this field.

string format: uuid
action_type
required

Type of preventive action:

  • TRAINING: training courses — applies to people
  • HEALTH: medical surveillance — applies to people
  • PER: personal protective equipment — applies to people
  • CHECK: check procedures — applies to people, equipment, work environments, substances, roles, work groups, PPE, offices, suppliers
  • MAINTENANCE: maintenance — applies to equipment, work environments, PPE, offices Cannot be changed after creation.
string
Allowed values: TRAINING MAINTENANCE HEALTH CHECK PER
code

Identifier code for the action.

string
<= 50 characters
name
required

Descriptive name of the action.

string
<= 255 characters
description

Optional detailed description.

string
validity_unit

Unit for the certificate validity period. Used together with validity.

string
Allowed values: YEAR MONTH DAY
validity

Number of validity units. Together with validity_unit, defines how long certificates linked to this action remain valid (e.g. validity 5 + validity_unit YEAR = 5 years).

integer
expire_interval

Number of days before expiration to trigger the EXPIRING status in the compliance schedule. Subscriptions transition from VALID to EXPIRING this many days before the certificate expires.

integer
manager

Action managers (JSON).

string format: json
assignee

Action assignees (JSON).

string format: json
watcher

Action watchers (JSON).

string format: json
subscriber_type

JSON array of resource types that can be subscribed to this action. Possible values: PERSON, ROLE, WORK_GROUP, WORK_ENVIRONMENT, SUBSTANCE, EQUIPMENT, OFFICE, PPE, UNIT. If null, the allowed types are determined by the action_type.

string format: json
nullable
data

Additional structured data in JSON format.

string format: json
subtenant_id
required

The office (work location) where this action is defined. Pass the office_id obtained from the Office API.

string format: uuid
tenant_id
required

The project (company) this action belongs to. Pass the project_id obtained from the Project API.

string format: uuid
Example
{
"action_type": "TRAINING",
"code": "FST-01",
"name": "Fire Safety Training Medium Risk",
"description": "Mandatory fire safety course for medium risk workers",
"validity_unit": "YEAR",
"validity": 5,
"expire_interval": 90,
"subtenant_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"tenant_id": "b5a7d602-3fc9-4e2a-9d1a-6e5b4c8f7a01"
}

Action created successfully

object
action_id

Unique identifier of the action. Auto-generated if not provided on creation. Compliance schedule entries (ActionSubscription) and certificate links (CertificateAction) reference the action via this field.

string format: uuid
action_type
required

Type of preventive action:

  • TRAINING: training courses — applies to people
  • HEALTH: medical surveillance — applies to people
  • PER: personal protective equipment — applies to people
  • CHECK: check procedures — applies to people, equipment, work environments, substances, roles, work groups, PPE, offices, suppliers
  • MAINTENANCE: maintenance — applies to equipment, work environments, PPE, offices Cannot be changed after creation.
string
Allowed values: TRAINING MAINTENANCE HEALTH CHECK PER
code

Identifier code for the action.

string
<= 50 characters
name
required

Descriptive name of the action.

string
<= 255 characters
description

Optional detailed description.

string
validity_unit

Unit for the certificate validity period. Used together with validity.

string
Allowed values: YEAR MONTH DAY
validity

Number of validity units. Together with validity_unit, defines how long certificates linked to this action remain valid (e.g. validity 5 + validity_unit YEAR = 5 years).

integer
expire_interval

Number of days before expiration to trigger the EXPIRING status in the compliance schedule. Subscriptions transition from VALID to EXPIRING this many days before the certificate expires.

integer
manager

Action managers (JSON).

string format: json
assignee

Action assignees (JSON).

string format: json
watcher

Action watchers (JSON).

string format: json
subscriber_type

JSON array of resource types that can be subscribed to this action. Possible values: PERSON, ROLE, WORK_GROUP, WORK_ENVIRONMENT, SUBSTANCE, EQUIPMENT, OFFICE, PPE, UNIT. If null, the allowed types are determined by the action_type.

string format: json
nullable
data

Additional structured data in JSON format.

string format: json
subtenant_id
required

The office (work location) where this action is defined. Pass the office_id obtained from the Office API.

string format: uuid
tenant_id
required

The project (company) this action belongs to. Pass the project_id obtained from the Project API.

string format: uuid
Example
{
"action_id": "c4d5e6f7-a8b9-0c1d-2e3f-4a5b6c7d8e9f",
"action_type": "TRAINING",
"code": "FST-01",
"name": "Fire Safety Training Medium Risk",
"validity_unit": "YEAR",
"validity": 5,
"expire_interval": 90,
"subtenant_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"tenant_id": "b5a7d602-3fc9-4e2a-9d1a-6e5b4c8f7a01"
}
GET
/v2/action/view/{id}

Retrieves a single action by its ID.

id
required
string format: uuid

The action_id to retrieve.

Action found

object
action_id

Unique identifier of the action.

string format: uuid
action_type

Type of preventive action. See Action schema for details.

string
Allowed values: TRAINING MAINTENANCE HEALTH CHECK PER
code

Identifier code for the action.

string
name

Descriptive name of the action.

string
description

Optional detailed description.

string
validity_unit

Unit for the certificate validity period.

string
Allowed values: YEAR MONTH DAY
validity

Number of validity units.

integer
expire_interval

Days before expiration to trigger EXPIRING status.

integer
manager

Action managers (JSON).

string format: json
assignee

Action assignees (JSON).

string format: json
watcher

Action watchers (JSON).

string format: json
subscriber_type

JSON array of allowed subscriber types. If null, determined by action_type.

string format: json
nullable
data

Additional structured data.

string format: json
subtenant_id

The office (work location) where this action is defined.

string format: uuid
tenant_id

The project (company) this action belongs to.

string format: uuid
countSubscribed

Total number of resources subscribed to this action.

integer
countValid

Number of subscribed resources with a currently valid certificate.

integer
countScheduled

Number of subscribed resources with a scheduled future session.

integer
countToDo

Number of subscribed resources without a valid certificate or scheduled session — compliance gaps to resolve.

integer
office_name

Name of the office where this action is defined.

string
project_name

Name of the project (company).

string
project_type

Type of the parent project.

string
owned_active

Whether this action is currently active in its validity period.

boolean
nullable
parent_active

Whether the parent office is currently active.

boolean
nullable
Example
{
"action_id": "c4d5e6f7-a8b9-0c1d-2e3f-4a5b6c7d8e9f",
"action_type": "TRAINING",
"code": "FST-01",
"name": "Fire Safety Training Medium Risk",
"validity_unit": "YEAR",
"validity": 5,
"expire_interval": 90,
"subtenant_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"tenant_id": "b5a7d602-3fc9-4e2a-9d1a-6e5b4c8f7a01",
"office_name": "Rome North Site",
"project_name": "Acme Construction Ltd",
"countSubscribed": 25,
"countValid": 18,
"countScheduled": 3,
"countToDo": 4,
"owned_active": true,
"parent_active": true
}

Action not found

PUT
/v2/action/update/{id}

Updates an existing action.

The action_type field cannot be changed after creation.

id
required
string format: uuid

The action_id to update.

Action fields to update

object
action_id

Unique identifier of the action. Auto-generated if not provided on creation. Compliance schedule entries (ActionSubscription) and certificate links (CertificateAction) reference the action via this field.

string format: uuid
action_type
required

Type of preventive action:

  • TRAINING: training courses — applies to people
  • HEALTH: medical surveillance — applies to people
  • PER: personal protective equipment — applies to people
  • CHECK: check procedures — applies to people, equipment, work environments, substances, roles, work groups, PPE, offices, suppliers
  • MAINTENANCE: maintenance — applies to equipment, work environments, PPE, offices Cannot be changed after creation.
string
Allowed values: TRAINING MAINTENANCE HEALTH CHECK PER
code

Identifier code for the action.

string
<= 50 characters
name
required

Descriptive name of the action.

string
<= 255 characters
description

Optional detailed description.

string
validity_unit

Unit for the certificate validity period. Used together with validity.

string
Allowed values: YEAR MONTH DAY
validity

Number of validity units. Together with validity_unit, defines how long certificates linked to this action remain valid (e.g. validity 5 + validity_unit YEAR = 5 years).

integer
expire_interval

Number of days before expiration to trigger the EXPIRING status in the compliance schedule. Subscriptions transition from VALID to EXPIRING this many days before the certificate expires.

integer
manager

Action managers (JSON).

string format: json
assignee

Action assignees (JSON).

string format: json
watcher

Action watchers (JSON).

string format: json
subscriber_type

JSON array of resource types that can be subscribed to this action. Possible values: PERSON, ROLE, WORK_GROUP, WORK_ENVIRONMENT, SUBSTANCE, EQUIPMENT, OFFICE, PPE, UNIT. If null, the allowed types are determined by the action_type.

string format: json
nullable
data

Additional structured data in JSON format.

string format: json
subtenant_id
required

The office (work location) where this action is defined. Pass the office_id obtained from the Office API.

string format: uuid
tenant_id
required

The project (company) this action belongs to. Pass the project_id obtained from the Project API.

string format: uuid
Example
{
"name": "Fire Safety Training High Risk",
"validity": 3
}

Action updated successfully

object
action_id

Unique identifier of the action. Auto-generated if not provided on creation. Compliance schedule entries (ActionSubscription) and certificate links (CertificateAction) reference the action via this field.

string format: uuid
action_type
required

Type of preventive action:

  • TRAINING: training courses — applies to people
  • HEALTH: medical surveillance — applies to people
  • PER: personal protective equipment — applies to people
  • CHECK: check procedures — applies to people, equipment, work environments, substances, roles, work groups, PPE, offices, suppliers
  • MAINTENANCE: maintenance — applies to equipment, work environments, PPE, offices Cannot be changed after creation.
string
Allowed values: TRAINING MAINTENANCE HEALTH CHECK PER
code

Identifier code for the action.

string
<= 50 characters
name
required

Descriptive name of the action.

string
<= 255 characters
description

Optional detailed description.

string
validity_unit

Unit for the certificate validity period. Used together with validity.

string
Allowed values: YEAR MONTH DAY
validity

Number of validity units. Together with validity_unit, defines how long certificates linked to this action remain valid (e.g. validity 5 + validity_unit YEAR = 5 years).

integer
expire_interval

Number of days before expiration to trigger the EXPIRING status in the compliance schedule. Subscriptions transition from VALID to EXPIRING this many days before the certificate expires.

integer
manager

Action managers (JSON).

string format: json
assignee

Action assignees (JSON).

string format: json
watcher

Action watchers (JSON).

string format: json
subscriber_type

JSON array of resource types that can be subscribed to this action. Possible values: PERSON, ROLE, WORK_GROUP, WORK_ENVIRONMENT, SUBSTANCE, EQUIPMENT, OFFICE, PPE, UNIT. If null, the allowed types are determined by the action_type.

string format: json
nullable
data

Additional structured data in JSON format.

string format: json
subtenant_id
required

The office (work location) where this action is defined. Pass the office_id obtained from the Office API.

string format: uuid
tenant_id
required

The project (company) this action belongs to. Pass the project_id obtained from the Project API.

string format: uuid
Example
{
"action_id": "c4d5e6f7-a8b9-0c1d-2e3f-4a5b6c7d8e9f",
"action_type": "TRAINING",
"name": "Fire Safety Training High Risk",
"validity": 3,
"validity_unit": "YEAR"
}

Action not found

DELETE
/v2/action/delete/{id}

Deletes an action.

If force=false (default), the response lists child entities (subscriptions, sessions, linked certificates). If force=true, the action and all related entities are deleted.

id
required
string format: uuid

The action_id to delete.

force
boolean

If true, deletes the action and all child entities. If false, returns a preview of affected entities.

Action deleted successfully

Preview of entities that would be deleted (returned when force=false)