Request
试一试
Available · No credits
GET/v1/federation/records
curl -s "https://api.risksindex.com/v1/federation/records?type=jurisdiction&limit=2"const res = await fetch("https://api.risksindex.com/v1/federation/records?type=jurisdiction&limit=2");
const { data, meta } = await res.json();import json, urllib.request
req = urllib.request.Request("https://api.risksindex.com/v1/federation/records?type=jurisdiction&limit=2")
with urllib.request.urlopen(req) as res:
answer = json.load(res)200 OKapplication/json
{
"data": [
{
"id": "index:jurisdiction/AFG/badakhshan",
"type": "jurisdiction",
"label": "Badakhshan",
"aliases": [],
"dimensions": {},
"links": [],
"level": 1,
"country": "AFG",
"path": "badakhshan",
"code": "AF-BDN"
}
],
"meta": {
"authority": "The Global Risks Index (NXS-GRX), GCRI C…",
"schema": "nexus.federation.records/v1",
"projection": "urn:therisk:graph:record-projection:v1",
"network": "index",
"state": "E",
"listingVersion": "32b25286724c0dd8f500eab4a738435e",
"snapshot": {
"digest": "sha256:9707f5b5060244eecba306a5fdffc3387…",
"snapshotAt": "2026-11-22T01:34:55.802Z",
"edition": "idx-949f583329bfb9c1c6c2"
},
"page": {
"limit": 2,
"cursor": null,
"next": "eyJrIjoiMzJiMjUyODY3MjRjMGRkOGY1MDBlYWI0…",
"returned": 2,
"total": 140772,
"levels": [],
"totalNote": "The snapshot records and tombstones, plu…"
},
"provenance": [
{}
],
"provenanceByType": {
"hazard": {},
"hazard-family": {},
"hazard-domain": {},
"indicator": {},
"indicator-domain": {},
"mapping-set": {},
"series": {},
"country": {},
"subsite": {},
"edition": {}
}
}
} An answer this API gave, shortened. Values change with the data.
Every record the Index is the authority for, in the graph projection, paged: the snapshot records, tombstones of records the previous snapshot held, then the ADM2 and ADM3 units of every country (index:jurisdiction/ /, read through the profile edition). One contract for every network (the federation descriptor names it as records). Paging by an opaque cursor bound to the listing version and Link rel="next"; a cursor of another version answers 409 STALE_CURSOR. level keeps the jurisdiction records to the named ADM levels. The strong ETag derives from the snapshot digest, the profile edition and the query, so a repeat read answers 304. Provenance per record type in meta.provenance.byType. No value, rank or class. Availability: Available.
Parameters
Parameters
typeoptionalquery · string
Comma-separated record types (bare or index:-qualified), for example jurisdiction
leveloptionalquery · string
Comma-separated ADM levels of jurisdiction records to list: 1, 2, 3 (default all). A reader that holds the graph in memory asks for 1
parentoptionalquery · string
A place identifier (index:country/, or an ADM1 or ADM2 index:jurisdiction/ / ): only its parts, the records partOf it
classificationoptionalquery · string
Comma-separated scheme:code pairs a place must hold, its own or inherited from its country (marked inherited): m49-region (the five top-level codes), registry-region, registry-subregion, un-status, adm (ADM1 to ADM3), boundary (permissive, share-alike). Only countries and units match
limitoptionalquery · integer
Records per page, 1 to 1000 (default 500)
cursoroptionalquery · string
Opaque cursor from meta.page.next or the Link rel="next" (bound to the listing 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 a key with a free account, or choose who the account is for, its seats and any council, and see your workstation first.