Skip to main content

Get Incident Data V2

Support avatar
Written by Support
Updated over 2 months ago

GET [ incident/get-incident-data/{incidentId?} ]

Production Endpoint: 
Test Endpoint: https://test.complyflow.com.au/app/public/index.php/api/v2/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 with v2 format.

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

incidentId

integer

Incident ID

70

No

null

\d+

fromDate

date

Filter Incidents after this date

20240403T02:00:00

No

null

YYYYMMDDThh:mm:ss

toDate

date

Filter Incidents before this date

20240403T02:00:00

No

null

YYYYMMDDThh:mm:ss

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/v2/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/v2/incident/get-incident-data/342' \
--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": 342,
"shortDescription": "342",
"date": "02-01-2025 14:01",
"site": "projecta",
"status": "Pending Actions",
"signoffStaff": "",
"signoffTime": "",
"signoffComment": "",
"lastUpdated": "02-01-2025 18:03:51",
"dateEmployerNotified": "02-01-2025",
"incidentShiftTime": "In the first 25% of the shift",
"NA POLICE INVOLVED": "NA",
"NO POLICE INVOLVED": "asd",
"NQ POLICE INVOLVED": "",
"NZ POLICE INVOLVED": "NA",
"NZ RISK MATRIX": "NA",
"incidentTypes": [
{
"id": 35,
"name": "CType",
"sections": [
{
"id": 26,
"name": "Section Contributing Factor",
"questions": [
{
"question": "is this contributing factor",
"answer": {
"answer": "yes",
"answerTag": "",
"history": "02-01-2025 18:02:33"
}
},
{
"question": "What are you?",
"answer": []
}
]
},
{
"id": 24,
"name": "Section Corrective Action",
"questions": [
{
"question": "QuestionA?",
"answer": {
"answer": "",
"answerTag": "",
"history": "02-01-2025 18:02:36"
}
},
{
"question": "Dog, Are you a dog ?",
"answer": []
},
{
"question": "Upload File",
"answer": []
},
{
"question": "Are u a cat?",
"answer": {
"answer": "asd",
"answerTag": "",
"history": "02-01-2025 18:02:38"
}
},
{
"question": "What are you?",
"answer": []
}
]
}
]
}
],
"correctiveActions": [
{
"id": 17,
"description": "123",
"assignedTo": {
"staffId": 692,
"staffName": "wr er"
},
"createdBy": {
"staffId": 692,
"staffName": "wr er"
},
"dueDate": "01-02-2025",
"lastUpdated": "02-01-2025 18:02:48",
"lastUpdatedBy": "wr er",
"status": "Open"
}
],
"contributingFactors": [
{
"id": 13,
"description": "yes",
"origin": "is this contributing factor",
"correctiveActions": []
}
]
}
]
}
Did this answer your question?