Risk
Manage risks, which represent hazards or potential issues in projects, work groups, or offices.
You can create, update, delete, and search for risks with advanced filtering and pagination.
- Version
- 2.0.0
- OpenAPI version
- 3.0.0
Operations
Section titled “Operations” POST /v2/risk/index
Returns a paginated and filterable list of risks.
Use POST to allow complex filters via JSON payload.
Request Body
Section titled “Request Body ”Parameters for searching risks
object
object
{ "name": "Risk 1", "status": "open"}
Example
{ "filter": { "name": "Risk 1", "work_group_id": "wg-1" }, "per-page": 10, "page": 1, "sort": "name"}
Responses
Section titled “ Responses ”List of risks
object
Example
{ "risk_id": "risk-1", "name": "Risk 1", "code": "R001", "description": "Risk of falling", "probability": 3, "damage": 4, "work_group_id": "wg-1", "work_group_code": "WG001", "work_group_name": "Work Group 1", "office_name": "Main Office", "present": 1, "initial": 2, "ridution": 1, "residual": 1, "project_id": "proj-1", "office_id": "off-1", "project_name": "Project X", "project_type": "safety", "owned_active": true, "parent_active": true}
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/risk/create
Create a new risk by providing the required details.
Request Body required
Section titled “Request Body required ”Risk object to be created
object
Example
{ "name": "Risk 2", "code": "R002", "description": "Risk of fire", "probability": 2, "damage": 5, "work_group_id": "wg-2"}
Responses
Section titled “ Responses ”Risk created successfully
object
Example
{ "risk_id": "risk-2", "name": "Risk 2", "code": "R002", "description": "Risk of fire", "probability": 2, "damage": 5, "work_group_id": "wg-2"}
GET /v2/risk/view/{id}
Retrieve a risk by its unique ID.
Path Parameters
Section titled “Path Parameters ”ID of the risk to retrieve
Responses
Section titled “ Responses ”Risk found
object
Example
{ "risk_id": "risk-1", "name": "Risk 1", "code": "R001", "description": "Risk of falling", "probability": 3, "damage": 4, "work_group_id": "wg-1", "work_group_code": "WG001", "work_group_name": "Work Group 1", "office_name": "Main Office", "present": 1, "initial": 2, "ridution": 1, "residual": 1, "project_id": "proj-1", "office_id": "off-1", "project_name": "Project X", "project_type": "safety", "owned_active": true, "parent_active": true}
Risk not found
update
Section titled “update” PUT /v2/risk/update/{id}
Update an existing risk by its unique ID.
Path Parameters
Section titled “Path Parameters ”ID of the risk to update
Request Body required
Section titled “Request Body required ”Risk object with updated data
object
Example
{ "name": "Updated Risk", "probability": 4}
Responses
Section titled “ Responses ”Risk updated successfully
object
Example
{ "risk_id": "risk-1", "name": "Updated Risk", "probability": 4}
Risk not found
delete
Section titled “delete” DELETE /v2/risk/delete/{id}
Delete a risk by its unique ID.
If force=true, all related entities will also be deleted.
Path Parameters
Section titled “Path Parameters ”ID of the risk to delete
Query Parameters
Section titled “Query Parameters ”Force the deletion of the entity and all related entities
Responses
Section titled “ Responses ”Risk 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