API REFERENCE
Read an ingestion result
On this page
/api/ingestionOmit action to read a job or stage. Use action only for datasets, imports or records. All responses are private and uncached. The x-recoup-query-schema describes complete valid parameter combinations, including action-specific page sizes.
Authentication
x-api-key in header
bearerAuth bearer
Request
curl --request GET \
--url 'https://api.recoupable.dev/api/ingestion?job_id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' \
--header 'x-api-key: YOUR_API_KEY'Replace the YOUR_ placeholders with your values. Required query parameters are included; optional parameters are listed below.
Try it
Fill in the fields, send the request from your browser, and read the live response. The curl below updates as you type.
Kept in this browser tab only and cleared when it closes.
curl --request GET \
--url 'https://api.recoupable.dev/api/ingestion'Parameters
Query parameters
actionstring · enumOmit to read a job. The three named actions browse an organization dataset.
Values: "datasets", "imports", "records"
organization_idstringRequired for dataset queries and jobs created in organization scope.
job_idstringRequired for job/stage reads and records.
stagestring · enumOmit for job status. Used only without action.
Values: "bronze", "silver", "gold"
dataset_idstringRequired for imports and records.
limitintegerMaximum 50 for datasets/imports, 100 for records.
afterstringOpaque UUID dataset cursor or 64-character import job cursor. Use the next_after returned by the preceding page.
after_rowintegerRecord cursor from next_after.
Responses
200Returns a job, requested stage or one organization catalog page.+
application/json
oneOf · Job 1
job_idstringrequiredpattern: ^[a-f0-9]{64}$
dataset_idstringformat: uuid
statusstring · enumrequiredValues: "queued", "held", "ready", "rejected"
engine_versionstringsource_sha256stringpattern: ^[a-f0-9]{64}$
contract_sha256stringSHA-256 of the validated, canonical contract including defaults. Version 2 workbook completion receipts include this field.
pattern: ^[a-f0-9]{64}$
silver_sha256stringpattern: ^[a-f0-9]{64}$
gold_sha256string | nullpattern: ^[a-f0-9]{64}$
issue_countintegerissues_truncatedintegerissuesarray<object>Item properties for issues
codestringrequiredrowintegerfieldstringsource_sheetstringcontrolsarray<object>Item properties for controls
fieldstringrequiredexpectedstringrequiredactualstringrequiredpassedbooleanrequiredsource_sheetstringsource_cellstringrows_readintegerrows_outputintegerallOf · any 1
any
oneOf · ArtifactResult 2
job_idstringrequiredpattern: ^[a-f0-9]{64}$
stagestring · enumrequiredValues: "bronze", "silver", "gold"
artifactobjectrequiredBronze contains filename, format, source_sha256, and content_base64. Silver contains source-grain records. Gold contains the ready records and field types.
oneOf · CatalogPage 3
oneOf · object 1
datasetsarray<object>requiredItem properties for datasets
object
next_afterstring | nullrequiredoneOf · object 2
importsarray<object>requiredItem properties for imports
object
next_afterstring | nullrequiredoneOf · object 3
recordsarray<object>requiredItem properties for records
object
next_afterinteger | nullrequired400Invalid input, query, or source encoding.+
application/json
errorstringrequired401A valid credential is required.+
application/json
errorstringrequired403Access to the selected scope was denied.+
application/json
errorstringrequired404The scoped job or artifact could not be found.+
application/json
errorstringrequired409The selected version, idempotency key, or artifact conflicts with stored state.+
application/json
errorstringrequired413The request, source, or record exceeds its size limit.+
application/json
errorstringrequired429The caller reached the operation rate limit.+
application/json
errorstringrequired503The operation or its configured infrastructure is unavailable.+
application/json
errorstringrequiredFull specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download ingestion.jsonView operation source
{
"summary": "Read an ingestion result",
"operationId": "readIngestion",
"description": "Omit action to read a job or stage. Use action only for datasets, imports or records. All responses are private and uncached. The x-recoup-query-schema describes complete valid parameter combinations, including action-specific page sizes.",
"security": [
{
"apiKeyAuth": []
},
{
"bearerAuth": []
}
],
"parameters": [
{
"name": "action",
"in": "query",
"description": "Omit to read a job. The three named actions browse an organization dataset.",
"schema": {
"type": "string",
"enum": [
"datasets",
"imports",
"records"
]
}
},
{
"name": "organization_id",
"in": "query",
"description": "Required for dataset queries and jobs created in organization scope.",
"schema": {
"type": "string",
"format": "uuid"
}
},
{
"name": "job_id",
"in": "query",
"description": "Required for job/stage reads and records.",
"schema": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
},
{
"name": "stage",
"in": "query",
"description": "Omit for job status. Used only without action.",
"schema": {
"type": "string",
"enum": [
"bronze",
"silver",
"gold"
]
}
},
{
"name": "dataset_id",
"in": "query",
"description": "Required for imports and records.",
"schema": {
"type": "string",
"format": "uuid"
}
},
{
"name": "limit",
"in": "query",
"description": "Maximum 50 for datasets/imports, 100 for records.",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
{
"name": "after",
"in": "query",
"description": "Opaque UUID dataset cursor or 64-character import job cursor. Use the next_after returned by the preceding page.",
"schema": {
"type": "string"
}
},
{
"name": "after_row",
"in": "query",
"description": "Record cursor from next_after.",
"schema": {
"type": "integer",
"minimum": 0,
"maximum": 10000
}
}
],
"responses": {
"200": {
"description": "Returns a job, requested stage or one organization catalog page.",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/Job"
},
{
"$ref": "#/components/schemas/ArtifactResult"
},
{
"$ref": "#/components/schemas/CatalogPage"
}
]
}
}
}
},
"400": {
"description": "Invalid input, query, or source encoding.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "A valid credential is required.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Access to the selected scope was denied.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "The scoped job or artifact could not be found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"409": {
"description": "The selected version, idempotency key, or artifact conflicts with stored state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"413": {
"description": "The request, source, or record exceeds its size limit.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "The caller reached the operation rate limit.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"503": {
"description": "The operation or its configured infrastructure is unavailable.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"x-recoup-query-schema": {
"examples": [
{
"job_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
],
"oneOf": [
{
"$ref": "#/components/schemas/JobQuery"
},
{
"$ref": "#/components/schemas/Datasets"
},
{
"$ref": "#/components/schemas/Imports"
},
{
"$ref": "#/components/schemas/Records"
}
]
}
}Read a job with ?job_id=<job_id>. Add the original organization_id for an organization-scoped job. Omit the action parameter when reading a job or artifact. Responses are private and uncached.
| State | What you can read |
|---|---|
queued | The job is awaiting completion. The original becomes available after capture. |
ready | Validation passed. Read the row counts, controls, digests and normalized records. |
held | Review the recorded issues and mapped data. Supply a new idempotency key to submit a corrected contract. |
rejected | The reader or an input limit prevented processing. Inspect the recorded reason and original. |
A stage query selects the captured original (bronze), mapped source records (silver) or accepted output (gold). Monetary decimals and identifiers in gold stay strings so a client can preserve subcent precision and leading zeros. Gold is available for ready jobs.
For a completed version 2 workbook, retain source_sha256, contract_sha256 and engine_version together. They identify which bytes, mapping and engine produced the result. A mapping edit changes the contract digest even if its author reuses the same version label.
Browse organization datasets
| Query action | Required parameters | Cursor for the next page |
|---|---|---|
datasets | organization_id | Pass the returned next_after as after. |
imports | organization_id, dataset_id | Pass next_after as after. |
records | organization_id, dataset_id, job_id | Pass next_after as after_row. |
A null cursor marks the end. Records are tied to one import version. Reading different versions and combining their records can count the same underlying activity twice. See process private data for creation and explicit delivery.