GET [ risk ]
Production Endpoint: https://app.complyflow.com.au/app/public/index.php/api/risk
Test Endpoint: https://test.complyflow.com.au/app/public/index.php/api/risk
Overview
This endpoint returns a list of all risks that a staff can see.
Authentication instructions
Refer to the Authentication method for Authentication Methods (for Login and Logout).
  Permissions Required
The user should possess the permissions below:
API User
User is Staff
One of the following:
User have View Risk Permission, or
User is a Risk Owner, or
User is assigned to Site Risk Action
Please also refer to the Permissions Overview guide.
Query parameters
FIELD  | TYPE  | DESCRIPTION  | EXAMPLE  | REQUIRED  | DEFAULT  | PATTERN  | 
  | 
  | Site ID  | 
  | No  | 
  | 
  | 
  | 
  | Risk Category ID  | 
  | No  | 
  | 
  | 
  | 
  | Risk Area ID  | 
  | No  | 
  | 
  | 
  | 
  | Risk Status in Site  | 
  | No  | 
  | 1 → Not Controlled 2 → Partially Controlled 3 → Controlled 4 → Eliminated 5 → Pending  | 
 site, category_id, and risk_area_id parameter value can be seen from Client   App > Risk Register > filter > Look for the query params on URL
hazard_category→risk_area_idhazard→category_idproject→site
Request Example
curl --location 'http://test.complyflow.com.au/app/public/index.php/api/risk?site=41&category_id=1&risk_area_id=1&status=5' \
--header 'Authorization: [...]' \
--header 'Cookie: [...]'
Response Example
The API Request returns all list of risk that staff can see.
{
    "token": "",
    "data": [
        {
            "risk_id": 26,
            "risk_name": "a",
            "last_modified": "2023-10-24 20:58:41",
            "risk_category": "aaaaav2",
            "sites": [
                {
                    "site_risk_id": 30,
                    "site_id": 41,
                    "risk_owner": "wr er",
                    "risk_status": "Pending",
                    "last_modified": "2023-10-24 20:58:41"
                }
            ]
        }
    ]
}
