Appearance
countries
3 endpoints at a glance
| Method | Path | Summary |
|---|---|---|
GET | /atlas/countries/ | List Countries |
GET | /atlas/countries/{cca2}/ | Get Country |
POST | /atlas/countries/refresh/ | Refresh Countries |
List Countries
GET
/atlas/countries/
List every country, sorted by common name.
Two shapes:
details=false(default) — slim picker payload, ~250 entries
× ~80 bytes:{code, name, region, flag}. Used by the
regions admin dialog.details=true— full envelope per row, identical in shape to
:func:get_country({code, data, meta}). Used by the
countries view in the UI; mirror of the legacy
/locations/countries/?details=truesemantics.
Parameters
Query Parameters
details
Type
boolean
Default
falseResponses
Successful Response
application/json
JSON { "additionalProperties": "string" }
[
]
Get Country
Refresh Countries
POST
/atlas/countries/refresh/
Pull every country from REST Countries and upsert into db.countries.
Single HTTP call to the upstream + a single bulk_write — usually
completes in well under a second. Used as a bootstrap on a fresh
deploy (the next weekly tick can be up to 7 days away) and as a
manual recovery handle when the scheduled job fails.
Routed through :func:run_and_record so this manual run lands in
db.task_history next to the scheduled ones, distinguishable by
the trigger="manual" field.
Authorizations
APIKeyQuery
Type
API Key (query: api-key)
or
APIKeyHeader
Type
API Key (header: x-api-key)
Responses
Successful Response
application/json
JSON
[
]