ActionSession
Manage action sessions, which represent scheduled or completed events related to a specific action (such as training, maintenance, or health checks).
You can create, update, delete, and search for action sessions with advanced filtering and pagination.
- Version
- 2.0.0
- OpenAPI version
- 3.0.0
Operations
Section titled “Operations” POST /v2/action-session/index
Returns a paginated and filterable list of action sessions.
Use POST to allow complex filters via JSON payload.
Request Body
Section titled “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
Section titled “ 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
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-session/create
Create a new action session by providing the required session details.
Request Body required
Section titled “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
Section titled “ 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.
Path Parameters
Section titled “Path Parameters ”ID of the action session to retrieve
Responses
Section titled “ 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
Section titled “delete” DELETE /v2/action-session/delete/{id}
Delete an action session by its unique ID.
If force=true, all related entities will also be deleted.
Path Parameters
Section titled “Path Parameters ”ID of the action session to delete
Query Parameters
Section titled “Query Parameters ”Force the deletion of the entity and all related entities
Responses
Section titled “ 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
update
Section titled “update” PUT /v2/action-session/update/{id}
Update an existing action session by its unique ID.
Path Parameters
Section titled “Path Parameters ”ID of the action session to update
Request Body required
Section titled “Request Body required ”Action session object with updated data
object
Additional data
Example
{ "validity_unit": "YEAR", "validity": 2}
Responses
Section titled “ 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