11 operations, each declared once.
events.listList stored events
Returns stored events, newest first. Filters are combinable: `type` restricts to one catalog type, `located` keeps only events whose position is known, and `limit` caps the number of rows. Events whose position could not be resolved are returned like any other โ they simply carry no coordinates.
| HTTP | GET /api/v1/events |
|---|---|
| CLI | mix crisis_map.run events.list |
| MCP tool | events_list |
| Returns | An array of event objects. |
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | no | Restrict to one catalog event type. Omit or pass `all` for every type. |
located | boolean | no | Keep only events with known coordinates. |
limit | integer | no | Maximum number of rows. |
events.getFetch one event
Returns one event by its database id or by the source's own `external_id`. Both are accepted because the two identities answer different questions: the database id is ours, the external id is the source's and is what makes the import idempotent.
| HTTP | GET /api/v1/events/:id |
|---|---|
| CLI | mix crisis_map.run events.get --id <string> |
| MCP tool | events_get |
| Returns | One event object. |
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Database id or source external_id. |
events.nearEvents within a radius of a point
The spatial query proper. Answers "what happened within X km of here" using PostGIS `ST_DWithin` on the geography column, which measures on the spheroid in metres and is answered from the GiST index rather than by scanning the table. Every returned event also carries its `distance_m`, computed by `ST_Distance` in the same query.
| HTTP | GET /api/v1/events/near |
|---|---|
| CLI | mix crisis_map.run events.near --lat <float> --lon <float> --radius-km <float> |
| MCP tool | events_near |
| Returns | An array of event objects, each with `distance_m` set. |
| Parameter | Type | Required | Description |
|---|---|---|---|
lat | float | yes | Latitude of the centre. |
lon | float | yes | Longitude of the centre. |
radius_km | float | yes | Search radius in kilometres. |
type | string | no | Restrict to one catalog event type. Omit or pass `all` for every type. |
events.statsCounts by type and by geocoding status
The shape of the stored data at a glance: how many events of each catalog type, and how many positions are known, unknown, not found or failed. This is the number the operator looks at after an import.
| HTTP | GET /api/v1/events/stats |
|---|---|
| CLI | mix crisis_map.run events.stats |
| MCP tool | events_stats |
| Returns | An object with `total`, `by_type` and `by_geocoding_status`. |
No parameters.
catalog.event_typesThe declared event types
The canonical vocabulary of event types, with the label and map colour each one is drawn with. Every other surface reads this list rather than keeping its own copy, which is why a new type appears in the filter, the map legend and the API documentation at once.
| HTTP | GET /api/v1/catalog/event-types |
|---|---|
| CLI | mix crisis_map.run catalog.event_types |
| MCP tool | catalog_event_types |
| Returns | An array of event type objects. |
No parameters.
catalog.geocoding_statusesThe declared geocoding statuses
Every state a position can be in, and whether that state means the coordinates are known. The schema enforces the pairing: a status that claims coordinates exist cannot be stored without a point, and one that claims they do not cannot be stored with one.
| HTTP | GET /api/v1/catalog/geocoding-statuses |
|---|---|
| CLI | mix crisis_map.run catalog.geocoding_statuses |
| MCP tool | catalog_geocoding_statuses |
| Returns | An array of geocoding status objects. |
No parameters.
geocoding.lookupResolve a place name
Forward geocoding through the configured geocoder, without storing anything. The answer carries `candidates` โ how many places the geocoder found plausible โ and `confidence`, its ranking score for the one returned, so an ambiguous name is visibly ambiguous. A place the geocoder does not know is `not_found`, which is an answer, not a failure. A geocoder that cannot be reached is an `error`.
| HTTP | GET /api/v1/geocoding/lookup |
|---|---|
| CLI | mix crisis_map.run geocoding.lookup --query <string> |
| MCP tool | geocoding_lookup |
| Returns | An object with `status` and, when found, `latitude`, `longitude`, `candidates` and `confidence`. |
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | yes | Place name to resolve. |
geocoding.statusHealth of the geocoder
Asks the configured geocoder whether it is up and which adapter is in use. Returns a reason instead of raising when it is not, so this is safe to call from a status page or a monitor.
| HTTP | GET /api/v1/geocoding/status |
|---|---|
| CLI | mix crisis_map.run geocoding.status |
| MCP tool | geocoding_status |
| Returns | An object describing the geocoder and its reachability. |
No parameters.
ingest.importImport the dataset
Runs the ingest pipeline over a JSON dataset: normalise, upsert on `external_id`, geocode what needs geocoding, store the outcome. Running it twice is safe and is the point: the second run updates the same rows and reuses positions that are already resolved, so the report shows updates and reuses rather than inserts. Pass `regeocode` to resolve positions again anyway.
| HTTP | POST /api/v1/ingest/import |
|---|---|
| CLI | mix crisis_map.run ingest.import |
| MCP tool | ingest_import |
| Returns | The import report: counts per outcome and the errors encountered. |
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | no | Dataset to read. Defaults to the bundled dataset. |
regeocode | boolean | no | Resolve positions again even when they are already known. |
system.capabilitiesThe registry itself
Lists every capability with its parameters, its route, its CLI form and its MCP tool name. This is the registry describing itself: the same list that generated the routes, the OpenAPI document and the documentation is readable at run time.
| HTTP | GET /api/v1/capabilities |
|---|---|
| CLI | mix crisis_map.run system.capabilities |
| MCP tool | system_capabilities |
| Returns | An array of capability descriptions. |
No parameters.
system.healthHealth of the system
One call that answers whether the parts are there: the database, the PostGIS extension and its version, the number of stored events and whether the geocoder answers.
| HTTP | GET /api/v1/health |
|---|---|
| CLI | mix crisis_map.run system.health |
| MCP tool | system_health |
| Returns | An object with the database, PostGIS, event and geocoder status. |
No parameters.