Risks Index APIOperational
sol28_distribution
SOL-28: distribution of a result across groups, beside the average
Request
અજમાવો
Available · MCP tool sol28.distribution · 10 credits per job · 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.
POST/v1/solutions/SOL-28/distribution
curl -s -X POST "https://api.risksindex.com/v1/solutions/SOL-28/distribution" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: <a-unique-key-per-attempt>" \
-d '{"measure":{"id":"m","polarity":"higher-is-riskier"},"dimension":"sex","groups":[{"id":"f","value":1,"se":0.1},{"id":"m","value":2,"se":0.1}]}'const res = await fetch("https://api.risksindex.com/v1/solutions/SOL-28/distribution", { method: "POST", headers: { "Content-Type": "application/json", "Idempotency-Key": "<a-unique-key-per-attempt>" }, body: "{\"measure\":{\"id\":\"m\",\"polarity\":\"higher-is-riskier\"},\"dimension\":\"sex\",\"groups\":[{\"id\":\"f\",\"value\":1,\"se\":0.1},{\"id\":\"m\",\"value\":2,\"se\":0.1}]}" });
const { data, meta } = await res.json();import json, urllib.request
req = urllib.request.Request("https://api.risksindex.com/v1/solutions/SOL-28/distribution", data="{\"measure\":{\"id\":\"m\",\"polarity\":\"higher-is-riskier\"},\"dimension\":\"sex\",\"groups\":[{\"id\":\"f\",\"value\":1,\"se\":0.1},{\"id\":\"m\",\"value\":2,\"se\":0.1}]}".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": {
"status": "shown",
"measure": {
"id": "m",
"higherIsRiskier": true
},
"dimension": "sex",
"average": {
"value": 1.5,
"basis": "simple mean of the groups with a value (no population on eve…",
"groupsUsed": 2,
"groupsMissing": []
},
"groups": [
{
"id": "f",
"label": "f",
"value": 1,
"differenceToMean": -0.5,
"ratioToMean": 0.666666667,
"se": 0.1,
"interval95": []
}
],
"summary": {
"absoluteDifference": {
"value": 1,
"between": {},
"interval95": [],
"intervalBasis": "normal approximation from the two group standard errors, gro…"
},
"ratio": {
"value": 2,
"interval95": [],
"intervalBasis": "delta method on the log ratio, groups independent"
},
"maxRelativeGapToMean": 0.333333333,
"groupsOnTheRiskierSide": {
"riskier": "m",
"lessRisky": "f",
"note": "the end of the split where the measure is worse for the peop…"
}
},
"uncertainty": {
"status": "supplied",
"note": "group standard errors were given: intervals are 95% normal a…"
},
"nis1": null,
"replication": {
"inputDigest": "92880f68aba3e91b357108a8203bcd78b5c3295cf0739aa6de73e561c58c…",
"resultDigest": "3bb3439579f0d7ada5d7e86cf9fabc6d10cdc5c5990d7ade741f4c32d06b…",
"methodVersion": "sol28-distribution-v1",
"deterministic": true
},
"statement": "Distribution is shown beside the average, for the groups and…"
},
"meta": {
"authority": "The Global Risks Index (NXS-GRX), GCRI Canada; Nexus Standar…",
"state": "E",
"provenance": [
{
"repository": "nexus-estate/nexus-standards-full",
"commit": "2fcbde115623f8b75a12a91177893f80feb7ee1c",
"path": "registry/native/nhs-1.json",
"sha256": "cf483570ce455cb47a20260a23af594d334a8bed4107a677922093029f3c…",
"licence": "CC-BY-4.0",
"snapshotAt": "2026-11-22T01:34:55.802Z",
"carriedVia": {}
}
],
"review": {
"state": "unreviewed",
"route": "Method: Nexus Standards technical committee due process. Evi…",
"note": "No independent review of this method is recorded: it is show…"
},
"decision": {
"recorded": false,
"note": "The client records their own decision and rationale in their…"
},
"illustrative": true,
"coverage": {
"status": "full",
"records": 2
},
"method": {
"id": "sol28-distribution-v1",
"card": "/v1/methods/sol28-distribution-v1",
"version": "sol28-distribution-v1",
"doc": "/v1/solutions/SOL-28/method-card"
},
"replication": {
"inputDigest": "92880f68aba3e91b357108a8203bcd78b5c3295cf0739aa6de73e561c58c…",
"resultDigest": "3bb3439579f0d7ada5d7e86cf9fabc6d10cdc5c5990d7ade741f4c32d06b…",
"methodVersion": "sol28-distribution-v1",
"deterministic": true
},
"service": "nxs-index-api",
"version": "0.9.0"
}
} An answer this API gave, shortened. Values change with the data.
On the caller's own grouped data: population-weighted mean, absolute difference, ratio, and for ordered groups the slope and relative indices of inequality, with intervals from supplied standard errors. A figure without an uncertainty is refused unless acknowledged. Says when distribution cannot be shown. Descriptive: no fairness verdict. Open over HTTP; the MCP tool is listed only with a Passport token. Availability: Available.
Parameters
Parameters
Idempotency-Keyoptionalheader · 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
- 402
- 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.