Skip to content

countries ​

3 endpoints at a glance
MethodPathSummary
GET/atlas/countries/List Countries
GET/atlas/countries/{cca2}/Get Country
POST/atlas/countries/refresh/Refresh Countries

countries​

Retrieve information about probes, measurements or anchors by country


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=true semantics.

Parameters​

Query Parameters

details
Type
boolean
Default
false

Responses​

Successful Response

application/json
JSON
[
  
{
  
  
"additionalProperties": "string"
  
}
]

Playground​

Variables
Key
Value

Samples​


Get Country​

GET
/atlas/countries/{cca2}/

Full country envelope for one cca2. 404 on miss.

Parameters​

Path Parameters

cca2*
Type
string
Required

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Variables
Key
Value

Samples​


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
[
]

Playground​

Authorization

Samples​


Atlas — built on RIPE Atlas data.