Skip to content

AS population ​

22 endpoints at a glance
MethodPathSummary
POST/as-population/backfillSubmit Backfill
POST/as-population/backfill/recover-staleRecover Stale Backfill
GET/as-population/backfill/statusGet Backfill Status
GET/as-population/by-as/{asn}/Get For As
GET/as-population/daily/List Daily
GET/as-population/daily/{date}/Get Daily
POST/as-population/daily/{date}/recompute-statsRecompute Daily Stats
POST/as-population/daily/{date}/reprocessReprocess Daily
POST/as-population/daily/{date}/verifyVerify Daily
POST/as-population/daily/backfill-stale-statsBackfill Stale Daily Stats
POST/as-population/daily/recompute-stats-rangeRecompute Daily Stats Range
GET/as-population/daily/stats-coverageDaily Stats Coverage
POST/as-population/daily/verify-rangeVerify Daily Range
GET/as-population/gaps/List Gaps
GET/as-population/gaps/by-country/List Gaps By Country
GET/as-population/gaps/countries/List Gap Countries
GET/as-population/imports/List Imports
GET/as-population/imports/{import_id}/Get Import
POST/as-population/imports/{import_id}/stopStop Import
GET/as-population/series/Get Series
GET/as-population/stats/Get Stats
POST/atlas/as-population/refresh/Refresh As Population

as-population​


Get Series​

GET
/as-population/series/

Public daily-stats series for the trends view. No auth gate —
same posture as the measurements-meta / events-connections /
probe-archive series (aggregate counts over public APNIC info).
400 on a bad / inverted / over-cap range.

Parameters​

Query Parameters

since*
Type
string
Required
until*
Type
string
Required

Responses​

Successful Response

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

Playground​

Variables
Key
Value

Samples​


Get For As​

GET
/as-population/by-as/{asn}/

Per-AS estimated-user-population time series (oldest-first).
Logged-in. since / until are inclusive YYYY-MM-DD.

Parameters​

Header Parameters

authorization
x-api-key

Path Parameters

asn*
Type
integer
Required

Query Parameters

since
until

Responses​

Successful Response

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

Playground​

Headers
Variables
Key
Value

Samples​


Get Stats​

GET
/as-population/stats/

Header tiles + worker snapshot for the admin panel.

Parameters​

Header Parameters

authorization
x-api-key

Responses​

Successful Response

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

Playground​

Headers

Samples​


List Imports​

GET
/as-population/imports/

Newest-first import-run rows. since / until are
inclusive YYYY-MM-DD bounds on started_at.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

since
until
trigger
limit
Type
integer
Default
100

Responses​

Successful Response

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

Playground​

Headers
Variables
Key
Value

Samples​


Get Import​

GET
/as-population/imports/{import_id}/

Parameters​

Header Parameters

authorization
x-api-key

Path Parameters

import_id*
Type
string
Required

Responses​

Successful Response

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

Playground​

Headers
Variables
Key
Value

Samples​


Stop Import​

POST
/as-population/imports/{import_id}/stop

Cooperative stop. Only running imports are stoppable
(no pre-queued DB row). 404 / 409 otherwise.

Parameters​

Header Parameters

authorization
x-api-key

Path Parameters

import_id*
Type
string
Required

Responses​

Successful Response

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

Playground​

Headers
Variables
Key
Value

Samples​


List Daily​

GET
/as-population/daily/

Newest-first daily-coverage rows. lite=true drops the heavy
stats block — used for the whole-year calendar fetch.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

since
until
limit
Type
integer
Default
100
lite
Type
boolean
Default
false

Responses​

Successful Response

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

Playground​

Headers
Variables
Key
Value

Samples​


Daily Stats Coverage​

GET
/as-population/daily/stats-coverage

Per-class daily-stats coverage over the retained window. Pure
read. 400 on a bad / inverted range.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

since

inclusive start, YYYY-MM-DD

until

inclusive end, YYYY-MM-DD

Responses​

Successful Response

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

Playground​

Headers
Variables
Key
Value

Samples​


Verify Daily Range​

POST
/as-population/daily/verify-range

Re-verify every date in a window. No APNIC call. Per-date
errors are recorded, not raised.

Parameters​

Header Parameters

authorization
x-api-key

Request Body​

application/json
JSON
{
  
"since": "string",
  
"until": "string"
}

Responses​

Successful Response

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

Playground​

Headers
Body

Samples​


Recompute Daily Stats Range​

POST
/as-population/daily/recompute-stats-range

Bulk-rebuild the stats block across a window. DB-only,
capped, audited via run_and_record.

Parameters​

Header Parameters

authorization
x-api-key

Request Body​

application/json
JSON
{
  
"since": "string",
  
"until": "string"
}

Responses​

Successful Response

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

Playground​

Headers
Body

Samples​


Backfill Stale Daily Stats​

