Skip to content

ActionSession

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

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

Security scheme type: apiKey

Query parameter name: access-token

POST
/v2/action-session/index

Returns a paginated and filterable list of action sessions. Use POST to allow complex filters via JSON payload.

Parameters for searching action sessions

object
filter
object
action_session_id
string format: uuid
action_id
string format: uuid
validity_unit
string
Allowed values: YEAR MONTH DAY
validity
integer
data

Additional data

string format: json
subtenant_id
string format: uuid
tenant_id
string format: uuid
action_code
string
action_name
string
action_type
string
Allowed values: TRAINING MAINTENANCE HEALTH CHECK PER
count_subscribed
integer
count_done
integer
count_fail
integer
count_unknown
integer
date_begin
string format: date
date_end
string format: date
manager
string format: json
assignee
string format: json
watcher
string format: json
per-page
integer
default: 100 >= 1
page
integer
default: 1 >= 1
sort

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

string
history

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.

boolean
Example
{
"filter": {
"action_type": "TRAINING"
},
"per-page": 10,
"page": 1,
"sort": "name"
}

List of action sessions

Array<object>
object
action_session_id
string format: uuid
action_id
string format: uuid
validity_unit
string
Allowed values: YEAR MONTH DAY
validity
integer
data

Additional data

string format: json
subtenant_id
string format: uuid
tenant_id
string format: uuid
action_code
string
action_name
string
action_type
string
Allowed values: TRAINING MAINTENANCE HEALTH CHECK PER
count_subscribed
integer
count_done
integer
count_fail
integer
count_unknown
integer
date_begin
string format: date
date_end
string format: date
manager
string format: json
assignee
string format: json
watcher
string format: json
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"
}
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-session/create

Create a new action session by providing the required session details.

Action session object to be created

object
action_session_id
string
action_id
string
validity_unit
string
Allowed values: YEAR MONTH DAY
validity
integer
manager
string format: json
assignee
string format: json
watcher
string format: json
data

Additional data

string format: json
subtenant_id
string
tenant_id
string
Example
{
"action_id": "act-1",
"validity_unit": "MONTH",
"validity": 6,
"subtenant_id": "sub-1",
"tenant_id": "ten-1"
}

Action session created successfully

object
action_session_id
string
action_id
string
validity_unit
string
Allowed values: YEAR MONTH DAY
validity
integer
manager
string format: json
assignee
string format: json
watcher
string format: json
data

Additional data

string format: json
subtenant_id
string
tenant_id
string
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.

id
required
string format: uuid

ID of the action session to retrieve

Action session found

object
action_session_id
string format: uuid
action_id
string format: uuid
validity_unit
string
Allowed values: YEAR MONTH DAY
validity
integer
data

Additional data

string format: json
subtenant_id
string format: uuid
tenant_id
string format: uuid
action_code
string
action_name
string
action_type
string
Allowed values: TRAINING MAINTENANCE HEALTH CHECK PER
count_subscribed
integer
count_done
integer
count_fail
integer
count_unknown
integer
date_begin
string format: date
date_end
string format: date
manager
string format: json
assignee
string format: json
watcher
string format: json
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.

id
required
string format: uuid

ID of the action session to delete

force
boolean

Force the deletion of the entity and all related entities

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.

id
required
string format: uuid

ID of the action session to update

Action session object with updated data

object
action_session_id
string
action_id
string
validity_unit
string
Allowed values: YEAR MONTH DAY
validity
integer
manager
string format: json
assignee
string format: json
watcher
string format: json
data

Additional data

string format: json
subtenant_id
string
tenant_id
string
Example
{
"validity_unit": "YEAR",
"validity": 2
}

Action session updated successfully

object
action_session_id
string
action_id
string
validity_unit
string
Allowed values: YEAR MONTH DAY
validity
integer
manager
string format: json
assignee
string format: json
watcher
string format: json
data

Additional data

string format: json
subtenant_id
string
tenant_id
string
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