বিষয়বস্তুতে যান
The Consortium

Risks Index APIOperational

GET_v1_places_changes

Change feed of places: units created, updated and withdrawn between editions

Request

Try it

Available · No credits

https://api.risksindex.com

GET/v1/places/changes

curl -s "https://api.risksindex.com/v1/places/changes?country=KEN&limit=2"
const res = await fetch("https://api.risksindex.com/v1/places/changes?country=KEN&limit=2");
const { data, meta } = await res.json();
import json, urllib.request

req = urllib.request.Request("https://api.risksindex.com/v1/places/changes?country=KEN&limit=2")
with urllib.request.urlopen(req) as res:
    answer = json.load(res)

200 OKapplication/json

[]

An answer this API gave, shortened. Values change with the data.

CloudEvents 1.0 index.jurisdiction.created|updated|withdrawn for the ADM1, ADM2 and ADM3 units of every country between the previous edition (the frozen baseline) and this one, in the batch the record feed uses (application/cloudevents-batch+json; format=envelope for the service envelope). updated means the unit's own data (name, ISO 3166-2 code, level) changed. Empty when the baseline is this edition: read the bulk listing once, then this feed at each edition. Paging by an opaque cursor bound to the feed version and Link rel="next"; 409 STALE_CURSOR after a new edition. Filters: level, country, type. No value. Availability: Available.

Parameters

Parameters

  • leveloptional

    query · string

    Comma-separated ADM levels: 1, 2, 3

  • countryoptional

    query · string

    ISO 3166-1 alpha-3 code, for example KEN

  • typeoptional

    query · string

    Comma-separated: created, updated, withdrawn

  • formatoptional

    query · string · cloudevents | envelope

    cloudevents (default) or envelope

  • limitoptional

    query · integer

    Events per page, 1 to 1000 (default 500)

  • cursoroptional

    query · string

    Opaque cursor from the Link rel="next" (bound to the feed version)

Answers

Responses

  • 200

    Records with provenance, coverage and links

  • 304

    Not modified: If-None-Match matched the snapshot digest

  • 400Problem, RFC 9457

    Bad cursor. Codes: BAD_CURSOR, BAD_FILTER, BAD_PAGE

  • 401

  • 404Problem, RFC 9457

    Not found. Codes: NOT_FOUND

  • 409Problem, RFC 9457

    Stale cursor. Codes: STALE_CURSOR

  • 414

  • 429Problem, RFC 9457

    Rate limited. Codes: RATE_LIMITED

  • 500Problem, RFC 9457

    Internal error. Codes: INTERNAL

  • 503Problem, RFC 9457

    Profiles unavailable. Codes: PROFILES_UNAVAILABLE

Get started

Get a key with a free account, or choose who the account is for, its seats and any council, and see your workstation first.