GET [ incident/get-incident-data/{incidentId?} ]
Production Endpoint: https://app.complyflow.com.au/app/public/index.php/api/incident/get-incident-data/{incidentId} 
Test Endpoint: https://test.complyflow.com.au/app/public/index.php/api/incident/get-incident-data/{incidentId} When incidentId is not specified in the URL, then will return all list of incident data. Otherwise will return specific incident data
Overview
This endpoint is used to fetch all incident data or view specific incident data.
Authentication instructions
Refer to the Authentication method for Authentication Methods (for Login and Logout).
Permissions Required
The user will required the permissions below:
API User
User is Staff
Users have View Incident Permission
Please also refer to the Permissions Overview guide.
Query parameters
FIELD  | TYPE  | DESCRIPTION  | Example  | REQUIRED  | DEFAULT  | PATTERN  | 
  | 
  | Incident ID  | 
  | No  | 
  | 
 | 
  | 
  | Filter Incidents after this date  | 
  | No  | 
  | 
  | 
  | 
  | Filter Incidents before this date  | 
  | No  | 
  | 
  | 
Request Example
To return all list of incident with filter fromDate and toDate parameter
curl --location 'http://test.complyflow.com.au/app/public/index.php/api/incident/get-incident-data?toDate=20240410T02%3A00%3A00&fromDate=20240403T02%3A00%3A00' \
--header 'Authorization: [...]' \
--header 'Cookie: [...]'
To return a specific incident detail data
curl --location 'http://test.complyflow.com.au/app/public/index.php/api/incident/get-incident-data/327' \
--header 'Authorization: [...]' \
--header 'Cookie: [...]'
Response Example
The API Request returns all or specific incident data based from incidentId parameter provided or not.
{
    "token": "",
    "data": [
        {
            "id": 327,
            "shortDescription": "try injury",
            "date": "09-04-2024 12:47",
            "site": "projecta",
            "status": "Ready To Close",
            "signoffStaff": "",
            "signoffTime": "",
            "signoffComment": "",
            "lastUpdated": "16-04-2024 17:44:57",
            "dateEmployerNotified": "09-04-2024",
            "incidentShiftTime": "Between 75% and the end of scheduled shift",
            "NA POLICE INVOLVED": "NOOO",
            "NO POLICE INVOLVED": "NYES",
            "NQ POLICE INVOLVED": "",
            "NZ POLICE INVOLVED": "NA",
            "NZ RISK MATRIX": "NA",
            "incidentTypes": [
                {
                    "id": 33,
                    "name": "AType",
                    "sections": [
                        {
                            "id": 24,
                            "name": "SectionA",
                            "questions": [
                                {
                                    "question": "What happen ?",
                                    "answer": {
                                        "answer": "Nothing",
                                        "answerTag": "",
                                        "history": "09-04-2024 15:48:25"
                                    }
                                },
                                {
                                    "question": "QuestionA?",
                                    "answer": {
                                        "answer": "",
                                        "answerTag": "",
                                        "history": "09-04-2024 15:48:28"
                                    }
                                },
                                {
                                    "question": "Are u a cat?",
                                    "answer": {
                                        "answer": "NYES",
                                        "answerTag": "",
                                        "history": "09-04-2024 15:48:28"
                                    }
                                }
                            ],
                            "contributingFactors": [],
                            "correctiveActions": []
                        }
                    ]
                }
            ]
        }
    ]
}
For the an updated version of the Incident API see Get Incident Data V2