ActionSession
Questi contenuti non sono ancora disponibili nella tua lingua.
Defines the individual sessions related to preventive actions, either scheduled or completed, which help manage the planning, execution, and renewal of safety measures over time. The meaning and purpose of each session vary depending on the type of action:
- For
training
, it refers to a specific course edition. - For
health
, it represents a medical examination. - For
per
, it tracks the delivery of personal protective equipment (PPE). - For
maintenance
, it refers to a maintenance order or intervention. - For
check
, it documents a safety inspection or procedure report.
- 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-session/index
Returns a paginated and filterable list of action sessions. Use POST to allow complex filters via JSON payload.
Authorizations
Sezione intitolata “Authorizations ”Request Body
Sezione intitolata “Request Body ”Parameters for searching action sessions
object
object
Additional data
The field of the model to sort the list for, use a minus to revert the sort. Es -name is to require the sort in reverse order
The field establishes whether to also include historized elements that are no longer active in the results. If you leave this parameter empty the response returns only actual entries.
Example
{ "filter": { "action_type": "TRAINING" }, "per-page": 10, "page": 1, "sort": "name"}
Responses
Sezione intitolata “ Responses ”List of action sessions
object
Additional data
Example
{ "action_session_id": "sess-1", "action_id": "act-1", "validity_unit": "MONTH", "validity": 12, "subtenant_id": "sub-1", "tenant_id": "ten-1", "action_code": "A001", "action_name": "Safety Training", "action_type": "TRAINING", "count_subscribed": 10, "count_done": 8, "count_fail": 1, "count_unknown": 1, "date_begin": "2024-01-10", "date_end": "2024-01-10"}
Headers
Sezione intitolata “Headers ”Current page
Total number of pages
Number of items per page
Total number of items
POST /v2/action-session/create
Create a new action session by providing the required session details.
Authorizations
Sezione intitolata “Authorizations ”Request Body required
Sezione intitolata “Request Body required ”Action session object to be created
object
Additional data
Example
{ "action_id": "act-1", "validity_unit": "MONTH", "validity": 6, "subtenant_id": "sub-1", "tenant_id": "ten-1"}
Responses
Sezione intitolata “ Responses ”Action session created successfully
object
Additional data
Example
{ "action_session_id": "sess-3", "action_id": "act-1", "validity_unit": "MONTH", "validity": 6, "subtenant_id": "sub-1", "tenant_id": "ten-1"}
GET /v2/action-session/view/{id}
Retrieve an action session by its unique ID.
Authorizations
Sezione intitolata “Authorizations ”Path Parameters
Sezione intitolata “Path Parameters ”ID of the action session to retrieve
Responses
Sezione intitolata “ Responses ”Action session found
object
Additional data
Example
{ "action_session_id": "sess-1", "action_id": "act-1", "validity_unit": "MONTH", "validity": 12, "subtenant_id": "sub-1", "tenant_id": "ten-1", "action_code": "A001", "action_name": "Safety Training", "action_type": "TRAINING", "count_subscribed": 10, "count_done": 8, "count_fail": 1, "count_unknown": 1, "date_begin": "2024-01-10", "date_end": "2024-01-10"}
Action session not found
DELETE /v2/action-session/delete/{id}
Delete an action session 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 session to delete
Query Parameters
Sezione intitolata “Query Parameters ”Force the deletion of the entity and all related entities
Responses
Sezione intitolata “ Responses ”Action session 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-session/update/{id}
Update an existing action session by its unique ID.
Authorizations
Sezione intitolata “Authorizations ”Path Parameters
Sezione intitolata “Path Parameters ”ID of the action session to update
Request Body required
Sezione intitolata “Request Body required ”Action session object with updated data
object
Additional data
Example
{ "validity_unit": "YEAR", "validity": 2}
Responses
Sezione intitolata “ Responses ”Action session updated successfully
object
Additional data
Example
{ "action_session_id": "sess-1", "action_id": "act-1", "validity_unit": "YEAR", "validity": 2, "subtenant_id": "sub-1", "tenant_id": "ten-1"}
Action session not found