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

Risks Index APIOperational

GET_v1_bulk_collection_

Stream a collection as NDJSON

Request

Try it

Available · 0.1 credits per 100 records

https://api.risksindex.com

GET/v1/bulk/{collection}

curl -s "https://api.risksindex.com/v1/bulk/<collection>"
const res = await fetch("https://api.risksindex.com/v1/bulk/<collection>");
const { data, meta } = await res.json();
import json, urllib.request

req = urllib.request.Request("https://api.risksindex.com/v1/bulk/<collection>")
with urllib.request.urlopen(req) as res:
    answer = json.load(res)

One record per line, paged internally from the collection's own list route so the stream is exactly what the API serves, bound to the snapshot digest (ETag). If-None-Match of the same digest answers 304; If-Match of another digest answers 412; ?skip=n resumes a cut stream. format is ndjson. Availability: Available.

Parameters

Parameters

  • collectionrequired

    path · string

    hazards, hazard-domains, indicators or indicator-domains

  • skipoptional

    query · string

    Records already received, to resume a cut stream (default 0)

  • formatoptional

    query · string

    ndjson (the only format built; default ndjson)

Answers

Responses

  • 200

    One record per line (NDJSON), bound to the snapshot digest

  • 304

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

  • 400Problem, RFC 9457

    Invalid request. Codes: INVALID_REQUEST

  • 401Problem, RFC 9457

    Sign-in needed. Codes: BULK_AUTH

  • 402

  • 404Problem, RFC 9457

    Not found. Codes: NOT_FOUND

  • 412Problem, RFC 9457

    Snapshot changed. Codes: SNAPSHOT_CHANGED

  • 414

  • 429Problem, RFC 9457

    Rate limited. Codes: RATE_LIMITED

  • 500Problem, RFC 9457

    Internal error. Codes: INTERNAL

  • 502Problem, RFC 9457

    Collection source failed. Codes: BULK_SOURCE

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.