Action
Questi contenuti non sono ancora disponibili nella tua lingua.
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
Sezione intitolata “ Authentication ”OAuth2
Sezione intitolata “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
Sezione intitolata “AccessToken ”Security scheme type: apiKey
Query parameter name: access-token
Operations
Sezione intitolata “Operations” POST /v2/action/index
Returns a paginated and filterable list of actions. Use POST to allow complex filters via JSON payload.
Authorizations
Sezione intitolata “Authorizations ”Request Body
Sezione intitolata “Request Body ”Parameters for searching actions
object
object
Example
{ "filter": { "name": "Safety Training", "action_type": "TRAINING" }, "per-page": 20, "page": 1, "sort": "name"}
Responses
Sezione intitolata “ 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
Sezione intitolata “Headers ”Current page
Total number of pages
Number of items per page
Total number of items
POST /v2/action/create
Create a new action by providing the required details.
Authorizations
Sezione intitolata “Authorizations ”Request Body required
Sezione intitolata “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
Sezione intitolata “ 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
Sezione intitolata “Authorizations ”Path Parameters
Sezione intitolata “Path Parameters ”ID of the action to retrieve
Responses
Sezione intitolata “ 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 /v2/action/delete/{id}
Delete an action by its unique ID. If force=true, all related entities will also be deleted.
Authorizations
Sezione intitolata “Authorizations ”Path Parameters
Sezione intitolata “Path Parameters ”ID of the action to delete
Query Parameters
Sezione intitolata “Query Parameters ”Force the deletion of the entity and all related entities
Responses
Sezione intitolata “ 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
PUT /v2/action/update/{id}
Update an existing action by its unique ID.
Authorizations
Sezione intitolata “Authorizations ”Path Parameters
Sezione intitolata “Path Parameters ”ID of the action to update
Request Body required
Sezione intitolata “Request Body required ”Action object with updated data
object
Example
{ "name": "Updated Training", "validity_unit": "YEAR", "validity": 2}
Responses
Sezione intitolata “ Responses ”Action updated successfully
object
Example
{ "action_id": "act-1", "name": "Updated Training", "validity_unit": "YEAR", "validity": 2}
Action not found