Skip to main content

Run Results & Integrity

Read a finished run with one verified record per chart: values, chart contract, coverage, integrity seal status, withheld reasons, and stale detection.

GET /v1/chart-to-data/runs/{id} returns one run with its results. A run that is not done has results: null. A finished run has one record per requested chart: chart_id, chart_key, the engine's status and message for the chart, and the result documents values (the customer-facing table of values), chart (the chart contract) and coverage (the coverage report). A bar or category marker-line chart has no values or chart document and returns plain instead, the rows of the category-axis reading. A chart the engine could not read comes back with a status such as EXECUTION_FAILURE; it does not fail the run.

Each record is verified on read against its seal, the run row and the bound inputs. integrity is VERIFIED, FAILED or UNSEALED (records stored before sealing), and integrity_reasons lists why a record failed: SEAL_MALFORMED, CONTENT_MISMATCH, ENGINE_MISMATCH, INPUT_MISMATCH, DOCUMENT_MISMATCH, RUN_MISMATCH, IDENTITY_MISMATCH, MEMBERSHIP_MISMATCH or INPUT_MISSING. The run itself has an integrity, VERIFIED only when its records are exactly the bound request's charts, none empty, duplicated or added, and each is intact. output_valid reports whether the output satisfies the output contract, and is null for a record without output.

A record that is not VERIFIED, whose output does not satisfy the contract, or that sits in a run that is not VERIFIED is returned without values, chart and coverage and with a withheld_reason of INTEGRITY_FAILED, UNSEALED or OUTPUT_INVALID. Its status, message and printed_tick_validation stay, so the reason a chart yielded nothing is still readable. An unsealed record is never reported as verified; a rerun replaces it with a sealed one.

printed_tick_validation reports whether the axes were checked against the tick labels printed on the page. On a record it has status (PASS or NOT_VERIFIED), the number of axes and the number of printed_glyphs; on the run it is PASS only if every chart with values is PASS and nothing is withheld. stale is a separate signal: it is true, with stale_reason INPUTS_NEWER or ENGINE_CHANGED, when the inputs have a newer version or the engine changed since the run. A stale run keeps its integrity and needs another run to reflect the change.

GET/v1/chart-to-data/runs/{id}

Run-level fields (in addition to the run fields)

resultsarray | nullOne record per requested chart; null until the run is done.
integritystring | nullVERIFIED, FAILED or UNSEALED for the run; null while the run is not done.
integrity_reasonsstring[]Why the run is not VERIFIED.
printed_tick_validationstringPASS or NOT_VERIFIED; present for a finished run.
stale, stale_reasonboolean, string | nullTrue when the inputs have a newer version (INPUTS_NEWER) or the engine changed (ENGINE_CHANGED).
inputs_version, inputs_digestinteger | null, string | nullThe version and digest of the inputs the run references.

Record fields (results[])

chart_id, chart_keystringThe chart the record answers.
status, messagestringThe engine's outcome for the chart, such as EXECUTION_FAILURE when it could not be read, and its message.
values, chart, coverageobjectThe customer-facing table of values, the chart contract and the coverage report. Absent when withheld or when the chart yielded none.
plainobjectCategory-axis rows (series, category, value, range) of a bar or category marker-line chart.
printed_tick_validationobject{ status (PASS or NOT_VERIFIED), axes, printed_glyphs }.
integrity, integrity_reasonsstring, string[]VERIFIED, FAILED or UNSEALED, and the reasons for a failure.
output_valid, output_invalid_reasonboolean | null, string | nullResult of the output-contract check, and why it failed.
withheld_reasonstringINTEGRITY_FAILED, UNSEALED or OUTPUT_INVALID. Present when values, chart and coverage are not served.

Response: A verified run (result documents abbreviated)

{
  "id": "4c9e1b75-a2d8-4f60-8e13-b7d0a5c42f98",
  "document_id": "d0e4b7a2-3f19-4c68-9a05-b1c7e8f26d34",
  "page_number": 4,
  "input_id": "2f7c9a41-8b06-4d3e-a915-60c8e1d4b7a3",
  "engine_version": "v24-ts-pdfjs-1",
  "status": "done",
  "attempts": 1,
  "error_code": null,
  "error_message": null,
  "results": [
    {
      "chart_id": "p4-c1",
      "chart_key": "p4-c1",
      "status": "COMPLETE",
      "message": "",
      "values": { "...": "customer-facing table of values" },
      "chart": { "...": "chart contract" },
      "coverage": { "...": "coverage report" },
      "printed_tick_validation": { "status": "PASS", "axes": 2, "printed_glyphs": 14 },
      "integrity": "VERIFIED",
      "integrity_reasons": [],
      "output_valid": true
    }
  ],
  "integrity": "VERIFIED",
  "integrity_reasons": [],
  "printed_tick_validation": "PASS",
  "stale": false,
  "stale_reason": null,
  "inputs_version": 3,
  "inputs_digest": "b1c7e8f2..."
}

Response: A withheld record

{
  "chart_id": "p4-c2",
  "chart_key": "p4-c2",
  "status": "COMPLETE",
  "message": "",
  "printed_tick_validation": { "status": "NOT_VERIFIED", "axes": 0, "printed_glyphs": 0 },
  "integrity": "UNSEALED",
  "integrity_reasons": [],
  "output_valid": null,
  "withheld_reason": "UNSEALED"
}
The seal detects corruption and binding errors between a stored record, its run and its inputs. It is not a signature: a party who can write the record and its seal together is outside what it proves. Treat VERIFIED as "this record is intact and belongs to this run", and keep inputs_digest and engine_version with any value you export.

Frequently asked questions

Why does a record have no values although the run is done?+
The record was withheld: its integrity is not VERIFIED, its output does not satisfy the output contract, or its run is not VERIFIED. withheld_reason says which (INTEGRITY_FAILED, UNSEALED or OUTPUT_INVALID), and integrity_reasons says why a seal check failed. The chart can also have yielded no values, with an engine status and message explaining it.
What does stale mean for a result I already have?+
The inputs have a newer version (INPUTS_NEWER) or the engine changed (ENGINE_CHANGED) since the run. The run stays VERIFIED if its seal matches its row, so the result is still valid for the exact bytes, inputs and engine that produced it. Queue another run to reflect the newer inputs or engine.
What is the difference between values and plain?+
values and chart are the result documents for charts read through the full engine. A bar chart or a category marker-line chart is read from the page's category axes and returns plain, the rows of series, category and value with a range, instead of values and chart.
What is printed_tick_validation?+
It reports whether the axes were checked against the tick labels printed on the page. A record is PASS when the printed ticks verified, and NOT_VERIFIED when no printed-tick evidence was stored or it could not be verified. The run reports PASS only if every chart with values is PASS and nothing is withheld.