1. Get User Emergencies (api2/emergencies/user)
This method retrieves a list of emergencies associated with the authenticated user.
URL
| Server |
URL |
HTTP Type |
| UAT |
https://api-ca-uat.iinsightonline.com/api2/emergencies/user |
GET |
| PRODUCTION |
https://api-ca.iinsightonline.com/api2/emergencies/user |
GET |
Authorization
| Parameter |
Value |
Mandatory |
| Type |
Bearer Token |
Yes |
| Token |
The token is generated using the /auth/login method |
Yes |
Response
{
"status": true,
"message": "User emergencies retrieved successfully",
"total_records": 2,
"data": [
{
"date_created": "2024-03-30 08:45:00",
"description": "Medical"
},
{
"date_created": "2024-03-30 12:30:00",
"description": "Fire"
}
]
}
2. Get Emergency Options (api2/emergencies/options)
This method retrieves the available emergency options that users can report.
URL
| Server |
URL |
HTTP Type |
| UAT |
https://api-ca-uat.iinsightonline.com/api2/emergencies/options |
GET |
| PRODUCTION |
https://api-ca.iinsightonline.com/api2/emergencies/options |
GET |
Authorization
| Parameter |
Value |
Mandatory |
| Type |
Bearer Token |
Yes |
| Token |
The token is generated using the /auth/login method |
Yes |
Response
{
"status": true,
"message": "Emergency options retrieved successfully",
"total_records": 3,
"data": [
{
"id": 1,
"description": "Medical emergency requiring assistance."
},
{
"id": 2,
"description": "Fire-related emergency."
},
{
"id": 3,
"description": "Emergency requiring police intervention."
}
]
}