# API: Datasets and Comparisons

Upload or replay Datasets and compare two releases over them.

Part of the API reference: requests carry a personal access token as `Authorization: Bearer <token>`, and bodies and answers are JSON.

- [API reference](https://typefuse.dev/guides/api-reference)
- [Try it in the API console](https://api.typefuse.dev/docs)

## Datasets

### GET /v1/organisations/{org}/decisions/{slug}/datasets

**List Datasets.**

**Path**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `org` | `string` | Required |  |
| `slug` | `string` | Required |  |

**Answer (200)**

| Name | Type | Description |
| --- | --- | --- |
| `datasets` | `array` |  |

```sh
curl "https://api.typefuse.dev/v1/organisations/acme/decisions/refunds/datasets" \
  -H "Authorization: Bearer $TYPEFUSE_TOKEN"
```

### POST /v1/organisations/{org}/decisions/{slug}/datasets

**Upload a Dataset.**

JSON `{ name, rows }`, or JSONL as application/x-ndjson with `?name=`.

**Path**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `org` | `string` | Required |  |
| `slug` | `string` | Required |  |

**Body**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | Required |  |
| `rows` | `array` | Required | One input (a JSON object) a row. |

**Answer (201)**

| Name | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `name` | `string` |  |
| `source` | `string`, one of `upload`, `replay` | "upload": rows sent by a person or agent; "replay": a snapshot of recorded production calls. |
| `replayFilter` | `object or null` | How a replay Dataset chose its recorded runs. |
| `replayFilter.environment` | `string` |  |
| `replayFilter.versionNumber` | `integer or null` |  |
| `replayFilter.since` | `string or null` | ISO times bounding when the recorded calls were answered. |
| `replayFilter.until` | `string or null` |  |
| `replayFilter.limit` | `integer` |  |
| `rowCount` | `integer` |  |
| `skippedNotStored` | `integer` | For a replay: matching recorded calls left out because their input is no longer stored. |
| `uniqueInputCount` | `integer` |  |
| `bytes` | `integer` |  |
| `createdBy` | `integer` |  |
| `createdByName` | `string` |  |
| `createdAt` | `string` |  |
| `refused` | `array of { "line": integer, "message": string }` | Rows that were not JSON objects (or were too large), by line; the rest were kept. |

```sh
curl -X POST "https://api.typefuse.dev/v1/organisations/acme/decisions/refunds/datasets" \
  -H "Authorization: Bearer $TYPEFUSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Refunds","rows":[]}'
```

### POST /v1/organisations/{org}/decisions/{slug}/datasets/replay

**Replay production calls as a Dataset.**

Snapshots recorded production calls. Owners and admins (and full-scope tokens) only.

**Path**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `org` | `string` | Required |  |
| `slug` | `string` | Required |  |

**Body**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `environment` | `string` | Optional | The environment whose recorded calls to snapshot; default "production". |
| `versionNumber` | `integer` | Optional | Only calls answered by this version. |
| `since` | `string` | Optional | ISO time; or `days` for the last N days. |
| `until` | `string` | Optional |  |
| `days` | `integer` | Optional |  |
| `limit` | `integer` | Optional | At most this many of the most recent calls. |
| `name` | `string` | Optional |  |

**Answer (201)**

| Name | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `name` | `string` |  |
| `source` | `string`, one of `upload`, `replay` | "upload": rows sent by a person or agent; "replay": a snapshot of recorded production calls. |
| `replayFilter` | `object or null` | How a replay Dataset chose its recorded runs. |
| `replayFilter.environment` | `string` |  |
| `replayFilter.versionNumber` | `integer or null` |  |
| `replayFilter.since` | `string or null` | ISO times bounding when the recorded calls were answered. |
| `replayFilter.until` | `string or null` |  |
| `replayFilter.limit` | `integer` |  |
| `rowCount` | `integer` |  |
| `skippedNotStored` | `integer` | For a replay: matching recorded calls left out because their input is no longer stored. |
| `uniqueInputCount` | `integer` |  |
| `bytes` | `integer` |  |
| `createdBy` | `integer` |  |
| `createdByName` | `string` |  |
| `createdAt` | `string` |  |

```sh
curl -X POST "https://api.typefuse.dev/v1/organisations/acme/decisions/refunds/datasets/replay" \
  -H "Authorization: Bearer $TYPEFUSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### GET /v1/organisations/{org}/decisions/{slug}/datasets/{datasetId}

**Get a Dataset.**

**Path**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `org` | `string` | Required |  |
| `slug` | `string` | Required |  |
| `datasetId` | `string` | Required |  |

**Answer (200)**

| Name | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `name` | `string` |  |
| `source` | `string`, one of `upload`, `replay` | "upload": rows sent by a person or agent; "replay": a snapshot of recorded production calls. |
| `replayFilter` | `object or null` | How a replay Dataset chose its recorded runs. |
| `replayFilter.environment` | `string` |  |
| `replayFilter.versionNumber` | `integer or null` |  |
| `replayFilter.since` | `string or null` | ISO times bounding when the recorded calls were answered. |
| `replayFilter.until` | `string or null` |  |
| `replayFilter.limit` | `integer` |  |
| `rowCount` | `integer` |  |
| `skippedNotStored` | `integer` | For a replay: matching recorded calls left out because their input is no longer stored. |
| `uniqueInputCount` | `integer` |  |
| `bytes` | `integer` |  |
| `createdBy` | `integer` |  |
| `createdByName` | `string` |  |
| `createdAt` | `string` |  |
| `preview` | `array` | The first 50 rows. |

```sh
curl "https://api.typefuse.dev/v1/organisations/acme/decisions/refunds/datasets/<datasetId>" \
  -H "Authorization: Bearer $TYPEFUSE_TOKEN"
```

### DELETE /v1/organisations/{org}/decisions/{slug}/datasets/{datasetId}

**Delete a Dataset.**

Soft delete: Dataset runs and Comparisons keep their evidence.

**Path**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `org` | `string` | Required |  |
| `slug` | `string` | Required |  |
| `datasetId` | `string` | Required |  |

It answers with no body.

```sh
curl -X DELETE "https://api.typefuse.dev/v1/organisations/acme/decisions/refunds/datasets/<datasetId>" \
  -H "Authorization: Bearer $TYPEFUSE_TOKEN"
```

## Comparisons

### GET /v1/organisations/{org}/decisions/{slug}/comparisons

**List Comparisons.**

**Path**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `org` | `string` | Required |  |
| `slug` | `string` | Required |  |

**Answer (200)**

| Name | Type | Description |
| --- | --- | --- |
| `comparisons` | `array` |  |

```sh
curl "https://api.typefuse.dev/v1/organisations/acme/decisions/refunds/comparisons" \
  -H "Authorization: Bearer $TYPEFUSE_TOKEN"
```

### POST /v1/organisations/{org}/decisions/{slug}/comparisons

**Start a Comparison.**

Starts the Comparison, running the rows it needs in the background; maxCalls is optional (without it, every chosen row runs). With X-TypeSafe-Key its rows run on your own TypeSafe key, sealed while they wait and never stored.

**Path**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `org` | `string` | Required |  |
| `slug` | `string` | Required |  |

**Headers**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-TypeSafe-Key` | `string` | Optional |  |

**Body**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `datasetId` | `string` | Required |  |
| `a` | `object` | Required | One side of a Comparison: exactly one of `version` (a published version by number), `draft` (the draft as it is now, frozen when started), `environment` (the release live there when started) or `recorded` (production's recorded answers; replay Datasets only). |
| `a.version` | `integer` | Optional |  |
| `a.draft` | `boolean` | Optional |  |
| `a.environment` | `string` | Optional |  |
| `a.recorded` | `boolean` | Optional |  |
| `b` | `object` | Required | One side of a Comparison: exactly one of `version` (a published version by number), `draft` (the draft as it is now, frozen when started), `environment` (the release live there when started) or `recorded` (production's recorded answers; replay Datasets only). |
| `b.version` | `integer` | Optional |  |
| `b.draft` | `boolean` | Optional |  |
| `b.environment` | `string` | Optional |  |
| `b.recorded` | `boolean` | Optional |  |
| `sample` | `integer` | Optional |  |
| `seed` | `integer` | Optional |  |
| `batchSize` | `integer` | Optional |  |
| `fresh` | `boolean` | Optional |  |
| `maxCalls` | `integer` | Optional | The most model calls both sides together may make; rows beyond it are not run. Without it, every chosen row runs. |

**Answer (202)**

| Name | Type | Description |
| --- | --- | --- |
| `comparison` | `object` |  |
| `comparison.id` | `string` |  |
| `comparison.datasetId` | `string` |  |
| `comparison.datasetName` | `string or null` |  |
| `comparison.datasetSource` | `string or null`, one of `upload`, `replay` |  |
| `comparison.status` | `string`, one of `running`, `completed`, `cancelled` |  |
| `comparison.a` | `object` |  |
| `comparison.b` | `object` |  |
| `comparison.maxCalls` | `integer` |  |
| `comparison.progress` | `object` | Rows finished across both sides, of the rows both will run. |
| `comparison.headline` | `object or null` | The headline numbers; null until analysed. |
| `comparison.summary` | `object or null` | The full analysis; null until analysed, and left out of lists. |
| `comparison.projection` | `object or null` | Each side's cost per call at the Decision's last 30 days of production traffic; null when there was none, before the analysis, and in lists. |
| `comparison.costWording` | `object or null` | The cost headline in words, as the app shows it: `said` compares the cost per call (such as "48% less per call") and `projected` puts it at production's recent traffic. Null before the analysis and in lists; either line is null when there is nothing to say. |
| `comparison.replay` | `object or null` | For a Dataset replayed from production: the recorded calls it matched and how many could not be replayed, because their input was no longer stored or (once analysed) no longer fits the input a side accepts. Null for uploaded Datasets. |
| `comparison.createdBy` | `integer` |  |
| `comparison.createdByName` | `string` |  |
| `comparison.createdAt` | `string` |  |
| `comparison.completedAt` | `string or null` |  |
| `estimate` | `object` |  |
| `estimate.datasetId` | `string` |  |
| `estimate.rows` | `integer` |  |
| `estimate.skippedNotStored` | `integer` | The Dataset's recorded calls left out of its replay snapshot because their input is no longer stored. |
| `estimate.uniqueInputs` | `integer` |  |
| `estimate.sample` | `integer or null` |  |
| `estimate.seed` | `integer` |  |
| `estimate.batchSize` | `integer` |  |
| `estimate.a` | `object` |  |
| `estimate.b` | `object` |  |
| `estimate.callsWithoutCap` | `integer` | Calls without a cap. |
| `estimate.maxCalls` | `integer or null` |  |
| `estimate.calls` | `integer` | Calls within maxCalls (or without a cap when none was given). |
| `estimate.rowsCovered` | `integer` |  |
| `estimate.inputTokens` | `integer` |  |
| `estimate.minutes` | `integer` |  |
| `estimate.allowed` | `boolean` |  |
| `estimate.refusal` | `object or null` |  |

```sh
curl -X POST "https://api.typefuse.dev/v1/organisations/acme/decisions/refunds/comparisons" \
  -H "Authorization: Bearer $TYPEFUSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"datasetId":"<datasetId>","a":{},"b":{}}'
```

### POST /v1/organisations/{org}/decisions/{slug}/comparisons/estimate

**Estimate a Comparison.**

What a Comparison would cost and whether it may start. Calls no model.

**Path**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `org` | `string` | Required |  |
| `slug` | `string` | Required |  |

**Headers**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `X-TypeSafe-Key` | `string` | Optional |  |

**Body**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `datasetId` | `string` | Required |  |
| `a` | `object` | Required | One side of a Comparison: exactly one of `version` (a published version by number), `draft` (the draft as it is now, frozen when started), `environment` (the release live there when started) or `recorded` (production's recorded answers; replay Datasets only). |
| `a.version` | `integer` | Optional |  |
| `a.draft` | `boolean` | Optional |  |
| `a.environment` | `string` | Optional |  |
| `a.recorded` | `boolean` | Optional |  |
| `b` | `object` | Required | One side of a Comparison: exactly one of `version` (a published version by number), `draft` (the draft as it is now, frozen when started), `environment` (the release live there when started) or `recorded` (production's recorded answers; replay Datasets only). |
| `b.version` | `integer` | Optional |  |
| `b.draft` | `boolean` | Optional |  |
| `b.environment` | `string` | Optional |  |
| `b.recorded` | `boolean` | Optional |  |
| `sample` | `integer` | Optional | A seeded random sample of this many rows; the same seed draws the same rows. |
| `seed` | `integer` | Optional |  |
| `batchSize` | `integer` | Optional |  |
| `fresh` | `boolean` | Optional | Run both sides even when a Dataset run for the same plan and rows exists (a noise floor). |
| `maxCalls` | `integer` | Optional | When given, the estimate covers only the rows this many calls reach. |

**Answer (200)**

| Name | Type | Description |
| --- | --- | --- |
| `datasetId` | `string` |  |
| `rows` | `integer` |  |
| `skippedNotStored` | `integer` | The Dataset's recorded calls left out of its replay snapshot because their input is no longer stored. |
| `uniqueInputs` | `integer` |  |
| `sample` | `integer or null` |  |
| `seed` | `integer` |  |
| `batchSize` | `integer` |  |
| `a` | `object` |  |
| `a.label` | `string` |  |
| `a.mode` | `string`, one of `recorded`, `reuse`, `run` | "recorded": answers read from production; "reuse": an existing Dataset run; "run": new calls. |
| `a.reuseRunId` | `string or null` |  |
| `a.calls` | `integer` | Calls this side makes for every selected row. |
| `b` | `object` |  |
| `b.label` | `string` |  |
| `b.mode` | `string`, one of `recorded`, `reuse`, `run` | "recorded": answers read from production; "reuse": an existing Dataset run; "run": new calls. |
| `b.reuseRunId` | `string or null` |  |
| `b.calls` | `integer` | Calls this side makes for every selected row. |
| `callsWithoutCap` | `integer` | Calls without a cap. |
| `maxCalls` | `integer or null` |  |
| `calls` | `integer` | Calls within maxCalls (or without a cap when none was given). |
| `rowsCovered` | `integer` |  |
| `inputTokens` | `integer` |  |
| `minutes` | `integer` |  |
| `allowed` | `boolean` |  |
| `refusal` | `object or null` |  |
| `refusal.code` | `string` |  |
| `refusal.message` | `string` |  |

```sh
curl -X POST "https://api.typefuse.dev/v1/organisations/acme/decisions/refunds/comparisons/estimate" \
  -H "Authorization: Bearer $TYPEFUSE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"datasetId":"<datasetId>","a":{},"b":{}}'
```

### GET /v1/organisations/{org}/decisions/{slug}/comparisons/{comparisonId}

**Get a Comparison.**

**Path**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `org` | `string` | Required |  |
| `slug` | `string` | Required |  |
| `comparisonId` | `string` | Required |  |

**Answer (200)**

| Name | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `datasetId` | `string` |  |
| `datasetName` | `string or null` |  |
| `datasetSource` | `string or null`, one of `upload`, `replay` |  |
| `status` | `string`, one of `running`, `completed`, `cancelled` |  |
| `a` | `object` |  |
| `a.label` | `string` |  |
| `a.reused` | `boolean` | An existing Dataset run answered this side; it made no new calls for this Comparison. |
| `a.run` | `object` | One target executed (or read) over a Dataset: the evidence. |
| `b` | `object` |  |
| `b.label` | `string` |  |
| `b.reused` | `boolean` | An existing Dataset run answered this side; it made no new calls for this Comparison. |
| `b.run` | `object` | One target executed (or read) over a Dataset: the evidence. |
| `maxCalls` | `integer` |  |
| `progress` | `object` | Rows finished across both sides, of the rows both will run. |
| `progress.done` | `integer` |  |
| `progress.total` | `integer` |  |
| `headline` | `object or null` | The headline numbers; null until analysed. |
| `headline.rows` | `integer` |  |
| `headline.compared` | `integer` |  |
| `headline.differingRows` | `integer` |  |
| `headline.questionsCompared` | `string`, one of `same`, `changed`, `different` | See ComparisonSummary; absent on Comparisons analysed before it existed and not read since. |
| `summary` | `object or null` | The full analysis; null until analysed, and left out of lists. |
| `summary.rows` | `integer` |  |
| `summary.compared` | `integer` | Rows both sides answered: the distributions and differences count these. |
| `summary.notAccepted` | `object` |  |
| `summary.errors` | `object` |  |
| `summary.skipped` | `object` |  |
| `summary.differingRows` | `integer` |  |
| `summary.perQuestion` | `object` |  |
| `summary.onlyIn` | `object` | Questions only one side asks: a contract change, not compared. |
| `summary.retyped` | `array of string` | Questions both sides ask by name whose answers are of a different kind: not compared. |
| `summary.questionsCompared` | `string`, one of `same`, `changed`, `different` | Whether the answers could be compared: `same` questions, `changed` (some compared, some only on one side or retyped) or `different` (nothing in common: answers not compared, and `differingRows` is 0). |
| `summary.differing` | `array of { "row": integer, "questions": array of string }` | Differing rows by Dataset row, with the questions that differ; at most 2,000. |
| `summary.differingTruncated` | `boolean` |  |
| `summary.sides` | `object` |  |
| `summary.difference` | `object` | Cost, tokens and latency of each side and the change from A to B, over the rows both sides answered only, so a call limit or an error on one side doesn't skew them. |
| `projection` | `object or null` | Each side's cost per call at the Decision's last 30 days of production traffic; null when there was none, before the analysis, and in lists. |
| `projection.environments` | `array of string` | The environments counted. |
| `projection.days` | `integer` |  |
| `projection.calls` | `integer` | Calls those environments answered in the last `days` days (shadow calls excluded). |
| `projection.a` | `number or null` | Side A's cost per call times `calls`; null when A has no recorded cost. |
| `projection.b` | `number or null` |  |
| `costWording` | `object or null` | The cost headline in words, as the app shows it: `said` compares the cost per call (such as "48% less per call") and `projected` puts it at production's recent traffic. Null before the analysis and in lists; either line is null when there is nothing to say. |
| `costWording.said` | `string or null` |  |
| `costWording.projected` | `string or null` |  |
| `replay` | `object or null` | For a Dataset replayed from production: the recorded calls it matched and how many could not be replayed, because their input was no longer stored or (once analysed) no longer fits the input a side accepts. Null for uploaded Datasets. |
| `replay.recordedCalls` | `integer` | Recorded calls the replay matched, stored or not. |
| `replay.notStored` | `integer` | Of those, calls whose input was no longer stored, so they were left out of the Dataset. |
| `replay.notAccepted` | `integer` | Rows the Comparison ran whose input a side did not accept (the larger side's count). |
| `replay.message` | `string or null` | The two above in one sentence; null when every call was replayed. |
| `createdBy` | `integer` |  |
| `createdByName` | `string` |  |
| `createdAt` | `string` |  |
| `completedAt` | `string or null` |  |

```sh
curl "https://api.typefuse.dev/v1/organisations/acme/decisions/refunds/comparisons/<comparisonId>" \
  -H "Authorization: Bearer $TYPEFUSE_TOKEN"
```

### POST /v1/organisations/{org}/decisions/{slug}/comparisons/{comparisonId}/cancel

**Cancel a Comparison.**

**Path**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `org` | `string` | Required |  |
| `slug` | `string` | Required |  |
| `comparisonId` | `string` | Required |  |

**Answer (200)**

| Name | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `datasetId` | `string` |  |
| `datasetName` | `string or null` |  |
| `datasetSource` | `string or null`, one of `upload`, `replay` |  |
| `status` | `string`, one of `running`, `completed`, `cancelled` |  |
| `a` | `object` |  |
| `a.label` | `string` |  |
| `a.reused` | `boolean` | An existing Dataset run answered this side; it made no new calls for this Comparison. |
| `a.run` | `object` | One target executed (or read) over a Dataset: the evidence. |
| `b` | `object` |  |
| `b.label` | `string` |  |
| `b.reused` | `boolean` | An existing Dataset run answered this side; it made no new calls for this Comparison. |
| `b.run` | `object` | One target executed (or read) over a Dataset: the evidence. |
| `maxCalls` | `integer` |  |
| `progress` | `object` | Rows finished across both sides, of the rows both will run. |
| `progress.done` | `integer` |  |
| `progress.total` | `integer` |  |
| `headline` | `object or null` | The headline numbers; null until analysed. |
| `headline.rows` | `integer` |  |
| `headline.compared` | `integer` |  |
| `headline.differingRows` | `integer` |  |
| `headline.questionsCompared` | `string`, one of `same`, `changed`, `different` | See ComparisonSummary; absent on Comparisons analysed before it existed and not read since. |
| `summary` | `object or null` | The full analysis; null until analysed, and left out of lists. |
| `summary.rows` | `integer` |  |
| `summary.compared` | `integer` | Rows both sides answered: the distributions and differences count these. |
| `summary.notAccepted` | `object` |  |
| `summary.errors` | `object` |  |
| `summary.skipped` | `object` |  |
| `summary.differingRows` | `integer` |  |
| `summary.perQuestion` | `object` |  |
| `summary.onlyIn` | `object` | Questions only one side asks: a contract change, not compared. |
| `summary.retyped` | `array of string` | Questions both sides ask by name whose answers are of a different kind: not compared. |
| `summary.questionsCompared` | `string`, one of `same`, `changed`, `different` | Whether the answers could be compared: `same` questions, `changed` (some compared, some only on one side or retyped) or `different` (nothing in common: answers not compared, and `differingRows` is 0). |
| `summary.differing` | `array of { "row": integer, "questions": array of string }` | Differing rows by Dataset row, with the questions that differ; at most 2,000. |
| `summary.differingTruncated` | `boolean` |  |
| `summary.sides` | `object` |  |
| `summary.difference` | `object` | Cost, tokens and latency of each side and the change from A to B, over the rows both sides answered only, so a call limit or an error on one side doesn't skew them. |
| `projection` | `object or null` | Each side's cost per call at the Decision's last 30 days of production traffic; null when there was none, before the analysis, and in lists. |
| `projection.environments` | `array of string` | The environments counted. |
| `projection.days` | `integer` |  |
| `projection.calls` | `integer` | Calls those environments answered in the last `days` days (shadow calls excluded). |
| `projection.a` | `number or null` | Side A's cost per call times `calls`; null when A has no recorded cost. |
| `projection.b` | `number or null` |  |
| `costWording` | `object or null` | The cost headline in words, as the app shows it: `said` compares the cost per call (such as "48% less per call") and `projected` puts it at production's recent traffic. Null before the analysis and in lists; either line is null when there is nothing to say. |
| `costWording.said` | `string or null` |  |
| `costWording.projected` | `string or null` |  |
| `replay` | `object or null` | For a Dataset replayed from production: the recorded calls it matched and how many could not be replayed, because their input was no longer stored or (once analysed) no longer fits the input a side accepts. Null for uploaded Datasets. |
| `replay.recordedCalls` | `integer` | Recorded calls the replay matched, stored or not. |
| `replay.notStored` | `integer` | Of those, calls whose input was no longer stored, so they were left out of the Dataset. |
| `replay.notAccepted` | `integer` | Rows the Comparison ran whose input a side did not accept (the larger side's count). |
| `replay.message` | `string or null` | The two above in one sentence; null when every call was replayed. |
| `createdBy` | `integer` |  |
| `createdByName` | `string` |  |
| `createdAt` | `string` |  |
| `completedAt` | `string or null` |  |

```sh
curl -X POST "https://api.typefuse.dev/v1/organisations/acme/decisions/refunds/comparisons/<comparisonId>/cancel" \
  -H "Authorization: Bearer $TYPEFUSE_TOKEN"
```

### GET /v1/organisations/{org}/decisions/{slug}/comparisons/{comparisonId}/rows

**List a Comparison's rows.**

**Path**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `org` | `string` | Required |  |
| `slug` | `string` | Required |  |
| `comparisonId` | `string` | Required |  |

**Query**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `filter` | `string`, one of `differs`, `all`, `errors`, `not_accepted` | Optional |  |
| `question` | `string` | Optional |  |
| `from` | `string` | Optional |  |
| `to` | `string` | Optional |  |
| `cursor` | `integer` | Optional |  |
| `limit` | `integer` | Optional |  |

**Answer (200)**

| Name | Type | Description |
| --- | --- | --- |
| `rows` | `array` |  |
| `nextCursor` | `integer or null` | Pass as `cursor` for the next page; null when there are no more rows. |

```sh
curl "https://api.typefuse.dev/v1/organisations/acme/decisions/refunds/comparisons/<comparisonId>/rows" \
  -H "Authorization: Bearer $TYPEFUSE_TOKEN"
```
