Action
Represents preventive actions designed to reduce or eliminate workplace risks, protecting workers’ health and safety. Each action falls under a specific type:
training
: safety training and awareness courseshealth
: medical surveillance and occupational health checksmaintenance
: equipment or infrastructure maintenanceper
: personal equipment requirements (PPE)check
: operational procedures and safety checklists
- 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
Flow type: refreshToken
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 and filterable list of actions. Use POST to allow complex filters via JSON payload.
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”Parameters for searching actions
object
object
Example
{ "filter": { "name": "Safety Training", "action_type": "TRAINING" }, "per-page": 20, "page": 1, "sort": "name"}
Responses
Section titled “ Responses ”List of actions
object
Additional data
Example
{ "action_id": "act-1", "action_type": "TRAINING", "code": "A001", "name": "Safety Training", "description": "Mandatory safety course", "validity_unit": "YEAR", "validity": 1, "subtenant_id": "sub-1", "tenant_id": "ten-1"}
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
Create a new action by providing the required details.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Action object to be created
object
Example
{ "action_type": "TRAINING", "code": "A003", "name": "New Action", "description": "Description", "validity_unit": "MONTH", "validity": 6, "subtenant_id": "sub-3", "tenant_id": "ten-3"}
Responses
Section titled “ Responses ”Action created successfully
object
Example
{ "action_id": "act-3", "action_type": "TRAINING", "code": "A003", "name": "New Action", "description": "Description", "validity_unit": "MONTH", "validity": 6, "subtenant_id": "sub-3", "tenant_id": "ten-3"}
GET /v2/action/view/{id}
Retrieve an action by its unique ID.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”ID of the action to retrieve
Responses
Section titled “ Responses ”Action found
object
Additional data
Example
{ "action_id": "act-1", "action_type": "TRAINING", "code": "A001", "name": "Safety Training", "description": "Mandatory safety course", "validity_unit": "YEAR", "validity": 1, "subtenant_id": "sub-1", "tenant_id": "ten-1"}
Action not found
delete
Section titled “delete” DELETE /v2/action/delete/{id}
Delete an action by its unique ID. If force=true, all related entities will also be deleted.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”ID of the action to delete
Query Parameters
Section titled “Query Parameters ”Force the deletion of the entity and all related entities
Responses
Section titled “ Responses ”Action deleted successfully
If force=false, the operation is interrupted and the list of connected entities that will be deleted in case of confirmation (force=true) is returned
update
Section titled “update” PUT /v2/action/update/{id}
Update an existing action by its unique ID.
Authorizations
Section titled “Authorizations ”Path Parameters
Section titled “Path Parameters ”ID of the action to update
Request Body required
Section titled “Request Body required ”Action object with updated data
object
Example
{ "name": "Updated Training", "validity_unit": "YEAR", "validity": 2}
Responses
Section titled “ Responses ”Action updated successfully
object
Example
{ "action_id": "act-1", "name": "Updated Training", "validity_unit": "YEAR", "validity": 2}
Action not found