POST
/as-population/daily/backfill-stale-stats

Force an immediate newest-first recompute of stale daily-stats.
DB-only, idempotent, bounded. Audited.

Parameters​

Header Parameters

authorization
x-api-key

Request Body​

application/json
JSON
{
  
"max_days": 1000
}

Responses​

Successful Response

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

Playground​

Headers
Body

Samples​


Get Daily​

GET
/as-population/daily/{date}/

Parameters​

Header Parameters

authorization
x-api-key

Path Parameters

date*
Type
string
Required

Responses​

Successful Response

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

Playground​

Headers
Variables
Key
Value

Samples​


Verify Daily​

POST
/as-population/daily/{date}/verify

Recompute one day's coverage + stats from cached rows. No
APNIC call. 400 on a bad date.

Parameters​

Header Parameters

authorization
x-api-key

Path Parameters

date*
Type
string
Required

Responses​

Successful Response

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

Playground​

Headers
Variables
Key
Value

Samples​


Reprocess Daily​

POST
/as-population/daily/{date}/reprocess

Force a re-fetch of one date's snapshot from APNIC.

Marks the day queued + reprocess_pending (calendar
reflects it immediately), then enqueues a single-date backfill.
The worker's import re-verifies and — because
reprocess_pending is set — seals the day once it lands
success. NB: APNIC may substitute the nearest snapshot if it
holds no exact history; that resolves to substituted, not a
silent mislabel.

Parameters​

Header Parameters

authorization
x-api-key

Path Parameters

date*
Type
string
Required

Responses​

Successful Response

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

Playground​

Headers
Variables
Key
Value

Samples​


Recompute Daily Stats​

POST
/as-population/daily/{date}/recompute-stats

Re-derive one day's stats block from cached rows. DB-only.
400 when the day has no coverage row yet (verify first).

Parameters​

Header Parameters

authorization
x-api-key

Path Parameters

date*
Type
string
Required

Responses​

Successful Response

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

Playground​

Headers
Variables
Key
Value

Samples​


Submit Backfill​

POST
/as-population/backfill

Queue a historical date-range backfill (one APNIC fetch per
date). Returns immediately; the worker walks the queue serially.
Each touched day is pre-lit queued so the calendar reflects
the enqueue. Idempotent (composite _id upserts).

Parameters​

Header Parameters

authorization
x-api-key

Request Body​

application/json
JSON
{
  
"since": "string",
  
"until": "string"
}

Responses​

Successful Response

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

Playground​

Headers
Body

Samples​


Get Backfill Status​

GET
/as-population/backfill/status

Worker queue snapshot + liveness. Dashboard polls this at 5s
while a backfill is running.

Parameters​

Header Parameters

authorization
x-api-key

Responses​

Successful Response

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

Playground​

Headers

Samples​


Recover Stale Backfill​

POST
/as-population/backfill/recover-stale

Re-enqueue imports orphaned in running by a dead worker.
Marks each failed (audit-honest) then re-enqueues its date.
Safe to call any time (idempotent imports).

Parameters​

Header Parameters

authorization
x-api-key

Responses​

Successful Response

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

Playground​

Headers

Samples​


List Gaps​

GET
/as-population/gaps/

Per-ASN deployment-gap rows for the dashboard's main table.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

max_probes
Type
integer
Default
3
min_population
Type
integer
Default
10000
country
statuses
sort

population_desc = biggest user populations first (default); probe_count_asc = least-covered first; gap_score_desc = users × deficit

Type
string
Valid values
"population_desc""probe_count_asc""gap_score_desc"
Default
"population_desc"
limit
Type
integer
Default
200
offset
Type
integer
Default
0

Responses​

Successful Response

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

Playground​

Headers
Variables
Key
Value

Samples​


List Gaps By Country​

GET
/as-population/gaps/by-country/

Per-country rollup for the gap dashboard's "By country" tab.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

max_probes
Type
integer
Default
3
min_population
Type
integer
Default
10000
statuses
sort

users_desc = most uncovered users first (default); gap_count_desc = most gap ASNs first; country_asc = alphabetical

Type
string
Valid values
"users_desc""gap_count_desc""country_asc"
Default
"users_desc"

Responses​

Successful Response

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

Playground​

Headers
Variables
Key
Value

Samples​


List Gap Countries​

GET
/as-population/gaps/countries/

Distinct ISO cc values present in the latest snapshot —
drives the country-filter dropdown.

Parameters​

Header Parameters

authorization
x-api-key

Responses​

Successful Response

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

Playground​

Headers

Samples​


Refresh As Population​

POST
/atlas/as-population/refresh/

Pull the latest global APNIC AS-population snapshot now.

Mirror of the daily cron's import_latest — one HTTP call,
completes in seconds. For historical date ranges use the admin
cookie-session endpoint POST /as-population/backfill instead;
this api-key route is the cron's manual companion.

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.