Get Alert Details
Endpoint
GET https://i3.safeandthecity.com/api/v1/alert/{id}
The Alert object represents an i3 Intelligence Alert that is active from a point in time (start date) at a defined location. Alert objects are added to i3 throughout the day and are subject to change over the course of a day.
info
Alerts can be historic, current or future. You should always check the start_date
property to understand the date and time an alert is relevant from.
Get Alert By ID
Request
The /alert/{id}
endpoint can be used to obtain the full details about a specific i3 alert.
- Shell
- Python
- Javascript
$ curl --request POST \
--url "https://i3.safeandthecity.com/api/v1/alert/{id}" \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_BEARER_TOKEN}'
import requests
r = requests.get('https://i3.safeandthecity.com/api/v1/alert/{id}', headers={'Content-Type': 'application/json', 'Authorization': 'Bearer {YOUR_BEARER_TOKEN}'})
import axios from 'axios';
const instance = axios.create({
baseURL: 'https://i3.safeandthecity.com/api',
timeout: 1000,
headers: {
'Content-Type': 'application/json'
'Authorization': 'Bearer {YOUR_BEARER_TOKEN}'
}
});
let response = instance.get('/v1/alert/{id}');
Accepted Parameters
Parameters | Type | Description | Required |
---|---|---|---|
id | uri parameter | The unique identifier of the desired alert | Yes |
Authorization | header | The Bearer token to authenticate with the server | Yes |
Response
The /alert/{id}
endpoint responds with a json object representation of an i3 alert.
{
"id": "00cfdf37-8777-43de-b371-83afb1146cea",
"title": "#EndOurCladdingScandal",
"description": "#EndOurCladdingScandal has organised a peaceful protest outside Old Palace Yard at 13:00 to end tenants paying for faulty rentals.",
"location": {
"address": "Old Palace Yard, London, England",
"latitude": 51.500194,
"longitude": -0.125642
},
"type": "Protest",
"start_date": "2022-04-20T12:00:00Z"
}