Get the public geographic breakdown
GET
/public/triggers/{id}/geo
const url = 'https://localhost:3000/api/v1/public/triggers/example/geo';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://localhost:3000/api/v1/public/triggers/example/geoReturns the number of events per country and city of a public trigger (no authentication)
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Trigger ID (UUID)
Query Parameters
Section titled “Query Parameters”from
string
Start (default: now-24h)
to
string
End (default: now)
filter
string
JSON filter on metadata (reserved _* keys rejected)
Responses
Section titled “Responses”Geographic breakdown of events
Media typeapplication/json
object
cities
required
Array<object>
object
count
required
integer
lat
required
number
lon
required
number
name
required
string
countries
required
object
key
additional properties
integer format: int64
trigger_id
required
string format: uuid
Example
{ "cities": [ { "count": 42, "lat": 48.1173, "lon": -1.6778, "name": "Rennes" } ], "countries": { "FR": 120, "US": 45 }, "trigger_id": "550e8400-e29b-41d4-a716-446655440000"}Invalid request
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}Trigger not found or not public
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}Erreur interne
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}