بازدە بۆ ناوەڕۆک
The Consortium

Risks Index APIOperational

sol12_classify

SOL-12: classify a register of texts or codes

Request

تاقی بکەرەوە

Available · MCP tool sol12.classify · No credits · Pro

Pro: an API key whose account holds an active plan of pro, max, max-20x, team, enterprise, as the Business Hub states it. Without it this operation answers 402 with the code PRO_REQUIRED.

https://api.risksindex.com

POST/v1/solutions/SOL-12/classify-register

curl -s -X POST "https://api.risksindex.com/v1/solutions/SOL-12/classify-register" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: <a-unique-key-per-attempt>" \
  -d '{"rows":[{"id":"a","text":"River flood"}]}'
const res = await fetch("https://api.risksindex.com/v1/solutions/SOL-12/classify-register", { method: "POST", headers: { "Content-Type": "application/json", "Idempotency-Key": "<a-unique-key-per-attempt>" }, body: "{\"rows\":[{\"id\":\"a\",\"text\":\"River flood\"}]}" });
const { data, meta } = await res.json();
import json, urllib.request

req = urllib.request.Request("https://api.risksindex.com/v1/solutions/SOL-12/classify-register", data="{\"rows\":[{\"id\":\"a\",\"text\":\"River flood\"}]}".encode(), method="POST", headers={"Content-Type": "application/json", "Idempotency-Key": "<a-unique-key-per-attempt>"})
with urllib.request.urlopen(req) as res:
    answer = json.load(res)

200 OKapplication/json

{
  "data": {
    "classifiedRegister": [
      {}
    ],
    "unmatched": [],
    "mappingFile": {
      "format": "SSSOM",
      "metadata": {},
      "rows": [],
      "tsv": "#curie_map:\n#  client: \"urn:client:regis…",
      "note": "Valid SSSOM table with a metadata block;…"
    },
    "coverageReport": {
      "forward": {},
      "reverse": {},
      "sector": {}
    },
    "replication": {
      "inputDigest": "6919715a78d252a1988b462770e341c44ed25af2…",
      "resultDigest": "67e01bcbaa1ec1b5b538e0936d0acc3960330c7a…",
      "methodVersion": "rule-v1",
      "sources": [],
      "deterministic": true
    },
    "method": {
      "id": "rule-v1",
      "modelCalls": "none",
      "card": "/v1/solutions/SOL-12/method-card"
    },
    "uncertainty": "A match confidence is a rule score from …"
  },
  "meta": {
    "authority": "The Global Risks Index (NXS-GRX), GCRI C…",
    "state": "E",
    "provenance": [
      {}
    ],
    "review": {
      "state": "unreviewed",
      "route": "Method: Nexus Standards technical commit…",
      "note": "No independent review of this method is …"
    },
    "decision": {
      "recorded": false,
      "note": "The client records their own decision an…"
    },
    "illustrative": true,
    "coverage": {
      "status": "full",
      "records": 1
    },
    "method": {
      "id": "rule-v1",
      "card": "/v1/methods/rule-v1",
      "version": "rule-v1",
      "doc": "/v1/solutions/SOL-12/method-card"
    },
    "service": "nxs-index-api",
    "version": "0.9.0"
  }
}

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

Deterministic classification of up to 2,000 rows (text, or a code with its system) to NHS-1 and NIS-1: classified register, unmatched list, SSSOM mapping file (JSON and TSV, all rows unreviewed), coverage report in both directions and a replication digest. No model call; nothing stored. Open over HTTP; the MCP tool is listed only with a Passport token. Availability: Available.

Parameters

Parameters

  • Idempotency-Keyoptional

    header · string

    Optional. A value of your own (a UUID is fine) that makes this write safe to retry: the same caller, key and request within 24 hours gets the first answer again, with the header Idempotent-Replayed: true, and the work is not done twice. It applies to a request that carries a credential.

Answers

Responses

  • 200

    Records with provenance, coverage and links

  • 400Problem, RFC 9457

    Bad request body. Codes: BAD_BUILD, BAD_JSON

  • 401

  • 404Problem, RFC 9457

    Not found. Codes: NOT_FOUND

  • 409

  • 413Problem, RFC 9457

    Body too large. Codes: TOO_LARGE

  • 414

  • 422

  • 429Problem, RFC 9457

    Rate limited. Codes: RATE_LIMITED

  • 500Problem, RFC 9457

    Internal error. Codes: INTERNAL

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.