API reference

API Surface

The stable lookup and critical-cell editing contracts are grouped here by workflow so diagnostics and curation work can move quickly without leaving the app shell.
Read models

Reference and lookup payloads

Reference data

GET /api/reference-data
{
  "attackTables": [
    {
      "key": "broadsword",
      "label": "Broadsword",
      "attackKind": "melee",
      "fumbleMinRoll": 1,
      "fumbleMaxRoll": 2
    }
  ],
  "criticalTables": [
    {
      "key": "mana",
      "label": "Mana Critical Strike Table",
      "family": "standard",
      "sourceDocument": "Mana.pdf",
      "notes": "Imported from PDF XML extraction."
    }
  ]
}

Attack lookup

POST /api/lookup/attack
{
  "attackTable": "broadsword",
  "armorType": "AT10",
  "roll": 111,
  "criticalRoll": 72
}

Critical lookup

POST /api/lookup/critical
{
  "criticalType": "mana",
  "column": "E",
  "roll": 100,
  "group": null
}
Curation contracts

Critical-cell editing workflow

Cell editor load

GET /api/tables/critical/{slug}/cells/{resultId}
{
  "resultId": 412,
  "tableSlug": "slash",
  "tableName": "Slash Critical Strike Table",
  "rollBand": "66-70",
  "groupKey": null,
  "columnKey": "C",
  "isCurated": false,
  "sourcePageNumber": 1,
  "sourceImageUrl": "/api/tables/critical/slash/cells/412/source-image",
  "rawCellText": "Original imported full cell text",
  "descriptionText": "Current curated prose",
  "rawAffixText": "+8H - 2S",
  "parseStatus": "verified",
  "parsedJson": "{\"version\":1,\"isDescriptionOverridden\":false,\"isRawAffixTextOverridden\":false,\"areEffectsOverridden\":false,\"areBranchesOverridden\":false,\"effects\":[],\"branches\":[]}",
  "isDescriptionOverridden": false,
  "isRawAffixTextOverridden": false,
  "areEffectsOverridden": false,
  "areBranchesOverridden": false,
  "validationMessages": [],
  "effects": [],
  "branches": []
}

Cell source image

GET /api/tables/critical/{slug}/cells/{resultId}/source-image

Cell re-parse

POST /api/tables/critical/{slug}/cells/{resultId}/reparse
{
  "currentState": {
    "rawCellText": "Strike to thigh. +8H\nWith greaves: blow glances aside.",
    "descriptionText": "Curated prose",
    "rawAffixText": "+8H",
    "parseStatus": "partial",
    "parsedJson": "{}",
    "isCurated": false,
    "isDescriptionOverridden": true,
    "isRawAffixTextOverridden": false,
    "areEffectsOverridden": false,
    "areBranchesOverridden": false,
    "effects": [],
    "branches": []
  }
}

Cell editor save

PUT /api/tables/critical/{slug}/cells/{resultId}
{
  "rawCellText": "Corrected imported text",
  "descriptionText": "Rewritten prose after manual review",
  "rawAffixText": "+10H - must parry 2 rnds",
  "parseStatus": "manually_curated",
  "parsedJson": "{\"reviewed\":true}",
  "isCurated": true,
  "isDescriptionOverridden": true,
  "isRawAffixTextOverridden": false,
  "areEffectsOverridden": false,
  "areBranchesOverridden": false,
  "effects": [
    {
      "effectCode": "direct_hits",
      "target": null,
      "valueInteger": 10,
      "valueDecimal": null,
      "valueExpression": null,
      "durationRounds": null,
      "perRound": null,
      "modifier": null,
      "bodyPart": null,
      "isPermanent": false,
      "sourceType": "symbol",
      "sourceText": "+10H",
      "originKey": "base:direct_hits:1",
      "isOverridden": true
    }
  ],
  "branches": []
}
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.