Risk
Questi contenuti non sono ancora disponibili nella tua lingua.
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
Sezione intitolata “Operations” POST /v2/risk/index
Returns a paginated and filterable list of risks.
Use POST to allow complex filters via JSON payload.
Request Body
Sezione intitolata “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
Sezione intitolata “ 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
Sezione intitolata “Headers ”Current page
Total number of pages
Number of items per page
Total number of items
POST /v2/risk/create
Create a new risk by providing the required details.
Request Body required
Sezione intitolata “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
Sezione intitolata “ 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
Sezione intitolata “Path Parameters ”ID of the risk to retrieve
Responses
Sezione intitolata “ 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
PUT /v2/risk/update/{id}
Update an existing risk by its unique ID.
Path Parameters
Sezione intitolata “Path Parameters ”ID of the risk to update
Request Body required
Sezione intitolata “Request Body required ”Risk object with updated data
object
Example
{ "name": "Updated Risk", "probability": 4}
Responses
Sezione intitolata “ Responses ”Risk updated successfully
object
Example
{ "risk_id": "risk-1", "name": "Updated Risk", "probability": 4}
Risk not found
DELETE /v2/risk/delete/{id}
Delete a risk by its unique ID.
If force=true, all related entities will also be deleted.
Path Parameters
Sezione intitolata “Path Parameters ”ID of the risk to delete
Query Parameters
Sezione intitolata “Query Parameters ”Force the deletion of the entity and all related entities
Responses
Sezione intitolata “ 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