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_idwith theoffice_id) - Find actions by type (e.g.
action_type: TRAININGfor training courses) - Create new preventive actions within an office
- Get the
action_idneeded to create compliance schedule entries or link certificates
Action types (action_type):
TRAINING: training courses — applies to peopleHEALTH: medical surveillance — applies to peoplePER: personal protective equipment (PPE) — applies to peopleCHECK: check procedures and checklists — applies to people, equipment, work environments, substances, roles, work groups, PPE, offices, suppliersMAINTENANCE: 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
Authentication
Section titled “ Authentication ”OAuth2
Section titled “OAuth2 ”Security scheme type: oauth2
Flow type: password
Token URL: https://auth.4hse.com/realms/4hse/protocol/openid-connect/token
AccessToken
Section titled “AccessToken ”Security scheme type: apiKey
Query parameter name: access-token
Operations
Section titled “Operations” 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 companyname: search an action by name
The response includes compliance counts:
countSubscribed: total number of subscribed resourcescountValid: number with a valid certificatecountScheduled: number with a scheduled future sessioncountToDo: number without a valid certificate or scheduled session — the compliance gaps to resolve
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”Parameters for searching actions
object
object
Unique identifier of the action.
Type of preventive action. See Action schema for details.
Identifier code for the action.
Descriptive name of the action.
Optional detailed description.
Unit for the certificate validity period.
Number of validity units.
Days before expiration to trigger EXPIRING status.
Action managers (JSON).
Action assignees (JSON).
Action watchers (JSON).
JSON array of allowed subscriber types. If null, determined by action_type.
Additional structured data.
The office (work location) where this action is defined.
The project (company) this action belongs to.
Total number of resources subscribed to this action.
Number of subscribed resources with a currently valid certificate.
Number of subscribed resources with a scheduled future session.
Number of subscribed resources without a valid certificate or scheduled session — compliance gaps to resolve.
Name of the office where this action is defined.
Name of the project (company).
Type of the parent project.
Whether this action is currently active in its validity period.
Whether the parent office is currently active.
Field to sort by. Prefix with minus for descending order (e.g. “-name”).
If true, includes historicized (no longer active) entries in the results. By default only current entries are returned.
Example
{ "filter": { "subtenant_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "action_type": "TRAINING" }, "per-page": 20, "page": 1, "sort": "name"}Responses
Section titled “ Responses ”List of actions
object
Unique identifier of the action.
Type of preventive action. See Action schema for details.
Identifier code for the action.
Descriptive name of the action.
Optional detailed description.
Unit for the certificate validity period.
Number of validity units.
Days before expiration to trigger EXPIRING status.
Action managers (JSON).
Action assignees (JSON).
Action watchers (JSON).
JSON array of allowed subscriber types. If null, determined by action_type.
Additional structured data.
The office (work location) where this action is defined.
The project (company) this action belongs to.
Total number of resources subscribed to this action.
Number of subscribed resources with a currently valid certificate.
Number of subscribed resources with a scheduled future session.
Number of subscribed resources without a valid certificate or scheduled session — compliance gaps to resolve.
Name of the office where this action is defined.
Name of the project (company).
Type of the parent project.
Whether this action is currently active in its validity period.
Whether the parent office is currently active.
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 }]Headers
Section titled “Headers ”Current page
Total number of pages
Number of items per page
Total number of items
create
Section titled “create” 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.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Action object to be created
object
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.
Type of preventive action:
TRAINING: training courses — applies to peopleHEALTH: medical surveillance — applies to peoplePER: personal protective equipment — applies to peopleCHECK: check procedures — applies to people, equipment, work environments, substances, roles, work groups, PPE, offices, suppliersMAINTENANCE: maintenance — applies to equipment, work environments, PPE, offices Cannot be changed after creation.
Identifier code for the action.
Descriptive name of the action.
Optional detailed description.
Unit for the certificate validity period. Used together with 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).
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.
Action managers (JSON).
Action assignees (JSON).
Action watchers (JSON).
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.
Additional structured data in JSON format.
The office (work location) where this action is defined. Pass the office_id obtained from the Office API.
The project (company) this action belongs to. Pass the project_id obtained from the Project API.
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"}Responses
Section titled “ Responses ”Action created successfully
object
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.
Type of preventive action:
TRAINING: training courses — applies to peopleHEALTH: medical surveillance — applies to peoplePER: personal protective equipment — applies to peopleCHECK: check procedures — applies to people, equipment, work environments, substances, roles, work groups, PPE, offices, suppliersMAINTENANCE: maintenance — applies to equipment, work environments, PPE, offices Cannot be changed after creation.
Identifier code for the action.
Descriptive name of the action.
Optional detailed description.
Unit for the certificate validity period. Used together with 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).
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.
Action managers (JSON).
Action assignees (JSON).
Action watchers (JSON).
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.
Additional structured data in JSON format.
The office (work location) where this action is defined. Pass the office_id obtained from the Office API.
The project (company) this action belongs to. Pass the project_id obtained from the Project API.
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.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The action_id to retrieve.
Responses
Section titled “ Responses ”Action found
object
Unique identifier of the action.
Type of preventive action. See Action schema for details.
Identifier code for the action.
Descriptive name of the action.
Optional detailed description.
Unit for the certificate validity period.
Number of validity units.
Days before expiration to trigger EXPIRING status.
Action managers (JSON).
Action assignees (JSON).
Action watchers (JSON).
JSON array of allowed subscriber types. If null, determined by action_type.
Additional structured data.
The office (work location) where this action is defined.
The project (company) this action belongs to.
Total number of resources subscribed to this action.
Number of subscribed resources with a currently valid certificate.
Number of subscribed resources with a scheduled future session.
Number of subscribed resources without a valid certificate or scheduled session — compliance gaps to resolve.
Name of the office where this action is defined.
Name of the project (company).
Type of the parent project.
Whether this action is currently active in its validity period.
Whether the parent office is currently active.
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
update
Section titled “update” PUT /v2/action/update/{id}
Updates an existing action.
The action_type field cannot be changed after creation.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The action_id to update.
Request Body required
Section titled “Request Body required ”Action fields to update
object
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.
Type of preventive action:
TRAINING: training courses — applies to peopleHEALTH: medical surveillance — applies to peoplePER: personal protective equipment — applies to peopleCHECK: check procedures — applies to people, equipment, work environments, substances, roles, work groups, PPE, offices, suppliersMAINTENANCE: maintenance — applies to equipment, work environments, PPE, offices Cannot be changed after creation.
Identifier code for the action.
Descriptive name of the action.
Optional detailed description.
Unit for the certificate validity period. Used together with 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).
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.
Action managers (JSON).
Action assignees (JSON).
Action watchers (JSON).
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.
Additional structured data in JSON format.
The office (work location) where this action is defined. Pass the office_id obtained from the Office API.
The project (company) this action belongs to. Pass the project_id obtained from the Project API.
Example
{ "name": "Fire Safety Training High Risk", "validity": 3}Responses
Section titled “ Responses ”Action updated successfully
object
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.
Type of preventive action:
TRAINING: training courses — applies to peopleHEALTH: medical surveillance — applies to peoplePER: personal protective equipment — applies to peopleCHECK: check procedures — applies to people, equipment, work environments, substances, roles, work groups, PPE, offices, suppliersMAINTENANCE: maintenance — applies to equipment, work environments, PPE, offices Cannot be changed after creation.
Identifier code for the action.
Descriptive name of the action.
Optional detailed description.
Unit for the certificate validity period. Used together with 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).
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.
Action managers (JSON).
Action assignees (JSON).
Action watchers (JSON).
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.
Additional structured data in JSON format.
The office (work location) where this action is defined. Pass the office_id obtained from the Office API.
The project (company) this action belongs to. Pass the project_id obtained from the Project API.
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
Section titled “delete” 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.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”The action_id to delete.
Query Parameters
Section titled “Query Parameters ”If true, deletes the action and all child entities. If false, returns a preview of affected entities.
Responses
Section titled “ Responses ”Action deleted successfully
Preview of entities that would be deleted (returned when force=false)