A job. Every job carries the same envelope of fields — see JobBase — but input and result hold
job-type-specific payloads, so the response is a union over type: pick the branch whose type matches
and you get the typed input and result for that kind of job.
The union is open on purpose. Job types are free strings on the server, so a type this spec version does
not describe lands in OtherJobResponse, where both fields stay free-form. No branch closes itself to
extra properties, and new job types can appear without a spec change.
The described types sit together under DescribedJobResponse, which has a discriminator on type. Any other
type is an OtherJobResponse. That branch sits outside the discriminator because a mapping can only name
specific values, and a branch with no mapping entry would only match a type equal to its schema name.
input and result are returned exactly as they were stored when the job was enqueued or completed. The
server never reshapes them, so a field a job type gained after a row was written is absent from that row
rather than null. The typed branches describe what the current code writes; fields that have not always
been written are left out of each branch's required list.
result is null in every branch until the job reaches a terminal state.
Who asked for the job. Discriminated by type: api_user for a job requested through the API on behalf
of a user, process for one enqueued by a Narrative process.
Which operator runs the job, e.g. materialized-view-refresh or datasets_execute_select. Finer-grained
than type: several job types can share one operator, and where no such mapping exists the two are equal.
When the job's current attempt started. A job can be retried; each retry is a new attempt, so this advances to the latest one, while created_at stays at the original submission.
Jobs enqueued today carry every field below, with null where a value is unset. Most of the optional fields
were added over the life of this job type, so a row written before a field existed lacks that key.
Written by the completion handler and by the Spark executor alike. recalculation_id and row_stats were
added after this job type existed, so older completed rows lack them.
The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Narrative I/O Knowledge Base","colors":{"primary":"#1438F5","light":"#F4F7FB","dark":"#010A28"},"logo":{"light":"https://mintcdn.com/narrative-07c7a1f7/ia6SQX79O4nc7uYf/logo/banner.png?fit=max\u0026auto=format\u0026n=ia6SQX79O4nc7uYf\u0026q=85\u0026s=99860b25011c79366624a87d1f648861","dark":"https://mintcdn.com/narrative-07c7a1f7/ia6SQX79O4nc7uYf/logo/banner-dark.png?fit=max\u0026auto=format\u0026n=ia6SQX79O4nc7uYf\u0026q=85\u0026s=604f9688855cf1123b9eddfc8a5bf0e5"},"favicon":"https://mintcdn.com/narrative-07c7a1f7/DaYE2y2_p0IkASZU/favicon.svg?fit=max\u0026auto=format\u0026n=DaYE2y2_p0IkASZU\u0026q=85\u0026s=9961047bdb2aaf9298577e1c3e624c24","navbar":{"links":[{"href":"mailto:[email protected]","label":"Support"}],"primary":{"type":"button","label":"Open Narrative","href":"https://app.narrative.io"}},"footer":{"socials":{"github":"https://github.com/narrative-io","linkedin":"https://linkedin.com/company/narrative-io"}},"seo":{"indexing":"navigable"},"integrations":{"fathom":{"siteId":"WELVPSSZ"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Release Notes","icon":"clock-rotate-left","href":"/release-notes"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"narrative-07c7a1f7","hasAudioNarration":false,"actualSubdomain":"narrative-07c7a1f7","customDomains":["docs.narrative.io"],"gitSource":{"type":"github","owner":"narrative-io","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae05e4bd115be216cdab17b","collectionId":"a2a4edcc-65dd-42cc-838f-f6f5675cafe8","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae05e4bd115be216cdab17b"},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae066346c1a15a18d9d1d3c","clientVersion":"0.0.3971","searchFilterCounts":[{"language":"default","tag":"API Documentation","count":234},{"language":"default","tag":"Reference","count":111},{"language":"default","tag":"Connectors","count":103},{"language":"default","tag":"All connectors","count":101},{"language":"default","tag":"Architecture Reference","count":76},{"language":"default","tag":"Agent Conversations","count":63},{"language":"default","tag":"Concepts","count":62},{"language":"default","tag":"Guides","count":58},{"language":"default","tag":"Errors","count":54},{"language":"default","tag":"NQL","count":36}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"[email protected]","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/datasets/truncate-a-dataset","slug":"/api-reference/datasets/truncate-a-dataset","pageMetadata":{"title":"Truncate a dataset","description":"Truncates a dataset.\n\nRemoves all rows from the dataset but leaves the dataset intact. The rows are removed by a job, which\nis returned.","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/truncate","href":"/api-reference/datasets/truncate-a-dataset","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Truncates a dataset.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"Removes all rows from the dataset but leaves the dataset intact. The rows are removed by a job, which\\nis returned.\"\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Truncate a dataset","description":"Truncates a dataset.\n\nRemoves all rows from the dataset but leaves the dataset intact. The rows are removed by a job, which\nis returned.","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/truncate","href":"/api-reference/datasets/truncate-a-dataset","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Truncate a dataset","tags":["Datasets"],"security":["0f270d3d-1fbb-41f0-b5ef-50fed0cdb6c1"],"description":"Truncates a dataset.\n\nRemoves all rows from the dataset but leaves the dataset intact. The rows are removed by a job, which\nis returned.","responses":{"201":"c30bb2a8-41af-4467-b814-06f25f5fa8c4","400":"a7ca9bee-317f-48c9-885f-ba6a8746acf4","404":"33a71da0-d9b4-439e-9d6e-fcec582f76fc"},"method":"post","type":"path","servers":["190e6995-21fb-418b-bbfe-8c27e30d5b55","1dc6c444-4c87-47b0-b19f-59c81fc72525"],"path":"/datasets/{dataset_id}/truncate","baseUrlOptions":["https://api-dev.narrative.io","https://api.narrative.io"],"title":"Truncate a dataset","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"b8dede7e-6a33-4294-9978-061ec0117a09":{"in":"path","name":"dataset_id","required":true,"description":"Unique identifier for a dataset.","schema":{"type":"integer","isRequired":true,"description":"Unique identifier for a dataset.","uniqueKey":"","typeLabel":"integer"}}},"responses":{"c30bb2a8-41af-4467-b814-06f25f5fa8c4":{"description":"The job that truncates the dataset.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"A job. Every job carries the same envelope of fields — see `JobBase` — but `input` and `result` hold\njob-type-specific payloads, so the response is a union over `type`: pick the branch whose `type` matches\nand you get the typed `input` and `result` for that kind of job.\n\nThe union is open on purpose. Job types are free strings on the server, so a type this spec version does\nnot describe lands in `OtherJobResponse`, where both fields stay free-form. No branch closes itself to\nextra properties, and new job types can appear without a spec change.\n\nThe described types sit together under `DescribedJobResponse`, which has a discriminator on `type`. Any other\n`type` is an `OtherJobResponse`. That branch sits outside the discriminator because a mapping can only name\nspecific values, and a branch with no mapping entry would only match a `type` equal to its schema name.\n\n`input` and `result` are returned exactly as they were stored when the job was enqueued or completed. The\nserver never reshapes them, so a field a job type gained after a row was written is absent from that row\nrather than null. The typed branches describe what the current code writes; fields that have not always\nbeen written are left out of each branch's `required` list.\n\n`result` is `null` in every branch until the job reaches a terminal state.","required":["type","input","result","job_id","company_id","data_plane_id","request_source","state","operator_type","tags","execution_cluster","idempotency_key","created_at","updated_at","attempted_at","attempt_version"],"example":{"job_id":"2a5b9ad7-dc8f-47bb-8e62-843a38f8054c","company_id":1,"data_plane_id":"f79cbdae-4848-47ca-95e8-69588364d185","compute_pool_id":null,"request_source":{"type":"api_user","company_id":1,"user_id":407},"state":"completed","type":"materialize-view","operator_type":"materialized-view-refresh","tags":[],"input":{"nql":"CREATE MATERIALIZED VIEW \"test_stats\" AS SELECT \"value\" FROM \"company_data\".\"10674\"","compiled_select":"SELECT\n `ds_10674`.`value`\nFROM\n narrative.datasets.ds_10674 `ds_10674`","create_as_view":null,"dataset_id":10736,"billing_enabled":null,"stats_enabled":true,"contains_delta_syntax":null,"first_run":false,"merge":true,"partitions":null,"snowflake_create_table":null,"snowflake_insert_statement":null,"chunk_metadata":null,"nio_last_modified_at":null,"delta_dataset_bounds":null,"write_mode":"append"},"executor":"job-executor-98e1f48e-bf54-4f11-bbd1-73c445120266","execution_cluster":"shared","idempotency_key":"10736:29329c64e7b8a4eda86aaabe04872b832ab456b5543d0c259c812525391f158c:669a5f8e4f373c2f907700decde47511aac6470f5698e2b856fb07f09160e5f2","result":{"dataset_id":10736,"snapshot_id":1724919539450264600,"recalculation_id":"abf9a2ec-426b-4751-bd16-fcb435061925","row_stats":null},"dequeued_at":"2023-10-31T11:19:13.400498Z","created_at":"2023-10-31T11:19:13.400498Z","updated_at":"2023-10-31T11:25:08.327209Z","attempted_at":"2023-10-31T11:19:13.400498Z","attempt_version":1,"ended_at":"2023-10-31T11:25:08.327194Z","workflow_id":null,"workflow_run_id":null},"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique identifier for the job.","isRequired":true,"uniqueKey":"oneOf.0.job_id","typeLabel":"string\u003cuuid>"},"company_id":{"description":"The company the job belongs to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.0.company_id","typeLabel":"integer\u003cint64>"},"data_plane_id":{"description":"The data plane the job runs on. Jobs on the Narrative data plane carry its id,\n`f79cbdae-4848-47ca-95e8-69588364d185`.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.0.data_plane_id","typeLabel":"string\u003cuuid>"},"request_source":{"oneOf":[{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","company_id","user_id"],"example":{"type":"api_user","company_id":1,"user_id":1248},"properties":{"type":{"type":"string","enum":["api_user"],"isRequired":true,"uniqueKey":"oneOf.0.request_source.oneOf.0.type","typeLabel":"enum\u003cstring>"},"company_id":{"description":"The company the request was made for.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.0.request_source.oneOf.0.company_id","typeLabel":"integer\u003cint64>"},"user_id":{"description":"The user who made the request.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.0.request_source.oneOf.0.user_id","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.0.request_source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","name"],"example":{"type":"process","name":"narrative-control-plane"},"properties":{"type":{"type":"string","enum":["process"],"isRequired":true,"uniqueKey":"oneOf.0.request_source.oneOf.1.type","typeLabel":"enum\u003cstring>"},"name":{"description":"The process that enqueued the job, e.g. `narrative-control-plane` or `health-check`.","type":"string","isRequired":true,"uniqueKey":"oneOf.0.request_source.oneOf.1.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.0.request_source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.0.request_source","typeLabel":"object"},"state":{"description":"Where a job is in its lifecycle.\n\n- `pending` — enqueued and waiting to be picked up.\n- `scheduled` — claimed by an executor but not yet started.\n- `running` — being executed.\n- `pending_cancellation` — cancellation has been requested and the data plane has yet to stop the work.\n- `completed`, `cancelled`, `failed` — terminal states.","type":"string","enum":["pending","scheduled","running","pending_cancellation","completed","cancelled","failed"],"isRequired":true,"uniqueKey":"oneOf.0.state","typeLabel":"enum\u003cstring>"},"operator_type":{"description":"Which operator runs the job, e.g. `materialized-view-refresh` or `datasets_execute_select`. Finer-grained\nthan `type`: several job types can share one operator, and where no such mapping exists the two are equal.","type":"string","isRequired":true,"uniqueKey":"oneOf.0.operator_type","typeLabel":"string"},"tags":{"description":"Free-form labels attached to the job.","type":"array","items":{"type":"string","minLength":1,"maxLength":255,"uniqueKey":"oneOf.0.tags.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.0.tags","typeLabel":"string[]"},"execution_cluster":{"description":"The type of the execution cluster to run the job on.\n\n- `dedicated` runs job on a dedicated cluster.\n- `shared` runs job on a shared cluster.","type":"string","enum":["dedicated","shared"],"isRequired":true,"uniqueKey":"oneOf.0.execution_cluster","typeLabel":"enum\u003cstring>"},"idempotency_key":{"description":"The unique key the job was enqueued under.","type":"string","minLength":1,"maxLength":255,"isRequired":true,"uniqueKey":"oneOf.0.idempotency_key","typeLabel":"string"},"created_at":{"description":"The timestamp representing when the job was created.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.0.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"description":"The timestamp representing when the job was updated.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.0.updated_at","typeLabel":"string\u003cdate-time>"},"attempted_at":{"description":"When the job's current attempt started. A job can be retried; each retry is a new attempt, so this advances to the latest one, while `created_at` stays at the original submission.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.0.attempted_at","typeLabel":"string\u003cdate-time>"},"attempt_version":{"description":"Which attempt this is: 1 for the first, increasing by one on each retry.","type":"integer","isRequired":true,"uniqueKey":"oneOf.0.attempt_version","typeLabel":"integer"},"type":{"type":"string","enum":["materialize-view"],"isRequired":true,"uniqueKey":"oneOf.0.type","typeLabel":"enum\u003cstring>"},"input":{"description":"Jobs enqueued today carry every field below, with `null` where a value is unset. Most of the optional fields\nwere added over the life of this job type, so a row written before a field existed lacks that key.","type":"object","required":["nql","compiled_select","dataset_id"],"properties":{"nql":{"description":"The `CREATE MATERIALIZED VIEW` statement the view was defined with.","type":"string","isRequired":true,"uniqueKey":"oneOf.0.input.nql","typeLabel":"string"},"compiled_select":{"description":"The SELECT that `nql` compiles to. This is what the operator runs.","type":"string","isRequired":true,"uniqueKey":"oneOf.0.input.compiled_select","typeLabel":"string"},"dataset_id":{"description":"The dataset the refreshed rows are written to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.0.input.dataset_id","typeLabel":"integer\u003cint64>"},"create_as_view":{"oneOf":[{"description":"Write a view instead of a table. Null when the job was enqueued without the option.","type":"boolean","uniqueKey":"oneOf.0.input.create_as_view.oneOf.0","typeLabel":"boolean"},{"description":"Write a view instead of a table. Null when the job was enqueued without the option.","type":"null","uniqueKey":"oneOf.0.input.create_as_view.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.input.create_as_view","typeLabel":"boolean | null"},"billing_enabled":{"oneOf":[{"description":"Whether the refresh bills for the rows it reads.","type":"boolean","uniqueKey":"oneOf.0.input.billing_enabled.oneOf.0","typeLabel":"boolean"},{"description":"Whether the refresh bills for the rows it reads.","type":"null","uniqueKey":"oneOf.0.input.billing_enabled.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.input.billing_enabled","typeLabel":"boolean | null"},"stats_enabled":{"oneOf":[{"description":"Whether extended dataset statistics are on for the view. Only the V1 stats path reads this.","type":"boolean","uniqueKey":"oneOf.0.input.stats_enabled.oneOf.0","typeLabel":"boolean"},{"description":"Whether extended dataset statistics are on for the view. Only the V1 stats path reads this.","type":"null","uniqueKey":"oneOf.0.input.stats_enabled.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.input.stats_enabled","typeLabel":"boolean | null"},"contains_delta_syntax":{"oneOf":[{"description":"Whether `nql` uses DELTA syntax.","type":"boolean","uniqueKey":"oneOf.0.input.contains_delta_syntax.oneOf.0","typeLabel":"boolean"},{"description":"Whether `nql` uses DELTA syntax.","type":"null","uniqueKey":"oneOf.0.input.contains_delta_syntax.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.input.contains_delta_syntax","typeLabel":"boolean | null"},"first_run":{"oneOf":[{"description":"Whether this is the view's first refresh.","type":"boolean","uniqueKey":"oneOf.0.input.first_run.oneOf.0","typeLabel":"boolean"},{"description":"Whether this is the view's first refresh.","type":"null","uniqueKey":"oneOf.0.input.first_run.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.input.first_run","typeLabel":"boolean | null"},"merge":{"oneOf":[{"description":"Whether the refresh merges into the target rather than replacing it.","type":"boolean","uniqueKey":"oneOf.0.input.merge.oneOf.0","typeLabel":"boolean"},{"description":"Whether the refresh merges into the target rather than replacing it.","type":"null","uniqueKey":"oneOf.0.input.merge.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.input.merge","typeLabel":"boolean | null"},"partitions":{"oneOf":[{"description":"Partition configuration for the write. Null when the view is unpartitioned; never an empty array.","type":"array","minItems":1,"items":{"description":"One partition expression applied to the written table.","type":"object","required":["field","fn","args"],"properties":{"field":{"description":"The column the partition is derived from.","type":"string","isRequired":true,"uniqueKey":"oneOf.0.input.partitions.oneOf.0.items.[INDEX].field","typeLabel":"string"},"fn":{"description":"The partition transform, e.g. `day` or `bucket`.","type":"string","isRequired":true,"uniqueKey":"oneOf.0.input.partitions.oneOf.0.items.[INDEX].fn","typeLabel":"string"},"args":{"description":"Arguments to `fn`. Empty for transforms that take none.","type":"array","items":{"type":"string","uniqueKey":"oneOf.0.input.partitions.oneOf.0.items.[INDEX].args.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.0.input.partitions.oneOf.0.items.[INDEX].args","typeLabel":"string[]"}},"example":{"field":"event_timestamp","fn":"day","args":[]},"uniqueKey":"oneOf.0.input.partitions.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.0.input.partitions.oneOf.0","typeLabel":"object[]"},{"description":"Partition configuration for the write. Null when the view is unpartitioned; never an empty array.","type":"null","minItems":1,"items":{"description":"One partition expression applied to the written table.","type":"object","required":["field","fn","args"],"properties":{"field":{"description":"The column the partition is derived from.","type":"string"},"fn":{"description":"The partition transform, e.g. `day` or `bucket`.","type":"string"},"args":{"description":"Arguments to `fn`. Empty for transforms that take none.","type":"array","items":{"type":"string"}}},"example":{"field":"event_timestamp","fn":"day","args":[]}},"uniqueKey":"oneOf.0.input.partitions.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.input.partitions","typeLabel":"object[] | null"},"snowflake_create_table":{"oneOf":[{"description":"Snowflake `CREATE TABLE` used to support MERGE. Null outside the Snowflake data plane.","type":"string","uniqueKey":"oneOf.0.input.snowflake_create_table.oneOf.0","typeLabel":"string"},{"description":"Snowflake `CREATE TABLE` used to support MERGE. Null outside the Snowflake data plane.","type":"null","uniqueKey":"oneOf.0.input.snowflake_create_table.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.input.snowflake_create_table","typeLabel":"string | null"},"snowflake_insert_statement":{"oneOf":[{"description":"Snowflake INSERT used to support MERGE. Null outside the Snowflake data plane.","type":"string","uniqueKey":"oneOf.0.input.snowflake_insert_statement.oneOf.0","typeLabel":"string"},{"description":"Snowflake INSERT used to support MERGE. Null outside the Snowflake data plane.","type":"null","uniqueKey":"oneOf.0.input.snowflake_insert_statement.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.input.snowflake_insert_statement","typeLabel":"string | null"},"chunk_metadata":{"oneOf":[{"type":"object","description":"Chunking state when the refresh is split across several jobs. Null when it is not.","required":["batch_id","chunk_sequence"],"example":{"batch_id":"0f1e2d3c-4b5a-4968-9788-6a5b4c3d2e1f","chunk_sequence":{"number":1,"of":4}},"properties":{"batch_id":{"description":"Shared by every chunk of the same refresh.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.0.input.chunk_metadata.oneOf.0.batch_id","typeLabel":"string\u003cuuid>"},"chunk_sequence":{"type":"object","required":["number","of"],"properties":{"number":{"description":"This chunk's position in the batch, starting at 1.","type":"integer","isRequired":true,"uniqueKey":"oneOf.0.input.chunk_metadata.oneOf.0.chunk_sequence.number","typeLabel":"integer"},"of":{"description":"How many chunks the batch has.","type":"integer","isRequired":true,"uniqueKey":"oneOf.0.input.chunk_metadata.oneOf.0.chunk_sequence.of","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"oneOf.0.input.chunk_metadata.oneOf.0.chunk_sequence","typeLabel":"object"}},"uniqueKey":"oneOf.0.input.chunk_metadata.oneOf.0","typeLabel":"object"},{"type":"null","description":"Chunking state when the refresh is split across several jobs. Null when it is not.","uniqueKey":"oneOf.0.input.chunk_metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.input.chunk_metadata","typeLabel":"object | null"},"nio_last_modified_at":{"oneOf":[{"description":"The `_nio_last_modified_at` watermark the refresh writes.","type":"string","format":"date-time","uniqueKey":"oneOf.0.input.nio_last_modified_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"The `_nio_last_modified_at` watermark the refresh writes.","type":"null","format":"date-time","uniqueKey":"oneOf.0.input.nio_last_modified_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.input.nio_last_modified_at","typeLabel":"string\u003cdate-time> | null"},"delta_dataset_bounds":{"oneOf":[{"description":"Bounds for the DELTA sources the refresh reads. Null on jobs enqueued without them, which does not mean\nthe query has no DELTA.","type":"array","items":{"description":"The upper bound of the rows a DELTA source contributes to this refresh.","type":"object","required":["dataset_id"],"properties":{"dataset_id":{"type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.0.input.delta_dataset_bounds.oneOf.0.items.[INDEX].dataset_id","typeLabel":"integer\u003cint64>"},"upper_bound":{"oneOf":[{"description":"Inclusive `_nio_last_modified_at` upper bound. Null when the dataset has no data.","type":"string","format":"date-time","uniqueKey":"oneOf.0.input.delta_dataset_bounds.oneOf.0.items.[INDEX].upper_bound.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"Inclusive `_nio_last_modified_at` upper bound. Null when the dataset has no data.","type":"null","format":"date-time","uniqueKey":"oneOf.0.input.delta_dataset_bounds.oneOf.0.items.[INDEX].upper_bound.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.input.delta_dataset_bounds.oneOf.0.items.[INDEX].upper_bound","typeLabel":"string\u003cdate-time> | null"}},"example":{"dataset_id":10674,"upper_bound":"2024-01-28T00:00:00Z"},"uniqueKey":"oneOf.0.input.delta_dataset_bounds.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.0.input.delta_dataset_bounds.oneOf.0","typeLabel":"object[]"},{"description":"Bounds for the DELTA sources the refresh reads. Null on jobs enqueued without them, which does not mean\nthe query has no DELTA.","type":"null","items":{"description":"The upper bound of the rows a DELTA source contributes to this refresh.","type":"object","required":["dataset_id"],"properties":{"dataset_id":{"type":"integer","format":"int64"},"upper_bound":{"oneOf":[{"description":"Inclusive `_nio_last_modified_at` upper bound. Null when the dataset has no data.","type":"string","format":"date-time"},{"description":"Inclusive `_nio_last_modified_at` upper bound. Null when the dataset has no data.","type":"null","format":"date-time"}]}},"example":{"dataset_id":10674,"upper_bound":"2024-01-28T00:00:00Z"}},"uniqueKey":"oneOf.0.input.delta_dataset_bounds.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.input.delta_dataset_bounds","typeLabel":"object[] | null"},"write_mode":{"oneOf":[{"description":"Whether the refresh appends to the target dataset or overwrites it. Null when unset.","type":"string","enum":["append","overwrite",null],"uniqueKey":"oneOf.0.input.write_mode.oneOf.0","typeLabel":"enum\u003cstring>"},{"description":"Whether the refresh appends to the target dataset or overwrites it. Null when unset.","type":"null","enum":["append","overwrite",null],"uniqueKey":"oneOf.0.input.write_mode.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.input.write_mode","typeLabel":"enum\u003cstring> | null"}},"example":{"nql":"CREATE MATERIALIZED VIEW \"test_stats\" AS SELECT \"value\" FROM \"company_data\".\"10674\"","compiled_select":"SELECT\n `ds_10674`.`value`\nFROM\n narrative.datasets.ds_10674 `ds_10674`","create_as_view":null,"dataset_id":10736,"billing_enabled":null,"stats_enabled":true,"contains_delta_syntax":null,"first_run":false,"merge":true,"partitions":null,"snowflake_create_table":null,"snowflake_insert_statement":null,"chunk_metadata":null,"nio_last_modified_at":null,"delta_dataset_bounds":null,"write_mode":"append"},"isRequired":true,"uniqueKey":"oneOf.0.input","typeLabel":"object"},"result":{"oneOf":[{"type":"object","description":"Written by the completion handler and by the Spark executor alike. `recalculation_id` and `row_stats` were\nadded after this job type existed, so older completed rows lack them.","required":["dataset_id","snapshot_id"],"example":{"dataset_id":10736,"snapshot_id":1724919539450264600,"recalculation_id":"abf9a2ec-426b-4751-bd16-fcb435061925","row_stats":null},"properties":{"dataset_id":{"description":"The dataset the rows were written to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.0.result.oneOf.0.dataset_id","typeLabel":"integer\u003cint64>"},"snapshot_id":{"description":"The Iceberg snapshot the write produced. The Snowflake data plane passes a numeric snapshot id here\ntoo, so this is always a number; `0` when the value it sent did not parse as one.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.0.result.oneOf.0.snapshot_id","typeLabel":"integer\u003cint64>"},"recalculation_id":{"oneOf":[{"description":"The statistics recalculation this refresh triggered. Only the V1 stats path sets it.","type":"string","format":"uuid","uniqueKey":"oneOf.0.result.oneOf.0.recalculation_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The statistics recalculation this refresh triggered. Only the V1 stats path sets it.","type":"null","format":"uuid","uniqueKey":"oneOf.0.result.oneOf.0.recalculation_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.result.oneOf.0.recalculation_id","typeLabel":"string\u003cuuid> | null"},"row_stats":{"oneOf":[{"type":"object","description":"Row counts for the write. Null when the operator did not report them.","required":["affected_rows","inserted_rows","updated_rows","deleted_rows"],"properties":{"affected_rows":{"type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.0.result.oneOf.0.row_stats.oneOf.0.affected_rows","typeLabel":"integer\u003cint64>"},"inserted_rows":{"type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.0.result.oneOf.0.row_stats.oneOf.0.inserted_rows","typeLabel":"integer\u003cint64>"},"updated_rows":{"type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.0.result.oneOf.0.row_stats.oneOf.0.updated_rows","typeLabel":"integer\u003cint64>"},"deleted_rows":{"type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.0.result.oneOf.0.row_stats.oneOf.0.deleted_rows","typeLabel":"integer\u003cint64>"}},"uniqueKey":"oneOf.0.result.oneOf.0.row_stats.oneOf.0","typeLabel":"object"},{"type":"null","description":"Row counts for the write. Null when the operator did not report them.","uniqueKey":"oneOf.0.result.oneOf.0.row_stats.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.result.oneOf.0.row_stats","typeLabel":"object | null"}},"isRequired":true,"uniqueKey":"oneOf.0.result.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"oneOf.0.result.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.0.result","typeLabel":"object | null"},"compute_pool_id":{"oneOf":[{"description":"The compute pool associated with the job, if any.","type":"string","format":"uuid","uniqueKey":"oneOf.0.compute_pool_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The compute pool associated with the job, if any.","type":"null","format":"uuid","uniqueKey":"oneOf.0.compute_pool_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.compute_pool_id","typeLabel":"string\u003cuuid> | null"},"executor":{"oneOf":[{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"string","uniqueKey":"oneOf.0.executor.oneOf.0","typeLabel":"string"},{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"null","uniqueKey":"oneOf.0.executor.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.executor","typeLabel":"string | null"},"dequeued_at":{"oneOf":[{"description":"When the job was taken off the queue. Null while it is still queued.","type":"string","format":"date-time","uniqueKey":"oneOf.0.dequeued_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"When the job was taken off the queue. Null while it is still queued.","type":"null","format":"date-time","uniqueKey":"oneOf.0.dequeued_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.dequeued_at","typeLabel":"string\u003cdate-time> | null"},"ended_at":{"oneOf":[{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"string","format":"date-time","uniqueKey":"oneOf.0.ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"null","format":"date-time","uniqueKey":"oneOf.0.ended_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.ended_at","typeLabel":"string\u003cdate-time> | null"},"workflow_id":{"oneOf":[{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"string","format":"uuid","uniqueKey":"oneOf.0.workflow_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"null","format":"uuid","uniqueKey":"oneOf.0.workflow_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.workflow_id","typeLabel":"string\u003cuuid> | null"},"workflow_run_id":{"oneOf":[{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"string","format":"uuid","uniqueKey":"oneOf.0.workflow_run_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"null","format":"uuid","uniqueKey":"oneOf.0.workflow_run_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.workflow_run_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"A job. Every job carries the same envelope of fields — see `JobBase` — but `input` and `result` hold\njob-type-specific payloads, so the response is a union over `type`: pick the branch whose `type` matches\nand you get the typed `input` and `result` for that kind of job.\n\nThe union is open on purpose. Job types are free strings on the server, so a type this spec version does\nnot describe lands in `OtherJobResponse`, where both fields stay free-form. No branch closes itself to\nextra properties, and new job types can appear without a spec change.\n\nThe described types sit together under `DescribedJobResponse`, which has a discriminator on `type`. Any other\n`type` is an `OtherJobResponse`. That branch sits outside the discriminator because a mapping can only name\nspecific values, and a branch with no mapping entry would only match a `type` equal to its schema name.\n\n`input` and `result` are returned exactly as they were stored when the job was enqueued or completed. The\nserver never reshapes them, so a field a job type gained after a row was written is absent from that row\nrather than null. The typed branches describe what the current code writes; fields that have not always\nbeen written are left out of each branch's `required` list.\n\n`result` is `null` in every branch until the job reaches a terminal state.","required":["type","input","result","job_id","company_id","data_plane_id","request_source","state","operator_type","tags","execution_cluster","idempotency_key","created_at","updated_at","attempted_at","attempt_version"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique identifier for the job.","isRequired":true,"uniqueKey":"oneOf.1.job_id","typeLabel":"string\u003cuuid>"},"company_id":{"description":"The company the job belongs to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.1.company_id","typeLabel":"integer\u003cint64>"},"data_plane_id":{"description":"The data plane the job runs on. Jobs on the Narrative data plane carry its id,\n`f79cbdae-4848-47ca-95e8-69588364d185`.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.1.data_plane_id","typeLabel":"string\u003cuuid>"},"request_source":{"oneOf":[{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","company_id","user_id"],"example":{"type":"api_user","company_id":1,"user_id":1248},"properties":{"type":{"type":"string","enum":["api_user"],"isRequired":true,"uniqueKey":"oneOf.1.request_source.oneOf.0.type","typeLabel":"enum\u003cstring>"},"company_id":{"description":"The company the request was made for.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.1.request_source.oneOf.0.company_id","typeLabel":"integer\u003cint64>"},"user_id":{"description":"The user who made the request.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.1.request_source.oneOf.0.user_id","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.1.request_source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","name"],"example":{"type":"process","name":"narrative-control-plane"},"properties":{"type":{"type":"string","enum":["process"],"isRequired":true,"uniqueKey":"oneOf.1.request_source.oneOf.1.type","typeLabel":"enum\u003cstring>"},"name":{"description":"The process that enqueued the job, e.g. `narrative-control-plane` or `health-check`.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.request_source.oneOf.1.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.1.request_source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.1.request_source","typeLabel":"object"},"state":{"description":"Where a job is in its lifecycle.\n\n- `pending` — enqueued and waiting to be picked up.\n- `scheduled` — claimed by an executor but not yet started.\n- `running` — being executed.\n- `pending_cancellation` — cancellation has been requested and the data plane has yet to stop the work.\n- `completed`, `cancelled`, `failed` — terminal states.","type":"string","enum":["pending","scheduled","running","pending_cancellation","completed","cancelled","failed"],"isRequired":true,"uniqueKey":"oneOf.1.state","typeLabel":"enum\u003cstring>"},"operator_type":{"description":"Which operator runs the job, e.g. `materialized-view-refresh` or `datasets_execute_select`. Finer-grained\nthan `type`: several job types can share one operator, and where no such mapping exists the two are equal.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.operator_type","typeLabel":"string"},"tags":{"description":"Free-form labels attached to the job.","type":"array","items":{"type":"string","minLength":1,"maxLength":255,"uniqueKey":"oneOf.1.tags.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.1.tags","typeLabel":"string[]"},"execution_cluster":{"description":"The type of the execution cluster to run the job on.\n\n- `dedicated` runs job on a dedicated cluster.\n- `shared` runs job on a shared cluster.","type":"string","enum":["dedicated","shared"],"isRequired":true,"uniqueKey":"oneOf.1.execution_cluster","typeLabel":"enum\u003cstring>"},"idempotency_key":{"description":"The unique key the job was enqueued under.","type":"string","minLength":1,"maxLength":255,"isRequired":true,"uniqueKey":"oneOf.1.idempotency_key","typeLabel":"string"},"created_at":{"description":"The timestamp representing when the job was created.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.1.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"description":"The timestamp representing when the job was updated.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.1.updated_at","typeLabel":"string\u003cdate-time>"},"attempted_at":{"description":"When the job's current attempt started. A job can be retried; each retry is a new attempt, so this advances to the latest one, while `created_at` stays at the original submission.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.1.attempted_at","typeLabel":"string\u003cdate-time>"},"attempt_version":{"description":"Which attempt this is: 1 for the first, increasing by one on each retry.","type":"integer","isRequired":true,"uniqueKey":"oneOf.1.attempt_version","typeLabel":"integer"},"type":{"type":"string","enum":["nql-forecast"],"isRequired":true,"uniqueKey":"oneOf.1.type","typeLabel":"enum\u003cstring>"},"input":{"type":"object","required":["nql","compiled_sql"],"properties":{"nql":{"description":"The NQL that was forecast.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.input.nql","typeLabel":"string"},"compiled_sql":{"description":"The SQL that `nql` compiles to. This is what the operator runs.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.input.compiled_sql","typeLabel":"string"}},"example":{"nql":"EXPLAIN SELECT narrative.rosetta_stone.\"age\" FROM narrative.rosetta_stone WHERE narrative.rosetta_stone.\"age\" > 50","compiled_sql":"SELECT\n `t`.`age`\nFROM\n narrative.datasets.ds_63 `t`\nWHERE\n `t`.`age` > 50"},"isRequired":true,"uniqueKey":"oneOf.1.input","typeLabel":"object"},"result":{"oneOf":[{"type":"object","description":"The forecast, or the reason it could not be produced. Exactly one of `success` / `failure` is present —\nthis is a Scala sum type encoded by constructor name, so the absent branch is not sent as null.\n\nNote the capitalised `Forecast` key inside `success.result`: that inner type is encoded with a different\nCirce configuration than the fields around it, which leaves the constructor name as written.","required":["success"],"example":{"success":{"result":{"Forecast":{"rows":1643721216,"cost":136130662400000}}}},"properties":{"success":{"type":"object","required":["result"],"properties":{"result":{"type":"object","required":["Forecast"],"properties":{"Forecast":{"type":"object","required":["rows","cost"],"properties":{"rows":{"description":"How many rows the query would return.","type":"integer","isRequired":true,"uniqueKey":"oneOf.1.result.oneOf.0.success.result.Forecast.rows","typeLabel":"integer"},"cost":{"description":"What those rows would cost, in microcents.","type":"integer","isRequired":true,"uniqueKey":"oneOf.1.result.oneOf.0.success.result.Forecast.cost","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"oneOf.1.result.oneOf.0.success.result.Forecast","typeLabel":"object"}},"isRequired":true,"uniqueKey":"oneOf.1.result.oneOf.0.success.result","typeLabel":"object"}},"isRequired":true,"uniqueKey":"oneOf.1.result.oneOf.0.success","typeLabel":"object"}},"isRequired":true,"uniqueKey":"oneOf.1.result.oneOf.0","typeLabel":"object"},{"type":"object","description":"The forecast, or the reason it could not be produced. Exactly one of `success` / `failure` is present —\nthis is a Scala sum type encoded by constructor name, so the absent branch is not sent as null.\n\nNote the capitalised `Forecast` key inside `success.result`: that inner type is encoded with a different\nCirce configuration than the fields around it, which leaves the constructor name as written.","required":["failure"],"example":{"failure":{"msg":"query timed out"}},"properties":{"failure":{"type":"object","required":["msg"],"properties":{"msg":{"description":"Why the forecast could not be produced.","type":"string","isRequired":true,"uniqueKey":"oneOf.1.result.oneOf.1.failure.msg","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.1.result.oneOf.1.failure","typeLabel":"object"}},"isRequired":true,"uniqueKey":"oneOf.1.result.oneOf.1","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"oneOf.1.result.oneOf.2","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.1.result","typeLabel":"object · object · null"},"compute_pool_id":{"oneOf":[{"description":"The compute pool associated with the job, if any.","type":"string","format":"uuid","uniqueKey":"oneOf.1.compute_pool_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The compute pool associated with the job, if any.","type":"null","format":"uuid","uniqueKey":"oneOf.1.compute_pool_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.compute_pool_id","typeLabel":"string\u003cuuid> | null"},"executor":{"oneOf":[{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"string","uniqueKey":"oneOf.1.executor.oneOf.0","typeLabel":"string"},{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"null","uniqueKey":"oneOf.1.executor.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.executor","typeLabel":"string | null"},"dequeued_at":{"oneOf":[{"description":"When the job was taken off the queue. Null while it is still queued.","type":"string","format":"date-time","uniqueKey":"oneOf.1.dequeued_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"When the job was taken off the queue. Null while it is still queued.","type":"null","format":"date-time","uniqueKey":"oneOf.1.dequeued_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.dequeued_at","typeLabel":"string\u003cdate-time> | null"},"ended_at":{"oneOf":[{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"string","format":"date-time","uniqueKey":"oneOf.1.ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"null","format":"date-time","uniqueKey":"oneOf.1.ended_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.ended_at","typeLabel":"string\u003cdate-time> | null"},"workflow_id":{"oneOf":[{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"string","format":"uuid","uniqueKey":"oneOf.1.workflow_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"null","format":"uuid","uniqueKey":"oneOf.1.workflow_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.workflow_id","typeLabel":"string\u003cuuid> | null"},"workflow_run_id":{"oneOf":[{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"string","format":"uuid","uniqueKey":"oneOf.1.workflow_run_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"null","format":"uuid","uniqueKey":"oneOf.1.workflow_run_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.workflow_run_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"oneOf.1","typeLabel":"object"},{"type":"object","description":"A job. Every job carries the same envelope of fields — see `JobBase` — but `input` and `result` hold\njob-type-specific payloads, so the response is a union over `type`: pick the branch whose `type` matches\nand you get the typed `input` and `result` for that kind of job.\n\nThe union is open on purpose. Job types are free strings on the server, so a type this spec version does\nnot describe lands in `OtherJobResponse`, where both fields stay free-form. No branch closes itself to\nextra properties, and new job types can appear without a spec change.\n\nThe described types sit together under `DescribedJobResponse`, which has a discriminator on `type`. Any other\n`type` is an `OtherJobResponse`. That branch sits outside the discriminator because a mapping can only name\nspecific values, and a branch with no mapping entry would only match a `type` equal to its schema name.\n\n`input` and `result` are returned exactly as they were stored when the job was enqueued or completed. The\nserver never reshapes them, so a field a job type gained after a row was written is absent from that row\nrather than null. The typed branches describe what the current code writes; fields that have not always\nbeen written are left out of each branch's `required` list.\n\n`result` is `null` in every branch until the job reaches a terminal state.","required":["type","input","result","job_id","company_id","data_plane_id","request_source","state","operator_type","tags","execution_cluster","idempotency_key","created_at","updated_at","attempted_at","attempt_version"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique identifier for the job.","isRequired":true,"uniqueKey":"oneOf.2.job_id","typeLabel":"string\u003cuuid>"},"company_id":{"description":"The company the job belongs to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.2.company_id","typeLabel":"integer\u003cint64>"},"data_plane_id":{"description":"The data plane the job runs on. Jobs on the Narrative data plane carry its id,\n`f79cbdae-4848-47ca-95e8-69588364d185`.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.2.data_plane_id","typeLabel":"string\u003cuuid>"},"request_source":{"oneOf":[{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","company_id","user_id"],"example":{"type":"api_user","company_id":1,"user_id":1248},"properties":{"type":{"type":"string","enum":["api_user"],"isRequired":true,"uniqueKey":"oneOf.2.request_source.oneOf.0.type","typeLabel":"enum\u003cstring>"},"company_id":{"description":"The company the request was made for.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.2.request_source.oneOf.0.company_id","typeLabel":"integer\u003cint64>"},"user_id":{"description":"The user who made the request.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.2.request_source.oneOf.0.user_id","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.2.request_source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","name"],"example":{"type":"process","name":"narrative-control-plane"},"properties":{"type":{"type":"string","enum":["process"],"isRequired":true,"uniqueKey":"oneOf.2.request_source.oneOf.1.type","typeLabel":"enum\u003cstring>"},"name":{"description":"The process that enqueued the job, e.g. `narrative-control-plane` or `health-check`.","type":"string","isRequired":true,"uniqueKey":"oneOf.2.request_source.oneOf.1.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.2.request_source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.2.request_source","typeLabel":"object"},"state":{"description":"Where a job is in its lifecycle.\n\n- `pending` — enqueued and waiting to be picked up.\n- `scheduled` — claimed by an executor but not yet started.\n- `running` — being executed.\n- `pending_cancellation` — cancellation has been requested and the data plane has yet to stop the work.\n- `completed`, `cancelled`, `failed` — terminal states.","type":"string","enum":["pending","scheduled","running","pending_cancellation","completed","cancelled","failed"],"isRequired":true,"uniqueKey":"oneOf.2.state","typeLabel":"enum\u003cstring>"},"operator_type":{"description":"Which operator runs the job, e.g. `materialized-view-refresh` or `datasets_execute_select`. Finer-grained\nthan `type`: several job types can share one operator, and where no such mapping exists the two are equal.","type":"string","isRequired":true,"uniqueKey":"oneOf.2.operator_type","typeLabel":"string"},"tags":{"description":"Free-form labels attached to the job.","type":"array","items":{"type":"string","minLength":1,"maxLength":255,"uniqueKey":"oneOf.2.tags.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.2.tags","typeLabel":"string[]"},"execution_cluster":{"description":"The type of the execution cluster to run the job on.\n\n- `dedicated` runs job on a dedicated cluster.\n- `shared` runs job on a shared cluster.","type":"string","enum":["dedicated","shared"],"isRequired":true,"uniqueKey":"oneOf.2.execution_cluster","typeLabel":"enum\u003cstring>"},"idempotency_key":{"description":"The unique key the job was enqueued under.","type":"string","minLength":1,"maxLength":255,"isRequired":true,"uniqueKey":"oneOf.2.idempotency_key","typeLabel":"string"},"created_at":{"description":"The timestamp representing when the job was created.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.2.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"description":"The timestamp representing when the job was updated.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.2.updated_at","typeLabel":"string\u003cdate-time>"},"attempted_at":{"description":"When the job's current attempt started. A job can be retried; each retry is a new attempt, so this advances to the latest one, while `created_at` stays at the original submission.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.2.attempted_at","typeLabel":"string\u003cdate-time>"},"attempt_version":{"description":"Which attempt this is: 1 for the first, increasing by one on each retry.","type":"integer","isRequired":true,"uniqueKey":"oneOf.2.attempt_version","typeLabel":"integer"},"type":{"type":"string","enum":["datasets_sample"],"isRequired":true,"uniqueKey":"oneOf.2.type","typeLabel":"enum\u003cstring>"},"input":{"type":"object","required":["dataset_id","compiled_sql"],"properties":{"dataset_id":{"description":"The dataset being sampled.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.2.input.dataset_id","typeLabel":"integer\u003cint64>"},"compiled_sql":{"description":"The SELECT that produces the sample. Compiled by the API, run by the operator.","type":"string","isRequired":true,"uniqueKey":"oneOf.2.input.compiled_sql","typeLabel":"string"}},"example":{"dataset_id":10736,"compiled_sql":"SELECT `ds_10674`.`value` FROM narrative.datasets.ds_10674 `ds_10674` LIMIT 100"},"isRequired":true,"uniqueKey":"oneOf.2.input","typeLabel":"object"},"result":{"oneOf":[{"type":"object","description":"How many rows the sample holds. The rows themselves are stored separately, not returned here.\n\nTwo shapes are stored. A job completed with the rows it selected (`datasets_execute_select`), or by the\nlegacy executor, carries `type` and `row_count`. A job completed with the bare `datasets_sample` marker\nstores an empty object, so neither key is guaranteed.","example":{"type":"datasets_sample","row_count":100},"properties":{"type":{"description":"Repeated inside the result by the encoder that writes it.","type":"string","enum":["datasets_sample"],"uniqueKey":"oneOf.2.result.oneOf.0.type","typeLabel":"enum\u003cstring>"},"row_count":{"type":"integer","format":"int64","uniqueKey":"oneOf.2.result.oneOf.0.row_count","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.2.result.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"oneOf.2.result.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.2.result","typeLabel":"object | null"},"compute_pool_id":{"oneOf":[{"description":"The compute pool associated with the job, if any.","type":"string","format":"uuid","uniqueKey":"oneOf.2.compute_pool_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The compute pool associated with the job, if any.","type":"null","format":"uuid","uniqueKey":"oneOf.2.compute_pool_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.compute_pool_id","typeLabel":"string\u003cuuid> | null"},"executor":{"oneOf":[{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"string","uniqueKey":"oneOf.2.executor.oneOf.0","typeLabel":"string"},{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"null","uniqueKey":"oneOf.2.executor.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.executor","typeLabel":"string | null"},"dequeued_at":{"oneOf":[{"description":"When the job was taken off the queue. Null while it is still queued.","type":"string","format":"date-time","uniqueKey":"oneOf.2.dequeued_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"When the job was taken off the queue. Null while it is still queued.","type":"null","format":"date-time","uniqueKey":"oneOf.2.dequeued_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.dequeued_at","typeLabel":"string\u003cdate-time> | null"},"ended_at":{"oneOf":[{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"string","format":"date-time","uniqueKey":"oneOf.2.ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"null","format":"date-time","uniqueKey":"oneOf.2.ended_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.ended_at","typeLabel":"string\u003cdate-time> | null"},"workflow_id":{"oneOf":[{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"string","format":"uuid","uniqueKey":"oneOf.2.workflow_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"null","format":"uuid","uniqueKey":"oneOf.2.workflow_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.workflow_id","typeLabel":"string\u003cuuid> | null"},"workflow_run_id":{"oneOf":[{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"string","format":"uuid","uniqueKey":"oneOf.2.workflow_run_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"null","format":"uuid","uniqueKey":"oneOf.2.workflow_run_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.2.workflow_run_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"oneOf.2","typeLabel":"object"},{"type":"object","description":"A job. Every job carries the same envelope of fields — see `JobBase` — but `input` and `result` hold\njob-type-specific payloads, so the response is a union over `type`: pick the branch whose `type` matches\nand you get the typed `input` and `result` for that kind of job.\n\nThe union is open on purpose. Job types are free strings on the server, so a type this spec version does\nnot describe lands in `OtherJobResponse`, where both fields stay free-form. No branch closes itself to\nextra properties, and new job types can appear without a spec change.\n\nThe described types sit together under `DescribedJobResponse`, which has a discriminator on `type`. Any other\n`type` is an `OtherJobResponse`. That branch sits outside the discriminator because a mapping can only name\nspecific values, and a branch with no mapping entry would only match a `type` equal to its schema name.\n\n`input` and `result` are returned exactly as they were stored when the job was enqueued or completed. The\nserver never reshapes them, so a field a job type gained after a row was written is absent from that row\nrather than null. The typed branches describe what the current code writes; fields that have not always\nbeen written are left out of each branch's `required` list.\n\n`result` is `null` in every branch until the job reaches a terminal state.","required":["type","input","result","job_id","company_id","data_plane_id","request_source","state","operator_type","tags","execution_cluster","idempotency_key","created_at","updated_at","attempted_at","attempt_version"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique identifier for the job.","isRequired":true,"uniqueKey":"oneOf.3.job_id","typeLabel":"string\u003cuuid>"},"company_id":{"description":"The company the job belongs to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.3.company_id","typeLabel":"integer\u003cint64>"},"data_plane_id":{"description":"The data plane the job runs on. Jobs on the Narrative data plane carry its id,\n`f79cbdae-4848-47ca-95e8-69588364d185`.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.3.data_plane_id","typeLabel":"string\u003cuuid>"},"request_source":{"oneOf":[{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","company_id","user_id"],"example":{"type":"api_user","company_id":1,"user_id":1248},"properties":{"type":{"type":"string","enum":["api_user"],"isRequired":true,"uniqueKey":"oneOf.3.request_source.oneOf.0.type","typeLabel":"enum\u003cstring>"},"company_id":{"description":"The company the request was made for.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.3.request_source.oneOf.0.company_id","typeLabel":"integer\u003cint64>"},"user_id":{"description":"The user who made the request.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.3.request_source.oneOf.0.user_id","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.3.request_source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","name"],"example":{"type":"process","name":"narrative-control-plane"},"properties":{"type":{"type":"string","enum":["process"],"isRequired":true,"uniqueKey":"oneOf.3.request_source.oneOf.1.type","typeLabel":"enum\u003cstring>"},"name":{"description":"The process that enqueued the job, e.g. `narrative-control-plane` or `health-check`.","type":"string","isRequired":true,"uniqueKey":"oneOf.3.request_source.oneOf.1.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.3.request_source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.3.request_source","typeLabel":"object"},"state":{"description":"Where a job is in its lifecycle.\n\n- `pending` — enqueued and waiting to be picked up.\n- `scheduled` — claimed by an executor but not yet started.\n- `running` — being executed.\n- `pending_cancellation` — cancellation has been requested and the data plane has yet to stop the work.\n- `completed`, `cancelled`, `failed` — terminal states.","type":"string","enum":["pending","scheduled","running","pending_cancellation","completed","cancelled","failed"],"isRequired":true,"uniqueKey":"oneOf.3.state","typeLabel":"enum\u003cstring>"},"operator_type":{"description":"Which operator runs the job, e.g. `materialized-view-refresh` or `datasets_execute_select`. Finer-grained\nthan `type`: several job types can share one operator, and where no such mapping exists the two are equal.","type":"string","isRequired":true,"uniqueKey":"oneOf.3.operator_type","typeLabel":"string"},"tags":{"description":"Free-form labels attached to the job.","type":"array","items":{"type":"string","minLength":1,"maxLength":255,"uniqueKey":"oneOf.3.tags.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.3.tags","typeLabel":"string[]"},"execution_cluster":{"description":"The type of the execution cluster to run the job on.\n\n- `dedicated` runs job on a dedicated cluster.\n- `shared` runs job on a shared cluster.","type":"string","enum":["dedicated","shared"],"isRequired":true,"uniqueKey":"oneOf.3.execution_cluster","typeLabel":"enum\u003cstring>"},"idempotency_key":{"description":"The unique key the job was enqueued under.","type":"string","minLength":1,"maxLength":255,"isRequired":true,"uniqueKey":"oneOf.3.idempotency_key","typeLabel":"string"},"created_at":{"description":"The timestamp representing when the job was created.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.3.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"description":"The timestamp representing when the job was updated.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.3.updated_at","typeLabel":"string\u003cdate-time>"},"attempted_at":{"description":"When the job's current attempt started. A job can be retried; each retry is a new attempt, so this advances to the latest one, while `created_at` stays at the original submission.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.3.attempted_at","typeLabel":"string\u003cdate-time>"},"attempt_version":{"description":"Which attempt this is: 1 for the first, increasing by one on each retry.","type":"integer","isRequired":true,"uniqueKey":"oneOf.3.attempt_version","typeLabel":"integer"},"type":{"type":"string","enum":["datasets_calculate_column_stats"],"isRequired":true,"uniqueKey":"oneOf.3.type","typeLabel":"enum\u003cstring>"},"input":{"oneOf":[{"type":"object","description":"Either input shape. A payload tells you which one it is: V2 carries `compiled_sql`, V1 does not. `anyOf`\nrather than `oneOf` because a V2 payload also satisfies V1's one required key, and a stored row carrying\nboth — nothing writes one today, but nothing stops one either — should still validate.","required":["dataset_id","compiled_sql"],"example":{"dataset_id":10736,"compiled_sql":"SELECT `ds_10674`.`age` FROM narrative.datasets.ds_10674 `ds_10674`"},"properties":{"dataset_id":{"description":"The dataset the statistics are computed for.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.3.input.oneOf.0.dataset_id","typeLabel":"integer\u003cint64>"},"compiled_sql":{"description":"The SELECT that produces the statistics.","type":"string","isRequired":true,"uniqueKey":"oneOf.3.input.oneOf.0.compiled_sql","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.3.input.oneOf.0","typeLabel":"object"},{"type":"object","description":"Either input shape. A payload tells you which one it is: V2 carries `compiled_sql`, V1 does not. `anyOf`\nrather than `oneOf` because a V2 payload also satisfies V1's one required key, and a stored row carrying\nboth — nothing writes one today, but nothing stops one either — should still validate.","required":["dataset_id"],"example":{"dataset_id":10736,"enabled_column_stats":{"AGE":{"data_type":"long","enabled_column_stats":{"nan_value_count":false,"null_value_count":true,"value_count":true,"lower_bound":true,"upper_bound":true,"column_stored_bytes":true,"approx_count_distinct":false,"count_distinct":false,"histogram":false,"mean":false,"standard_deviation":false,"completeness":false,"observed_types":false}}}},"properties":{"dataset_id":{"description":"The dataset the statistics are computed for.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.3.input.oneOf.1.dataset_id","typeLabel":"integer\u003cint64>"},"enabled_column_stats":{"oneOf":[{"description":"Which statistics to collect, keyed by column name. Null when the job was enqueued without any.","type":"object","additionalProperties":{"type":"object","required":["data_type","enabled_column_stats"],"properties":{"data_type":{"description":"The column's type, as the stats job sees it.","type":"string","enum":["boolean","double","long","string","timestamp_tz","array","object"],"isRequired":true,"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.0.additionalProperties.data_type","typeLabel":"enum\u003cstring>"},"enabled_column_stats":{"description":"Which statistics to collect for one column. The first six are basic statistics, on by default; the rest are\nadvanced and are turned on by the dataset's metrics configuration. Statistics that make no sense for the\ncolumn's type are switched off before the job is enqueued — `mean` on a string column, for instance.","type":"object","required":["nan_value_count","null_value_count","value_count","lower_bound","upper_bound","column_stored_bytes","approx_count_distinct","count_distinct","histogram","mean","standard_deviation","completeness","observed_types"],"properties":{"nan_value_count":{"type":"boolean","isRequired":true,"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.0.additionalProperties.enabled_column_stats.nan_value_count","typeLabel":"boolean"},"null_value_count":{"type":"boolean","isRequired":true,"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.0.additionalProperties.enabled_column_stats.null_value_count","typeLabel":"boolean"},"value_count":{"type":"boolean","isRequired":true,"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.0.additionalProperties.enabled_column_stats.value_count","typeLabel":"boolean"},"lower_bound":{"type":"boolean","isRequired":true,"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.0.additionalProperties.enabled_column_stats.lower_bound","typeLabel":"boolean"},"upper_bound":{"type":"boolean","isRequired":true,"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.0.additionalProperties.enabled_column_stats.upper_bound","typeLabel":"boolean"},"column_stored_bytes":{"type":"boolean","isRequired":true,"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.0.additionalProperties.enabled_column_stats.column_stored_bytes","typeLabel":"boolean"},"approx_count_distinct":{"type":"boolean","isRequired":true,"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.0.additionalProperties.enabled_column_stats.approx_count_distinct","typeLabel":"boolean"},"count_distinct":{"type":"boolean","isRequired":true,"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.0.additionalProperties.enabled_column_stats.count_distinct","typeLabel":"boolean"},"histogram":{"type":"boolean","isRequired":true,"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.0.additionalProperties.enabled_column_stats.histogram","typeLabel":"boolean"},"mean":{"type":"boolean","isRequired":true,"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.0.additionalProperties.enabled_column_stats.mean","typeLabel":"boolean"},"standard_deviation":{"type":"boolean","isRequired":true,"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.0.additionalProperties.enabled_column_stats.standard_deviation","typeLabel":"boolean"},"completeness":{"type":"boolean","isRequired":true,"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.0.additionalProperties.enabled_column_stats.completeness","typeLabel":"boolean"},"observed_types":{"type":"boolean","isRequired":true,"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.0.additionalProperties.enabled_column_stats.observed_types","typeLabel":"boolean"}},"isRequired":true,"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.0.additionalProperties.enabled_column_stats","typeLabel":"object"}},"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.0.additionalProperties","typeLabel":"object"},"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.0","typeLabel":"object"},{"description":"Which statistics to collect, keyed by column name. Null when the job was enqueued without any.","type":"null","additionalProperties":{"type":"object","required":["data_type","enabled_column_stats"],"properties":{"data_type":{"description":"The column's type, as the stats job sees it.","type":"string","enum":["boolean","double","long","string","timestamp_tz","array","object"],"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.1.additionalProperties.data_type","typeLabel":"enum\u003cstring>"},"enabled_column_stats":{"description":"Which statistics to collect for one column. The first six are basic statistics, on by default; the rest are\nadvanced and are turned on by the dataset's metrics configuration. Statistics that make no sense for the\ncolumn's type are switched off before the job is enqueued — `mean` on a string column, for instance.","type":"object","required":["nan_value_count","null_value_count","value_count","lower_bound","upper_bound","column_stored_bytes","approx_count_distinct","count_distinct","histogram","mean","standard_deviation","completeness","observed_types"],"properties":{"nan_value_count":{"type":"boolean","uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.1.additionalProperties.enabled_column_stats.nan_value_count","typeLabel":"boolean"},"null_value_count":{"type":"boolean","uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.1.additionalProperties.enabled_column_stats.null_value_count","typeLabel":"boolean"},"value_count":{"type":"boolean","uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.1.additionalProperties.enabled_column_stats.value_count","typeLabel":"boolean"},"lower_bound":{"type":"boolean","uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.1.additionalProperties.enabled_column_stats.lower_bound","typeLabel":"boolean"},"upper_bound":{"type":"boolean","uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.1.additionalProperties.enabled_column_stats.upper_bound","typeLabel":"boolean"},"column_stored_bytes":{"type":"boolean","uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.1.additionalProperties.enabled_column_stats.column_stored_bytes","typeLabel":"boolean"},"approx_count_distinct":{"type":"boolean","uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.1.additionalProperties.enabled_column_stats.approx_count_distinct","typeLabel":"boolean"},"count_distinct":{"type":"boolean","uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.1.additionalProperties.enabled_column_stats.count_distinct","typeLabel":"boolean"},"histogram":{"type":"boolean","uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.1.additionalProperties.enabled_column_stats.histogram","typeLabel":"boolean"},"mean":{"type":"boolean","uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.1.additionalProperties.enabled_column_stats.mean","typeLabel":"boolean"},"standard_deviation":{"type":"boolean","uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.1.additionalProperties.enabled_column_stats.standard_deviation","typeLabel":"boolean"},"completeness":{"type":"boolean","uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.1.additionalProperties.enabled_column_stats.completeness","typeLabel":"boolean"},"observed_types":{"type":"boolean","uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.1.additionalProperties.enabled_column_stats.observed_types","typeLabel":"boolean"}},"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.1.additionalProperties.enabled_column_stats","typeLabel":"object"}},"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.1.additionalProperties","typeLabel":"object"},"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.3.input.oneOf.1.enabled_column_stats","typeLabel":"object | null"}},"isRequired":true,"uniqueKey":"oneOf.3.input.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.3.input","typeLabel":"object"},"result":{"oneOf":[{"type":"object","description":"A marker that the job finished. The statistics themselves are written to the dataset, not returned here.\nA job completed through the API carries only `type`; one completed by the legacy executor also carries\n`total_rows` and `column_count`.","required":["type"],"example":{"type":"datasets_calculate_column_stats"},"properties":{"type":{"type":"string","enum":["datasets_calculate_column_stats"],"isRequired":true,"uniqueKey":"oneOf.3.result.oneOf.0.type","typeLabel":"enum\u003cstring>"},"total_rows":{"description":"How many rows the dataset had when the statistics were computed.","type":"integer","format":"int64","uniqueKey":"oneOf.3.result.oneOf.0.total_rows","typeLabel":"integer\u003cint64>"},"column_count":{"description":"How many columns statistics were computed for.","type":"integer","uniqueKey":"oneOf.3.result.oneOf.0.column_count","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"oneOf.3.result.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"oneOf.3.result.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.3.result","typeLabel":"object | null"},"compute_pool_id":{"oneOf":[{"description":"The compute pool associated with the job, if any.","type":"string","format":"uuid","uniqueKey":"oneOf.3.compute_pool_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The compute pool associated with the job, if any.","type":"null","format":"uuid","uniqueKey":"oneOf.3.compute_pool_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.3.compute_pool_id","typeLabel":"string\u003cuuid> | null"},"executor":{"oneOf":[{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"string","uniqueKey":"oneOf.3.executor.oneOf.0","typeLabel":"string"},{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"null","uniqueKey":"oneOf.3.executor.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.3.executor","typeLabel":"string | null"},"dequeued_at":{"oneOf":[{"description":"When the job was taken off the queue. Null while it is still queued.","type":"string","format":"date-time","uniqueKey":"oneOf.3.dequeued_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"When the job was taken off the queue. Null while it is still queued.","type":"null","format":"date-time","uniqueKey":"oneOf.3.dequeued_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.3.dequeued_at","typeLabel":"string\u003cdate-time> | null"},"ended_at":{"oneOf":[{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"string","format":"date-time","uniqueKey":"oneOf.3.ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"null","format":"date-time","uniqueKey":"oneOf.3.ended_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.3.ended_at","typeLabel":"string\u003cdate-time> | null"},"workflow_id":{"oneOf":[{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"string","format":"uuid","uniqueKey":"oneOf.3.workflow_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"null","format":"uuid","uniqueKey":"oneOf.3.workflow_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.3.workflow_id","typeLabel":"string\u003cuuid> | null"},"workflow_run_id":{"oneOf":[{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"string","format":"uuid","uniqueKey":"oneOf.3.workflow_run_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"null","format":"uuid","uniqueKey":"oneOf.3.workflow_run_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.3.workflow_run_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"oneOf.3","typeLabel":"object"},{"type":"object","description":"A job. Every job carries the same envelope of fields — see `JobBase` — but `input` and `result` hold\njob-type-specific payloads, so the response is a union over `type`: pick the branch whose `type` matches\nand you get the typed `input` and `result` for that kind of job.\n\nThe union is open on purpose. Job types are free strings on the server, so a type this spec version does\nnot describe lands in `OtherJobResponse`, where both fields stay free-form. No branch closes itself to\nextra properties, and new job types can appear without a spec change.\n\nThe described types sit together under `DescribedJobResponse`, which has a discriminator on `type`. Any other\n`type` is an `OtherJobResponse`. That branch sits outside the discriminator because a mapping can only name\nspecific values, and a branch with no mapping entry would only match a `type` equal to its schema name.\n\n`input` and `result` are returned exactly as they were stored when the job was enqueued or completed. The\nserver never reshapes them, so a field a job type gained after a row was written is absent from that row\nrather than null. The typed branches describe what the current code writes; fields that have not always\nbeen written are left out of each branch's `required` list.\n\n`result` is `null` in every branch until the job reaches a terminal state.","required":["type","input","result","job_id","company_id","data_plane_id","request_source","state","operator_type","tags","execution_cluster","idempotency_key","created_at","updated_at","attempted_at","attempt_version"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique identifier for the job.","isRequired":true,"uniqueKey":"oneOf.4.job_id","typeLabel":"string\u003cuuid>"},"company_id":{"description":"The company the job belongs to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.4.company_id","typeLabel":"integer\u003cint64>"},"data_plane_id":{"description":"The data plane the job runs on. Jobs on the Narrative data plane carry its id,\n`f79cbdae-4848-47ca-95e8-69588364d185`.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.4.data_plane_id","typeLabel":"string\u003cuuid>"},"request_source":{"oneOf":[{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","company_id","user_id"],"example":{"type":"api_user","company_id":1,"user_id":1248},"properties":{"type":{"type":"string","enum":["api_user"],"isRequired":true,"uniqueKey":"oneOf.4.request_source.oneOf.0.type","typeLabel":"enum\u003cstring>"},"company_id":{"description":"The company the request was made for.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.4.request_source.oneOf.0.company_id","typeLabel":"integer\u003cint64>"},"user_id":{"description":"The user who made the request.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.4.request_source.oneOf.0.user_id","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.4.request_source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","name"],"example":{"type":"process","name":"narrative-control-plane"},"properties":{"type":{"type":"string","enum":["process"],"isRequired":true,"uniqueKey":"oneOf.4.request_source.oneOf.1.type","typeLabel":"enum\u003cstring>"},"name":{"description":"The process that enqueued the job, e.g. `narrative-control-plane` or `health-check`.","type":"string","isRequired":true,"uniqueKey":"oneOf.4.request_source.oneOf.1.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.4.request_source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.4.request_source","typeLabel":"object"},"state":{"description":"Where a job is in its lifecycle.\n\n- `pending` — enqueued and waiting to be picked up.\n- `scheduled` — claimed by an executor but not yet started.\n- `running` — being executed.\n- `pending_cancellation` — cancellation has been requested and the data plane has yet to stop the work.\n- `completed`, `cancelled`, `failed` — terminal states.","type":"string","enum":["pending","scheduled","running","pending_cancellation","completed","cancelled","failed"],"isRequired":true,"uniqueKey":"oneOf.4.state","typeLabel":"enum\u003cstring>"},"operator_type":{"description":"Which operator runs the job, e.g. `materialized-view-refresh` or `datasets_execute_select`. Finer-grained\nthan `type`: several job types can share one operator, and where no such mapping exists the two are equal.","type":"string","isRequired":true,"uniqueKey":"oneOf.4.operator_type","typeLabel":"string"},"tags":{"description":"Free-form labels attached to the job.","type":"array","items":{"type":"string","minLength":1,"maxLength":255,"uniqueKey":"oneOf.4.tags.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.4.tags","typeLabel":"string[]"},"execution_cluster":{"description":"The type of the execution cluster to run the job on.\n\n- `dedicated` runs job on a dedicated cluster.\n- `shared` runs job on a shared cluster.","type":"string","enum":["dedicated","shared"],"isRequired":true,"uniqueKey":"oneOf.4.execution_cluster","typeLabel":"enum\u003cstring>"},"idempotency_key":{"description":"The unique key the job was enqueued under.","type":"string","minLength":1,"maxLength":255,"isRequired":true,"uniqueKey":"oneOf.4.idempotency_key","typeLabel":"string"},"created_at":{"description":"The timestamp representing when the job was created.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.4.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"description":"The timestamp representing when the job was updated.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.4.updated_at","typeLabel":"string\u003cdate-time>"},"attempted_at":{"description":"When the job's current attempt started. A job can be retried; each retry is a new attempt, so this advances to the latest one, while `created_at` stays at the original submission.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.4.attempted_at","typeLabel":"string\u003cdate-time>"},"attempt_version":{"description":"Which attempt this is: 1 for the first, increasing by one on each retry.","type":"integer","isRequired":true,"uniqueKey":"oneOf.4.attempt_version","typeLabel":"integer"},"type":{"type":"string","enum":["materialized_views_collect_access_rules_billing_data"],"isRequired":true,"uniqueKey":"oneOf.4.type","typeLabel":"enum\u003cstring>"},"input":{"type":"object","required":["nio_last_modified_at","compiled_query","refresh_job_id"],"properties":{"nio_last_modified_at":{"description":"The job counts rows whose `_nio_last_modified_at` matches this watermark.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.4.input.nio_last_modified_at","typeLabel":"string\u003cdate-time>"},"compiled_query":{"description":"The query that counts the rows, compiled by the API so the operator needs no query logic.","type":"string","isRequired":true,"uniqueKey":"oneOf.4.input.compiled_query","typeLabel":"string"},"refresh_job_id":{"description":"The `materialize-view` job whose rows this job bills for.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.4.input.refresh_job_id","typeLabel":"string\u003cuuid>"},"dataset_id":{"oneOf":[{"description":"The dataset the refresh wrote to. Null on jobs enqueued without one.","type":"integer","format":"int64","uniqueKey":"oneOf.4.input.dataset_id.oneOf.0","typeLabel":"integer\u003cint64>"},{"description":"The dataset the refresh wrote to. Null on jobs enqueued without one.","type":"null","format":"int64","uniqueKey":"oneOf.4.input.dataset_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.4.input.dataset_id","typeLabel":"integer\u003cint64> | null"}},"example":{"dataset_id":10736,"nio_last_modified_at":"2024-01-28T00:00:00Z","compiled_query":"SELECT `t`.`_nio_access_rule_id` FROM narrative.datasets.ds_10736 `t`","refresh_job_id":"2a5b9ad7-dc8f-47bb-8e62-843a38f8054c"},"isRequired":true,"uniqueKey":"oneOf.4.input","typeLabel":"object"},"result":{"oneOf":[{"type":"object","description":"One entry per access rule the refresh read from. A job completed through the API carries `type` as well;\none completed by the Spark executor does not.","required":["sources"],"example":{"type":"materialized_views_collect_access_rules_billing_data","sources":[{"access_rule_id":88,"rows":1200,"price_per_row":{"currency":"USD","microcents":250}}]},"properties":{"sources":{"type":"array","items":{"type":"object","required":["access_rule_id","rows","price_per_row"],"properties":{"access_rule_id":{"description":"The access rule the rows came from.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.4.result.oneOf.0.sources.items.[INDEX].access_rule_id","typeLabel":"integer\u003cint64>"},"rows":{"description":"How many rows this access rule contributed.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.4.result.oneOf.0.sources.items.[INDEX].rows","typeLabel":"integer\u003cint64>"},"price_per_row":{"type":"object","required":["currency","microcents"],"properties":{"currency":{"description":"ISO 4217 currency code.","type":"string","examples":["USD"],"isRequired":true,"uniqueKey":"oneOf.4.result.oneOf.0.sources.items.[INDEX].price_per_row.currency","typeLabel":"string"},"microcents":{"description":"Price per row, in microcents.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.4.result.oneOf.0.sources.items.[INDEX].price_per_row.microcents","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.4.result.oneOf.0.sources.items.[INDEX].price_per_row","typeLabel":"object"}},"uniqueKey":"oneOf.4.result.oneOf.0.sources.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.4.result.oneOf.0.sources","typeLabel":"object[]"},"type":{"description":"Repeated inside the result by the completion handler.","type":"string","enum":["materialized_views_collect_access_rules_billing_data"],"uniqueKey":"oneOf.4.result.oneOf.0.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.4.result.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"oneOf.4.result.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.4.result","typeLabel":"object | null"},"compute_pool_id":{"oneOf":[{"description":"The compute pool associated with the job, if any.","type":"string","format":"uuid","uniqueKey":"oneOf.4.compute_pool_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The compute pool associated with the job, if any.","type":"null","format":"uuid","uniqueKey":"oneOf.4.compute_pool_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.4.compute_pool_id","typeLabel":"string\u003cuuid> | null"},"executor":{"oneOf":[{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"string","uniqueKey":"oneOf.4.executor.oneOf.0","typeLabel":"string"},{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"null","uniqueKey":"oneOf.4.executor.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.4.executor","typeLabel":"string | null"},"dequeued_at":{"oneOf":[{"description":"When the job was taken off the queue. Null while it is still queued.","type":"string","format":"date-time","uniqueKey":"oneOf.4.dequeued_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"When the job was taken off the queue. Null while it is still queued.","type":"null","format":"date-time","uniqueKey":"oneOf.4.dequeued_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.4.dequeued_at","typeLabel":"string\u003cdate-time> | null"},"ended_at":{"oneOf":[{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"string","format":"date-time","uniqueKey":"oneOf.4.ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"null","format":"date-time","uniqueKey":"oneOf.4.ended_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.4.ended_at","typeLabel":"string\u003cdate-time> | null"},"workflow_id":{"oneOf":[{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"string","format":"uuid","uniqueKey":"oneOf.4.workflow_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"null","format":"uuid","uniqueKey":"oneOf.4.workflow_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.4.workflow_id","typeLabel":"string\u003cuuid> | null"},"workflow_run_id":{"oneOf":[{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"string","format":"uuid","uniqueKey":"oneOf.4.workflow_run_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"null","format":"uuid","uniqueKey":"oneOf.4.workflow_run_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.4.workflow_run_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"oneOf.4","typeLabel":"object"},{"type":"object","description":"A job. Every job carries the same envelope of fields — see `JobBase` — but `input` and `result` hold\njob-type-specific payloads, so the response is a union over `type`: pick the branch whose `type` matches\nand you get the typed `input` and `result` for that kind of job.\n\nThe union is open on purpose. Job types are free strings on the server, so a type this spec version does\nnot describe lands in `OtherJobResponse`, where both fields stay free-form. No branch closes itself to\nextra properties, and new job types can appear without a spec change.\n\nThe described types sit together under `DescribedJobResponse`, which has a discriminator on `type`. Any other\n`type` is an `OtherJobResponse`. That branch sits outside the discriminator because a mapping can only name\nspecific values, and a branch with no mapping entry would only match a `type` equal to its schema name.\n\n`input` and `result` are returned exactly as they were stored when the job was enqueued or completed. The\nserver never reshapes them, so a field a job type gained after a row was written is absent from that row\nrather than null. The typed branches describe what the current code writes; fields that have not always\nbeen written are left out of each branch's `required` list.\n\n`result` is `null` in every branch until the job reaches a terminal state.","required":["type","input","result","job_id","company_id","data_plane_id","request_source","state","operator_type","tags","execution_cluster","idempotency_key","created_at","updated_at","attempted_at","attempt_version"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique identifier for the job.","isRequired":true,"uniqueKey":"oneOf.5.job_id","typeLabel":"string\u003cuuid>"},"company_id":{"description":"The company the job belongs to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.5.company_id","typeLabel":"integer\u003cint64>"},"data_plane_id":{"description":"The data plane the job runs on. Jobs on the Narrative data plane carry its id,\n`f79cbdae-4848-47ca-95e8-69588364d185`.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.5.data_plane_id","typeLabel":"string\u003cuuid>"},"request_source":{"oneOf":[{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","company_id","user_id"],"example":{"type":"api_user","company_id":1,"user_id":1248},"properties":{"type":{"type":"string","enum":["api_user"],"isRequired":true,"uniqueKey":"oneOf.5.request_source.oneOf.0.type","typeLabel":"enum\u003cstring>"},"company_id":{"description":"The company the request was made for.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.5.request_source.oneOf.0.company_id","typeLabel":"integer\u003cint64>"},"user_id":{"description":"The user who made the request.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.5.request_source.oneOf.0.user_id","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.5.request_source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","name"],"example":{"type":"process","name":"narrative-control-plane"},"properties":{"type":{"type":"string","enum":["process"],"isRequired":true,"uniqueKey":"oneOf.5.request_source.oneOf.1.type","typeLabel":"enum\u003cstring>"},"name":{"description":"The process that enqueued the job, e.g. `narrative-control-plane` or `health-check`.","type":"string","isRequired":true,"uniqueKey":"oneOf.5.request_source.oneOf.1.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.5.request_source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.5.request_source","typeLabel":"object"},"state":{"description":"Where a job is in its lifecycle.\n\n- `pending` — enqueued and waiting to be picked up.\n- `scheduled` — claimed by an executor but not yet started.\n- `running` — being executed.\n- `pending_cancellation` — cancellation has been requested and the data plane has yet to stop the work.\n- `completed`, `cancelled`, `failed` — terminal states.","type":"string","enum":["pending","scheduled","running","pending_cancellation","completed","cancelled","failed"],"isRequired":true,"uniqueKey":"oneOf.5.state","typeLabel":"enum\u003cstring>"},"operator_type":{"description":"Which operator runs the job, e.g. `materialized-view-refresh` or `datasets_execute_select`. Finer-grained\nthan `type`: several job types can share one operator, and where no such mapping exists the two are equal.","type":"string","isRequired":true,"uniqueKey":"oneOf.5.operator_type","typeLabel":"string"},"tags":{"description":"Free-form labels attached to the job.","type":"array","items":{"type":"string","minLength":1,"maxLength":255,"uniqueKey":"oneOf.5.tags.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.5.tags","typeLabel":"string[]"},"execution_cluster":{"description":"The type of the execution cluster to run the job on.\n\n- `dedicated` runs job on a dedicated cluster.\n- `shared` runs job on a shared cluster.","type":"string","enum":["dedicated","shared"],"isRequired":true,"uniqueKey":"oneOf.5.execution_cluster","typeLabel":"enum\u003cstring>"},"idempotency_key":{"description":"The unique key the job was enqueued under.","type":"string","minLength":1,"maxLength":255,"isRequired":true,"uniqueKey":"oneOf.5.idempotency_key","typeLabel":"string"},"created_at":{"description":"The timestamp representing when the job was created.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.5.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"description":"The timestamp representing when the job was updated.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.5.updated_at","typeLabel":"string\u003cdate-time>"},"attempted_at":{"description":"When the job's current attempt started. A job can be retried; each retry is a new attempt, so this advances to the latest one, while `created_at` stays at the original submission.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.5.attempted_at","typeLabel":"string\u003cdate-time>"},"attempt_version":{"description":"Which attempt this is: 1 for the first, increasing by one on each retry.","type":"integer","isRequired":true,"uniqueKey":"oneOf.5.attempt_version","typeLabel":"integer"},"type":{"type":"string","enum":["datasets_deliver_data"],"isRequired":true,"uniqueKey":"oneOf.5.type","typeLabel":"enum\u003cstring>"},"input":{"type":"object","required":["dataset_id","external_id"],"properties":{"dataset_id":{"description":"The dataset being delivered.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.5.input.dataset_id","typeLabel":"integer\u003cint64>"},"external_id":{"description":"The dataset's external identifier, as the destination knows it.","type":"string","isRequired":true,"uniqueKey":"oneOf.5.input.external_id","typeLabel":"string"},"app_id":{"oneOf":[{"description":"The app being delivered to. Null on deliveries not routed through an app installation.","type":"integer","format":"int64","uniqueKey":"oneOf.5.input.app_id.oneOf.0","typeLabel":"integer\u003cint64>"},{"description":"The app being delivered to. Null on deliveries not routed through an app installation.","type":"null","format":"int64","uniqueKey":"oneOf.5.input.app_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.5.input.app_id","typeLabel":"integer\u003cint64> | null"},"connection_id":{"oneOf":[{"description":"The connection being delivered to.","type":"string","format":"uuid","uniqueKey":"oneOf.5.input.connection_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The connection being delivered to.","type":"null","format":"uuid","uniqueKey":"oneOf.5.input.connection_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.5.input.connection_id","typeLabel":"string\u003cuuid> | null"},"snapshot_id":{"oneOf":[{"description":"The snapshot being delivered. A string, not a number — the Snowflake data plane passes a numeric\nsnapshot id through this field as text.","type":"string","uniqueKey":"oneOf.5.input.snapshot_id.oneOf.0","typeLabel":"string"},{"description":"The snapshot being delivered. A string, not a number — the Snowflake data plane passes a numeric\nsnapshot id through this field as text.","type":"null","uniqueKey":"oneOf.5.input.snapshot_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.5.input.snapshot_id","typeLabel":"string | null"},"maintenance_window_predicate":{"oneOf":[{"description":"SQL restricting the delivery to a maintenance window. Null when the delivery covers the whole\nsnapshot.","type":"string","uniqueKey":"oneOf.5.input.maintenance_window_predicate.oneOf.0","typeLabel":"string"},{"description":"SQL restricting the delivery to a maintenance window. Null when the delivery covers the whole\nsnapshot.","type":"null","uniqueKey":"oneOf.5.input.maintenance_window_predicate.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.5.input.maintenance_window_predicate","typeLabel":"string | null"}},"example":{"app_id":142,"connection_id":"0f1e2d3c-4b5a-4968-9788-6a5b4c3d2e1f","dataset_id":10736,"external_id":"nio_10736","snapshot_id":"1724919539450264600","maintenance_window_predicate":null},"isRequired":true,"uniqueKey":"oneOf.5.input","typeLabel":"object"},"result":{"oneOf":[{"type":"object","description":"Empty. The API records nothing beyond the job reaching `completed` — what was delivered is already in the\ninput, and the destination's own response is not kept.","example":{},"isRequired":true,"uniqueKey":"oneOf.5.result.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"oneOf.5.result.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.5.result","typeLabel":"object | null"},"compute_pool_id":{"oneOf":[{"description":"The compute pool associated with the job, if any.","type":"string","format":"uuid","uniqueKey":"oneOf.5.compute_pool_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The compute pool associated with the job, if any.","type":"null","format":"uuid","uniqueKey":"oneOf.5.compute_pool_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.5.compute_pool_id","typeLabel":"string\u003cuuid> | null"},"executor":{"oneOf":[{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"string","uniqueKey":"oneOf.5.executor.oneOf.0","typeLabel":"string"},{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"null","uniqueKey":"oneOf.5.executor.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.5.executor","typeLabel":"string | null"},"dequeued_at":{"oneOf":[{"description":"When the job was taken off the queue. Null while it is still queued.","type":"string","format":"date-time","uniqueKey":"oneOf.5.dequeued_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"When the job was taken off the queue. Null while it is still queued.","type":"null","format":"date-time","uniqueKey":"oneOf.5.dequeued_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.5.dequeued_at","typeLabel":"string\u003cdate-time> | null"},"ended_at":{"oneOf":[{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"string","format":"date-time","uniqueKey":"oneOf.5.ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"null","format":"date-time","uniqueKey":"oneOf.5.ended_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.5.ended_at","typeLabel":"string\u003cdate-time> | null"},"workflow_id":{"oneOf":[{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"string","format":"uuid","uniqueKey":"oneOf.5.workflow_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"null","format":"uuid","uniqueKey":"oneOf.5.workflow_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.5.workflow_id","typeLabel":"string\u003cuuid> | null"},"workflow_run_id":{"oneOf":[{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"string","format":"uuid","uniqueKey":"oneOf.5.workflow_run_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"null","format":"uuid","uniqueKey":"oneOf.5.workflow_run_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.5.workflow_run_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"oneOf.5","typeLabel":"object"},{"type":"object","description":"A job. Every job carries the same envelope of fields — see `JobBase` — but `input` and `result` hold\njob-type-specific payloads, so the response is a union over `type`: pick the branch whose `type` matches\nand you get the typed `input` and `result` for that kind of job.\n\nThe union is open on purpose. Job types are free strings on the server, so a type this spec version does\nnot describe lands in `OtherJobResponse`, where both fields stay free-form. No branch closes itself to\nextra properties, and new job types can appear without a spec change.\n\nThe described types sit together under `DescribedJobResponse`, which has a discriminator on `type`. Any other\n`type` is an `OtherJobResponse`. That branch sits outside the discriminator because a mapping can only name\nspecific values, and a branch with no mapping entry would only match a `type` equal to its schema name.\n\n`input` and `result` are returned exactly as they were stored when the job was enqueued or completed. The\nserver never reshapes them, so a field a job type gained after a row was written is absent from that row\nrather than null. The typed branches describe what the current code writes; fields that have not always\nbeen written are left out of each branch's `required` list.\n\n`result` is `null` in every branch until the job reaches a terminal state.","required":["type","input","result","job_id","company_id","data_plane_id","request_source","state","operator_type","tags","execution_cluster","idempotency_key","created_at","updated_at","attempted_at","attempt_version"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique identifier for the job.","isRequired":true,"uniqueKey":"oneOf.6.job_id","typeLabel":"string\u003cuuid>"},"company_id":{"description":"The company the job belongs to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.6.company_id","typeLabel":"integer\u003cint64>"},"data_plane_id":{"description":"The data plane the job runs on. Jobs on the Narrative data plane carry its id,\n`f79cbdae-4848-47ca-95e8-69588364d185`.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.6.data_plane_id","typeLabel":"string\u003cuuid>"},"request_source":{"oneOf":[{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","company_id","user_id"],"example":{"type":"api_user","company_id":1,"user_id":1248},"properties":{"type":{"type":"string","enum":["api_user"],"isRequired":true,"uniqueKey":"oneOf.6.request_source.oneOf.0.type","typeLabel":"enum\u003cstring>"},"company_id":{"description":"The company the request was made for.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.6.request_source.oneOf.0.company_id","typeLabel":"integer\u003cint64>"},"user_id":{"description":"The user who made the request.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.6.request_source.oneOf.0.user_id","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.6.request_source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","name"],"example":{"type":"process","name":"narrative-control-plane"},"properties":{"type":{"type":"string","enum":["process"],"isRequired":true,"uniqueKey":"oneOf.6.request_source.oneOf.1.type","typeLabel":"enum\u003cstring>"},"name":{"description":"The process that enqueued the job, e.g. `narrative-control-plane` or `health-check`.","type":"string","isRequired":true,"uniqueKey":"oneOf.6.request_source.oneOf.1.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.6.request_source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.6.request_source","typeLabel":"object"},"state":{"description":"Where a job is in its lifecycle.\n\n- `pending` — enqueued and waiting to be picked up.\n- `scheduled` — claimed by an executor but not yet started.\n- `running` — being executed.\n- `pending_cancellation` — cancellation has been requested and the data plane has yet to stop the work.\n- `completed`, `cancelled`, `failed` — terminal states.","type":"string","enum":["pending","scheduled","running","pending_cancellation","completed","cancelled","failed"],"isRequired":true,"uniqueKey":"oneOf.6.state","typeLabel":"enum\u003cstring>"},"operator_type":{"description":"Which operator runs the job, e.g. `materialized-view-refresh` or `datasets_execute_select`. Finer-grained\nthan `type`: several job types can share one operator, and where no such mapping exists the two are equal.","type":"string","isRequired":true,"uniqueKey":"oneOf.6.operator_type","typeLabel":"string"},"tags":{"description":"Free-form labels attached to the job.","type":"array","items":{"type":"string","minLength":1,"maxLength":255,"uniqueKey":"oneOf.6.tags.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.6.tags","typeLabel":"string[]"},"execution_cluster":{"description":"The type of the execution cluster to run the job on.\n\n- `dedicated` runs job on a dedicated cluster.\n- `shared` runs job on a shared cluster.","type":"string","enum":["dedicated","shared"],"isRequired":true,"uniqueKey":"oneOf.6.execution_cluster","typeLabel":"enum\u003cstring>"},"idempotency_key":{"description":"The unique key the job was enqueued under.","type":"string","minLength":1,"maxLength":255,"isRequired":true,"uniqueKey":"oneOf.6.idempotency_key","typeLabel":"string"},"created_at":{"description":"The timestamp representing when the job was created.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.6.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"description":"The timestamp representing when the job was updated.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.6.updated_at","typeLabel":"string\u003cdate-time>"},"attempted_at":{"description":"When the job's current attempt started. A job can be retried; each retry is a new attempt, so this advances to the latest one, while `created_at` stays at the original submission.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.6.attempted_at","typeLabel":"string\u003cdate-time>"},"attempt_version":{"description":"Which attempt this is: 1 for the first, increasing by one on each retry.","type":"integer","isRequired":true,"uniqueKey":"oneOf.6.attempt_version","typeLabel":"integer"},"type":{"type":"string","enum":["model_inference_run"],"isRequired":true,"uniqueKey":"oneOf.6.type","typeLabel":"enum\u003cstring>"},"input":{"description":"Jobs enqueued today carry every field below. `tools` and `tool_choice` were added after this job type\nexisted, so older rows lack them.","type":"object","required":["model","messages","inference_config"],"properties":{"model":{"oneOf":[{"type":"object","description":"The model to run, narrowed to the one provider binding that fits this job's data plane. Rows written\nbefore the binding travelled with the job carry the bare model id as a string instead.","required":["id","binding"],"properties":{"id":{"description":"The Narrative model id.","type":"string","isRequired":true,"uniqueKey":"oneOf.6.input.model.oneOf.0.id","typeLabel":"string"},"binding":{"description":"Where the model runs and what it can do there. Discriminated by `provider`.","type":"object","required":["provider","model_id","capabilities"],"properties":{"provider":{"type":"string","enum":["bedrock","snowflake_cortex"],"isRequired":true,"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.provider","typeLabel":"enum\u003cstring>"},"model_id":{"description":"The provider's own id for the model, e.g. `global.anthropic.claude-sonnet-4-6`.","type":"string","isRequired":true,"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.model_id","typeLabel":"string"},"capabilities":{"description":"What this provider binding supports. Only `structured_output_mode` is always sent — the rest are omitted\nentirely when unset, rather than sent as null.","type":"object","required":["structured_output_mode"],"properties":{"structured_output_mode":{"description":"How the binding produces structured output.","type":"string","enum":["native","forced_tool_use","prompted_tool_use"],"isRequired":true,"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.structured_output_mode","typeLabel":"enum\u003cstring>"},"strict_tool_use":{"description":"Present when the binding supports grammar-constrained tool arguments.","type":"object","required":["max_tool_count"],"properties":{"max_tool_count":{"description":"How many strict tools one request may declare.","type":"integer","isRequired":true,"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.strict_tool_use.max_tool_count","typeLabel":"integer"}},"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.strict_tool_use","typeLabel":"object"},"supported_sampling_parameters":{"description":"Which sampling parameters the binding honours. Absent when it accepts none; never an empty array.","type":"array","minItems":1,"items":{"type":"string","enum":["temperature","top_p"],"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.supported_sampling_parameters.items.[INDEX]","typeLabel":"enum\u003cstring>"},"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.supported_sampling_parameters","typeLabel":"enum\u003cstring>[]"},"thinking_support":{"description":"What a caller may ask this binding for about thinking, and what it is sent when nobody asks. Absent on a\nbinding that is not offered thinking.","type":"object","required":["vocabularies","reasoning_text_readable"],"properties":{"vocabularies":{"description":"The ways this binding can be asked to think, preferred one first. Never empty.","type":"array","minItems":1,"items":{"oneOf":[{"type":"object","description":"One way of asking a model to think, with the value used when a caller names the vocabulary without a\nvalue. Discriminated by `type`.","required":["type","levels","default"],"properties":{"type":{"type":"string","enum":["effort"],"isRequired":true,"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.thinking_support.vocabularies.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"levels":{"description":"The effort levels the model accepts, shallowest first. Never empty.","type":"array","minItems":1,"items":{"type":"string","enum":["low","medium","high"],"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.thinking_support.vocabularies.items.[INDEX].oneOf.0.levels.items.[INDEX]","typeLabel":"enum\u003cstring>"},"isRequired":true,"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.thinking_support.vocabularies.items.[INDEX].oneOf.0.levels","typeLabel":"enum\u003cstring>[]"},"default":{"type":"string","enum":["low","medium","high"],"isRequired":true,"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.thinking_support.vocabularies.items.[INDEX].oneOf.0.default","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.thinking_support.vocabularies.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"One way of asking a model to think, with the value used when a caller names the vocabulary without a\nvalue. Discriminated by `type`.","required":["type","default"],"properties":{"type":{"type":"string","enum":["budget"],"isRequired":true,"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.thinking_support.vocabularies.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"default":{"description":"The token budget used when a caller asks for budgeted thinking without naming one.","type":"integer","minimum":1024,"isRequired":true,"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.thinking_support.vocabularies.items.[INDEX].oneOf.1.default","typeLabel":"integer"}},"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.thinking_support.vocabularies.items.[INDEX].oneOf.1","typeLabel":"object"}],"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.thinking_support.vocabularies.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.thinking_support.vocabularies","typeLabel":"object[]"},"reasoning_text_readable":{"description":"Whether the reasoning that comes back is readable text, rather than a signature with no words.","type":"boolean","isRequired":true,"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.thinking_support.reasoning_text_readable","typeLabel":"boolean"},"unasked":{"oneOf":[{"type":"string","description":"The setting sent when a caller names none. Omitted for a binding that needs no thinking field at all.","enum":["disabled"],"example":"disabled","uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.thinking_support.unasked.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","description":"The setting sent when a caller names none. Omitted for a binding that needs no thinking field at all.","required":["type","level"],"example":"disabled","properties":{"type":{"type":"string","enum":["effort"],"isRequired":true,"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.thinking_support.unasked.oneOf.1.type","typeLabel":"enum\u003cstring>"},"level":{"type":"string","enum":["low","medium","high"],"isRequired":true,"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.thinking_support.unasked.oneOf.1.level","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.thinking_support.unasked.oneOf.1","typeLabel":"object"},{"type":"object","description":"The setting sent when a caller names none. Omitted for a binding that needs no thinking field at all.","required":["type","budget_tokens"],"example":"disabled","properties":{"type":{"type":"string","enum":["budget"],"isRequired":true,"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.thinking_support.unasked.oneOf.2.type","typeLabel":"enum\u003cstring>"},"budget_tokens":{"type":"integer","minimum":1024,"isRequired":true,"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.thinking_support.unasked.oneOf.2.budget_tokens","typeLabel":"integer"}},"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.thinking_support.unasked.oneOf.2","typeLabel":"object"}],"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.thinking_support.unasked","typeLabel":"enum\u003cstring> · object · object"},"off_allowed":{"description":"`false` for a model that always thinks and can't turn thinking off. When a caller asks such a model\nfor `disabled`, the model is sent low effort instead. Absent means `true`.","type":"boolean","uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.thinking_support.off_allowed","typeLabel":"boolean"}},"example":{"vocabularies":[{"type":"effort","levels":["low","medium","high"],"default":"medium"}],"unasked":"disabled","reasoning_text_readable":true},"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.thinking_support","typeLabel":"object"},"image_input":{"description":"`true` when the binding takes `image` blocks in user messages and tool results. Sent\nonly when true; absent means `false`.","type":"boolean","uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities.image_input","typeLabel":"boolean"}},"isRequired":true,"uniqueKey":"oneOf.6.input.model.oneOf.0.binding.capabilities","typeLabel":"object"}},"isRequired":true,"uniqueKey":"oneOf.6.input.model.oneOf.0.binding","typeLabel":"object"}},"isRequired":true,"uniqueKey":"oneOf.6.input.model.oneOf.0","typeLabel":"object"},{"type":"string","description":"The model to run, narrowed to the one provider binding that fits this job's data plane. Rows written\nbefore the binding travelled with the job carry the bare model id as a string instead.","isRequired":true,"uniqueKey":"oneOf.6.input.model.oneOf.1","typeLabel":"string"}],"isRequired":true,"uniqueKey":"oneOf.6.input.model","typeLabel":"object | string"},"messages":{"description":"The conversation so far, oldest first.","type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["user","assistant","system"],"isRequired":true,"uniqueKey":"oneOf.6.input.messages.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"content":{"description":"The turn's content blocks, in order.","type":"array","items":{"oneOf":[{"type":"object","title":"Text","description":"A single block inside a message. Messages carry an ordered list of blocks. Six\nvariants discriminated by `type`:\n\n- `text` — plain text content. The dominant variant for user messages and final\n assistant answers.\n- `tool_use` — the model requesting a tool call. Carries the call's `tool_use_id`\n (used to match it with the subsequent result), the fully-aliased `name`, and the\n `arguments` the model produced.\n- `tool_result` — the response to a `tool_use`. References the same `tool_use_id`\n and carries nested content blocks with the actual result text. `is_error` flags\n tool failures so the model can decide how to react.\n- `reasoning` — the model's own working, present on an assistant turn when the run\n asked for thinking (`defaults.thinking`). It comes **first** in the turn, ahead of\n the answer. `text` is optional: some models return their reasoning as words, others\n return only a `signature` and keep the words to themselves.\n- `redacted_reasoning` — reasoning the provider encrypted rather than returned. Opaque\n base64; there is nothing to read, and it exists so a turn can still be replayed\n intact.\n- `image` — an image in a user message, or inside a `tool_result`. Either the caller\n sent it, or an MCP tool returned it. See `ImageBlock`.\n\nThe discriminator field is `type`. Use it to dispatch in your client.\n\nEach block may also carry an **`id`** alongside its own fields (`b_\u003cjob>_\u003cordinal>`), the identifier\nit was given where it was produced. Blocks a caller sent, and turns stored before ids existed, have\nnone. `final_answer_from` on the message points at ids, which is how a reader knows which block to\nrender as the reply — see the note there.\n\nReasoning blocks are passed through as the model produced them, `signature` included.\nA client that wants to continue a conversation exactly as the model left it can send\nthem back verbatim; one that only wants to show the answer can drop them. The signature\nis meaningful only to the provider — treat it as opaque and don't parse it.","required":["type","text"],"example":{"type":"text","text":"What is 2 + 2?"},"properties":{"type":{"type":"string","enum":["text"],"isRequired":true,"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","isRequired":true,"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.0.text","typeLabel":"string"},"id":{"type":"string","description":"The id this block was produced under, when we produced it. Absent on blocks a caller sent\nand on turns stored before ids existed.","example":"b_c08cf800_01","uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.0.id","typeLabel":"string"}},"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.0","typeLabel":"Text · object"},{"type":"object","title":"ToolUse","description":"A single block inside a message. Messages carry an ordered list of blocks. Six\nvariants discriminated by `type`:\n\n- `text` — plain text content. The dominant variant for user messages and final\n assistant answers.\n- `tool_use` — the model requesting a tool call. Carries the call's `tool_use_id`\n (used to match it with the subsequent result), the fully-aliased `name`, and the\n `arguments` the model produced.\n- `tool_result` — the response to a `tool_use`. References the same `tool_use_id`\n and carries nested content blocks with the actual result text. `is_error` flags\n tool failures so the model can decide how to react.\n- `reasoning` — the model's own working, present on an assistant turn when the run\n asked for thinking (`defaults.thinking`). It comes **first** in the turn, ahead of\n the answer. `text` is optional: some models return their reasoning as words, others\n return only a `signature` and keep the words to themselves.\n- `redacted_reasoning` — reasoning the provider encrypted rather than returned. Opaque\n base64; there is nothing to read, and it exists so a turn can still be replayed\n intact.\n- `image` — an image in a user message, or inside a `tool_result`. Either the caller\n sent it, or an MCP tool returned it. See `ImageBlock`.\n\nThe discriminator field is `type`. Use it to dispatch in your client.\n\nEach block may also carry an **`id`** alongside its own fields (`b_\u003cjob>_\u003cordinal>`), the identifier\nit was given where it was produced. Blocks a caller sent, and turns stored before ids existed, have\nnone. `final_answer_from` on the message points at ids, which is how a reader knows which block to\nrender as the reply — see the note there.\n\nReasoning blocks are passed through as the model produced them, `signature` included.\nA client that wants to continue a conversation exactly as the model left it can send\nthem back verbatim; one that only wants to show the answer can drop them. The signature\nis meaningful only to the provider — treat it as opaque and don't parse it.","required":["type","tool_use_id","name","arguments"],"properties":{"type":{"type":"string","enum":["tool_use"],"isRequired":true,"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"tool_use_id":{"type":"string","description":"Server-assigned identifier the model produced when emitting the tool call.\nUse this to match a `tool_result` with its `tool_use`, and to fill\n`outputs[].tool_use_id` when resuming a `requires_action` run.","example":"tooluse_DWXPKZ50JDGib5GmShyUgJ","isRequired":true,"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.1.tool_use_id","typeLabel":"string"},"name":{"type":"string","description":"Fully-aliased tool name (`{alias}-{tool_name}`) — the same string the model\nsaw in its tool catalog. The alias prefix is how the platform routes the call\nback to its definition.","example":"docs-search_narrative_i_o_knowledge_base","isRequired":true,"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.1.name","typeLabel":"string"},"arguments":{"type":"object","description":"Arguments object produced by the model. Must conform to the tool's\n`input_schema` — if the model produced something that doesn't validate, the\nrun terminates with the\n[MCP Tool Argument Validation Failed](https://docs.narrative.io/reference/architecture/agent-conversations/errors/mcp-tool-validation)\nerror for server-side tools, or surfaces in `pending_tool_calls` as-is for\nclient-side tools.","example":{"query":"rate limiting"},"isRequired":true,"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.1.arguments","typeLabel":"object"},"id":{"type":"string","description":"The id this block was produced under, when we produced it. Absent on blocks a caller sent\nand on turns stored before ids existed.","example":"b_c08cf800_01","uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.1.id","typeLabel":"string"}},"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.1","typeLabel":"ToolUse · object"},{"type":"object","title":"ToolResult","description":"A single block inside a message. Messages carry an ordered list of blocks. Six\nvariants discriminated by `type`:\n\n- `text` — plain text content. The dominant variant for user messages and final\n assistant answers.\n- `tool_use` — the model requesting a tool call. Carries the call's `tool_use_id`\n (used to match it with the subsequent result), the fully-aliased `name`, and the\n `arguments` the model produced.\n- `tool_result` — the response to a `tool_use`. References the same `tool_use_id`\n and carries nested content blocks with the actual result text. `is_error` flags\n tool failures so the model can decide how to react.\n- `reasoning` — the model's own working, present on an assistant turn when the run\n asked for thinking (`defaults.thinking`). It comes **first** in the turn, ahead of\n the answer. `text` is optional: some models return their reasoning as words, others\n return only a `signature` and keep the words to themselves.\n- `redacted_reasoning` — reasoning the provider encrypted rather than returned. Opaque\n base64; there is nothing to read, and it exists so a turn can still be replayed\n intact.\n- `image` — an image in a user message, or inside a `tool_result`. Either the caller\n sent it, or an MCP tool returned it. See `ImageBlock`.\n\nThe discriminator field is `type`. Use it to dispatch in your client.\n\nEach block may also carry an **`id`** alongside its own fields (`b_\u003cjob>_\u003cordinal>`), the identifier\nit was given where it was produced. Blocks a caller sent, and turns stored before ids existed, have\nnone. `final_answer_from` on the message points at ids, which is how a reader knows which block to\nrender as the reply — see the note there.\n\nReasoning blocks are passed through as the model produced them, `signature` included.\nA client that wants to continue a conversation exactly as the model left it can send\nthem back verbatim; one that only wants to show the answer can drop them. The signature\nis meaningful only to the provider — treat it as opaque and don't parse it.","required":["type","tool_use_id","content","is_error"],"properties":{"type":{"type":"string","enum":["tool_result"],"isRequired":true,"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"tool_use_id":{"type":"string","description":"The `tool_use_id` from the matching `tool_use` block on the prior assistant turn.","example":"tooluse_DWXPKZ50JDGib5GmShyUgJ","isRequired":true,"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.2.tool_use_id","typeLabel":"string"},"content":{"type":"array","description":"Nested content blocks carrying the actual result: `text` blocks, plus `image`\nblocks when the tool returned images. Almost always a single `text` block; the\nplatform splits long results into multiple text blocks when the underlying MCP\nserver returns multiple chunks. An image an MCP tool returned that a model can't\nread (an unsupported type, or over the size limit) is replaced with a `text`\nblock saying so.","items":{"$circularRef":"c670553c-4370-4369-a11e-b426701ce2b9"},"isRequired":true,"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.2.content","typeLabel":"array"},"is_error":{"type":"boolean","description":"Whether the tool call failed. The model decides how to react to errors —\nretry, ask the user, fall through to a partial answer, etc. Note that an\nMCP server returning a non-2xx response that the platform can still parse\ncounts as `is_error: false` (the tool *succeeded* in returning a result, even\nif that result reports an underlying failure).","isRequired":true,"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.2.is_error","typeLabel":"boolean"},"id":{"type":"string","description":"The id this block was produced under, when we produced it. Absent on blocks a caller sent\nand on turns stored before ids existed.","example":"b_c08cf800_01","uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.2.id","typeLabel":"string"}},"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.2","typeLabel":"ToolResult · object"},{"type":"object","title":"Reasoning","description":"A single block inside a message. Messages carry an ordered list of blocks. Six\nvariants discriminated by `type`:\n\n- `text` — plain text content. The dominant variant for user messages and final\n assistant answers.\n- `tool_use` — the model requesting a tool call. Carries the call's `tool_use_id`\n (used to match it with the subsequent result), the fully-aliased `name`, and the\n `arguments` the model produced.\n- `tool_result` — the response to a `tool_use`. References the same `tool_use_id`\n and carries nested content blocks with the actual result text. `is_error` flags\n tool failures so the model can decide how to react.\n- `reasoning` — the model's own working, present on an assistant turn when the run\n asked for thinking (`defaults.thinking`). It comes **first** in the turn, ahead of\n the answer. `text` is optional: some models return their reasoning as words, others\n return only a `signature` and keep the words to themselves.\n- `redacted_reasoning` — reasoning the provider encrypted rather than returned. Opaque\n base64; there is nothing to read, and it exists so a turn can still be replayed\n intact.\n- `image` — an image in a user message, or inside a `tool_result`. Either the caller\n sent it, or an MCP tool returned it. See `ImageBlock`.\n\nThe discriminator field is `type`. Use it to dispatch in your client.\n\nEach block may also carry an **`id`** alongside its own fields (`b_\u003cjob>_\u003cordinal>`), the identifier\nit was given where it was produced. Blocks a caller sent, and turns stored before ids existed, have\nnone. `final_answer_from` on the message points at ids, which is how a reader knows which block to\nrender as the reply — see the note there.\n\nReasoning blocks are passed through as the model produced them, `signature` included.\nA client that wants to continue a conversation exactly as the model left it can send\nthem back verbatim; one that only wants to show the answer can drop them. The signature\nis meaningful only to the provider — treat it as opaque and don't parse it.","required":["type","signature"],"example":{"type":"reasoning","signature":"CAIS6QMKcAgQEAEYAipATBOWJItj3lNDm2ZmBW70v+WJ5oI6W68N…"},"properties":{"type":{"type":"string","enum":["reasoning"],"isRequired":true,"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.3.type","typeLabel":"enum\u003cstring>"},"signature":{"type":"string","description":"Provider-issued signature over the reasoning. Opaque: not a hash you can verify\nor a token you can decode. Send the block back unchanged to continue a turn as\nthe model left it, or ignore it.","example":"CAIS6QMKcAgQEAEYAipATBOWJItj3lNDm2ZmBW70v+WJ5oI6W68N…","isRequired":true,"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.3.signature","typeLabel":"string"},"id":{"type":"string","description":"The id this block was produced under, when we produced it. Absent on blocks a caller sent\nand on turns stored before ids existed.","example":"b_c08cf800_01","uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.3.id","typeLabel":"string"},"text":{"type":"string","description":"The model's working, when it returns it as words. Absent when the model reasoned\nbut withheld the text — the Opus models do this, and `signature` is then the only\nevidence the turn reasoned at all. Never assume this field is present.","example":"Cleo cannot be Monday, so the only assignment left is…","uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.3.text","typeLabel":"string"}},"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.3","typeLabel":"Reasoning · object"},{"type":"object","title":"RedactedReasoning","description":"A single block inside a message. Messages carry an ordered list of blocks. Six\nvariants discriminated by `type`:\n\n- `text` — plain text content. The dominant variant for user messages and final\n assistant answers.\n- `tool_use` — the model requesting a tool call. Carries the call's `tool_use_id`\n (used to match it with the subsequent result), the fully-aliased `name`, and the\n `arguments` the model produced.\n- `tool_result` — the response to a `tool_use`. References the same `tool_use_id`\n and carries nested content blocks with the actual result text. `is_error` flags\n tool failures so the model can decide how to react.\n- `reasoning` — the model's own working, present on an assistant turn when the run\n asked for thinking (`defaults.thinking`). It comes **first** in the turn, ahead of\n the answer. `text` is optional: some models return their reasoning as words, others\n return only a `signature` and keep the words to themselves.\n- `redacted_reasoning` — reasoning the provider encrypted rather than returned. Opaque\n base64; there is nothing to read, and it exists so a turn can still be replayed\n intact.\n- `image` — an image in a user message, or inside a `tool_result`. Either the caller\n sent it, or an MCP tool returned it. See `ImageBlock`.\n\nThe discriminator field is `type`. Use it to dispatch in your client.\n\nEach block may also carry an **`id`** alongside its own fields (`b_\u003cjob>_\u003cordinal>`), the identifier\nit was given where it was produced. Blocks a caller sent, and turns stored before ids existed, have\nnone. `final_answer_from` on the message points at ids, which is how a reader knows which block to\nrender as the reply — see the note there.\n\nReasoning blocks are passed through as the model produced them, `signature` included.\nA client that wants to continue a conversation exactly as the model left it can send\nthem back verbatim; one that only wants to show the answer can drop them. The signature\nis meaningful only to the provider — treat it as opaque and don't parse it.","required":["type","data"],"example":{"type":"redacted_reasoning","data":"ZW5jcnlwdGVkLXJlYXNvbmluZy1ieXRlcw=="},"properties":{"type":{"type":"string","enum":["redacted_reasoning"],"isRequired":true,"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.4.type","typeLabel":"enum\u003cstring>"},"data":{"type":"string","description":"Base64 of the encrypted reasoning. Nothing to display. Kept so the turn can be\nreplayed whole.","example":"ZW5jcnlwdGVkLXJlYXNvbmluZy1ieXRlcw==","isRequired":true,"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.4.data","typeLabel":"string"},"id":{"type":"string","description":"The id this block was produced under, when we produced it. Absent on blocks a caller sent\nand on turns stored before ids existed.","example":"b_c08cf800_01","uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.4.id","typeLabel":"string"}},"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.4","typeLabel":"RedactedReasoning · object"},{"type":"object","title":"Image","description":"A single block inside a message. Messages carry an ordered list of blocks. Six\nvariants discriminated by `type`:\n\n- `text` — plain text content. The dominant variant for user messages and final\n assistant answers.\n- `tool_use` — the model requesting a tool call. Carries the call's `tool_use_id`\n (used to match it with the subsequent result), the fully-aliased `name`, and the\n `arguments` the model produced.\n- `tool_result` — the response to a `tool_use`. References the same `tool_use_id`\n and carries nested content blocks with the actual result text. `is_error` flags\n tool failures so the model can decide how to react.\n- `reasoning` — the model's own working, present on an assistant turn when the run\n asked for thinking (`defaults.thinking`). It comes **first** in the turn, ahead of\n the answer. `text` is optional: some models return their reasoning as words, others\n return only a `signature` and keep the words to themselves.\n- `redacted_reasoning` — reasoning the provider encrypted rather than returned. Opaque\n base64; there is nothing to read, and it exists so a turn can still be replayed\n intact.\n- `image` — an image in a user message, or inside a `tool_result`. Either the caller\n sent it, or an MCP tool returned it. See `ImageBlock`.\n\nThe discriminator field is `type`. Use it to dispatch in your client.\n\nEach block may also carry an **`id`** alongside its own fields (`b_\u003cjob>_\u003cordinal>`), the identifier\nit was given where it was produced. Blocks a caller sent, and turns stored before ids existed, have\nnone. `final_answer_from` on the message points at ids, which is how a reader knows which block to\nrender as the reply — see the note there.\n\nReasoning blocks are passed through as the model produced them, `signature` included.\nA client that wants to continue a conversation exactly as the model left it can send\nthem back verbatim; one that only wants to show the answer can drop them. The signature\nis meaningful only to the provider — treat it as opaque and don't parse it.","required":["type","source"],"example":{"type":"image","source":{"type":"base64","media_type":"image/png","data":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="}},"properties":{"type":{"type":"string","enum":["image"],"isRequired":true,"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.5.type","typeLabel":"enum\u003cstring>"},"source":{"type":"object","required":["type","media_type","data"],"properties":{"type":{"type":"string","enum":["base64"],"isRequired":true,"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.5.source.type","typeLabel":"enum\u003cstring>"},"media_type":{"type":"string","enum":["image/jpeg","image/png","image/gif","image/webp"],"isRequired":true,"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.5.source.media_type","typeLabel":"enum\u003cstring>"},"data":{"type":"string","description":"The image bytes, base64-encoded.","example":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==","isRequired":true,"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.5.source.data","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.5.source","typeLabel":"object"},"id":{"type":"string","description":"The id this block was produced under, when we produced it. Absent on blocks a caller sent\nand on turns stored before ids existed.","example":"b_c08cf800_01","uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.5.id","typeLabel":"string"}},"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX].oneOf.5","typeLabel":"Image · object"}],"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content.items.[INDEX]","typeLabel":"Text · object | ToolUse · object | ToolResult · object | Reasoning · object | RedactedReasoning · object | Image · object"},"isRequired":true,"uniqueKey":"oneOf.6.input.messages.items.[INDEX].content","typeLabel":"(Text · object | ToolUse · object | ToolResult · object | Reasoning · object | RedactedReasoning · object | Image · object)[]"}},"uniqueKey":"oneOf.6.input.messages.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.6.input.messages","typeLabel":"object[]"},"inference_config":{"description":"Sampling settings for the call. Every key is present; the optional ones are null when unset. `thinking`\nwas added after this job type existed, so older rows lack it.","type":"object","required":["output_format_schema"],"properties":{"output_format_schema":{"description":"JSON Schema the model's structured output must satisfy.","type":"object","isRequired":true,"uniqueKey":"oneOf.6.input.inference_config.output_format_schema","typeLabel":"object"},"max_tokens":{"oneOf":[{"type":"integer","uniqueKey":"oneOf.6.input.inference_config.max_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"oneOf.6.input.inference_config.max_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.6.input.inference_config.max_tokens","typeLabel":"integer | null"},"temperature":{"oneOf":[{"type":"number","format":"float","uniqueKey":"oneOf.6.input.inference_config.temperature.oneOf.0","typeLabel":"number\u003cfloat>"},{"type":"null","format":"float","uniqueKey":"oneOf.6.input.inference_config.temperature.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.6.input.inference_config.temperature","typeLabel":"number\u003cfloat> | null"},"top_p":{"oneOf":[{"type":"number","format":"float","uniqueKey":"oneOf.6.input.inference_config.top_p.oneOf.0","typeLabel":"number\u003cfloat>"},{"type":"null","format":"float","uniqueKey":"oneOf.6.input.inference_config.top_p.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.6.input.inference_config.top_p","typeLabel":"number\u003cfloat> | null"},"stop_sequences":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"oneOf.6.input.inference_config.stop_sequences.oneOf.0.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.6.input.inference_config.stop_sequences.oneOf.0","typeLabel":"string[]"},{"type":"null","items":{"type":"string"},"uniqueKey":"oneOf.6.input.inference_config.stop_sequences.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.6.input.inference_config.stop_sequences","typeLabel":"string[] | null"},"thinking":{"oneOf":[{"type":"string","description":"Reasoning setting for the call. Null leaves the binding's own default.","enum":["disabled"],"example":"disabled","uniqueKey":"oneOf.6.input.inference_config.thinking.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","description":"Reasoning setting for the call. Null leaves the binding's own default.","required":["type","level"],"example":"disabled","properties":{"type":{"type":"string","enum":["effort"],"isRequired":true,"uniqueKey":"oneOf.6.input.inference_config.thinking.oneOf.1.type","typeLabel":"enum\u003cstring>"},"level":{"type":"string","enum":["low","medium","high"],"isRequired":true,"uniqueKey":"oneOf.6.input.inference_config.thinking.oneOf.1.level","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.6.input.inference_config.thinking.oneOf.1","typeLabel":"object"},{"type":"object","description":"Reasoning setting for the call. Null leaves the binding's own default.","required":["type","budget_tokens"],"example":"disabled","properties":{"type":{"type":"string","enum":["budget"],"isRequired":true,"uniqueKey":"oneOf.6.input.inference_config.thinking.oneOf.2.type","typeLabel":"enum\u003cstring>"},"budget_tokens":{"type":"integer","minimum":1024,"isRequired":true,"uniqueKey":"oneOf.6.input.inference_config.thinking.oneOf.2.budget_tokens","typeLabel":"integer"}},"uniqueKey":"oneOf.6.input.inference_config.thinking.oneOf.2","typeLabel":"object"},{"type":"null","description":"Reasoning setting for the call. Null leaves the binding's own default.","uniqueKey":"oneOf.6.input.inference_config.thinking.oneOf.3","typeLabel":"null"}],"uniqueKey":"oneOf.6.input.inference_config.thinking","typeLabel":"enum\u003cstring> · object · object · null"}},"isRequired":true,"uniqueKey":"oneOf.6.input.inference_config","typeLabel":"object"},"tools":{"oneOf":[{"description":"Tool definitions offered to the model. Null when the job offers no tools, in which case the model only\nproduces structured output. Never an empty array.","type":"array","minItems":1,"items":{"description":"One tool definition, shaped to map straight onto the provider's tool specification.","type":"object","required":["name","description","input_schema"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"oneOf.6.input.tools.oneOf.0.items.[INDEX].name","typeLabel":"string"},"description":{"type":"string","isRequired":true,"uniqueKey":"oneOf.6.input.tools.oneOf.0.items.[INDEX].description","typeLabel":"string"},"input_schema":{"description":"JSON Schema for the tool's arguments.","type":"object","isRequired":true,"uniqueKey":"oneOf.6.input.tools.oneOf.0.items.[INDEX].input_schema","typeLabel":"object"},"strict":{"description":"Opt into grammar-constrained sampling for this tool's arguments. Defaults to true when the field is\nabsent, which is how payloads written before the field existed decode.","type":"boolean","default":true,"uniqueKey":"oneOf.6.input.tools.oneOf.0.items.[INDEX].strict","typeLabel":"boolean"}},"uniqueKey":"oneOf.6.input.tools.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.6.input.tools.oneOf.0","typeLabel":"object[]"},{"description":"Tool definitions offered to the model. Null when the job offers no tools, in which case the model only\nproduces structured output. Never an empty array.","type":"null","minItems":1,"items":{"description":"One tool definition, shaped to map straight onto the provider's tool specification.","type":"object","required":["name","description","input_schema"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"input_schema":{"description":"JSON Schema for the tool's arguments.","type":"object"},"strict":{"description":"Opt into grammar-constrained sampling for this tool's arguments. Defaults to true when the field is\nabsent, which is how payloads written before the field existed decode.","type":"boolean","default":true}}},"uniqueKey":"oneOf.6.input.tools.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.6.input.tools","typeLabel":"object[] | null"},"tool_choice":{"oneOf":[{"type":"object","description":"How the model picks a tool. Only meaningful when `tools` is set; null leaves the provider default.","required":["type"],"example":{"type":"auto"},"properties":{"type":{"type":"string","enum":["auto","any","specific_tool"],"isRequired":true,"uniqueKey":"oneOf.6.input.tool_choice.oneOf.0.type","typeLabel":"enum\u003cstring>"},"name":{"description":"Which tool to call. Present only when `type` is `specific_tool`; must match a `tools[].name`.","type":"string","uniqueKey":"oneOf.6.input.tool_choice.oneOf.0.name","typeLabel":"string"}},"uniqueKey":"oneOf.6.input.tool_choice.oneOf.0","typeLabel":"object"},{"type":"null","description":"How the model picks a tool. Only meaningful when `tools` is set; null leaves the provider default.","uniqueKey":"oneOf.6.input.tool_choice.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.6.input.tool_choice","typeLabel":"object | null"}},"example":{"model":{"id":"claude-sonnet-4","binding":{"provider":"bedrock","model_id":"global.anthropic.claude-sonnet-4","capabilities":{"structured_output_mode":"native"}}},"messages":[{"role":"user","content":[{"type":"text","text":"Which city?"}]}],"inference_config":{"output_format_schema":{"type":"object"},"max_tokens":1024,"temperature":null,"top_p":null,"stop_sequences":null,"thinking":null},"tools":null,"tool_choice":null},"isRequired":true,"uniqueKey":"oneOf.6.input","typeLabel":"object"},"result":{"oneOf":[{"type":"object","description":"The turn the model produced, with its provenance and token usage. Results written today carry every field\nbelow. `tool_calls`, `stop_reason`, `produced_blocks`, `final_answer_from` and `failed_structured_output`\nwere added after this job type existed, so older rows carry only `structured_output` and `usage`.","required":["structured_output","usage"],"example":{"structured_output":{"city":"Paris"},"usage":{"completion_tokens":907,"prompt_tokens":4849,"total_tokens":5756},"tool_calls":[],"stop_reason":"end_turn","produced_blocks":[],"final_answer_from":[],"failed_structured_output":null},"properties":{"structured_output":{"oneOf":[{"description":"The model's structured answer. Null on a tool-use-only turn, where the model called a tool instead of\nanswering.","type":"object","isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.structured_output.oneOf.0","typeLabel":"object"},{"description":"The model's structured answer. Null on a tool-use-only turn, where the model called a tool instead of\nanswering.","type":"null","isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.structured_output.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.structured_output","typeLabel":"object | null"},"usage":{"type":"object","required":["completion_tokens","prompt_tokens","total_tokens"],"properties":{"completion_tokens":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.usage.completion_tokens","typeLabel":"integer"},"prompt_tokens":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.usage.prompt_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.usage.total_tokens","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.usage","typeLabel":"object"},"tool_calls":{"description":"Tool calls the model made on this turn.","type":"array","items":{"type":"object","required":["id","name","arguments"],"properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.tool_calls.items.[INDEX].id","typeLabel":"string"},"name":{"type":"string","isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.tool_calls.items.[INDEX].name","typeLabel":"string"},"arguments":{"description":"The arguments the model produced for the call.","type":"object","isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.tool_calls.items.[INDEX].arguments","typeLabel":"object"}},"uniqueKey":"oneOf.6.result.oneOf.0.tool_calls.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.6.result.oneOf.0.tool_calls","typeLabel":"object[]"},"stop_reason":{"description":"Why the model stopped. Unrecognised provider values are passed through verbatim.","type":"string","examples":["end_turn","tool_use","max_tokens","stop_sequence","guardrail_intervened","content_filtered","malformed_model_output"],"uniqueKey":"oneOf.6.result.oneOf.0.stop_reason","typeLabel":"string"},"produced_blocks":{"description":"The blocks the model produced, reasoning included, each with the id it was given. Empty on operators\nthat do not report them — a reader then rebuilds the turn from the other fields.","type":"array","items":{"type":"object","required":["id","block"],"properties":{"id":{"description":"The block's identifier, e.g. `b_c08cf800_00`.","type":"string","isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].id","typeLabel":"string"},"block":{"oneOf":[{"type":"object","title":"Text","description":"A single block inside a message. Messages carry an ordered list of blocks. Six\nvariants discriminated by `type`:\n\n- `text` — plain text content. The dominant variant for user messages and final\n assistant answers.\n- `tool_use` — the model requesting a tool call. Carries the call's `tool_use_id`\n (used to match it with the subsequent result), the fully-aliased `name`, and the\n `arguments` the model produced.\n- `tool_result` — the response to a `tool_use`. References the same `tool_use_id`\n and carries nested content blocks with the actual result text. `is_error` flags\n tool failures so the model can decide how to react.\n- `reasoning` — the model's own working, present on an assistant turn when the run\n asked for thinking (`defaults.thinking`). It comes **first** in the turn, ahead of\n the answer. `text` is optional: some models return their reasoning as words, others\n return only a `signature` and keep the words to themselves.\n- `redacted_reasoning` — reasoning the provider encrypted rather than returned. Opaque\n base64; there is nothing to read, and it exists so a turn can still be replayed\n intact.\n- `image` — an image in a user message, or inside a `tool_result`. Either the caller\n sent it, or an MCP tool returned it. See `ImageBlock`.\n\nThe discriminator field is `type`. Use it to dispatch in your client.\n\nEach block may also carry an **`id`** alongside its own fields (`b_\u003cjob>_\u003cordinal>`), the identifier\nit was given where it was produced. Blocks a caller sent, and turns stored before ids existed, have\nnone. `final_answer_from` on the message points at ids, which is how a reader knows which block to\nrender as the reply — see the note there.\n\nReasoning blocks are passed through as the model produced them, `signature` included.\nA client that wants to continue a conversation exactly as the model left it can send\nthem back verbatim; one that only wants to show the answer can drop them. The signature\nis meaningful only to the provider — treat it as opaque and don't parse it.","required":["type","text"],"example":{"type":"text","text":"What is 2 + 2?"},"properties":{"type":{"type":"string","enum":["text"],"isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.0.type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.0.text","typeLabel":"string"},"id":{"type":"string","description":"The id this block was produced under, when we produced it. Absent on blocks a caller sent\nand on turns stored before ids existed.","example":"b_c08cf800_01","uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.0.id","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.0","typeLabel":"Text · object"},{"type":"object","title":"ToolUse","description":"A single block inside a message. Messages carry an ordered list of blocks. Six\nvariants discriminated by `type`:\n\n- `text` — plain text content. The dominant variant for user messages and final\n assistant answers.\n- `tool_use` — the model requesting a tool call. Carries the call's `tool_use_id`\n (used to match it with the subsequent result), the fully-aliased `name`, and the\n `arguments` the model produced.\n- `tool_result` — the response to a `tool_use`. References the same `tool_use_id`\n and carries nested content blocks with the actual result text. `is_error` flags\n tool failures so the model can decide how to react.\n- `reasoning` — the model's own working, present on an assistant turn when the run\n asked for thinking (`defaults.thinking`). It comes **first** in the turn, ahead of\n the answer. `text` is optional: some models return their reasoning as words, others\n return only a `signature` and keep the words to themselves.\n- `redacted_reasoning` — reasoning the provider encrypted rather than returned. Opaque\n base64; there is nothing to read, and it exists so a turn can still be replayed\n intact.\n- `image` — an image in a user message, or inside a `tool_result`. Either the caller\n sent it, or an MCP tool returned it. See `ImageBlock`.\n\nThe discriminator field is `type`. Use it to dispatch in your client.\n\nEach block may also carry an **`id`** alongside its own fields (`b_\u003cjob>_\u003cordinal>`), the identifier\nit was given where it was produced. Blocks a caller sent, and turns stored before ids existed, have\nnone. `final_answer_from` on the message points at ids, which is how a reader knows which block to\nrender as the reply — see the note there.\n\nReasoning blocks are passed through as the model produced them, `signature` included.\nA client that wants to continue a conversation exactly as the model left it can send\nthem back verbatim; one that only wants to show the answer can drop them. The signature\nis meaningful only to the provider — treat it as opaque and don't parse it.","required":["type","tool_use_id","name","arguments"],"properties":{"type":{"type":"string","enum":["tool_use"],"isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.1.type","typeLabel":"enum\u003cstring>"},"tool_use_id":{"type":"string","description":"Server-assigned identifier the model produced when emitting the tool call.\nUse this to match a `tool_result` with its `tool_use`, and to fill\n`outputs[].tool_use_id` when resuming a `requires_action` run.","example":"tooluse_DWXPKZ50JDGib5GmShyUgJ","isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.1.tool_use_id","typeLabel":"string"},"name":{"type":"string","description":"Fully-aliased tool name (`{alias}-{tool_name}`) — the same string the model\nsaw in its tool catalog. The alias prefix is how the platform routes the call\nback to its definition.","example":"docs-search_narrative_i_o_knowledge_base","isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.1.name","typeLabel":"string"},"arguments":{"type":"object","description":"Arguments object produced by the model. Must conform to the tool's\n`input_schema` — if the model produced something that doesn't validate, the\nrun terminates with the\n[MCP Tool Argument Validation Failed](https://docs.narrative.io/reference/architecture/agent-conversations/errors/mcp-tool-validation)\nerror for server-side tools, or surfaces in `pending_tool_calls` as-is for\nclient-side tools.","example":{"query":"rate limiting"},"isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.1.arguments","typeLabel":"object"},"id":{"type":"string","description":"The id this block was produced under, when we produced it. Absent on blocks a caller sent\nand on turns stored before ids existed.","example":"b_c08cf800_01","uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.1.id","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.1","typeLabel":"ToolUse · object"},{"type":"object","title":"ToolResult","description":"A single block inside a message. Messages carry an ordered list of blocks. Six\nvariants discriminated by `type`:\n\n- `text` — plain text content. The dominant variant for user messages and final\n assistant answers.\n- `tool_use` — the model requesting a tool call. Carries the call's `tool_use_id`\n (used to match it with the subsequent result), the fully-aliased `name`, and the\n `arguments` the model produced.\n- `tool_result` — the response to a `tool_use`. References the same `tool_use_id`\n and carries nested content blocks with the actual result text. `is_error` flags\n tool failures so the model can decide how to react.\n- `reasoning` — the model's own working, present on an assistant turn when the run\n asked for thinking (`defaults.thinking`). It comes **first** in the turn, ahead of\n the answer. `text` is optional: some models return their reasoning as words, others\n return only a `signature` and keep the words to themselves.\n- `redacted_reasoning` — reasoning the provider encrypted rather than returned. Opaque\n base64; there is nothing to read, and it exists so a turn can still be replayed\n intact.\n- `image` — an image in a user message, or inside a `tool_result`. Either the caller\n sent it, or an MCP tool returned it. See `ImageBlock`.\n\nThe discriminator field is `type`. Use it to dispatch in your client.\n\nEach block may also carry an **`id`** alongside its own fields (`b_\u003cjob>_\u003cordinal>`), the identifier\nit was given where it was produced. Blocks a caller sent, and turns stored before ids existed, have\nnone. `final_answer_from` on the message points at ids, which is how a reader knows which block to\nrender as the reply — see the note there.\n\nReasoning blocks are passed through as the model produced them, `signature` included.\nA client that wants to continue a conversation exactly as the model left it can send\nthem back verbatim; one that only wants to show the answer can drop them. The signature\nis meaningful only to the provider — treat it as opaque and don't parse it.","required":["type","tool_use_id","content","is_error"],"properties":{"type":{"type":"string","enum":["tool_result"],"isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.2.type","typeLabel":"enum\u003cstring>"},"tool_use_id":{"type":"string","description":"The `tool_use_id` from the matching `tool_use` block on the prior assistant turn.","example":"tooluse_DWXPKZ50JDGib5GmShyUgJ","isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.2.tool_use_id","typeLabel":"string"},"content":{"type":"array","description":"Nested content blocks carrying the actual result: `text` blocks, plus `image`\nblocks when the tool returned images. Almost always a single `text` block; the\nplatform splits long results into multiple text blocks when the underlying MCP\nserver returns multiple chunks. An image an MCP tool returned that a model can't\nread (an unsupported type, or over the size limit) is replaced with a `text`\nblock saying so.","items":{"$circularRef":"c670553c-4370-4369-a11e-b426701ce2b9"},"isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.2.content","typeLabel":"array"},"is_error":{"type":"boolean","description":"Whether the tool call failed. The model decides how to react to errors —\nretry, ask the user, fall through to a partial answer, etc. Note that an\nMCP server returning a non-2xx response that the platform can still parse\ncounts as `is_error: false` (the tool *succeeded* in returning a result, even\nif that result reports an underlying failure).","isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.2.is_error","typeLabel":"boolean"},"id":{"type":"string","description":"The id this block was produced under, when we produced it. Absent on blocks a caller sent\nand on turns stored before ids existed.","example":"b_c08cf800_01","uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.2.id","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.2","typeLabel":"ToolResult · object"},{"type":"object","title":"Reasoning","description":"A single block inside a message. Messages carry an ordered list of blocks. Six\nvariants discriminated by `type`:\n\n- `text` — plain text content. The dominant variant for user messages and final\n assistant answers.\n- `tool_use` — the model requesting a tool call. Carries the call's `tool_use_id`\n (used to match it with the subsequent result), the fully-aliased `name`, and the\n `arguments` the model produced.\n- `tool_result` — the response to a `tool_use`. References the same `tool_use_id`\n and carries nested content blocks with the actual result text. `is_error` flags\n tool failures so the model can decide how to react.\n- `reasoning` — the model's own working, present on an assistant turn when the run\n asked for thinking (`defaults.thinking`). It comes **first** in the turn, ahead of\n the answer. `text` is optional: some models return their reasoning as words, others\n return only a `signature` and keep the words to themselves.\n- `redacted_reasoning` — reasoning the provider encrypted rather than returned. Opaque\n base64; there is nothing to read, and it exists so a turn can still be replayed\n intact.\n- `image` — an image in a user message, or inside a `tool_result`. Either the caller\n sent it, or an MCP tool returned it. See `ImageBlock`.\n\nThe discriminator field is `type`. Use it to dispatch in your client.\n\nEach block may also carry an **`id`** alongside its own fields (`b_\u003cjob>_\u003cordinal>`), the identifier\nit was given where it was produced. Blocks a caller sent, and turns stored before ids existed, have\nnone. `final_answer_from` on the message points at ids, which is how a reader knows which block to\nrender as the reply — see the note there.\n\nReasoning blocks are passed through as the model produced them, `signature` included.\nA client that wants to continue a conversation exactly as the model left it can send\nthem back verbatim; one that only wants to show the answer can drop them. The signature\nis meaningful only to the provider — treat it as opaque and don't parse it.","required":["type","signature"],"example":{"type":"reasoning","signature":"CAIS6QMKcAgQEAEYAipATBOWJItj3lNDm2ZmBW70v+WJ5oI6W68N…"},"properties":{"type":{"type":"string","enum":["reasoning"],"isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.3.type","typeLabel":"enum\u003cstring>"},"signature":{"type":"string","description":"Provider-issued signature over the reasoning. Opaque: not a hash you can verify\nor a token you can decode. Send the block back unchanged to continue a turn as\nthe model left it, or ignore it.","example":"CAIS6QMKcAgQEAEYAipATBOWJItj3lNDm2ZmBW70v+WJ5oI6W68N…","isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.3.signature","typeLabel":"string"},"id":{"type":"string","description":"The id this block was produced under, when we produced it. Absent on blocks a caller sent\nand on turns stored before ids existed.","example":"b_c08cf800_01","uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.3.id","typeLabel":"string"},"text":{"type":"string","description":"The model's working, when it returns it as words. Absent when the model reasoned\nbut withheld the text — the Opus models do this, and `signature` is then the only\nevidence the turn reasoned at all. Never assume this field is present.","example":"Cleo cannot be Monday, so the only assignment left is…","uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.3.text","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.3","typeLabel":"Reasoning · object"},{"type":"object","title":"RedactedReasoning","description":"A single block inside a message. Messages carry an ordered list of blocks. Six\nvariants discriminated by `type`:\n\n- `text` — plain text content. The dominant variant for user messages and final\n assistant answers.\n- `tool_use` — the model requesting a tool call. Carries the call's `tool_use_id`\n (used to match it with the subsequent result), the fully-aliased `name`, and the\n `arguments` the model produced.\n- `tool_result` — the response to a `tool_use`. References the same `tool_use_id`\n and carries nested content blocks with the actual result text. `is_error` flags\n tool failures so the model can decide how to react.\n- `reasoning` — the model's own working, present on an assistant turn when the run\n asked for thinking (`defaults.thinking`). It comes **first** in the turn, ahead of\n the answer. `text` is optional: some models return their reasoning as words, others\n return only a `signature` and keep the words to themselves.\n- `redacted_reasoning` — reasoning the provider encrypted rather than returned. Opaque\n base64; there is nothing to read, and it exists so a turn can still be replayed\n intact.\n- `image` — an image in a user message, or inside a `tool_result`. Either the caller\n sent it, or an MCP tool returned it. See `ImageBlock`.\n\nThe discriminator field is `type`. Use it to dispatch in your client.\n\nEach block may also carry an **`id`** alongside its own fields (`b_\u003cjob>_\u003cordinal>`), the identifier\nit was given where it was produced. Blocks a caller sent, and turns stored before ids existed, have\nnone. `final_answer_from` on the message points at ids, which is how a reader knows which block to\nrender as the reply — see the note there.\n\nReasoning blocks are passed through as the model produced them, `signature` included.\nA client that wants to continue a conversation exactly as the model left it can send\nthem back verbatim; one that only wants to show the answer can drop them. The signature\nis meaningful only to the provider — treat it as opaque and don't parse it.","required":["type","data"],"example":{"type":"redacted_reasoning","data":"ZW5jcnlwdGVkLXJlYXNvbmluZy1ieXRlcw=="},"properties":{"type":{"type":"string","enum":["redacted_reasoning"],"isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.4.type","typeLabel":"enum\u003cstring>"},"data":{"type":"string","description":"Base64 of the encrypted reasoning. Nothing to display. Kept so the turn can be\nreplayed whole.","example":"ZW5jcnlwdGVkLXJlYXNvbmluZy1ieXRlcw==","isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.4.data","typeLabel":"string"},"id":{"type":"string","description":"The id this block was produced under, when we produced it. Absent on blocks a caller sent\nand on turns stored before ids existed.","example":"b_c08cf800_01","uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.4.id","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.4","typeLabel":"RedactedReasoning · object"},{"type":"object","title":"Image","description":"A single block inside a message. Messages carry an ordered list of blocks. Six\nvariants discriminated by `type`:\n\n- `text` — plain text content. The dominant variant for user messages and final\n assistant answers.\n- `tool_use` — the model requesting a tool call. Carries the call's `tool_use_id`\n (used to match it with the subsequent result), the fully-aliased `name`, and the\n `arguments` the model produced.\n- `tool_result` — the response to a `tool_use`. References the same `tool_use_id`\n and carries nested content blocks with the actual result text. `is_error` flags\n tool failures so the model can decide how to react.\n- `reasoning` — the model's own working, present on an assistant turn when the run\n asked for thinking (`defaults.thinking`). It comes **first** in the turn, ahead of\n the answer. `text` is optional: some models return their reasoning as words, others\n return only a `signature` and keep the words to themselves.\n- `redacted_reasoning` — reasoning the provider encrypted rather than returned. Opaque\n base64; there is nothing to read, and it exists so a turn can still be replayed\n intact.\n- `image` — an image in a user message, or inside a `tool_result`. Either the caller\n sent it, or an MCP tool returned it. See `ImageBlock`.\n\nThe discriminator field is `type`. Use it to dispatch in your client.\n\nEach block may also carry an **`id`** alongside its own fields (`b_\u003cjob>_\u003cordinal>`), the identifier\nit was given where it was produced. Blocks a caller sent, and turns stored before ids existed, have\nnone. `final_answer_from` on the message points at ids, which is how a reader knows which block to\nrender as the reply — see the note there.\n\nReasoning blocks are passed through as the model produced them, `signature` included.\nA client that wants to continue a conversation exactly as the model left it can send\nthem back verbatim; one that only wants to show the answer can drop them. The signature\nis meaningful only to the provider — treat it as opaque and don't parse it.","required":["type","source"],"example":{"type":"image","source":{"type":"base64","media_type":"image/png","data":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="}},"properties":{"type":{"type":"string","enum":["image"],"isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.5.type","typeLabel":"enum\u003cstring>"},"source":{"type":"object","required":["type","media_type","data"],"properties":{"type":{"type":"string","enum":["base64"],"isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.5.source.type","typeLabel":"enum\u003cstring>"},"media_type":{"type":"string","enum":["image/jpeg","image/png","image/gif","image/webp"],"isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.5.source.media_type","typeLabel":"enum\u003cstring>"},"data":{"type":"string","description":"The image bytes, base64-encoded.","example":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==","isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.5.source.data","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.5.source","typeLabel":"object"},"id":{"type":"string","description":"The id this block was produced under, when we produced it. Absent on blocks a caller sent\nand on turns stored before ids existed.","example":"b_c08cf800_01","uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.5.id","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block.oneOf.5","typeLabel":"Image · object"}],"isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX].block","typeLabel":"Text · object | ToolUse · object | ToolResult · object | Reasoning · object | RedactedReasoning · object | Image · object"}},"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.6.result.oneOf.0.produced_blocks","typeLabel":"object[]"},"final_answer_from":{"description":"Ids of the `produced_blocks` the answer was taken from.","type":"array","items":{"type":"string","uniqueKey":"oneOf.6.result.oneOf.0.final_answer_from.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.6.result.oneOf.0.final_answer_from","typeLabel":"string[]"},"failed_structured_output":{"oneOf":[{"type":"object","description":"Structured output that did not satisfy `output_format_schema`. The job still succeeds and the raw\noutput is kept here rather than discarded.","required":["message","raw_output"],"properties":{"message":{"description":"Why the output was rejected.","type":"string","isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.failed_structured_output.oneOf.0.message","typeLabel":"string"},"raw_output":{"description":"What the model actually produced.","isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0.failed_structured_output.oneOf.0.raw_output","typeLabel":"any"}},"uniqueKey":"oneOf.6.result.oneOf.0.failed_structured_output.oneOf.0","typeLabel":"object"},{"type":"null","description":"Structured output that did not satisfy `output_format_schema`. The job still succeeds and the raw\noutput is kept here rather than discarded.","uniqueKey":"oneOf.6.result.oneOf.0.failed_structured_output.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.6.result.oneOf.0.failed_structured_output","typeLabel":"object | null"}},"isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"oneOf.6.result.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.6.result","typeLabel":"object | null"},"compute_pool_id":{"oneOf":[{"description":"The compute pool associated with the job, if any.","type":"string","format":"uuid","uniqueKey":"oneOf.6.compute_pool_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The compute pool associated with the job, if any.","type":"null","format":"uuid","uniqueKey":"oneOf.6.compute_pool_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.6.compute_pool_id","typeLabel":"string\u003cuuid> | null"},"executor":{"oneOf":[{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"string","uniqueKey":"oneOf.6.executor.oneOf.0","typeLabel":"string"},{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"null","uniqueKey":"oneOf.6.executor.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.6.executor","typeLabel":"string | null"},"dequeued_at":{"oneOf":[{"description":"When the job was taken off the queue. Null while it is still queued.","type":"string","format":"date-time","uniqueKey":"oneOf.6.dequeued_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"When the job was taken off the queue. Null while it is still queued.","type":"null","format":"date-time","uniqueKey":"oneOf.6.dequeued_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.6.dequeued_at","typeLabel":"string\u003cdate-time> | null"},"ended_at":{"oneOf":[{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"string","format":"date-time","uniqueKey":"oneOf.6.ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"null","format":"date-time","uniqueKey":"oneOf.6.ended_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.6.ended_at","typeLabel":"string\u003cdate-time> | null"},"workflow_id":{"oneOf":[{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"string","format":"uuid","uniqueKey":"oneOf.6.workflow_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"null","format":"uuid","uniqueKey":"oneOf.6.workflow_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.6.workflow_id","typeLabel":"string\u003cuuid> | null"},"workflow_run_id":{"oneOf":[{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"string","format":"uuid","uniqueKey":"oneOf.6.workflow_run_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"null","format":"uuid","uniqueKey":"oneOf.6.workflow_run_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.6.workflow_run_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"oneOf.6","typeLabel":"object"},{"type":"object","description":"A job. Every job carries the same envelope of fields — see `JobBase` — but `input` and `result` hold\njob-type-specific payloads, so the response is a union over `type`: pick the branch whose `type` matches\nand you get the typed `input` and `result` for that kind of job.\n\nThe union is open on purpose. Job types are free strings on the server, so a type this spec version does\nnot describe lands in `OtherJobResponse`, where both fields stay free-form. No branch closes itself to\nextra properties, and new job types can appear without a spec change.\n\nThe described types sit together under `DescribedJobResponse`, which has a discriminator on `type`. Any other\n`type` is an `OtherJobResponse`. That branch sits outside the discriminator because a mapping can only name\nspecific values, and a branch with no mapping entry would only match a `type` equal to its schema name.\n\n`input` and `result` are returned exactly as they were stored when the job was enqueued or completed. The\nserver never reshapes them, so a field a job type gained after a row was written is absent from that row\nrather than null. The typed branches describe what the current code writes; fields that have not always\nbeen written are left out of each branch's `required` list.\n\n`result` is `null` in every branch until the job reaches a terminal state.","required":["type","input","result","job_id","company_id","data_plane_id","request_source","state","operator_type","tags","execution_cluster","idempotency_key","created_at","updated_at","attempted_at","attempt_version"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique identifier for the job.","isRequired":true,"uniqueKey":"oneOf.7.job_id","typeLabel":"string\u003cuuid>"},"company_id":{"description":"The company the job belongs to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.7.company_id","typeLabel":"integer\u003cint64>"},"data_plane_id":{"description":"The data plane the job runs on. Jobs on the Narrative data plane carry its id,\n`f79cbdae-4848-47ca-95e8-69588364d185`.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.7.data_plane_id","typeLabel":"string\u003cuuid>"},"request_source":{"oneOf":[{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","company_id","user_id"],"example":{"type":"api_user","company_id":1,"user_id":1248},"properties":{"type":{"type":"string","enum":["api_user"],"isRequired":true,"uniqueKey":"oneOf.7.request_source.oneOf.0.type","typeLabel":"enum\u003cstring>"},"company_id":{"description":"The company the request was made for.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.7.request_source.oneOf.0.company_id","typeLabel":"integer\u003cint64>"},"user_id":{"description":"The user who made the request.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.7.request_source.oneOf.0.user_id","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.7.request_source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","name"],"example":{"type":"process","name":"narrative-control-plane"},"properties":{"type":{"type":"string","enum":["process"],"isRequired":true,"uniqueKey":"oneOf.7.request_source.oneOf.1.type","typeLabel":"enum\u003cstring>"},"name":{"description":"The process that enqueued the job, e.g. `narrative-control-plane` or `health-check`.","type":"string","isRequired":true,"uniqueKey":"oneOf.7.request_source.oneOf.1.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.7.request_source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.7.request_source","typeLabel":"object"},"state":{"description":"Where a job is in its lifecycle.\n\n- `pending` — enqueued and waiting to be picked up.\n- `scheduled` — claimed by an executor but not yet started.\n- `running` — being executed.\n- `pending_cancellation` — cancellation has been requested and the data plane has yet to stop the work.\n- `completed`, `cancelled`, `failed` — terminal states.","type":"string","enum":["pending","scheduled","running","pending_cancellation","completed","cancelled","failed"],"isRequired":true,"uniqueKey":"oneOf.7.state","typeLabel":"enum\u003cstring>"},"operator_type":{"description":"Which operator runs the job, e.g. `materialized-view-refresh` or `datasets_execute_select`. Finer-grained\nthan `type`: several job types can share one operator, and where no such mapping exists the two are equal.","type":"string","isRequired":true,"uniqueKey":"oneOf.7.operator_type","typeLabel":"string"},"tags":{"description":"Free-form labels attached to the job.","type":"array","items":{"type":"string","minLength":1,"maxLength":255,"uniqueKey":"oneOf.7.tags.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.7.tags","typeLabel":"string[]"},"execution_cluster":{"description":"The type of the execution cluster to run the job on.\n\n- `dedicated` runs job on a dedicated cluster.\n- `shared` runs job on a shared cluster.","type":"string","enum":["dedicated","shared"],"isRequired":true,"uniqueKey":"oneOf.7.execution_cluster","typeLabel":"enum\u003cstring>"},"idempotency_key":{"description":"The unique key the job was enqueued under.","type":"string","minLength":1,"maxLength":255,"isRequired":true,"uniqueKey":"oneOf.7.idempotency_key","typeLabel":"string"},"created_at":{"description":"The timestamp representing when the job was created.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.7.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"description":"The timestamp representing when the job was updated.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.7.updated_at","typeLabel":"string\u003cdate-time>"},"attempted_at":{"description":"When the job's current attempt started. A job can be retried; each retry is a new attempt, so this advances to the latest one, while `created_at` stays at the original submission.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.7.attempted_at","typeLabel":"string\u003cdate-time>"},"attempt_version":{"description":"Which attempt this is: 1 for the first, increasing by one on each retry.","type":"integer","isRequired":true,"uniqueKey":"oneOf.7.attempt_version","typeLabel":"integer"},"type":{"type":"string","enum":["datasets_delete_table"],"isRequired":true,"uniqueKey":"oneOf.7.type","typeLabel":"enum\u003cstring>"},"input":{"type":"object","required":["external_id"],"properties":{"external_id":{"description":"The table's external identifier.","type":"string","isRequired":true,"uniqueKey":"oneOf.7.input.external_id","typeLabel":"string"},"is_narrative_managed":{"oneOf":[{"description":"Whether Narrative owns the table's storage. A table Narrative does not manage is deregistered rather\nthan dropped. Added after this job type existed, so older rows lack the key.","type":"boolean","uniqueKey":"oneOf.7.input.is_narrative_managed.oneOf.0","typeLabel":"boolean"},{"description":"Whether Narrative owns the table's storage. A table Narrative does not manage is deregistered rather\nthan dropped. Added after this job type existed, so older rows lack the key.","type":"null","uniqueKey":"oneOf.7.input.is_narrative_managed.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.7.input.is_narrative_managed","typeLabel":"boolean | null"}},"example":{"external_id":"nio_10736","is_narrative_managed":true},"isRequired":true,"uniqueKey":"oneOf.7.input","typeLabel":"object"},"result":{"oneOf":[{"type":"object","description":"Empty. The API records nothing beyond the job reaching `completed`.","example":{},"isRequired":true,"uniqueKey":"oneOf.7.result.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"oneOf.7.result.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.7.result","typeLabel":"object | null"},"compute_pool_id":{"oneOf":[{"description":"The compute pool associated with the job, if any.","type":"string","format":"uuid","uniqueKey":"oneOf.7.compute_pool_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The compute pool associated with the job, if any.","type":"null","format":"uuid","uniqueKey":"oneOf.7.compute_pool_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.7.compute_pool_id","typeLabel":"string\u003cuuid> | null"},"executor":{"oneOf":[{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"string","uniqueKey":"oneOf.7.executor.oneOf.0","typeLabel":"string"},{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"null","uniqueKey":"oneOf.7.executor.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.7.executor","typeLabel":"string | null"},"dequeued_at":{"oneOf":[{"description":"When the job was taken off the queue. Null while it is still queued.","type":"string","format":"date-time","uniqueKey":"oneOf.7.dequeued_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"When the job was taken off the queue. Null while it is still queued.","type":"null","format":"date-time","uniqueKey":"oneOf.7.dequeued_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.7.dequeued_at","typeLabel":"string\u003cdate-time> | null"},"ended_at":{"oneOf":[{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"string","format":"date-time","uniqueKey":"oneOf.7.ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"null","format":"date-time","uniqueKey":"oneOf.7.ended_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.7.ended_at","typeLabel":"string\u003cdate-time> | null"},"workflow_id":{"oneOf":[{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"string","format":"uuid","uniqueKey":"oneOf.7.workflow_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"null","format":"uuid","uniqueKey":"oneOf.7.workflow_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.7.workflow_id","typeLabel":"string\u003cuuid> | null"},"workflow_run_id":{"oneOf":[{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"string","format":"uuid","uniqueKey":"oneOf.7.workflow_run_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"null","format":"uuid","uniqueKey":"oneOf.7.workflow_run_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.7.workflow_run_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"oneOf.7","typeLabel":"object"},{"type":"object","description":"A job. Every job carries the same envelope of fields — see `JobBase` — but `input` and `result` hold\njob-type-specific payloads, so the response is a union over `type`: pick the branch whose `type` matches\nand you get the typed `input` and `result` for that kind of job.\n\nThe union is open on purpose. Job types are free strings on the server, so a type this spec version does\nnot describe lands in `OtherJobResponse`, where both fields stay free-form. No branch closes itself to\nextra properties, and new job types can appear without a spec change.\n\nThe described types sit together under `DescribedJobResponse`, which has a discriminator on `type`. Any other\n`type` is an `OtherJobResponse`. That branch sits outside the discriminator because a mapping can only name\nspecific values, and a branch with no mapping entry would only match a `type` equal to its schema name.\n\n`input` and `result` are returned exactly as they were stored when the job was enqueued or completed. The\nserver never reshapes them, so a field a job type gained after a row was written is absent from that row\nrather than null. The typed branches describe what the current code writes; fields that have not always\nbeen written are left out of each branch's `required` list.\n\n`result` is `null` in every branch until the job reaches a terminal state.","required":["type","input","result","job_id","company_id","data_plane_id","request_source","state","operator_type","tags","execution_cluster","idempotency_key","created_at","updated_at","attempted_at","attempt_version"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique identifier for the job.","isRequired":true,"uniqueKey":"oneOf.8.job_id","typeLabel":"string\u003cuuid>"},"company_id":{"description":"The company the job belongs to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.8.company_id","typeLabel":"integer\u003cint64>"},"data_plane_id":{"description":"The data plane the job runs on. Jobs on the Narrative data plane carry its id,\n`f79cbdae-4848-47ca-95e8-69588364d185`.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.8.data_plane_id","typeLabel":"string\u003cuuid>"},"request_source":{"oneOf":[{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","company_id","user_id"],"example":{"type":"api_user","company_id":1,"user_id":1248},"properties":{"type":{"type":"string","enum":["api_user"],"isRequired":true,"uniqueKey":"oneOf.8.request_source.oneOf.0.type","typeLabel":"enum\u003cstring>"},"company_id":{"description":"The company the request was made for.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.8.request_source.oneOf.0.company_id","typeLabel":"integer\u003cint64>"},"user_id":{"description":"The user who made the request.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.8.request_source.oneOf.0.user_id","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.8.request_source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","name"],"example":{"type":"process","name":"narrative-control-plane"},"properties":{"type":{"type":"string","enum":["process"],"isRequired":true,"uniqueKey":"oneOf.8.request_source.oneOf.1.type","typeLabel":"enum\u003cstring>"},"name":{"description":"The process that enqueued the job, e.g. `narrative-control-plane` or `health-check`.","type":"string","isRequired":true,"uniqueKey":"oneOf.8.request_source.oneOf.1.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.8.request_source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.8.request_source","typeLabel":"object"},"state":{"description":"Where a job is in its lifecycle.\n\n- `pending` — enqueued and waiting to be picked up.\n- `scheduled` — claimed by an executor but not yet started.\n- `running` — being executed.\n- `pending_cancellation` — cancellation has been requested and the data plane has yet to stop the work.\n- `completed`, `cancelled`, `failed` — terminal states.","type":"string","enum":["pending","scheduled","running","pending_cancellation","completed","cancelled","failed"],"isRequired":true,"uniqueKey":"oneOf.8.state","typeLabel":"enum\u003cstring>"},"operator_type":{"description":"Which operator runs the job, e.g. `materialized-view-refresh` or `datasets_execute_select`. Finer-grained\nthan `type`: several job types can share one operator, and where no such mapping exists the two are equal.","type":"string","isRequired":true,"uniqueKey":"oneOf.8.operator_type","typeLabel":"string"},"tags":{"description":"Free-form labels attached to the job.","type":"array","items":{"type":"string","minLength":1,"maxLength":255,"uniqueKey":"oneOf.8.tags.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.8.tags","typeLabel":"string[]"},"execution_cluster":{"description":"The type of the execution cluster to run the job on.\n\n- `dedicated` runs job on a dedicated cluster.\n- `shared` runs job on a shared cluster.","type":"string","enum":["dedicated","shared"],"isRequired":true,"uniqueKey":"oneOf.8.execution_cluster","typeLabel":"enum\u003cstring>"},"idempotency_key":{"description":"The unique key the job was enqueued under.","type":"string","minLength":1,"maxLength":255,"isRequired":true,"uniqueKey":"oneOf.8.idempotency_key","typeLabel":"string"},"created_at":{"description":"The timestamp representing when the job was created.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.8.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"description":"The timestamp representing when the job was updated.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.8.updated_at","typeLabel":"string\u003cdate-time>"},"attempted_at":{"description":"When the job's current attempt started. A job can be retried; each retry is a new attempt, so this advances to the latest one, while `created_at` stays at the original submission.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.8.attempted_at","typeLabel":"string\u003cdate-time>"},"attempt_version":{"description":"Which attempt this is: 1 for the first, increasing by one on each retry.","type":"integer","isRequired":true,"uniqueKey":"oneOf.8.attempt_version","typeLabel":"integer"},"type":{"type":"string","enum":["datasets_execute_dml"],"isRequired":true,"uniqueKey":"oneOf.8.type","typeLabel":"enum\u003cstring>"},"input":{"type":"object","required":["dataset_id","nql","compiled_sql"],"properties":{"dataset_id":{"description":"The dataset the statement runs against.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.8.input.dataset_id","typeLabel":"integer\u003cint64>"},"nql":{"description":"The NQL statement as written.","type":"string","isRequired":true,"uniqueKey":"oneOf.8.input.nql","typeLabel":"string"},"compiled_sql":{"description":"The SQL that `nql` compiles to. This is what the operator runs.","type":"string","isRequired":true,"uniqueKey":"oneOf.8.input.compiled_sql","typeLabel":"string"},"nio_last_modified_at":{"oneOf":[{"description":"The `_nio_last_modified_at` watermark the statement writes.","type":"string","format":"date-time","uniqueKey":"oneOf.8.input.nio_last_modified_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"The `_nio_last_modified_at` watermark the statement writes.","type":"null","format":"date-time","uniqueKey":"oneOf.8.input.nio_last_modified_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.8.input.nio_last_modified_at","typeLabel":"string\u003cdate-time> | null"}},"example":{"dataset_id":10736,"nql":"DELETE FROM \"company_data\".\"10736\" WHERE \"age\" \u003c 18","compiled_sql":"DELETE FROM narrative.datasets.ds_10736 WHERE age \u003c 18","nio_last_modified_at":null},"isRequired":true,"uniqueKey":"oneOf.8.input","typeLabel":"object"},"result":{"oneOf":[{"type":"object","description":"Row counts for the statement. A job completed through the API carries `type` as well; one completed by\nthe legacy executor does not.","required":["affected_rows","inserted_rows","updated_rows","deleted_rows"],"example":{"type":"datasets_execute_dml","affected_rows":10,"inserted_rows":0,"updated_rows":0,"deleted_rows":10},"properties":{"affected_rows":{"type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.8.result.oneOf.0.affected_rows","typeLabel":"integer\u003cint64>"},"inserted_rows":{"type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.8.result.oneOf.0.inserted_rows","typeLabel":"integer\u003cint64>"},"updated_rows":{"type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.8.result.oneOf.0.updated_rows","typeLabel":"integer\u003cint64>"},"deleted_rows":{"type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.8.result.oneOf.0.deleted_rows","typeLabel":"integer\u003cint64>"},"type":{"description":"Repeated inside the result by the completion handler.","type":"string","enum":["datasets_execute_dml"],"uniqueKey":"oneOf.8.result.oneOf.0.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.8.result.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"oneOf.8.result.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.8.result","typeLabel":"object | null"},"compute_pool_id":{"oneOf":[{"description":"The compute pool associated with the job, if any.","type":"string","format":"uuid","uniqueKey":"oneOf.8.compute_pool_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The compute pool associated with the job, if any.","type":"null","format":"uuid","uniqueKey":"oneOf.8.compute_pool_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.8.compute_pool_id","typeLabel":"string\u003cuuid> | null"},"executor":{"oneOf":[{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"string","uniqueKey":"oneOf.8.executor.oneOf.0","typeLabel":"string"},{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"null","uniqueKey":"oneOf.8.executor.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.8.executor","typeLabel":"string | null"},"dequeued_at":{"oneOf":[{"description":"When the job was taken off the queue. Null while it is still queued.","type":"string","format":"date-time","uniqueKey":"oneOf.8.dequeued_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"When the job was taken off the queue. Null while it is still queued.","type":"null","format":"date-time","uniqueKey":"oneOf.8.dequeued_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.8.dequeued_at","typeLabel":"string\u003cdate-time> | null"},"ended_at":{"oneOf":[{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"string","format":"date-time","uniqueKey":"oneOf.8.ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"null","format":"date-time","uniqueKey":"oneOf.8.ended_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.8.ended_at","typeLabel":"string\u003cdate-time> | null"},"workflow_id":{"oneOf":[{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"string","format":"uuid","uniqueKey":"oneOf.8.workflow_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"null","format":"uuid","uniqueKey":"oneOf.8.workflow_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.8.workflow_id","typeLabel":"string\u003cuuid> | null"},"workflow_run_id":{"oneOf":[{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"string","format":"uuid","uniqueKey":"oneOf.8.workflow_run_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"null","format":"uuid","uniqueKey":"oneOf.8.workflow_run_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.8.workflow_run_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"oneOf.8","typeLabel":"object"},{"type":"object","description":"A job. Every job carries the same envelope of fields — see `JobBase` — but `input` and `result` hold\njob-type-specific payloads, so the response is a union over `type`: pick the branch whose `type` matches\nand you get the typed `input` and `result` for that kind of job.\n\nThe union is open on purpose. Job types are free strings on the server, so a type this spec version does\nnot describe lands in `OtherJobResponse`, where both fields stay free-form. No branch closes itself to\nextra properties, and new job types can appear without a spec change.\n\nThe described types sit together under `DescribedJobResponse`, which has a discriminator on `type`. Any other\n`type` is an `OtherJobResponse`. That branch sits outside the discriminator because a mapping can only name\nspecific values, and a branch with no mapping entry would only match a `type` equal to its schema name.\n\n`input` and `result` are returned exactly as they were stored when the job was enqueued or completed. The\nserver never reshapes them, so a field a job type gained after a row was written is absent from that row\nrather than null. The typed branches describe what the current code writes; fields that have not always\nbeen written are left out of each branch's `required` list.\n\n`result` is `null` in every branch until the job reaches a terminal state.","required":["type","input","result","job_id","company_id","data_plane_id","request_source","state","operator_type","tags","execution_cluster","idempotency_key","created_at","updated_at","attempted_at","attempt_version"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique identifier for the job.","isRequired":true,"uniqueKey":"oneOf.9.job_id","typeLabel":"string\u003cuuid>"},"company_id":{"description":"The company the job belongs to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.9.company_id","typeLabel":"integer\u003cint64>"},"data_plane_id":{"description":"The data plane the job runs on. Jobs on the Narrative data plane carry its id,\n`f79cbdae-4848-47ca-95e8-69588364d185`.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.9.data_plane_id","typeLabel":"string\u003cuuid>"},"request_source":{"oneOf":[{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","company_id","user_id"],"example":{"type":"api_user","company_id":1,"user_id":1248},"properties":{"type":{"type":"string","enum":["api_user"],"isRequired":true,"uniqueKey":"oneOf.9.request_source.oneOf.0.type","typeLabel":"enum\u003cstring>"},"company_id":{"description":"The company the request was made for.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.9.request_source.oneOf.0.company_id","typeLabel":"integer\u003cint64>"},"user_id":{"description":"The user who made the request.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.9.request_source.oneOf.0.user_id","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.9.request_source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","name"],"example":{"type":"process","name":"narrative-control-plane"},"properties":{"type":{"type":"string","enum":["process"],"isRequired":true,"uniqueKey":"oneOf.9.request_source.oneOf.1.type","typeLabel":"enum\u003cstring>"},"name":{"description":"The process that enqueued the job, e.g. `narrative-control-plane` or `health-check`.","type":"string","isRequired":true,"uniqueKey":"oneOf.9.request_source.oneOf.1.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.9.request_source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.9.request_source","typeLabel":"object"},"state":{"description":"Where a job is in its lifecycle.\n\n- `pending` — enqueued and waiting to be picked up.\n- `scheduled` — claimed by an executor but not yet started.\n- `running` — being executed.\n- `pending_cancellation` — cancellation has been requested and the data plane has yet to stop the work.\n- `completed`, `cancelled`, `failed` — terminal states.","type":"string","enum":["pending","scheduled","running","pending_cancellation","completed","cancelled","failed"],"isRequired":true,"uniqueKey":"oneOf.9.state","typeLabel":"enum\u003cstring>"},"operator_type":{"description":"Which operator runs the job, e.g. `materialized-view-refresh` or `datasets_execute_select`. Finer-grained\nthan `type`: several job types can share one operator, and where no such mapping exists the two are equal.","type":"string","isRequired":true,"uniqueKey":"oneOf.9.operator_type","typeLabel":"string"},"tags":{"description":"Free-form labels attached to the job.","type":"array","items":{"type":"string","minLength":1,"maxLength":255,"uniqueKey":"oneOf.9.tags.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.9.tags","typeLabel":"string[]"},"execution_cluster":{"description":"The type of the execution cluster to run the job on.\n\n- `dedicated` runs job on a dedicated cluster.\n- `shared` runs job on a shared cluster.","type":"string","enum":["dedicated","shared"],"isRequired":true,"uniqueKey":"oneOf.9.execution_cluster","typeLabel":"enum\u003cstring>"},"idempotency_key":{"description":"The unique key the job was enqueued under.","type":"string","minLength":1,"maxLength":255,"isRequired":true,"uniqueKey":"oneOf.9.idempotency_key","typeLabel":"string"},"created_at":{"description":"The timestamp representing when the job was created.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.9.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"description":"The timestamp representing when the job was updated.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.9.updated_at","typeLabel":"string\u003cdate-time>"},"attempted_at":{"description":"When the job's current attempt started. A job can be retried; each retry is a new attempt, so this advances to the latest one, while `created_at` stays at the original submission.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.9.attempted_at","typeLabel":"string\u003cdate-time>"},"attempt_version":{"description":"Which attempt this is: 1 for the first, increasing by one on each retry.","type":"integer","isRequired":true,"uniqueKey":"oneOf.9.attempt_version","typeLabel":"integer"},"type":{"type":"string","enum":["datasets_create_table"],"isRequired":true,"uniqueKey":"oneOf.9.type","typeLabel":"enum\u003cstring>"},"input":{"oneOf":[{"type":"object","description":"The input for a create table job. Snowflake gets a compiled `CREATE TABLE` statement, and AWS gets an Iceberg table definition.","required":["dataset_id","compiled_sql"],"example":{"dataset_id":10736,"compiled_sql":"CREATE TABLE narrative.datasets.ds_10736 (age BIGINT)"},"properties":{"dataset_id":{"description":"The dataset the table is created for.","type":"integer","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.0.dataset_id","typeLabel":"integer"},"compiled_sql":{"description":"The `CREATE TABLE` statement, compiled by the API.","type":"string","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.0.compiled_sql","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.0","typeLabel":"object"},{"type":"object","description":"The input for a create table job. Snowflake gets a compiled `CREATE TABLE` statement, and AWS gets an Iceberg table definition.","required":["dataset_id","definition"],"example":{"dataset_id":10737,"definition":{"columns":[{"plain":{"name":"id","data_type":{"type":"string"},"optional":false}},{"materialized":{"name":"_nio_last_modified_at","data_type":{"type":"timestamptz"},"optional":false,"description":"Last Modified At","value":{"type":"last_modified_at"}}}],"partitions":[{"source_column":"id","transform":"identity"}]}},"properties":{"dataset_id":{"description":"The dataset the table is backing.","type":"integer","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.dataset_id","typeLabel":"integer"},"definition":{"description":"The columns and partitioning of the Iceberg table to create.","type":"object","required":["columns","partitions"],"properties":{"columns":{"type":"array","minItems":1,"items":{"oneOf":[{"type":"object","description":"A table column. Either a plain column or a materialized field.","required":["plain"],"properties":{"plain":{"type":"object","required":["name","data_type","optional"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.name","typeLabel":"string"},"data_type":{"oneOf":[{"type":"object","required":["type","items"],"properties":{"type":{"type":"string","description":"An array with elements of any data type.","enum":["array"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.0.type","typeLabel":"enum\u003cstring>"},"items":{"oneOf":[{"$circularRef":"a6fba766-4e0f-41b7-bcf4-b64b3c977afb","isRequired":true}],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.0.\\items","typeLabel":"any"},"validations":{"type":"array","description":"A raw Spark SQL expression determining whether a value for the given column is valid or not.\n\nIf more than one validation is specified then _all_ the validation must evaluate to `true` for the column value to be considered valid.\n\nIf `validations` is not specified or empty then all rows will match the access rule.\n\nE.g. for a dataset with the following type definition:\n\n```\n{\n \"type\": \"object\",\n \"properties\": {\n \"idValue\": {\n \"type\": \"string\"\n },\n \"idType\": {\n \"type\": \"string\",\n \"enum\": [\n \"idfa\",\n \"adid\"\n ]\n },\n \"timestamp\": {\n \"type\": \"timestamptz\"\n }\n },\n \"required\": [\n \"idValue\"\n ]\n}\n```\n\nValid constraints include:\n\n- Is the ID type IDFA?\n\n```sql\nidType = 'idfa'\n```\n- Is the ID type non-null?\n\n```sql\nidType is not null\n```\n- Was the row collected within the last 90 days?\n\n```sql\ntimestamp > date_sub(current_date(), 90)\n```","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.0.validations.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.0.validations","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.0","typeLabel":"object"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"True/false values. Input values must be one of `true` or `false`.","enum":["boolean"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.1.type","typeLabel":"enum\u003cstring>"},"validations":{"type":"array","description":"A raw Spark SQL expression determining whether a value for the given column is valid or not.\n\nIf more than one validation is specified then _all_ the validation must evaluate to `true` for the column value to be considered valid.\n\nIf `validations` is not specified or empty then all rows will match the access rule.\n\nE.g. for a dataset with the following type definition:\n\n```\n{\n \"type\": \"object\",\n \"properties\": {\n \"idValue\": {\n \"type\": \"string\"\n },\n \"idType\": {\n \"type\": \"string\",\n \"enum\": [\n \"idfa\",\n \"adid\"\n ]\n },\n \"timestamp\": {\n \"type\": \"timestamptz\"\n }\n },\n \"required\": [\n \"idValue\"\n ]\n}\n```\n\nValid constraints include:\n\n- Is the ID type IDFA?\n\n```sql\nidType = 'idfa'\n```\n- Is the ID type non-null?\n\n```sql\nidType is not null\n```\n- Was the row collected within the last 90 days?\n\n```sql\ntimestamp > date_sub(current_date(), 90)\n```","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.1.validations.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.1.validations","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.1","typeLabel":"object"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"64-bit IEEE 754 floating point values.","enum":["double"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.2.type","typeLabel":"enum\u003cstring>"},"enum":{"type":"array","description":"An optional set of possible values for the field.","items":{"type":"number","format":"double","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.2.enum.items.[INDEX]","typeLabel":"number\u003cdouble>"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.2.enum","typeLabel":"number\u003cdouble>[]"},"validations":{"type":"array","description":"A raw Spark SQL expression determining whether a value for the given column is valid or not.\n\nIf more than one validation is specified then _all_ the validation must evaluate to `true` for the column value to be considered valid.\n\nIf `validations` is not specified or empty then all rows will match the access rule.\n\nE.g. for a dataset with the following type definition:\n\n```\n{\n \"type\": \"object\",\n \"properties\": {\n \"idValue\": {\n \"type\": \"string\"\n },\n \"idType\": {\n \"type\": \"string\",\n \"enum\": [\n \"idfa\",\n \"adid\"\n ]\n },\n \"timestamp\": {\n \"type\": \"timestamptz\"\n }\n },\n \"required\": [\n \"idValue\"\n ]\n}\n```\n\nValid constraints include:\n\n- Is the ID type IDFA?\n\n```sql\nidType = 'idfa'\n```\n- Is the ID type non-null?\n\n```sql\nidType is not null\n```\n- Was the row collected within the last 90 days?\n\n```sql\ntimestamp > date_sub(current_date(), 90)\n```","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.2.validations.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.2.validations","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.2","typeLabel":"object"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"64-bit signed integer values.","enum":["long"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.3.type","typeLabel":"enum\u003cstring>"},"enum":{"type":"array","description":"An optional set of possible values for the field.","items":{"type":"integer","format":"int64","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.3.enum.items.[INDEX]","typeLabel":"integer\u003cint64>"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.3.enum","typeLabel":"integer\u003cint64>[]"},"validations":{"type":"array","description":"A raw Spark SQL expression determining whether a value for the given column is valid or not.\n\nIf more than one validation is specified then _all_ the validation must evaluate to `true` for the column value to be considered valid.\n\nIf `validations` is not specified or empty then all rows will match the access rule.\n\nE.g. for a dataset with the following type definition:\n\n```\n{\n \"type\": \"object\",\n \"properties\": {\n \"idValue\": {\n \"type\": \"string\"\n },\n \"idType\": {\n \"type\": \"string\",\n \"enum\": [\n \"idfa\",\n \"adid\"\n ]\n },\n \"timestamp\": {\n \"type\": \"timestamptz\"\n }\n },\n \"required\": [\n \"idValue\"\n ]\n}\n```\n\nValid constraints include:\n\n- Is the ID type IDFA?\n\n```sql\nidType = 'idfa'\n```\n- Is the ID type non-null?\n\n```sql\nidType is not null\n```\n- Was the row collected within the last 90 days?\n\n```sql\ntimestamp > date_sub(current_date(), 90)\n```","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.3.validations.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.3.validations","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.3","typeLabel":"object"},{"type":"object","required":["type","properties"],"properties":{"type":{"description":"A record consisting of named fields of any type.","enum":["object"],"type":"string","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.4.type","typeLabel":"enum\u003cstring>"},"properties":{"type":"object","description":"A map from field names to field types.\n\nField names must consist of only alphanumeric characters or underscores and be \u003c 255 characters long.","additionalProperties":{"type":"any","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.4.properties.additionalProperties","typeLabel":"any"},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.4.properties","typeLabel":"object"},"required":{"description":"An optional array of properties whose values are never missing or null.","type":"array","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.4.required.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.4.required","typeLabel":"string[]"},"unsellable":{"description":"An optional array of properties that cannot be sold to buyers.","type":"array","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.4.unsellable.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.4.unsellable","typeLabel":"string[]"},"sensitive":{"description":"An optional array of properties that are sensitive. Data in sensitive fields are redacted when showed to Narrative users via the UI or API but can still be bought and sold.","type":"array","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.4.sensitive.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.4.sensitive","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.4","typeLabel":"object"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"Abitrary-length character sequences encoded with UTF-8.","enum":["string"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.5.type","typeLabel":"enum\u003cstring>"},"enum":{"type":"array","description":"An optional set of possible values for the field.","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.5.enum.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.5.enum","typeLabel":"string[]"},"validations":{"type":"array","description":"A raw Spark SQL expression determining whether a value for the given column is valid or not.\n\nIf more than one validation is specified then _all_ the validation must evaluate to `true` for the column value to be considered valid.\n\nIf `validations` is not specified or empty then all rows will match the access rule.\n\nE.g. for a dataset with the following type definition:\n\n```\n{\n \"type\": \"object\",\n \"properties\": {\n \"idValue\": {\n \"type\": \"string\"\n },\n \"idType\": {\n \"type\": \"string\",\n \"enum\": [\n \"idfa\",\n \"adid\"\n ]\n },\n \"timestamp\": {\n \"type\": \"timestamptz\"\n }\n },\n \"required\": [\n \"idValue\"\n ]\n}\n```\n\nValid constraints include:\n\n- Is the ID type IDFA?\n\n```sql\nidType = 'idfa'\n```\n- Is the ID type non-null?\n\n```sql\nidType is not null\n```\n- Was the row collected within the last 90 days?\n\n```sql\ntimestamp > date_sub(current_date(), 90)\n```","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.5.validations.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.5.validations","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.5","typeLabel":"object"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"Timestamp with timezone, stored as microseconds. Input values are expected to be valid [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) strings.","enum":["timestamptz"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.6.type","typeLabel":"enum\u003cstring>"},"validations":{"type":"array","description":"A raw Spark SQL expression determining whether a value for the given column is valid or not.\n\nIf more than one validation is specified then _all_ the validation must evaluate to `true` for the column value to be considered valid.\n\nIf `validations` is not specified or empty then all rows will match the access rule.\n\nE.g. for a dataset with the following type definition:\n\n```\n{\n \"type\": \"object\",\n \"properties\": {\n \"idValue\": {\n \"type\": \"string\"\n },\n \"idType\": {\n \"type\": \"string\",\n \"enum\": [\n \"idfa\",\n \"adid\"\n ]\n },\n \"timestamp\": {\n \"type\": \"timestamptz\"\n }\n },\n \"required\": [\n \"idValue\"\n ]\n}\n```\n\nValid constraints include:\n\n- Is the ID type IDFA?\n\n```sql\nidType = 'idfa'\n```\n- Is the ID type non-null?\n\n```sql\nidType is not null\n```\n- Was the row collected within the last 90 days?\n\n```sql\ntimestamp > date_sub(current_date(), 90)\n```","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.6.validations.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.6.validations","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type.oneOf.6","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.data_type","typeLabel":"object"},"optional":{"description":"Whether the column accepts nulls.","type":"boolean","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain.optional","typeLabel":"boolean"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0.plain","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"A table column. Either a plain column or a materialized field.","required":["materialized"],"properties":{"materialized":{"type":"object","required":["name","data_type","optional","description","value"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.name","typeLabel":"string"},"data_type":{"oneOf":[{"type":"object","required":["type","items"],"properties":{"type":{"type":"string","description":"An array with elements of any data type.","enum":["array"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.0.type","typeLabel":"enum\u003cstring>"},"items":{"oneOf":[{"$circularRef":"a6fba766-4e0f-41b7-bcf4-b64b3c977afb","isRequired":true}],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.0.\\items","typeLabel":"any"},"validations":{"type":"array","description":"A raw Spark SQL expression determining whether a value for the given column is valid or not.\n\nIf more than one validation is specified then _all_ the validation must evaluate to `true` for the column value to be considered valid.\n\nIf `validations` is not specified or empty then all rows will match the access rule.\n\nE.g. for a dataset with the following type definition:\n\n```\n{\n \"type\": \"object\",\n \"properties\": {\n \"idValue\": {\n \"type\": \"string\"\n },\n \"idType\": {\n \"type\": \"string\",\n \"enum\": [\n \"idfa\",\n \"adid\"\n ]\n },\n \"timestamp\": {\n \"type\": \"timestamptz\"\n }\n },\n \"required\": [\n \"idValue\"\n ]\n}\n```\n\nValid constraints include:\n\n- Is the ID type IDFA?\n\n```sql\nidType = 'idfa'\n```\n- Is the ID type non-null?\n\n```sql\nidType is not null\n```\n- Was the row collected within the last 90 days?\n\n```sql\ntimestamp > date_sub(current_date(), 90)\n```","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.0.validations.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.0.validations","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.0","typeLabel":"object"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"True/false values. Input values must be one of `true` or `false`.","enum":["boolean"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.1.type","typeLabel":"enum\u003cstring>"},"validations":{"type":"array","description":"A raw Spark SQL expression determining whether a value for the given column is valid or not.\n\nIf more than one validation is specified then _all_ the validation must evaluate to `true` for the column value to be considered valid.\n\nIf `validations` is not specified or empty then all rows will match the access rule.\n\nE.g. for a dataset with the following type definition:\n\n```\n{\n \"type\": \"object\",\n \"properties\": {\n \"idValue\": {\n \"type\": \"string\"\n },\n \"idType\": {\n \"type\": \"string\",\n \"enum\": [\n \"idfa\",\n \"adid\"\n ]\n },\n \"timestamp\": {\n \"type\": \"timestamptz\"\n }\n },\n \"required\": [\n \"idValue\"\n ]\n}\n```\n\nValid constraints include:\n\n- Is the ID type IDFA?\n\n```sql\nidType = 'idfa'\n```\n- Is the ID type non-null?\n\n```sql\nidType is not null\n```\n- Was the row collected within the last 90 days?\n\n```sql\ntimestamp > date_sub(current_date(), 90)\n```","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.1.validations.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.1.validations","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.1","typeLabel":"object"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"64-bit IEEE 754 floating point values.","enum":["double"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.2.type","typeLabel":"enum\u003cstring>"},"enum":{"type":"array","description":"An optional set of possible values for the field.","items":{"type":"number","format":"double","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.2.enum.items.[INDEX]","typeLabel":"number\u003cdouble>"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.2.enum","typeLabel":"number\u003cdouble>[]"},"validations":{"type":"array","description":"A raw Spark SQL expression determining whether a value for the given column is valid or not.\n\nIf more than one validation is specified then _all_ the validation must evaluate to `true` for the column value to be considered valid.\n\nIf `validations` is not specified or empty then all rows will match the access rule.\n\nE.g. for a dataset with the following type definition:\n\n```\n{\n \"type\": \"object\",\n \"properties\": {\n \"idValue\": {\n \"type\": \"string\"\n },\n \"idType\": {\n \"type\": \"string\",\n \"enum\": [\n \"idfa\",\n \"adid\"\n ]\n },\n \"timestamp\": {\n \"type\": \"timestamptz\"\n }\n },\n \"required\": [\n \"idValue\"\n ]\n}\n```\n\nValid constraints include:\n\n- Is the ID type IDFA?\n\n```sql\nidType = 'idfa'\n```\n- Is the ID type non-null?\n\n```sql\nidType is not null\n```\n- Was the row collected within the last 90 days?\n\n```sql\ntimestamp > date_sub(current_date(), 90)\n```","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.2.validations.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.2.validations","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.2","typeLabel":"object"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"64-bit signed integer values.","enum":["long"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.3.type","typeLabel":"enum\u003cstring>"},"enum":{"type":"array","description":"An optional set of possible values for the field.","items":{"type":"integer","format":"int64","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.3.enum.items.[INDEX]","typeLabel":"integer\u003cint64>"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.3.enum","typeLabel":"integer\u003cint64>[]"},"validations":{"type":"array","description":"A raw Spark SQL expression determining whether a value for the given column is valid or not.\n\nIf more than one validation is specified then _all_ the validation must evaluate to `true` for the column value to be considered valid.\n\nIf `validations` is not specified or empty then all rows will match the access rule.\n\nE.g. for a dataset with the following type definition:\n\n```\n{\n \"type\": \"object\",\n \"properties\": {\n \"idValue\": {\n \"type\": \"string\"\n },\n \"idType\": {\n \"type\": \"string\",\n \"enum\": [\n \"idfa\",\n \"adid\"\n ]\n },\n \"timestamp\": {\n \"type\": \"timestamptz\"\n }\n },\n \"required\": [\n \"idValue\"\n ]\n}\n```\n\nValid constraints include:\n\n- Is the ID type IDFA?\n\n```sql\nidType = 'idfa'\n```\n- Is the ID type non-null?\n\n```sql\nidType is not null\n```\n- Was the row collected within the last 90 days?\n\n```sql\ntimestamp > date_sub(current_date(), 90)\n```","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.3.validations.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.3.validations","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.3","typeLabel":"object"},{"type":"object","required":["type","properties"],"properties":{"type":{"description":"A record consisting of named fields of any type.","enum":["object"],"type":"string","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.4.type","typeLabel":"enum\u003cstring>"},"properties":{"type":"object","description":"A map from field names to field types.\n\nField names must consist of only alphanumeric characters or underscores and be \u003c 255 characters long.","additionalProperties":{"type":"any","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.4.properties.additionalProperties","typeLabel":"any"},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.4.properties","typeLabel":"object"},"required":{"description":"An optional array of properties whose values are never missing or null.","type":"array","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.4.required.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.4.required","typeLabel":"string[]"},"unsellable":{"description":"An optional array of properties that cannot be sold to buyers.","type":"array","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.4.unsellable.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.4.unsellable","typeLabel":"string[]"},"sensitive":{"description":"An optional array of properties that are sensitive. Data in sensitive fields are redacted when showed to Narrative users via the UI or API but can still be bought and sold.","type":"array","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.4.sensitive.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.4.sensitive","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.4","typeLabel":"object"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"Abitrary-length character sequences encoded with UTF-8.","enum":["string"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.5.type","typeLabel":"enum\u003cstring>"},"enum":{"type":"array","description":"An optional set of possible values for the field.","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.5.enum.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.5.enum","typeLabel":"string[]"},"validations":{"type":"array","description":"A raw Spark SQL expression determining whether a value for the given column is valid or not.\n\nIf more than one validation is specified then _all_ the validation must evaluate to `true` for the column value to be considered valid.\n\nIf `validations` is not specified or empty then all rows will match the access rule.\n\nE.g. for a dataset with the following type definition:\n\n```\n{\n \"type\": \"object\",\n \"properties\": {\n \"idValue\": {\n \"type\": \"string\"\n },\n \"idType\": {\n \"type\": \"string\",\n \"enum\": [\n \"idfa\",\n \"adid\"\n ]\n },\n \"timestamp\": {\n \"type\": \"timestamptz\"\n }\n },\n \"required\": [\n \"idValue\"\n ]\n}\n```\n\nValid constraints include:\n\n- Is the ID type IDFA?\n\n```sql\nidType = 'idfa'\n```\n- Is the ID type non-null?\n\n```sql\nidType is not null\n```\n- Was the row collected within the last 90 days?\n\n```sql\ntimestamp > date_sub(current_date(), 90)\n```","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.5.validations.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.5.validations","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.5","typeLabel":"object"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"Timestamp with timezone, stored as microseconds. Input values are expected to be valid [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) strings.","enum":["timestamptz"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.6.type","typeLabel":"enum\u003cstring>"},"validations":{"type":"array","description":"A raw Spark SQL expression determining whether a value for the given column is valid or not.\n\nIf more than one validation is specified then _all_ the validation must evaluate to `true` for the column value to be considered valid.\n\nIf `validations` is not specified or empty then all rows will match the access rule.\n\nE.g. for a dataset with the following type definition:\n\n```\n{\n \"type\": \"object\",\n \"properties\": {\n \"idValue\": {\n \"type\": \"string\"\n },\n \"idType\": {\n \"type\": \"string\",\n \"enum\": [\n \"idfa\",\n \"adid\"\n ]\n },\n \"timestamp\": {\n \"type\": \"timestamptz\"\n }\n },\n \"required\": [\n \"idValue\"\n ]\n}\n```\n\nValid constraints include:\n\n- Is the ID type IDFA?\n\n```sql\nidType = 'idfa'\n```\n- Is the ID type non-null?\n\n```sql\nidType is not null\n```\n- Was the row collected within the last 90 days?\n\n```sql\ntimestamp > date_sub(current_date(), 90)\n```","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.6.validations.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.6.validations","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type.oneOf.6","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.data_type","typeLabel":"object"},"optional":{"description":"Whether the column accepts nulls.","type":"boolean","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.optional","typeLabel":"boolean"},"description":{"type":"string","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.description","typeLabel":"string"},"value":{"oneOf":[{"type":"object","description":"What the field is materialized from. `type` selects the shape.","required":["type","data_type","mapping"],"properties":{"type":{"type":"string","enum":["ad_hoc"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.0.type","typeLabel":"enum\u003cstring>"},"data_type":{"type":"any","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.0.data_type","typeLabel":"any"},"mapping":{"type":"any","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.0.mapping","typeLabel":"any"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.0","typeLabel":"object"},{"type":"object","description":"What the field is materialized from. `type` selects the shape.","required":["type","attribute","mapping"],"properties":{"type":{"type":"string","enum":["attribute"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1.type","typeLabel":"enum\u003cstring>"},"attribute":{"type":"any","description":"An attribute as it appears inside another resource, such as a dataset's materialized fields. Unlike the\nresponses from the attributes API it always carries `company_id` and `collaborators`, whoever the caller is.","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1.attribute","typeLabel":"any"},"mapping":{"type":"object","properties":{"attribute_id":{"type":"integer","description":"The target attribute's ID.","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1.mapping.attribute_id","typeLabel":"integer"},"created_at":{"type":"string","description":"ISO-8601 timestamp indicating when the mapping was created.","example":"2021-08-26T21:06:07.710357Z","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1.mapping.created_at","typeLabel":"string"},"dataset_id":{"type":"integer","description":"The source dataset's ID.","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1.mapping.dataset_id","typeLabel":"integer"},"mapping":{"type":"any","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1.mapping.mapping","typeLabel":"any"},"status":{"type":"string","description":"The status of the mapping.\n * `active` - Active mappings can be used\n * `archived` - Archived/Deleted mappings - mapping no longer in use\n * `pending` - Pending mappings need to be accepted before they can be used\n * `rejected` - Proposed mappings the owner turned down. Can still be accepted later\n","enum":["active","archived","pending","rejected"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1.mapping.status","typeLabel":"enum\u003cstring>"},"updated_at":{"type":"string","description":"ISO-8601 timestamp indicating when the mapping was last updated.","example":"2021-08-26T21:06:07.710357Z","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1.mapping.updated_at","typeLabel":"string"},"created_by":{"type":"any","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1.mapping.created_by","typeLabel":"any"},"updated_by":{"type":"any","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1.mapping.updated_by","typeLabel":"any"},"scope":{"type":"string","description":"The scope of the mapping.\n * `global` - Mappings available to all\n * `private` - Company private mappings\n","enum":["global","private"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1.mapping.scope","typeLabel":"enum\u003cstring>"},"source":{"type":"string","description":"The source of the mapping.\n * `company` - Company private mapping\n * `admin` - Admin created/promoted mapping\n * `system` - System (Automated/ML) mappings\n * `lineage` - Lineage-derived mappings (editable without admin)\n * `rosetta_stone` - Rosetta Stone mappings (editable without admin)\n * `derived` - Computed on the request from a stored mapping and a derivation rule. Not stored, so it has\n no `id`; listed only when asked for by source\n","enum":["company","admin","system","lineage","rosetta_stone","derived"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1.mapping.source","typeLabel":"enum\u003cstring>"},"id":{"type":"any","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1.mapping.id","typeLabel":"any"},"company_id":{"type":"any","description":"The company that owns the mapping. Null for platform-wide mappings.","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1.mapping.company_id","typeLabel":"any"},"provenance":{"type":"any","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1.mapping.provenance","typeLabel":"any"},"tags":{"oneOf":[{"description":"Free-form labels on the mapping. Null and an empty array both mean no tags; `nio:`-prefixed tags\nare reserved for Narrative.","type":"array","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1.mapping.tags.oneOf.0.items.[INDEX]","typeLabel":"string"},"example":["nio:rosetta"],"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1.mapping.tags.oneOf.0","typeLabel":"string[]"},{"description":"Free-form labels on the mapping. Null and an empty array both mean no tags; `nio:`-prefixed tags\nare reserved for Narrative.","type":"null","items":{"type":"string"},"example":["nio:rosetta"],"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1.mapping.tags.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1.mapping.tags","typeLabel":"string[] | null"},"derived_from":{"type":"any","description":"The stored mapping this one was copied from when it was authored (lineage). Unrelated to derivation rules;\nsee `provenance` for those. Null when the mapping was authored directly.","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1.mapping.derived_from","typeLabel":"any"}},"required":["attribute_id","created_at","dataset_id","mapping","status","updated_at","created_by","updated_by","scope","source"],"example":{"id":"ea9dddd2-e3ee-40b5-b03e-c3cd37c8a7f0","attribute_id":1,"created_at":"2021-12-10T00:00:00Z","dataset_id":3,"mapping":{"type":"object_mapping","property_mappings":[{"path":"foo","expression":"upper(`US Kennel ID`)","dependencies":{"properties":["US Kennel ID"]}},{"path":"bar.baz.qux","expression":"weight * 10000","dependencies":{"properties":["weight"]}}]},"status":"active","updated_at":"2021-12-10T00:00:01Z","created_by":1,"updated_by":1,"company_id":100,"scope":"global","source":"admin","derived_from":"ea9dddd2-e3ee-40b5-b03e-c3cd37c8a6f0"},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1.mapping","typeLabel":"object"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.1","typeLabel":"object"},{"type":"object","description":"What the field is materialized from. `type` selects the shape.","required":["type","attribute","denominator","fields","mapping"],"properties":{"type":{"type":"string","enum":["attribute_sample"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.type","typeLabel":"enum\u003cstring>"},"attribute":{"type":"any","description":"An attribute as it appears inside another resource, such as a dataset's materialized fields. Unlike the\nresponses from the attributes API it always carries `company_id` and `collaborators`, whoever the caller is.","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.attribute","typeLabel":"any"},"denominator":{"description":"Sample rate denominator — 128 means one row in 128.","type":"integer","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.denominator","typeLabel":"integer"},"fields":{"type":"array","minItems":1,"items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.fields.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.fields","typeLabel":"string[]"},"mapping":{"type":"object","properties":{"attribute_id":{"type":"integer","description":"The target attribute's ID.","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.mapping.attribute_id","typeLabel":"integer"},"created_at":{"type":"string","description":"ISO-8601 timestamp indicating when the mapping was created.","example":"2021-08-26T21:06:07.710357Z","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.mapping.created_at","typeLabel":"string"},"dataset_id":{"type":"integer","description":"The source dataset's ID.","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.mapping.dataset_id","typeLabel":"integer"},"mapping":{"type":"any","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.mapping.mapping","typeLabel":"any"},"status":{"type":"string","description":"The status of the mapping.\n * `active` - Active mappings can be used\n * `archived` - Archived/Deleted mappings - mapping no longer in use\n * `pending` - Pending mappings need to be accepted before they can be used\n * `rejected` - Proposed mappings the owner turned down. Can still be accepted later\n","enum":["active","archived","pending","rejected"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.mapping.status","typeLabel":"enum\u003cstring>"},"updated_at":{"type":"string","description":"ISO-8601 timestamp indicating when the mapping was last updated.","example":"2021-08-26T21:06:07.710357Z","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.mapping.updated_at","typeLabel":"string"},"created_by":{"type":"any","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.mapping.created_by","typeLabel":"any"},"updated_by":{"type":"any","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.mapping.updated_by","typeLabel":"any"},"scope":{"type":"string","description":"The scope of the mapping.\n * `global` - Mappings available to all\n * `private` - Company private mappings\n","enum":["global","private"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.mapping.scope","typeLabel":"enum\u003cstring>"},"source":{"type":"string","description":"The source of the mapping.\n * `company` - Company private mapping\n * `admin` - Admin created/promoted mapping\n * `system` - System (Automated/ML) mappings\n * `lineage` - Lineage-derived mappings (editable without admin)\n * `rosetta_stone` - Rosetta Stone mappings (editable without admin)\n * `derived` - Computed on the request from a stored mapping and a derivation rule. Not stored, so it has\n no `id`; listed only when asked for by source\n","enum":["company","admin","system","lineage","rosetta_stone","derived"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.mapping.source","typeLabel":"enum\u003cstring>"},"id":{"type":"any","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.mapping.id","typeLabel":"any"},"company_id":{"type":"any","description":"The company that owns the mapping. Null for platform-wide mappings.","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.mapping.company_id","typeLabel":"any"},"provenance":{"type":"any","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.mapping.provenance","typeLabel":"any"},"tags":{"oneOf":[{"description":"Free-form labels on the mapping. Null and an empty array both mean no tags; `nio:`-prefixed tags\nare reserved for Narrative.","type":"array","items":{"type":"string","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.mapping.tags.oneOf.0.items.[INDEX]","typeLabel":"string"},"example":["nio:rosetta"],"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.mapping.tags.oneOf.0","typeLabel":"string[]"},{"description":"Free-form labels on the mapping. Null and an empty array both mean no tags; `nio:`-prefixed tags\nare reserved for Narrative.","type":"null","items":{"type":"string"},"example":["nio:rosetta"],"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.mapping.tags.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.mapping.tags","typeLabel":"string[] | null"},"derived_from":{"type":"any","description":"The stored mapping this one was copied from when it was authored (lineage). Unrelated to derivation rules;\nsee `provenance` for those. Null when the mapping was authored directly.","uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.mapping.derived_from","typeLabel":"any"}},"required":["attribute_id","created_at","dataset_id","mapping","status","updated_at","created_by","updated_by","scope","source"],"example":{"id":"ea9dddd2-e3ee-40b5-b03e-c3cd37c8a7f0","attribute_id":1,"created_at":"2021-12-10T00:00:00Z","dataset_id":3,"mapping":{"type":"object_mapping","property_mappings":[{"path":"foo","expression":"upper(`US Kennel ID`)","dependencies":{"properties":["US Kennel ID"]}},{"path":"bar.baz.qux","expression":"weight * 10000","dependencies":{"properties":["weight"]}}]},"status":"active","updated_at":"2021-12-10T00:00:01Z","created_by":1,"updated_by":1,"company_id":100,"scope":"global","source":"admin","derived_from":"ea9dddd2-e3ee-40b5-b03e-c3cd37c8a6f0"},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2.mapping","typeLabel":"object"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.2","typeLabel":"object"},{"type":"object","description":"What the field is materialized from. `type` selects the shape.","required":["type","denominator"],"example":{"type":"uniform_sample","denominator":128},"properties":{"type":{"type":"string","enum":["uniform_sample"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.3.type","typeLabel":"enum\u003cstring>"},"denominator":{"description":"Sample rate denominator — 128 means one row in 128.","type":"integer","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.3.denominator","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.3","typeLabel":"object"},{"type":"object","description":"What the field is materialized from. `type` selects the shape.","required":["type","expression"],"properties":{"type":{"type":"string","enum":["xz2_index"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.4.type","typeLabel":"enum\u003cstring>"},"expression":{"type":"string","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.4.expression","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.4","typeLabel":"object"},{"type":"object","description":"What the field is materialized from. `type` selects the shape.","required":["type"],"properties":{"type":{"type":"string","enum":["last_modified_at"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.5.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.5","typeLabel":"object"},{"type":"object","description":"What the field is materialized from. `type` selects the shape.","required":["type"],"properties":{"type":{"type":"string","enum":["nio_sources"],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.6.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value.oneOf.6","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized.value","typeLabel":"object"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1.materialized","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX].oneOf.1","typeLabel":"object"}],"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.columns","typeLabel":"object[]"},"partitions":{"type":"array","minItems":1,"items":{"type":"object","required":["source_column","transform"],"properties":{"source_column":{"description":"The column the partition is derived from.","type":"string","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.partitions.items.[INDEX].source_column","typeLabel":"string"},"transform":{"description":"The Iceberg partition transform: `identity`, `year`, `month`, `day`, `hour`, `bucket[\u003cn>]` or\n`truncate[\u003cwidth>]`.","type":"string","pattern":"^(identity|year|month|day|hour|bucket\\[\\d+\\]|truncate\\[\\d+\\])$","isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.partitions.items.[INDEX].transform","typeLabel":"string"}},"uniqueKey":"oneOf.9.input.oneOf.1.definition.partitions.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition.partitions","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1.definition","typeLabel":"object"}},"isRequired":true,"uniqueKey":"oneOf.9.input.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.9.input","typeLabel":"object"},"result":{"oneOf":[{"type":"object","description":"Set when the job completes. Always `{\"type\": \"datasets_create_table\"}`; the job reports success and nothing else.\nCompleting the job doesn't activate the dataset.","required":["type"],"example":{"type":"datasets_create_table"},"properties":{"type":{"type":"string","enum":["datasets_create_table"],"isRequired":true,"uniqueKey":"oneOf.9.result.oneOf.0.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.9.result.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"oneOf.9.result.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.9.result","typeLabel":"object | null"},"compute_pool_id":{"oneOf":[{"description":"The compute pool associated with the job, if any.","type":"string","format":"uuid","uniqueKey":"oneOf.9.compute_pool_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The compute pool associated with the job, if any.","type":"null","format":"uuid","uniqueKey":"oneOf.9.compute_pool_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.9.compute_pool_id","typeLabel":"string\u003cuuid> | null"},"executor":{"oneOf":[{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"string","uniqueKey":"oneOf.9.executor.oneOf.0","typeLabel":"string"},{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"null","uniqueKey":"oneOf.9.executor.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.9.executor","typeLabel":"string | null"},"dequeued_at":{"oneOf":[{"description":"When the job was taken off the queue. Null while it is still queued.","type":"string","format":"date-time","uniqueKey":"oneOf.9.dequeued_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"When the job was taken off the queue. Null while it is still queued.","type":"null","format":"date-time","uniqueKey":"oneOf.9.dequeued_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.9.dequeued_at","typeLabel":"string\u003cdate-time> | null"},"ended_at":{"oneOf":[{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"string","format":"date-time","uniqueKey":"oneOf.9.ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"null","format":"date-time","uniqueKey":"oneOf.9.ended_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.9.ended_at","typeLabel":"string\u003cdate-time> | null"},"workflow_id":{"oneOf":[{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"string","format":"uuid","uniqueKey":"oneOf.9.workflow_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"null","format":"uuid","uniqueKey":"oneOf.9.workflow_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.9.workflow_id","typeLabel":"string\u003cuuid> | null"},"workflow_run_id":{"oneOf":[{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"string","format":"uuid","uniqueKey":"oneOf.9.workflow_run_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"null","format":"uuid","uniqueKey":"oneOf.9.workflow_run_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.9.workflow_run_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"oneOf.9","typeLabel":"object"},{"type":"object","description":"A job. Every job carries the same envelope of fields — see `JobBase` — but `input` and `result` hold\njob-type-specific payloads, so the response is a union over `type`: pick the branch whose `type` matches\nand you get the typed `input` and `result` for that kind of job.\n\nThe union is open on purpose. Job types are free strings on the server, so a type this spec version does\nnot describe lands in `OtherJobResponse`, where both fields stay free-form. No branch closes itself to\nextra properties, and new job types can appear without a spec change.\n\nThe described types sit together under `DescribedJobResponse`, which has a discriminator on `type`. Any other\n`type` is an `OtherJobResponse`. That branch sits outside the discriminator because a mapping can only name\nspecific values, and a branch with no mapping entry would only match a `type` equal to its schema name.\n\n`input` and `result` are returned exactly as they were stored when the job was enqueued or completed. The\nserver never reshapes them, so a field a job type gained after a row was written is absent from that row\nrather than null. The typed branches describe what the current code writes; fields that have not always\nbeen written are left out of each branch's `required` list.\n\n`result` is `null` in every branch until the job reaches a terminal state.","required":["type","input","result","job_id","company_id","data_plane_id","request_source","state","operator_type","tags","execution_cluster","idempotency_key","created_at","updated_at","attempted_at","attempt_version"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique identifier for the job.","isRequired":true,"uniqueKey":"oneOf.10.job_id","typeLabel":"string\u003cuuid>"},"company_id":{"description":"The company the job belongs to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.10.company_id","typeLabel":"integer\u003cint64>"},"data_plane_id":{"description":"The data plane the job runs on. Jobs on the Narrative data plane carry its id,\n`f79cbdae-4848-47ca-95e8-69588364d185`.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.10.data_plane_id","typeLabel":"string\u003cuuid>"},"request_source":{"oneOf":[{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","company_id","user_id"],"example":{"type":"api_user","company_id":1,"user_id":1248},"properties":{"type":{"type":"string","enum":["api_user"],"isRequired":true,"uniqueKey":"oneOf.10.request_source.oneOf.0.type","typeLabel":"enum\u003cstring>"},"company_id":{"description":"The company the request was made for.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.10.request_source.oneOf.0.company_id","typeLabel":"integer\u003cint64>"},"user_id":{"description":"The user who made the request.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.10.request_source.oneOf.0.user_id","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.10.request_source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","name"],"example":{"type":"process","name":"narrative-control-plane"},"properties":{"type":{"type":"string","enum":["process"],"isRequired":true,"uniqueKey":"oneOf.10.request_source.oneOf.1.type","typeLabel":"enum\u003cstring>"},"name":{"description":"The process that enqueued the job, e.g. `narrative-control-plane` or `health-check`.","type":"string","isRequired":true,"uniqueKey":"oneOf.10.request_source.oneOf.1.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.10.request_source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.10.request_source","typeLabel":"object"},"state":{"description":"Where a job is in its lifecycle.\n\n- `pending` — enqueued and waiting to be picked up.\n- `scheduled` — claimed by an executor but not yet started.\n- `running` — being executed.\n- `pending_cancellation` — cancellation has been requested and the data plane has yet to stop the work.\n- `completed`, `cancelled`, `failed` — terminal states.","type":"string","enum":["pending","scheduled","running","pending_cancellation","completed","cancelled","failed"],"isRequired":true,"uniqueKey":"oneOf.10.state","typeLabel":"enum\u003cstring>"},"operator_type":{"description":"Which operator runs the job, e.g. `materialized-view-refresh` or `datasets_execute_select`. Finer-grained\nthan `type`: several job types can share one operator, and where no such mapping exists the two are equal.","type":"string","isRequired":true,"uniqueKey":"oneOf.10.operator_type","typeLabel":"string"},"tags":{"description":"Free-form labels attached to the job.","type":"array","items":{"type":"string","minLength":1,"maxLength":255,"uniqueKey":"oneOf.10.tags.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.10.tags","typeLabel":"string[]"},"execution_cluster":{"description":"The type of the execution cluster to run the job on.\n\n- `dedicated` runs job on a dedicated cluster.\n- `shared` runs job on a shared cluster.","type":"string","enum":["dedicated","shared"],"isRequired":true,"uniqueKey":"oneOf.10.execution_cluster","typeLabel":"enum\u003cstring>"},"idempotency_key":{"description":"The unique key the job was enqueued under.","type":"string","minLength":1,"maxLength":255,"isRequired":true,"uniqueKey":"oneOf.10.idempotency_key","typeLabel":"string"},"created_at":{"description":"The timestamp representing when the job was created.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.10.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"description":"The timestamp representing when the job was updated.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.10.updated_at","typeLabel":"string\u003cdate-time>"},"attempted_at":{"description":"When the job's current attempt started. A job can be retried; each retry is a new attempt, so this advances to the latest one, while `created_at` stays at the original submission.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.10.attempted_at","typeLabel":"string\u003cdate-time>"},"attempt_version":{"description":"Which attempt this is: 1 for the first, increasing by one on each retry.","type":"integer","isRequired":true,"uniqueKey":"oneOf.10.attempt_version","typeLabel":"integer"},"type":{"type":"string","enum":["datasets_truncate_table"],"isRequired":true,"uniqueKey":"oneOf.10.type","typeLabel":"enum\u003cstring>"},"input":{"type":"object","required":["dataset_id"],"properties":{"dataset_id":{"description":"The dataset being truncated.","type":"integer","isRequired":true,"uniqueKey":"oneOf.10.input.dataset_id","typeLabel":"integer"}},"example":{"dataset_id":10736},"isRequired":true,"uniqueKey":"oneOf.10.input","typeLabel":"object"},"result":{"oneOf":[{"type":"object","description":"Empty. The API records nothing beyond the job reaching `completed`.","example":{},"isRequired":true,"uniqueKey":"oneOf.10.result.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"oneOf.10.result.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.10.result","typeLabel":"object | null"},"compute_pool_id":{"oneOf":[{"description":"The compute pool associated with the job, if any.","type":"string","format":"uuid","uniqueKey":"oneOf.10.compute_pool_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The compute pool associated with the job, if any.","type":"null","format":"uuid","uniqueKey":"oneOf.10.compute_pool_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.10.compute_pool_id","typeLabel":"string\u003cuuid> | null"},"executor":{"oneOf":[{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"string","uniqueKey":"oneOf.10.executor.oneOf.0","typeLabel":"string"},{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"null","uniqueKey":"oneOf.10.executor.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.10.executor","typeLabel":"string | null"},"dequeued_at":{"oneOf":[{"description":"When the job was taken off the queue. Null while it is still queued.","type":"string","format":"date-time","uniqueKey":"oneOf.10.dequeued_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"When the job was taken off the queue. Null while it is still queued.","type":"null","format":"date-time","uniqueKey":"oneOf.10.dequeued_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.10.dequeued_at","typeLabel":"string\u003cdate-time> | null"},"ended_at":{"oneOf":[{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"string","format":"date-time","uniqueKey":"oneOf.10.ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"null","format":"date-time","uniqueKey":"oneOf.10.ended_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.10.ended_at","typeLabel":"string\u003cdate-time> | null"},"workflow_id":{"oneOf":[{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"string","format":"uuid","uniqueKey":"oneOf.10.workflow_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"null","format":"uuid","uniqueKey":"oneOf.10.workflow_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.10.workflow_id","typeLabel":"string\u003cuuid> | null"},"workflow_run_id":{"oneOf":[{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"string","format":"uuid","uniqueKey":"oneOf.10.workflow_run_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"null","format":"uuid","uniqueKey":"oneOf.10.workflow_run_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.10.workflow_run_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"oneOf.10","typeLabel":"object"},{"type":"object","description":"A job. Every job carries the same envelope of fields — see `JobBase` — but `input` and `result` hold\njob-type-specific payloads, so the response is a union over `type`: pick the branch whose `type` matches\nand you get the typed `input` and `result` for that kind of job.\n\nThe union is open on purpose. Job types are free strings on the server, so a type this spec version does\nnot describe lands in `OtherJobResponse`, where both fields stay free-form. No branch closes itself to\nextra properties, and new job types can appear without a spec change.\n\nThe described types sit together under `DescribedJobResponse`, which has a discriminator on `type`. Any other\n`type` is an `OtherJobResponse`. That branch sits outside the discriminator because a mapping can only name\nspecific values, and a branch with no mapping entry would only match a `type` equal to its schema name.\n\n`input` and `result` are returned exactly as they were stored when the job was enqueued or completed. The\nserver never reshapes them, so a field a job type gained after a row was written is absent from that row\nrather than null. The typed branches describe what the current code writes; fields that have not always\nbeen written are left out of each branch's `required` list.\n\n`result` is `null` in every branch until the job reaches a terminal state.","required":["type","input","result","job_id","company_id","data_plane_id","request_source","state","operator_type","tags","execution_cluster","idempotency_key","created_at","updated_at","attempted_at","attempt_version"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique identifier for the job.","isRequired":true,"uniqueKey":"oneOf.11.job_id","typeLabel":"string\u003cuuid>"},"company_id":{"description":"The company the job belongs to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.11.company_id","typeLabel":"integer\u003cint64>"},"data_plane_id":{"description":"The data plane the job runs on. Jobs on the Narrative data plane carry its id,\n`f79cbdae-4848-47ca-95e8-69588364d185`.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.11.data_plane_id","typeLabel":"string\u003cuuid>"},"request_source":{"oneOf":[{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","company_id","user_id"],"example":{"type":"api_user","company_id":1,"user_id":1248},"properties":{"type":{"type":"string","enum":["api_user"],"isRequired":true,"uniqueKey":"oneOf.11.request_source.oneOf.0.type","typeLabel":"enum\u003cstring>"},"company_id":{"description":"The company the request was made for.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.11.request_source.oneOf.0.company_id","typeLabel":"integer\u003cint64>"},"user_id":{"description":"The user who made the request.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.11.request_source.oneOf.0.user_id","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.11.request_source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","name"],"example":{"type":"process","name":"narrative-control-plane"},"properties":{"type":{"type":"string","enum":["process"],"isRequired":true,"uniqueKey":"oneOf.11.request_source.oneOf.1.type","typeLabel":"enum\u003cstring>"},"name":{"description":"The process that enqueued the job, e.g. `narrative-control-plane` or `health-check`.","type":"string","isRequired":true,"uniqueKey":"oneOf.11.request_source.oneOf.1.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.11.request_source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.11.request_source","typeLabel":"object"},"state":{"description":"Where a job is in its lifecycle.\n\n- `pending` — enqueued and waiting to be picked up.\n- `scheduled` — claimed by an executor but not yet started.\n- `running` — being executed.\n- `pending_cancellation` — cancellation has been requested and the data plane has yet to stop the work.\n- `completed`, `cancelled`, `failed` — terminal states.","type":"string","enum":["pending","scheduled","running","pending_cancellation","completed","cancelled","failed"],"isRequired":true,"uniqueKey":"oneOf.11.state","typeLabel":"enum\u003cstring>"},"operator_type":{"description":"Which operator runs the job, e.g. `materialized-view-refresh` or `datasets_execute_select`. Finer-grained\nthan `type`: several job types can share one operator, and where no such mapping exists the two are equal.","type":"string","isRequired":true,"uniqueKey":"oneOf.11.operator_type","typeLabel":"string"},"tags":{"description":"Free-form labels attached to the job.","type":"array","items":{"type":"string","minLength":1,"maxLength":255,"uniqueKey":"oneOf.11.tags.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.11.tags","typeLabel":"string[]"},"execution_cluster":{"description":"The type of the execution cluster to run the job on.\n\n- `dedicated` runs job on a dedicated cluster.\n- `shared` runs job on a shared cluster.","type":"string","enum":["dedicated","shared"],"isRequired":true,"uniqueKey":"oneOf.11.execution_cluster","typeLabel":"enum\u003cstring>"},"idempotency_key":{"description":"The unique key the job was enqueued under.","type":"string","minLength":1,"maxLength":255,"isRequired":true,"uniqueKey":"oneOf.11.idempotency_key","typeLabel":"string"},"created_at":{"description":"The timestamp representing when the job was created.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.11.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"description":"The timestamp representing when the job was updated.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.11.updated_at","typeLabel":"string\u003cdate-time>"},"attempted_at":{"description":"When the job's current attempt started. A job can be retried; each retry is a new attempt, so this advances to the latest one, while `created_at` stays at the original submission.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.11.attempted_at","typeLabel":"string\u003cdate-time>"},"attempt_version":{"description":"Which attempt this is: 1 for the first, increasing by one on each retry.","type":"integer","isRequired":true,"uniqueKey":"oneOf.11.attempt_version","typeLabel":"integer"},"type":{"type":"string","enum":["datasets_enforce_table_ttl_retention_policy"],"isRequired":true,"uniqueKey":"oneOf.11.type","typeLabel":"enum\u003cstring>"},"input":{"type":"object","required":["dataset_id"],"properties":{"dataset_id":{"description":"The dataset the policy applies to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.11.input.dataset_id","typeLabel":"integer\u003cint64>"},"dataset_external_id":{"oneOf":[{"description":"The dataset's external identifier. Null when the dataset has none.","type":"string","uniqueKey":"oneOf.11.input.dataset_external_id.oneOf.0","typeLabel":"string"},{"description":"The dataset's external identifier. Null when the dataset has none.","type":"null","uniqueKey":"oneOf.11.input.dataset_external_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.11.input.dataset_external_id","typeLabel":"string | null"}},"example":{"dataset_id":10736,"dataset_external_id":"nio_10736"},"isRequired":true,"uniqueKey":"oneOf.11.input","typeLabel":"object"},"result":{"oneOf":[{"type":"object","description":"Empty. The API records nothing beyond the job reaching `completed`.","example":{},"isRequired":true,"uniqueKey":"oneOf.11.result.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"oneOf.11.result.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.11.result","typeLabel":"object | null"},"compute_pool_id":{"oneOf":[{"description":"The compute pool associated with the job, if any.","type":"string","format":"uuid","uniqueKey":"oneOf.11.compute_pool_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The compute pool associated with the job, if any.","type":"null","format":"uuid","uniqueKey":"oneOf.11.compute_pool_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.11.compute_pool_id","typeLabel":"string\u003cuuid> | null"},"executor":{"oneOf":[{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"string","uniqueKey":"oneOf.11.executor.oneOf.0","typeLabel":"string"},{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"null","uniqueKey":"oneOf.11.executor.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.11.executor","typeLabel":"string | null"},"dequeued_at":{"oneOf":[{"description":"When the job was taken off the queue. Null while it is still queued.","type":"string","format":"date-time","uniqueKey":"oneOf.11.dequeued_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"When the job was taken off the queue. Null while it is still queued.","type":"null","format":"date-time","uniqueKey":"oneOf.11.dequeued_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.11.dequeued_at","typeLabel":"string\u003cdate-time> | null"},"ended_at":{"oneOf":[{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"string","format":"date-time","uniqueKey":"oneOf.11.ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"null","format":"date-time","uniqueKey":"oneOf.11.ended_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.11.ended_at","typeLabel":"string\u003cdate-time> | null"},"workflow_id":{"oneOf":[{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"string","format":"uuid","uniqueKey":"oneOf.11.workflow_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"null","format":"uuid","uniqueKey":"oneOf.11.workflow_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.11.workflow_id","typeLabel":"string\u003cuuid> | null"},"workflow_run_id":{"oneOf":[{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"string","format":"uuid","uniqueKey":"oneOf.11.workflow_run_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"null","format":"uuid","uniqueKey":"oneOf.11.workflow_run_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.11.workflow_run_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"oneOf.11","typeLabel":"object"},{"type":"object","description":"A job. Every job carries the same envelope of fields — see `JobBase` — but `input` and `result` hold\njob-type-specific payloads, so the response is a union over `type`: pick the branch whose `type` matches\nand you get the typed `input` and `result` for that kind of job.\n\nThe union is open on purpose. Job types are free strings on the server, so a type this spec version does\nnot describe lands in `OtherJobResponse`, where both fields stay free-form. No branch closes itself to\nextra properties, and new job types can appear without a spec change.\n\nThe described types sit together under `DescribedJobResponse`, which has a discriminator on `type`. Any other\n`type` is an `OtherJobResponse`. That branch sits outside the discriminator because a mapping can only name\nspecific values, and a branch with no mapping entry would only match a `type` equal to its schema name.\n\n`input` and `result` are returned exactly as they were stored when the job was enqueued or completed. The\nserver never reshapes them, so a field a job type gained after a row was written is absent from that row\nrather than null. The typed branches describe what the current code writes; fields that have not always\nbeen written are left out of each branch's `required` list.\n\n`result` is `null` in every branch until the job reaches a terminal state.","required":["type","input","result","job_id","company_id","data_plane_id","request_source","state","operator_type","tags","execution_cluster","idempotency_key","created_at","updated_at","attempted_at","attempt_version"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique identifier for the job.","isRequired":true,"uniqueKey":"oneOf.12.job_id","typeLabel":"string\u003cuuid>"},"company_id":{"description":"The company the job belongs to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.12.company_id","typeLabel":"integer\u003cint64>"},"data_plane_id":{"description":"The data plane the job runs on. Jobs on the Narrative data plane carry its id,\n`f79cbdae-4848-47ca-95e8-69588364d185`.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.12.data_plane_id","typeLabel":"string\u003cuuid>"},"request_source":{"oneOf":[{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","company_id","user_id"],"example":{"type":"api_user","company_id":1,"user_id":1248},"properties":{"type":{"type":"string","enum":["api_user"],"isRequired":true,"uniqueKey":"oneOf.12.request_source.oneOf.0.type","typeLabel":"enum\u003cstring>"},"company_id":{"description":"The company the request was made for.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.12.request_source.oneOf.0.company_id","typeLabel":"integer\u003cint64>"},"user_id":{"description":"The user who made the request.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.12.request_source.oneOf.0.user_id","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.12.request_source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","name"],"example":{"type":"process","name":"narrative-control-plane"},"properties":{"type":{"type":"string","enum":["process"],"isRequired":true,"uniqueKey":"oneOf.12.request_source.oneOf.1.type","typeLabel":"enum\u003cstring>"},"name":{"description":"The process that enqueued the job, e.g. `narrative-control-plane` or `health-check`.","type":"string","isRequired":true,"uniqueKey":"oneOf.12.request_source.oneOf.1.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.12.request_source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.12.request_source","typeLabel":"object"},"state":{"description":"Where a job is in its lifecycle.\n\n- `pending` — enqueued and waiting to be picked up.\n- `scheduled` — claimed by an executor but not yet started.\n- `running` — being executed.\n- `pending_cancellation` — cancellation has been requested and the data plane has yet to stop the work.\n- `completed`, `cancelled`, `failed` — terminal states.","type":"string","enum":["pending","scheduled","running","pending_cancellation","completed","cancelled","failed"],"isRequired":true,"uniqueKey":"oneOf.12.state","typeLabel":"enum\u003cstring>"},"operator_type":{"description":"Which operator runs the job, e.g. `materialized-view-refresh` or `datasets_execute_select`. Finer-grained\nthan `type`: several job types can share one operator, and where no such mapping exists the two are equal.","type":"string","isRequired":true,"uniqueKey":"oneOf.12.operator_type","typeLabel":"string"},"tags":{"description":"Free-form labels attached to the job.","type":"array","items":{"type":"string","minLength":1,"maxLength":255,"uniqueKey":"oneOf.12.tags.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.12.tags","typeLabel":"string[]"},"execution_cluster":{"description":"The type of the execution cluster to run the job on.\n\n- `dedicated` runs job on a dedicated cluster.\n- `shared` runs job on a shared cluster.","type":"string","enum":["dedicated","shared"],"isRequired":true,"uniqueKey":"oneOf.12.execution_cluster","typeLabel":"enum\u003cstring>"},"idempotency_key":{"description":"The unique key the job was enqueued under.","type":"string","minLength":1,"maxLength":255,"isRequired":true,"uniqueKey":"oneOf.12.idempotency_key","typeLabel":"string"},"created_at":{"description":"The timestamp representing when the job was created.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.12.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"description":"The timestamp representing when the job was updated.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.12.updated_at","typeLabel":"string\u003cdate-time>"},"attempted_at":{"description":"When the job's current attempt started. A job can be retried; each retry is a new attempt, so this advances to the latest one, while `created_at` stays at the original submission.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.12.attempted_at","typeLabel":"string\u003cdate-time>"},"attempt_version":{"description":"Which attempt this is: 1 for the first, increasing by one on each retry.","type":"integer","isRequired":true,"uniqueKey":"oneOf.12.attempt_version","typeLabel":"integer"},"type":{"type":"string","enum":["datasets_enforce_row_ttl_retention_policy"],"isRequired":true,"uniqueKey":"oneOf.12.type","typeLabel":"enum\u003cstring>"},"input":{"type":"object","required":["dataset_id","sql"],"properties":{"dataset_id":{"description":"The dataset the policy applies to.","type":"integer","isRequired":true,"uniqueKey":"oneOf.12.input.dataset_id","typeLabel":"integer"},"sql":{"description":"The delete statements that enforce the policy, run in order.","type":"array","items":{"type":"string","uniqueKey":"oneOf.12.input.sql.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.12.input.sql","typeLabel":"string[]"}},"example":{"dataset_id":10736,"sql":["DELETE FROM narrative.datasets.ds_10736 WHERE _nio_last_modified_at \u003c 1706400000000"]},"isRequired":true,"uniqueKey":"oneOf.12.input","typeLabel":"object"},"result":{"oneOf":[{"type":"object","description":"Empty. The API records nothing beyond the job reaching `completed`.","example":{},"isRequired":true,"uniqueKey":"oneOf.12.result.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"oneOf.12.result.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.12.result","typeLabel":"object | null"},"compute_pool_id":{"oneOf":[{"description":"The compute pool associated with the job, if any.","type":"string","format":"uuid","uniqueKey":"oneOf.12.compute_pool_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The compute pool associated with the job, if any.","type":"null","format":"uuid","uniqueKey":"oneOf.12.compute_pool_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.12.compute_pool_id","typeLabel":"string\u003cuuid> | null"},"executor":{"oneOf":[{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"string","uniqueKey":"oneOf.12.executor.oneOf.0","typeLabel":"string"},{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"null","uniqueKey":"oneOf.12.executor.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.12.executor","typeLabel":"string | null"},"dequeued_at":{"oneOf":[{"description":"When the job was taken off the queue. Null while it is still queued.","type":"string","format":"date-time","uniqueKey":"oneOf.12.dequeued_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"When the job was taken off the queue. Null while it is still queued.","type":"null","format":"date-time","uniqueKey":"oneOf.12.dequeued_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.12.dequeued_at","typeLabel":"string\u003cdate-time> | null"},"ended_at":{"oneOf":[{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"string","format":"date-time","uniqueKey":"oneOf.12.ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"null","format":"date-time","uniqueKey":"oneOf.12.ended_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.12.ended_at","typeLabel":"string\u003cdate-time> | null"},"workflow_id":{"oneOf":[{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"string","format":"uuid","uniqueKey":"oneOf.12.workflow_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"null","format":"uuid","uniqueKey":"oneOf.12.workflow_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.12.workflow_id","typeLabel":"string\u003cuuid> | null"},"workflow_run_id":{"oneOf":[{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"string","format":"uuid","uniqueKey":"oneOf.12.workflow_run_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"null","format":"uuid","uniqueKey":"oneOf.12.workflow_run_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.12.workflow_run_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"oneOf.12","typeLabel":"object"},{"type":"object","description":"A job. Every job carries the same envelope of fields — see `JobBase` — but `input` and `result` hold\njob-type-specific payloads, so the response is a union over `type`: pick the branch whose `type` matches\nand you get the typed `input` and `result` for that kind of job.\n\nThe union is open on purpose. Job types are free strings on the server, so a type this spec version does\nnot describe lands in `OtherJobResponse`, where both fields stay free-form. No branch closes itself to\nextra properties, and new job types can appear without a spec change.\n\nThe described types sit together under `DescribedJobResponse`, which has a discriminator on `type`. Any other\n`type` is an `OtherJobResponse`. That branch sits outside the discriminator because a mapping can only name\nspecific values, and a branch with no mapping entry would only match a `type` equal to its schema name.\n\n`input` and `result` are returned exactly as they were stored when the job was enqueued or completed. The\nserver never reshapes them, so a field a job type gained after a row was written is absent from that row\nrather than null. The typed branches describe what the current code writes; fields that have not always\nbeen written are left out of each branch's `required` list.\n\n`result` is `null` in every branch until the job reaches a terminal state.","required":["type","input","result","job_id","company_id","data_plane_id","request_source","state","operator_type","tags","execution_cluster","idempotency_key","created_at","updated_at","attempted_at","attempt_version"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique identifier for the job.","isRequired":true,"uniqueKey":"oneOf.13.job_id","typeLabel":"string\u003cuuid>"},"company_id":{"description":"The company the job belongs to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.13.company_id","typeLabel":"integer\u003cint64>"},"data_plane_id":{"description":"The data plane the job runs on. Jobs on the Narrative data plane carry its id,\n`f79cbdae-4848-47ca-95e8-69588364d185`.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.13.data_plane_id","typeLabel":"string\u003cuuid>"},"request_source":{"oneOf":[{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","company_id","user_id"],"example":{"type":"api_user","company_id":1,"user_id":1248},"properties":{"type":{"type":"string","enum":["api_user"],"isRequired":true,"uniqueKey":"oneOf.13.request_source.oneOf.0.type","typeLabel":"enum\u003cstring>"},"company_id":{"description":"The company the request was made for.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.13.request_source.oneOf.0.company_id","typeLabel":"integer\u003cint64>"},"user_id":{"description":"The user who made the request.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.13.request_source.oneOf.0.user_id","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.13.request_source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","name"],"example":{"type":"process","name":"narrative-control-plane"},"properties":{"type":{"type":"string","enum":["process"],"isRequired":true,"uniqueKey":"oneOf.13.request_source.oneOf.1.type","typeLabel":"enum\u003cstring>"},"name":{"description":"The process that enqueued the job, e.g. `narrative-control-plane` or `health-check`.","type":"string","isRequired":true,"uniqueKey":"oneOf.13.request_source.oneOf.1.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.13.request_source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.13.request_source","typeLabel":"object"},"state":{"description":"Where a job is in its lifecycle.\n\n- `pending` — enqueued and waiting to be picked up.\n- `scheduled` — claimed by an executor but not yet started.\n- `running` — being executed.\n- `pending_cancellation` — cancellation has been requested and the data plane has yet to stop the work.\n- `completed`, `cancelled`, `failed` — terminal states.","type":"string","enum":["pending","scheduled","running","pending_cancellation","completed","cancelled","failed"],"isRequired":true,"uniqueKey":"oneOf.13.state","typeLabel":"enum\u003cstring>"},"operator_type":{"description":"Which operator runs the job, e.g. `materialized-view-refresh` or `datasets_execute_select`. Finer-grained\nthan `type`: several job types can share one operator, and where no such mapping exists the two are equal.","type":"string","isRequired":true,"uniqueKey":"oneOf.13.operator_type","typeLabel":"string"},"tags":{"description":"Free-form labels attached to the job.","type":"array","items":{"type":"string","minLength":1,"maxLength":255,"uniqueKey":"oneOf.13.tags.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.13.tags","typeLabel":"string[]"},"execution_cluster":{"description":"The type of the execution cluster to run the job on.\n\n- `dedicated` runs job on a dedicated cluster.\n- `shared` runs job on a shared cluster.","type":"string","enum":["dedicated","shared"],"isRequired":true,"uniqueKey":"oneOf.13.execution_cluster","typeLabel":"enum\u003cstring>"},"idempotency_key":{"description":"The unique key the job was enqueued under.","type":"string","minLength":1,"maxLength":255,"isRequired":true,"uniqueKey":"oneOf.13.idempotency_key","typeLabel":"string"},"created_at":{"description":"The timestamp representing when the job was created.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.13.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"description":"The timestamp representing when the job was updated.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.13.updated_at","typeLabel":"string\u003cdate-time>"},"attempted_at":{"description":"When the job's current attempt started. A job can be retried; each retry is a new attempt, so this advances to the latest one, while `created_at` stays at the original submission.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.13.attempted_at","typeLabel":"string\u003cdate-time>"},"attempt_version":{"description":"Which attempt this is: 1 for the first, increasing by one on each retry.","type":"integer","isRequired":true,"uniqueKey":"oneOf.13.attempt_version","typeLabel":"integer"},"type":{"type":"string","enum":["datasets_calculate_affected_rows"],"isRequired":true,"uniqueKey":"oneOf.13.type","typeLabel":"enum\u003cstring>"},"input":{"type":"object","required":["compiled_sql","dataset_id"],"properties":{"compiled_sql":{"description":"The SELECT that counts the rows, compiled by the API.","type":"string","isRequired":true,"uniqueKey":"oneOf.13.input.compiled_sql","typeLabel":"string"},"dataset_id":{"description":"The dataset being counted.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.13.input.dataset_id","typeLabel":"integer\u003cint64>"}},"example":{"compiled_sql":"SELECT COUNT(1) AS affected_rows FROM narrative.datasets.ds_10736","dataset_id":10736},"isRequired":true,"uniqueKey":"oneOf.13.input","typeLabel":"object"},"result":{"oneOf":[{"type":"object","description":"The operator's raw SELECT output. The count sits at `rows[0].values.affected_rows`; the job carries the\ngeneric select result rather than a count field of its own so that new SELECT-backed job types need no\noperator change. A job completed through the API carries `type` as well; one completed by the legacy\nexecutor does not.","required":["rows"],"example":{"type":"datasets_execute_select","rows":[{"values":{"affected_rows":42}}]},"properties":{"rows":{"type":"array","items":{"type":"object","required":["values"],"properties":{"values":{"description":"One returned row, keyed by column name.","type":"object","isRequired":true,"uniqueKey":"oneOf.13.result.oneOf.0.rows.items.[INDEX].values","typeLabel":"object"}},"uniqueKey":"oneOf.13.result.oneOf.0.rows.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.13.result.oneOf.0.rows","typeLabel":"object[]"},"type":{"description":"The operator that produced the result, not the job's own type.","type":"string","enum":["datasets_execute_select"],"uniqueKey":"oneOf.13.result.oneOf.0.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"oneOf.13.result.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"oneOf.13.result.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"oneOf.13.result","typeLabel":"object | null"},"compute_pool_id":{"oneOf":[{"description":"The compute pool associated with the job, if any.","type":"string","format":"uuid","uniqueKey":"oneOf.13.compute_pool_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The compute pool associated with the job, if any.","type":"null","format":"uuid","uniqueKey":"oneOf.13.compute_pool_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.13.compute_pool_id","typeLabel":"string\u003cuuid> | null"},"executor":{"oneOf":[{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"string","uniqueKey":"oneOf.13.executor.oneOf.0","typeLabel":"string"},{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"null","uniqueKey":"oneOf.13.executor.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.13.executor","typeLabel":"string | null"},"dequeued_at":{"oneOf":[{"description":"When the job was taken off the queue. Null while it is still queued.","type":"string","format":"date-time","uniqueKey":"oneOf.13.dequeued_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"When the job was taken off the queue. Null while it is still queued.","type":"null","format":"date-time","uniqueKey":"oneOf.13.dequeued_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.13.dequeued_at","typeLabel":"string\u003cdate-time> | null"},"ended_at":{"oneOf":[{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"string","format":"date-time","uniqueKey":"oneOf.13.ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"null","format":"date-time","uniqueKey":"oneOf.13.ended_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.13.ended_at","typeLabel":"string\u003cdate-time> | null"},"workflow_id":{"oneOf":[{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"string","format":"uuid","uniqueKey":"oneOf.13.workflow_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"null","format":"uuid","uniqueKey":"oneOf.13.workflow_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.13.workflow_id","typeLabel":"string\u003cuuid> | null"},"workflow_run_id":{"oneOf":[{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"string","format":"uuid","uniqueKey":"oneOf.13.workflow_run_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"null","format":"uuid","uniqueKey":"oneOf.13.workflow_run_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.13.workflow_run_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"oneOf.13","typeLabel":"object"},{"type":"object","description":"A job. Every job carries the same envelope of fields — see `JobBase` — but `input` and `result` hold\njob-type-specific payloads, so the response is a union over `type`: pick the branch whose `type` matches\nand you get the typed `input` and `result` for that kind of job.\n\nThe union is open on purpose. Job types are free strings on the server, so a type this spec version does\nnot describe lands in `OtherJobResponse`, where both fields stay free-form. No branch closes itself to\nextra properties, and new job types can appear without a spec change.\n\nThe described types sit together under `DescribedJobResponse`, which has a discriminator on `type`. Any other\n`type` is an `OtherJobResponse`. That branch sits outside the discriminator because a mapping can only name\nspecific values, and a branch with no mapping entry would only match a `type` equal to its schema name.\n\n`input` and `result` are returned exactly as they were stored when the job was enqueued or completed. The\nserver never reshapes them, so a field a job type gained after a row was written is absent from that row\nrather than null. The typed branches describe what the current code writes; fields that have not always\nbeen written are left out of each branch's `required` list.\n\n`result` is `null` in every branch until the job reaches a terminal state.","required":["type","input","result","job_id","company_id","data_plane_id","request_source","state","operator_type","tags","execution_cluster","idempotency_key","created_at","updated_at","attempted_at","attempt_version"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique identifier for the job.","isRequired":true,"uniqueKey":"oneOf.14.job_id","typeLabel":"string\u003cuuid>"},"company_id":{"description":"The company the job belongs to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.14.company_id","typeLabel":"integer\u003cint64>"},"data_plane_id":{"description":"The data plane the job runs on. Jobs on the Narrative data plane carry its id,\n`f79cbdae-4848-47ca-95e8-69588364d185`.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.14.data_plane_id","typeLabel":"string\u003cuuid>"},"request_source":{"oneOf":[{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","company_id","user_id"],"example":{"type":"api_user","company_id":1,"user_id":1248},"properties":{"type":{"type":"string","enum":["api_user"],"isRequired":true,"uniqueKey":"oneOf.14.request_source.oneOf.0.type","typeLabel":"enum\u003cstring>"},"company_id":{"description":"The company the request was made for.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.14.request_source.oneOf.0.company_id","typeLabel":"integer\u003cint64>"},"user_id":{"description":"The user who made the request.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.14.request_source.oneOf.0.user_id","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.14.request_source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","name"],"example":{"type":"process","name":"narrative-control-plane"},"properties":{"type":{"type":"string","enum":["process"],"isRequired":true,"uniqueKey":"oneOf.14.request_source.oneOf.1.type","typeLabel":"enum\u003cstring>"},"name":{"description":"The process that enqueued the job, e.g. `narrative-control-plane` or `health-check`.","type":"string","isRequired":true,"uniqueKey":"oneOf.14.request_source.oneOf.1.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.14.request_source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.14.request_source","typeLabel":"object"},"state":{"description":"Where a job is in its lifecycle.\n\n- `pending` — enqueued and waiting to be picked up.\n- `scheduled` — claimed by an executor but not yet started.\n- `running` — being executed.\n- `pending_cancellation` — cancellation has been requested and the data plane has yet to stop the work.\n- `completed`, `cancelled`, `failed` — terminal states.","type":"string","enum":["pending","scheduled","running","pending_cancellation","completed","cancelled","failed"],"isRequired":true,"uniqueKey":"oneOf.14.state","typeLabel":"enum\u003cstring>"},"operator_type":{"description":"Which operator runs the job, e.g. `materialized-view-refresh` or `datasets_execute_select`. Finer-grained\nthan `type`: several job types can share one operator, and where no such mapping exists the two are equal.","type":"string","isRequired":true,"uniqueKey":"oneOf.14.operator_type","typeLabel":"string"},"tags":{"description":"Free-form labels attached to the job.","type":"array","items":{"type":"string","minLength":1,"maxLength":255,"uniqueKey":"oneOf.14.tags.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.14.tags","typeLabel":"string[]"},"execution_cluster":{"description":"The type of the execution cluster to run the job on.\n\n- `dedicated` runs job on a dedicated cluster.\n- `shared` runs job on a shared cluster.","type":"string","enum":["dedicated","shared"],"isRequired":true,"uniqueKey":"oneOf.14.execution_cluster","typeLabel":"enum\u003cstring>"},"idempotency_key":{"description":"The unique key the job was enqueued under.","type":"string","minLength":1,"maxLength":255,"isRequired":true,"uniqueKey":"oneOf.14.idempotency_key","typeLabel":"string"},"created_at":{"description":"The timestamp representing when the job was created.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.14.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"description":"The timestamp representing when the job was updated.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.14.updated_at","typeLabel":"string\u003cdate-time>"},"attempted_at":{"description":"When the job's current attempt started. A job can be retried; each retry is a new attempt, so this advances to the latest one, while `created_at` stays at the original submission.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.14.attempted_at","typeLabel":"string\u003cdate-time>"},"attempt_version":{"description":"Which attempt this is: 1 for the first, increasing by one on each retry.","type":"integer","isRequired":true,"uniqueKey":"oneOf.14.attempt_version","typeLabel":"integer"},"type":{"type":"string","enum":["model_training_run"],"isRequired":true,"uniqueKey":"oneOf.14.type","typeLabel":"enum\u003cstring>"},"input":{"type":"object","required":["company_id","dataset_id","instance_type","base_model_id","base_model_repository","base_model_repo_id","trained_model_narrative_repository_model_id","trained_model_narrative_repo_id","trained_model_version","trained_model"],"properties":{"company_id":{"description":"The company the trained model belongs to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.14.input.company_id","typeLabel":"integer\u003cint64>"},"dataset_id":{"description":"The dataset the model trains on.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.14.input.dataset_id","typeLabel":"integer\u003cint64>"},"instance_type":{"description":"The instance the training runs on, e.g. `ml.g5.12xlarge`.","type":"string","isRequired":true,"uniqueKey":"oneOf.14.input.instance_type","typeLabel":"string"},"base_model_id":{"description":"The base model being fine-tuned.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.14.input.base_model_id","typeLabel":"integer\u003cint64>"},"base_model_repository":{"oneOf":[{"type":"object","description":"Where a model lives. Discriminated by `type`.","required":["type","organization"],"properties":{"type":{"type":"string","enum":["hugging_face"],"isRequired":true,"uniqueKey":"oneOf.14.input.base_model_repository.oneOf.0.type","typeLabel":"enum\u003cstring>"},"organization":{"description":"The Hugging Face organization the model sits under.","type":"string","isRequired":true,"uniqueKey":"oneOf.14.input.base_model_repository.oneOf.0.organization","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.14.input.base_model_repository.oneOf.0","typeLabel":"object"},{"type":"object","description":"Where a model lives. Discriminated by `type`.","required":["type","company_id"],"properties":{"type":{"type":"string","enum":["narrative"],"isRequired":true,"uniqueKey":"oneOf.14.input.base_model_repository.oneOf.1.type","typeLabel":"enum\u003cstring>"},"company_id":{"description":"The company whose Narrative repository holds the model.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.14.input.base_model_repository.oneOf.1.company_id","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.14.input.base_model_repository.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.14.input.base_model_repository","typeLabel":"object"},"base_model_repo_id":{"description":"The base model's id within its repository, e.g. `meta-llama/Llama-3.1-8B`.","type":"string","isRequired":true,"uniqueKey":"oneOf.14.input.base_model_repo_id","typeLabel":"string"},"trained_model_narrative_repository_model_id":{"description":"The id the trained model is published under in Narrative's repository.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.14.input.trained_model_narrative_repository_model_id","typeLabel":"string\u003cuuid>"},"trained_model_narrative_repo_id":{"description":"The trained model's full repository path, `\u003ccompany>/\u003cmodel>/\u003cversion>`.","type":"string","isRequired":true,"uniqueKey":"oneOf.14.input.trained_model_narrative_repo_id","typeLabel":"string"},"trained_model_version":{"description":"The version this run produces.","type":"integer","isRequired":true,"uniqueKey":"oneOf.14.input.trained_model_version","typeLabel":"integer"},"trained_model":{"description":"What the run publishes.","type":"object","required":["name","collaborators"],"properties":{"name":{"type":"string","isRequired":true,"uniqueKey":"oneOf.14.input.trained_model.name","typeLabel":"string"},"collaborators":{"description":"Who may view, train on, and deploy the trained model.","type":"object","required":["view","train","deploy"],"properties":{"view":{"description":"One access rule. `all` and `none` stand alone; `inclusion` and `exclusion` list the companies they apply\nto. `anonymous` means no authentication is needed at all.","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["anonymous","all","none","inclusion","exclusion"],"isRequired":true,"uniqueKey":"oneOf.14.input.trained_model.collaborators.view.type","typeLabel":"enum\u003cstring>"},"company_ids":{"description":"The companies the rule names. Present only for `inclusion` and `exclusion`, and never empty.","type":"array","minItems":1,"items":{"type":"integer","format":"int64","uniqueKey":"oneOf.14.input.trained_model.collaborators.view.company_ids.items.[INDEX]","typeLabel":"integer\u003cint64>"},"uniqueKey":"oneOf.14.input.trained_model.collaborators.view.company_ids","typeLabel":"integer\u003cint64>[]"}},"examples":[{"type":"none"},{"type":"inclusion","company_ids":[1,2]}],"isRequired":true,"uniqueKey":"oneOf.14.input.trained_model.collaborators.view","typeLabel":"object"},"train":{"description":"One access rule. `all` and `none` stand alone; `inclusion` and `exclusion` list the companies they apply\nto.","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["all","none","inclusion","exclusion"],"isRequired":true,"uniqueKey":"oneOf.14.input.trained_model.collaborators.train.type","typeLabel":"enum\u003cstring>"},"company_ids":{"description":"The companies the rule names. Present only for `inclusion` and `exclusion`, and never empty.","type":"array","minItems":1,"items":{"type":"integer","format":"int64","uniqueKey":"oneOf.14.input.trained_model.collaborators.train.company_ids.items.[INDEX]","typeLabel":"integer\u003cint64>"},"uniqueKey":"oneOf.14.input.trained_model.collaborators.train.company_ids","typeLabel":"integer\u003cint64>[]"}},"examples":[{"type":"none"},{"type":"inclusion","company_ids":[1,2]}],"isRequired":true,"uniqueKey":"oneOf.14.input.trained_model.collaborators.train","typeLabel":"object"},"deploy":{"description":"One access rule. `all` and `none` stand alone; `inclusion` and `exclusion` list the companies they apply\nto.","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["all","none","inclusion","exclusion"],"isRequired":true,"uniqueKey":"oneOf.14.input.trained_model.collaborators.deploy.type","typeLabel":"enum\u003cstring>"},"company_ids":{"description":"The companies the rule names. Present only for `inclusion` and `exclusion`, and never empty.","type":"array","minItems":1,"items":{"type":"integer","format":"int64","uniqueKey":"oneOf.14.input.trained_model.collaborators.deploy.company_ids.items.[INDEX]","typeLabel":"integer\u003cint64>"},"uniqueKey":"oneOf.14.input.trained_model.collaborators.deploy.company_ids","typeLabel":"integer\u003cint64>[]"}},"examples":[{"type":"none"},{"type":"inclusion","company_ids":[1,2]}],"isRequired":true,"uniqueKey":"oneOf.14.input.trained_model.collaborators.deploy","typeLabel":"object"}},"isRequired":true,"uniqueKey":"oneOf.14.input.trained_model.collaborators","typeLabel":"object"},"description":{"oneOf":[{"type":"string","uniqueKey":"oneOf.14.input.trained_model.description.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"oneOf.14.input.trained_model.description.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.14.input.trained_model.description","typeLabel":"string | null"},"tags":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"oneOf.14.input.trained_model.tags.oneOf.0.items.[INDEX]","typeLabel":"string"},"uniqueKey":"oneOf.14.input.trained_model.tags.oneOf.0","typeLabel":"string[]"},{"type":"null","items":{"type":"string"},"uniqueKey":"oneOf.14.input.trained_model.tags.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.14.input.trained_model.tags","typeLabel":"string[] | null"},"license_id":{"oneOf":[{"type":"string","uniqueKey":"oneOf.14.input.trained_model.license_id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"oneOf.14.input.trained_model.license_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.14.input.trained_model.license_id","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"oneOf.14.input.trained_model","typeLabel":"object"},"connections":{"oneOf":[{"description":"Destinations the trained model is delivered to once training finishes. Null when there are none;\nabsent on jobs enqueued before the field existed.","type":"array","items":{"description":"One destination the trained model is delivered to.","type":"object","required":["app_id","profile_id"],"properties":{"app_id":{"description":"The app being delivered to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.14.input.connections.oneOf.0.items.[INDEX].app_id","typeLabel":"integer\u003cint64>"},"profile_id":{"description":"The destination profile within the app.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.14.input.connections.oneOf.0.items.[INDEX].profile_id","typeLabel":"string\u003cuuid>"},"quick_settings":{"oneOf":[{"description":"Connector settings for the destination. Null when the connection needs none.","type":"object","uniqueKey":"oneOf.14.input.connections.oneOf.0.items.[INDEX].quick_settings.oneOf.0","typeLabel":"object"},{"description":"Connector settings for the destination. Null when the connection needs none.","type":"null","uniqueKey":"oneOf.14.input.connections.oneOf.0.items.[INDEX].quick_settings.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.14.input.connections.oneOf.0.items.[INDEX].quick_settings","typeLabel":"object | null"}},"example":{"app_id":142,"profile_id":"9c1f0a2e-3d4b-4c5a-8e6f-7a8b9c0d1e2f","quick_settings":null},"uniqueKey":"oneOf.14.input.connections.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"oneOf.14.input.connections.oneOf.0","typeLabel":"object[]"},{"description":"Destinations the trained model is delivered to once training finishes. Null when there are none;\nabsent on jobs enqueued before the field existed.","type":"null","items":{"description":"One destination the trained model is delivered to.","type":"object","required":["app_id","profile_id"],"properties":{"app_id":{"description":"The app being delivered to.","type":"integer","format":"int64"},"profile_id":{"description":"The destination profile within the app.","type":"string","format":"uuid"},"quick_settings":{"oneOf":[{"description":"Connector settings for the destination. Null when the connection needs none.","type":"object"},{"description":"Connector settings for the destination. Null when the connection needs none.","type":"null"}]}},"example":{"app_id":142,"profile_id":"9c1f0a2e-3d4b-4c5a-8e6f-7a8b9c0d1e2f","quick_settings":null}},"uniqueKey":"oneOf.14.input.connections.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.14.input.connections","typeLabel":"object[] | null"},"custom_axolotl_config_override":{"oneOf":[{"description":"Overrides merged into the generated Axolotl training config. Null to use the defaults.","type":"object","uniqueKey":"oneOf.14.input.custom_axolotl_config_override.oneOf.0","typeLabel":"object"},{"description":"Overrides merged into the generated Axolotl training config. Null to use the defaults.","type":"null","uniqueKey":"oneOf.14.input.custom_axolotl_config_override.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.14.input.custom_axolotl_config_override","typeLabel":"object | null"}},"example":{"company_id":1,"connections":null,"custom_axolotl_config_override":null,"dataset_id":10736,"instance_type":"ml.g5.12xlarge","base_model_id":57,"base_model_repository":{"type":"hugging_face","organization":"meta-llama"},"base_model_repo_id":"meta-llama/Llama-3.1-8B","trained_model_narrative_repository_model_id":"7d2f1b3c-5e6a-4f8b-9c0d-1e2f3a4b5c6d","trained_model_narrative_repo_id":"1/7d2f1b3c-5e6a-4f8b-9c0d-1e2f3a4b5c6d/1","trained_model_version":1,"trained_model":{"name":"churn-predictor","collaborators":{"view":{"type":"none"},"train":{"type":"none"},"deploy":{"type":"none"}},"description":null,"tags":null,"license_id":null}},"isRequired":true,"uniqueKey":"oneOf.14.input","typeLabel":"object"},"result":{"description":"A job result the spec does not describe a shape for. The server stores `result` as arbitrary JSON and does\nnot constrain it, so this is any JSON value. Null until the job reaches a terminal state.","examples":[{"row_count":100},{}],"isRequired":true,"uniqueKey":"oneOf.14.result","typeLabel":"any"},"compute_pool_id":{"oneOf":[{"description":"The compute pool associated with the job, if any.","type":"string","format":"uuid","uniqueKey":"oneOf.14.compute_pool_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The compute pool associated with the job, if any.","type":"null","format":"uuid","uniqueKey":"oneOf.14.compute_pool_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.14.compute_pool_id","typeLabel":"string\u003cuuid> | null"},"executor":{"oneOf":[{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"string","uniqueKey":"oneOf.14.executor.oneOf.0","typeLabel":"string"},{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"null","uniqueKey":"oneOf.14.executor.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.14.executor","typeLabel":"string | null"},"dequeued_at":{"oneOf":[{"description":"When the job was taken off the queue. Null while it is still queued.","type":"string","format":"date-time","uniqueKey":"oneOf.14.dequeued_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"When the job was taken off the queue. Null while it is still queued.","type":"null","format":"date-time","uniqueKey":"oneOf.14.dequeued_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.14.dequeued_at","typeLabel":"string\u003cdate-time> | null"},"ended_at":{"oneOf":[{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"string","format":"date-time","uniqueKey":"oneOf.14.ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"null","format":"date-time","uniqueKey":"oneOf.14.ended_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.14.ended_at","typeLabel":"string\u003cdate-time> | null"},"workflow_id":{"oneOf":[{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"string","format":"uuid","uniqueKey":"oneOf.14.workflow_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"null","format":"uuid","uniqueKey":"oneOf.14.workflow_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.14.workflow_id","typeLabel":"string\u003cuuid> | null"},"workflow_run_id":{"oneOf":[{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"string","format":"uuid","uniqueKey":"oneOf.14.workflow_run_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"null","format":"uuid","uniqueKey":"oneOf.14.workflow_run_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.14.workflow_run_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"oneOf.14","typeLabel":"object"},{"type":"object","description":"A job. Every job carries the same envelope of fields — see `JobBase` — but `input` and `result` hold\njob-type-specific payloads, so the response is a union over `type`: pick the branch whose `type` matches\nand you get the typed `input` and `result` for that kind of job.\n\nThe union is open on purpose. Job types are free strings on the server, so a type this spec version does\nnot describe lands in `OtherJobResponse`, where both fields stay free-form. No branch closes itself to\nextra properties, and new job types can appear without a spec change.\n\nThe described types sit together under `DescribedJobResponse`, which has a discriminator on `type`. Any other\n`type` is an `OtherJobResponse`. That branch sits outside the discriminator because a mapping can only name\nspecific values, and a branch with no mapping entry would only match a `type` equal to its schema name.\n\n`input` and `result` are returned exactly as they were stored when the job was enqueued or completed. The\nserver never reshapes them, so a field a job type gained after a row was written is absent from that row\nrather than null. The typed branches describe what the current code writes; fields that have not always\nbeen written are left out of each branch's `required` list.\n\n`result` is `null` in every branch until the job reaches a terminal state.","required":["type","input","result","job_id","company_id","data_plane_id","request_source","state","operator_type","tags","execution_cluster","idempotency_key","created_at","updated_at","attempted_at","attempt_version"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique identifier for the job.","isRequired":true,"uniqueKey":"oneOf.15.job_id","typeLabel":"string\u003cuuid>"},"company_id":{"description":"The company the job belongs to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.15.company_id","typeLabel":"integer\u003cint64>"},"data_plane_id":{"description":"The data plane the job runs on. Jobs on the Narrative data plane carry its id,\n`f79cbdae-4848-47ca-95e8-69588364d185`.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.15.data_plane_id","typeLabel":"string\u003cuuid>"},"request_source":{"oneOf":[{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","company_id","user_id"],"example":{"type":"api_user","company_id":1,"user_id":1248},"properties":{"type":{"type":"string","enum":["api_user"],"isRequired":true,"uniqueKey":"oneOf.15.request_source.oneOf.0.type","typeLabel":"enum\u003cstring>"},"company_id":{"description":"The company the request was made for.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.15.request_source.oneOf.0.company_id","typeLabel":"integer\u003cint64>"},"user_id":{"description":"The user who made the request.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.15.request_source.oneOf.0.user_id","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.15.request_source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","name"],"example":{"type":"process","name":"narrative-control-plane"},"properties":{"type":{"type":"string","enum":["process"],"isRequired":true,"uniqueKey":"oneOf.15.request_source.oneOf.1.type","typeLabel":"enum\u003cstring>"},"name":{"description":"The process that enqueued the job, e.g. `narrative-control-plane` or `health-check`.","type":"string","isRequired":true,"uniqueKey":"oneOf.15.request_source.oneOf.1.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.15.request_source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.15.request_source","typeLabel":"object"},"state":{"description":"Where a job is in its lifecycle.\n\n- `pending` — enqueued and waiting to be picked up.\n- `scheduled` — claimed by an executor but not yet started.\n- `running` — being executed.\n- `pending_cancellation` — cancellation has been requested and the data plane has yet to stop the work.\n- `completed`, `cancelled`, `failed` — terminal states.","type":"string","enum":["pending","scheduled","running","pending_cancellation","completed","cancelled","failed"],"isRequired":true,"uniqueKey":"oneOf.15.state","typeLabel":"enum\u003cstring>"},"operator_type":{"description":"Which operator runs the job, e.g. `materialized-view-refresh` or `datasets_execute_select`. Finer-grained\nthan `type`: several job types can share one operator, and where no such mapping exists the two are equal.","type":"string","isRequired":true,"uniqueKey":"oneOf.15.operator_type","typeLabel":"string"},"tags":{"description":"Free-form labels attached to the job.","type":"array","items":{"type":"string","minLength":1,"maxLength":255,"uniqueKey":"oneOf.15.tags.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.15.tags","typeLabel":"string[]"},"execution_cluster":{"description":"The type of the execution cluster to run the job on.\n\n- `dedicated` runs job on a dedicated cluster.\n- `shared` runs job on a shared cluster.","type":"string","enum":["dedicated","shared"],"isRequired":true,"uniqueKey":"oneOf.15.execution_cluster","typeLabel":"enum\u003cstring>"},"idempotency_key":{"description":"The unique key the job was enqueued under.","type":"string","minLength":1,"maxLength":255,"isRequired":true,"uniqueKey":"oneOf.15.idempotency_key","typeLabel":"string"},"created_at":{"description":"The timestamp representing when the job was created.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.15.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"description":"The timestamp representing when the job was updated.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.15.updated_at","typeLabel":"string\u003cdate-time>"},"attempted_at":{"description":"When the job's current attempt started. A job can be retried; each retry is a new attempt, so this advances to the latest one, while `created_at` stays at the original submission.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.15.attempted_at","typeLabel":"string\u003cdate-time>"},"attempt_version":{"description":"Which attempt this is: 1 for the first, increasing by one on each retry.","type":"integer","isRequired":true,"uniqueKey":"oneOf.15.attempt_version","typeLabel":"integer"},"type":{"type":"string","enum":["models_deliver_model"],"isRequired":true,"uniqueKey":"oneOf.15.type","typeLabel":"enum\u003cstring>"},"input":{"type":"object","required":["company_id","app_id","connection_id","profile_id","model_id","model_name","model_version"],"properties":{"company_id":{"description":"The company that owns the model.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.15.input.company_id","typeLabel":"integer\u003cint64>"},"app_id":{"description":"The app being delivered to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.15.input.app_id","typeLabel":"integer\u003cint64>"},"connection_id":{"description":"The connection being delivered to.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.15.input.connection_id","typeLabel":"string\u003cuuid>"},"profile_id":{"description":"The destination profile within the app.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.15.input.profile_id","typeLabel":"string\u003cuuid>"},"model_id":{"description":"The model's id in Narrative's repository.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.15.input.model_id","typeLabel":"string\u003cuuid>"},"model_name":{"type":"string","isRequired":true,"uniqueKey":"oneOf.15.input.model_name","typeLabel":"string"},"model_version":{"type":"integer","isRequired":true,"uniqueKey":"oneOf.15.input.model_version","typeLabel":"integer"},"quick_settings":{"oneOf":[{"description":"Connector settings for the destination. Null when the connection needs none.","type":"object","uniqueKey":"oneOf.15.input.quick_settings.oneOf.0","typeLabel":"object"},{"description":"Connector settings for the destination. Null when the connection needs none.","type":"null","uniqueKey":"oneOf.15.input.quick_settings.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.15.input.quick_settings","typeLabel":"object | null"}},"example":{"company_id":1,"app_id":142,"connection_id":"0f1e2d3c-4b5a-4968-9788-6a5b4c3d2e1f","profile_id":"9c1f0a2e-3d4b-4c5a-8e6f-7a8b9c0d1e2f","model_id":"7d2f1b3c-5e6a-4f8b-9c0d-1e2f3a4b5c6d","model_name":"churn-predictor","model_version":1,"quick_settings":null},"isRequired":true,"uniqueKey":"oneOf.15.input","typeLabel":"object"},"result":{"description":"A job result the spec does not describe a shape for. The server stores `result` as arbitrary JSON and does\nnot constrain it, so this is any JSON value. Null until the job reaches a terminal state.","examples":[{"row_count":100},{}],"isRequired":true,"uniqueKey":"oneOf.15.result","typeLabel":"any"},"compute_pool_id":{"oneOf":[{"description":"The compute pool associated with the job, if any.","type":"string","format":"uuid","uniqueKey":"oneOf.15.compute_pool_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The compute pool associated with the job, if any.","type":"null","format":"uuid","uniqueKey":"oneOf.15.compute_pool_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.15.compute_pool_id","typeLabel":"string\u003cuuid> | null"},"executor":{"oneOf":[{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"string","uniqueKey":"oneOf.15.executor.oneOf.0","typeLabel":"string"},{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"null","uniqueKey":"oneOf.15.executor.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.15.executor","typeLabel":"string | null"},"dequeued_at":{"oneOf":[{"description":"When the job was taken off the queue. Null while it is still queued.","type":"string","format":"date-time","uniqueKey":"oneOf.15.dequeued_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"When the job was taken off the queue. Null while it is still queued.","type":"null","format":"date-time","uniqueKey":"oneOf.15.dequeued_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.15.dequeued_at","typeLabel":"string\u003cdate-time> | null"},"ended_at":{"oneOf":[{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"string","format":"date-time","uniqueKey":"oneOf.15.ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"null","format":"date-time","uniqueKey":"oneOf.15.ended_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.15.ended_at","typeLabel":"string\u003cdate-time> | null"},"workflow_id":{"oneOf":[{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"string","format":"uuid","uniqueKey":"oneOf.15.workflow_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"null","format":"uuid","uniqueKey":"oneOf.15.workflow_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.15.workflow_id","typeLabel":"string\u003cuuid> | null"},"workflow_run_id":{"oneOf":[{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"string","format":"uuid","uniqueKey":"oneOf.15.workflow_run_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"null","format":"uuid","uniqueKey":"oneOf.15.workflow_run_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.15.workflow_run_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"oneOf.15","typeLabel":"object"},{"type":"object","description":"A job. Every job carries the same envelope of fields — see `JobBase` — but `input` and `result` hold\njob-type-specific payloads, so the response is a union over `type`: pick the branch whose `type` matches\nand you get the typed `input` and `result` for that kind of job.\n\nThe union is open on purpose. Job types are free strings on the server, so a type this spec version does\nnot describe lands in `OtherJobResponse`, where both fields stay free-form. No branch closes itself to\nextra properties, and new job types can appear without a spec change.\n\nThe described types sit together under `DescribedJobResponse`, which has a discriminator on `type`. Any other\n`type` is an `OtherJobResponse`. That branch sits outside the discriminator because a mapping can only name\nspecific values, and a branch with no mapping entry would only match a `type` equal to its schema name.\n\n`input` and `result` are returned exactly as they were stored when the job was enqueued or completed. The\nserver never reshapes them, so a field a job type gained after a row was written is absent from that row\nrather than null. The typed branches describe what the current code writes; fields that have not always\nbeen written are left out of each branch's `required` list.\n\n`result` is `null` in every branch until the job reaches a terminal state.","required":["type","input","result","job_id","company_id","data_plane_id","request_source","state","operator_type","tags","execution_cluster","idempotency_key","created_at","updated_at","attempted_at","attempt_version"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique identifier for the job.","isRequired":true,"uniqueKey":"oneOf.16.job_id","typeLabel":"string\u003cuuid>"},"company_id":{"description":"The company the job belongs to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.16.company_id","typeLabel":"integer\u003cint64>"},"data_plane_id":{"description":"The data plane the job runs on. Jobs on the Narrative data plane carry its id,\n`f79cbdae-4848-47ca-95e8-69588364d185`.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.16.data_plane_id","typeLabel":"string\u003cuuid>"},"request_source":{"oneOf":[{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","company_id","user_id"],"example":{"type":"api_user","company_id":1,"user_id":1248},"properties":{"type":{"type":"string","enum":["api_user"],"isRequired":true,"uniqueKey":"oneOf.16.request_source.oneOf.0.type","typeLabel":"enum\u003cstring>"},"company_id":{"description":"The company the request was made for.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.16.request_source.oneOf.0.company_id","typeLabel":"integer\u003cint64>"},"user_id":{"description":"The user who made the request.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.16.request_source.oneOf.0.user_id","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.16.request_source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","name"],"example":{"type":"process","name":"narrative-control-plane"},"properties":{"type":{"type":"string","enum":["process"],"isRequired":true,"uniqueKey":"oneOf.16.request_source.oneOf.1.type","typeLabel":"enum\u003cstring>"},"name":{"description":"The process that enqueued the job, e.g. `narrative-control-plane` or `health-check`.","type":"string","isRequired":true,"uniqueKey":"oneOf.16.request_source.oneOf.1.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.16.request_source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.16.request_source","typeLabel":"object"},"state":{"description":"Where a job is in its lifecycle.\n\n- `pending` — enqueued and waiting to be picked up.\n- `scheduled` — claimed by an executor but not yet started.\n- `running` — being executed.\n- `pending_cancellation` — cancellation has been requested and the data plane has yet to stop the work.\n- `completed`, `cancelled`, `failed` — terminal states.","type":"string","enum":["pending","scheduled","running","pending_cancellation","completed","cancelled","failed"],"isRequired":true,"uniqueKey":"oneOf.16.state","typeLabel":"enum\u003cstring>"},"operator_type":{"description":"Which operator runs the job, e.g. `materialized-view-refresh` or `datasets_execute_select`. Finer-grained\nthan `type`: several job types can share one operator, and where no such mapping exists the two are equal.","type":"string","isRequired":true,"uniqueKey":"oneOf.16.operator_type","typeLabel":"string"},"tags":{"description":"Free-form labels attached to the job.","type":"array","items":{"type":"string","minLength":1,"maxLength":255,"uniqueKey":"oneOf.16.tags.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.16.tags","typeLabel":"string[]"},"execution_cluster":{"description":"The type of the execution cluster to run the job on.\n\n- `dedicated` runs job on a dedicated cluster.\n- `shared` runs job on a shared cluster.","type":"string","enum":["dedicated","shared"],"isRequired":true,"uniqueKey":"oneOf.16.execution_cluster","typeLabel":"enum\u003cstring>"},"idempotency_key":{"description":"The unique key the job was enqueued under.","type":"string","minLength":1,"maxLength":255,"isRequired":true,"uniqueKey":"oneOf.16.idempotency_key","typeLabel":"string"},"created_at":{"description":"The timestamp representing when the job was created.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.16.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"description":"The timestamp representing when the job was updated.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.16.updated_at","typeLabel":"string\u003cdate-time>"},"attempted_at":{"description":"When the job's current attempt started. A job can be retried; each retry is a new attempt, so this advances to the latest one, while `created_at` stays at the original submission.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.16.attempted_at","typeLabel":"string\u003cdate-time>"},"attempt_version":{"description":"Which attempt this is: 1 for the first, increasing by one on each retry.","type":"integer","isRequired":true,"uniqueKey":"oneOf.16.attempt_version","typeLabel":"integer"},"type":{"type":"string","enum":["models_train_classifier"],"isRequired":true,"uniqueKey":"oneOf.16.type","typeLabel":"enum\u003cstring>"},"input":{"description":"A job input the spec does not describe a shape for. The server stores `input` as arbitrary JSON and does\nnot constrain it, so this is any JSON value.","examples":[{"dataset_id":10736,"compiled_sql":"SELECT `t`.`age` FROM narrative.datasets.ds_10736 `t`"},{}],"isRequired":true,"uniqueKey":"oneOf.16.input","typeLabel":"any"},"result":{"description":"A job result the spec does not describe a shape for. The server stores `result` as arbitrary JSON and does\nnot constrain it, so this is any JSON value. Null until the job reaches a terminal state.","examples":[{"row_count":100},{}],"isRequired":true,"uniqueKey":"oneOf.16.result","typeLabel":"any"},"compute_pool_id":{"oneOf":[{"description":"The compute pool associated with the job, if any.","type":"string","format":"uuid","uniqueKey":"oneOf.16.compute_pool_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The compute pool associated with the job, if any.","type":"null","format":"uuid","uniqueKey":"oneOf.16.compute_pool_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.16.compute_pool_id","typeLabel":"string\u003cuuid> | null"},"executor":{"oneOf":[{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"string","uniqueKey":"oneOf.16.executor.oneOf.0","typeLabel":"string"},{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"null","uniqueKey":"oneOf.16.executor.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.16.executor","typeLabel":"string | null"},"dequeued_at":{"oneOf":[{"description":"When the job was taken off the queue. Null while it is still queued.","type":"string","format":"date-time","uniqueKey":"oneOf.16.dequeued_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"When the job was taken off the queue. Null while it is still queued.","type":"null","format":"date-time","uniqueKey":"oneOf.16.dequeued_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.16.dequeued_at","typeLabel":"string\u003cdate-time> | null"},"ended_at":{"oneOf":[{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"string","format":"date-time","uniqueKey":"oneOf.16.ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"null","format":"date-time","uniqueKey":"oneOf.16.ended_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.16.ended_at","typeLabel":"string\u003cdate-time> | null"},"workflow_id":{"oneOf":[{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"string","format":"uuid","uniqueKey":"oneOf.16.workflow_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"null","format":"uuid","uniqueKey":"oneOf.16.workflow_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.16.workflow_id","typeLabel":"string\u003cuuid> | null"},"workflow_run_id":{"oneOf":[{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"string","format":"uuid","uniqueKey":"oneOf.16.workflow_run_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"null","format":"uuid","uniqueKey":"oneOf.16.workflow_run_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.16.workflow_run_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"oneOf.16","typeLabel":"object"},{"type":"object","description":"A job. Every job carries the same envelope of fields — see `JobBase` — but `input` and `result` hold\njob-type-specific payloads, so the response is a union over `type`: pick the branch whose `type` matches\nand you get the typed `input` and `result` for that kind of job.\n\nThe union is open on purpose. Job types are free strings on the server, so a type this spec version does\nnot describe lands in `OtherJobResponse`, where both fields stay free-form. No branch closes itself to\nextra properties, and new job types can appear without a spec change.\n\nThe described types sit together under `DescribedJobResponse`, which has a discriminator on `type`. Any other\n`type` is an `OtherJobResponse`. That branch sits outside the discriminator because a mapping can only name\nspecific values, and a branch with no mapping entry would only match a `type` equal to its schema name.\n\n`input` and `result` are returned exactly as they were stored when the job was enqueued or completed. The\nserver never reshapes them, so a field a job type gained after a row was written is absent from that row\nrather than null. The typed branches describe what the current code writes; fields that have not always\nbeen written are left out of each branch's `required` list.\n\n`result` is `null` in every branch until the job reaches a terminal state.","required":["type","input","result","job_id","company_id","data_plane_id","request_source","state","operator_type","tags","execution_cluster","idempotency_key","created_at","updated_at","attempted_at","attempt_version"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique identifier for the job.","isRequired":true,"uniqueKey":"oneOf.17.job_id","typeLabel":"string\u003cuuid>"},"company_id":{"description":"The company the job belongs to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.17.company_id","typeLabel":"integer\u003cint64>"},"data_plane_id":{"description":"The data plane the job runs on. Jobs on the Narrative data plane carry its id,\n`f79cbdae-4848-47ca-95e8-69588364d185`.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.17.data_plane_id","typeLabel":"string\u003cuuid>"},"request_source":{"oneOf":[{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","company_id","user_id"],"example":{"type":"api_user","company_id":1,"user_id":1248},"properties":{"type":{"type":"string","enum":["api_user"],"isRequired":true,"uniqueKey":"oneOf.17.request_source.oneOf.0.type","typeLabel":"enum\u003cstring>"},"company_id":{"description":"The company the request was made for.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.17.request_source.oneOf.0.company_id","typeLabel":"integer\u003cint64>"},"user_id":{"description":"The user who made the request.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.17.request_source.oneOf.0.user_id","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.17.request_source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","name"],"example":{"type":"process","name":"narrative-control-plane"},"properties":{"type":{"type":"string","enum":["process"],"isRequired":true,"uniqueKey":"oneOf.17.request_source.oneOf.1.type","typeLabel":"enum\u003cstring>"},"name":{"description":"The process that enqueued the job, e.g. `narrative-control-plane` or `health-check`.","type":"string","isRequired":true,"uniqueKey":"oneOf.17.request_source.oneOf.1.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.17.request_source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.17.request_source","typeLabel":"object"},"state":{"description":"Where a job is in its lifecycle.\n\n- `pending` — enqueued and waiting to be picked up.\n- `scheduled` — claimed by an executor but not yet started.\n- `running` — being executed.\n- `pending_cancellation` — cancellation has been requested and the data plane has yet to stop the work.\n- `completed`, `cancelled`, `failed` — terminal states.","type":"string","enum":["pending","scheduled","running","pending_cancellation","completed","cancelled","failed"],"isRequired":true,"uniqueKey":"oneOf.17.state","typeLabel":"enum\u003cstring>"},"operator_type":{"description":"Which operator runs the job, e.g. `materialized-view-refresh` or `datasets_execute_select`. Finer-grained\nthan `type`: several job types can share one operator, and where no such mapping exists the two are equal.","type":"string","isRequired":true,"uniqueKey":"oneOf.17.operator_type","typeLabel":"string"},"tags":{"description":"Free-form labels attached to the job.","type":"array","items":{"type":"string","minLength":1,"maxLength":255,"uniqueKey":"oneOf.17.tags.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.17.tags","typeLabel":"string[]"},"execution_cluster":{"description":"The type of the execution cluster to run the job on.\n\n- `dedicated` runs job on a dedicated cluster.\n- `shared` runs job on a shared cluster.","type":"string","enum":["dedicated","shared"],"isRequired":true,"uniqueKey":"oneOf.17.execution_cluster","typeLabel":"enum\u003cstring>"},"idempotency_key":{"description":"The unique key the job was enqueued under.","type":"string","minLength":1,"maxLength":255,"isRequired":true,"uniqueKey":"oneOf.17.idempotency_key","typeLabel":"string"},"created_at":{"description":"The timestamp representing when the job was created.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.17.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"description":"The timestamp representing when the job was updated.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.17.updated_at","typeLabel":"string\u003cdate-time>"},"attempted_at":{"description":"When the job's current attempt started. A job can be retried; each retry is a new attempt, so this advances to the latest one, while `created_at` stays at the original submission.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.17.attempted_at","typeLabel":"string\u003cdate-time>"},"attempt_version":{"description":"Which attempt this is: 1 for the first, increasing by one on each retry.","type":"integer","isRequired":true,"uniqueKey":"oneOf.17.attempt_version","typeLabel":"integer"},"type":{"type":"string","enum":["health_check"],"isRequired":true,"uniqueKey":"oneOf.17.type","typeLabel":"enum\u003cstring>"},"input":{"description":"Empty. The job carries no parameters — the data plane it targets is the job's own `data_plane_id`.","type":"object","example":{},"isRequired":true,"uniqueKey":"oneOf.17.input","typeLabel":"object"},"result":{"description":"A job result the spec does not describe a shape for. The server stores `result` as arbitrary JSON and does\nnot constrain it, so this is any JSON value. Null until the job reaches a terminal state.","examples":[{"row_count":100},{}],"isRequired":true,"uniqueKey":"oneOf.17.result","typeLabel":"any"},"compute_pool_id":{"oneOf":[{"description":"The compute pool associated with the job, if any.","type":"string","format":"uuid","uniqueKey":"oneOf.17.compute_pool_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The compute pool associated with the job, if any.","type":"null","format":"uuid","uniqueKey":"oneOf.17.compute_pool_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.17.compute_pool_id","typeLabel":"string\u003cuuid> | null"},"executor":{"oneOf":[{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"string","uniqueKey":"oneOf.17.executor.oneOf.0","typeLabel":"string"},{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"null","uniqueKey":"oneOf.17.executor.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.17.executor","typeLabel":"string | null"},"dequeued_at":{"oneOf":[{"description":"When the job was taken off the queue. Null while it is still queued.","type":"string","format":"date-time","uniqueKey":"oneOf.17.dequeued_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"When the job was taken off the queue. Null while it is still queued.","type":"null","format":"date-time","uniqueKey":"oneOf.17.dequeued_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.17.dequeued_at","typeLabel":"string\u003cdate-time> | null"},"ended_at":{"oneOf":[{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"string","format":"date-time","uniqueKey":"oneOf.17.ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"null","format":"date-time","uniqueKey":"oneOf.17.ended_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.17.ended_at","typeLabel":"string\u003cdate-time> | null"},"workflow_id":{"oneOf":[{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"string","format":"uuid","uniqueKey":"oneOf.17.workflow_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"null","format":"uuid","uniqueKey":"oneOf.17.workflow_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.17.workflow_id","typeLabel":"string\u003cuuid> | null"},"workflow_run_id":{"oneOf":[{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"string","format":"uuid","uniqueKey":"oneOf.17.workflow_run_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"null","format":"uuid","uniqueKey":"oneOf.17.workflow_run_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.17.workflow_run_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"oneOf.17","typeLabel":"object"},{"type":"object","description":"A job. Every job carries the same envelope of fields — see `JobBase` — but `input` and `result` hold\njob-type-specific payloads, so the response is a union over `type`: pick the branch whose `type` matches\nand you get the typed `input` and `result` for that kind of job.\n\nThe union is open on purpose. Job types are free strings on the server, so a type this spec version does\nnot describe lands in `OtherJobResponse`, where both fields stay free-form. No branch closes itself to\nextra properties, and new job types can appear without a spec change.\n\nThe described types sit together under `DescribedJobResponse`, which has a discriminator on `type`. Any other\n`type` is an `OtherJobResponse`. That branch sits outside the discriminator because a mapping can only name\nspecific values, and a branch with no mapping entry would only match a `type` equal to its schema name.\n\n`input` and `result` are returned exactly as they were stored when the job was enqueued or completed. The\nserver never reshapes them, so a field a job type gained after a row was written is absent from that row\nrather than null. The typed branches describe what the current code writes; fields that have not always\nbeen written are left out of each branch's `required` list.\n\n`result` is `null` in every branch until the job reaches a terminal state.","required":["type","input","result","job_id","company_id","data_plane_id","request_source","state","operator_type","tags","execution_cluster","idempotency_key","created_at","updated_at","attempted_at","attempt_version"],"properties":{"job_id":{"type":"string","format":"uuid","description":"Unique identifier for the job.","isRequired":true,"uniqueKey":"oneOf.18.job_id","typeLabel":"string\u003cuuid>"},"company_id":{"description":"The company the job belongs to.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.18.company_id","typeLabel":"integer\u003cint64>"},"data_plane_id":{"description":"The data plane the job runs on. Jobs on the Narrative data plane carry its id,\n`f79cbdae-4848-47ca-95e8-69588364d185`.","type":"string","format":"uuid","isRequired":true,"uniqueKey":"oneOf.18.data_plane_id","typeLabel":"string\u003cuuid>"},"request_source":{"oneOf":[{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","company_id","user_id"],"example":{"type":"api_user","company_id":1,"user_id":1248},"properties":{"type":{"type":"string","enum":["api_user"],"isRequired":true,"uniqueKey":"oneOf.18.request_source.oneOf.0.type","typeLabel":"enum\u003cstring>"},"company_id":{"description":"The company the request was made for.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.18.request_source.oneOf.0.company_id","typeLabel":"integer\u003cint64>"},"user_id":{"description":"The user who made the request.","type":"integer","format":"int64","isRequired":true,"uniqueKey":"oneOf.18.request_source.oneOf.0.user_id","typeLabel":"integer\u003cint64>"}},"isRequired":true,"uniqueKey":"oneOf.18.request_source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Who asked for the job. Discriminated by `type`: `api_user` for a job requested through the API on behalf\nof a user, `process` for one enqueued by a Narrative process.","required":["type","name"],"example":{"type":"process","name":"narrative-control-plane"},"properties":{"type":{"type":"string","enum":["process"],"isRequired":true,"uniqueKey":"oneOf.18.request_source.oneOf.1.type","typeLabel":"enum\u003cstring>"},"name":{"description":"The process that enqueued the job, e.g. `narrative-control-plane` or `health-check`.","type":"string","isRequired":true,"uniqueKey":"oneOf.18.request_source.oneOf.1.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.18.request_source.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.18.request_source","typeLabel":"object"},"state":{"description":"Where a job is in its lifecycle.\n\n- `pending` — enqueued and waiting to be picked up.\n- `scheduled` — claimed by an executor but not yet started.\n- `running` — being executed.\n- `pending_cancellation` — cancellation has been requested and the data plane has yet to stop the work.\n- `completed`, `cancelled`, `failed` — terminal states.","type":"string","enum":["pending","scheduled","running","pending_cancellation","completed","cancelled","failed"],"isRequired":true,"uniqueKey":"oneOf.18.state","typeLabel":"enum\u003cstring>"},"operator_type":{"description":"Which operator runs the job, e.g. `materialized-view-refresh` or `datasets_execute_select`. Finer-grained\nthan `type`: several job types can share one operator, and where no such mapping exists the two are equal.","type":"string","isRequired":true,"uniqueKey":"oneOf.18.operator_type","typeLabel":"string"},"tags":{"description":"Free-form labels attached to the job.","type":"array","items":{"type":"string","minLength":1,"maxLength":255,"uniqueKey":"oneOf.18.tags.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"oneOf.18.tags","typeLabel":"string[]"},"execution_cluster":{"description":"The type of the execution cluster to run the job on.\n\n- `dedicated` runs job on a dedicated cluster.\n- `shared` runs job on a shared cluster.","type":"string","enum":["dedicated","shared"],"isRequired":true,"uniqueKey":"oneOf.18.execution_cluster","typeLabel":"enum\u003cstring>"},"idempotency_key":{"description":"The unique key the job was enqueued under.","type":"string","minLength":1,"maxLength":255,"isRequired":true,"uniqueKey":"oneOf.18.idempotency_key","typeLabel":"string"},"created_at":{"description":"The timestamp representing when the job was created.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.18.created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"description":"The timestamp representing when the job was updated.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.18.updated_at","typeLabel":"string\u003cdate-time>"},"attempted_at":{"description":"When the job's current attempt started. A job can be retried; each retry is a new attempt, so this advances to the latest one, while `created_at` stays at the original submission.","type":"string","format":"date-time","isRequired":true,"uniqueKey":"oneOf.18.attempted_at","typeLabel":"string\u003cdate-time>"},"attempt_version":{"description":"Which attempt this is: 1 for the first, increasing by one on each retry.","type":"integer","isRequired":true,"uniqueKey":"oneOf.18.attempt_version","typeLabel":"integer"},"type":{"description":"Any job type other than the ones `JobResponse` describes a branch for.","type":"string","not":{"enum":["materialize-view","nql-forecast","datasets_sample","datasets_calculate_column_stats","materialized_views_collect_access_rules_billing_data","datasets_deliver_data","model_inference_run","datasets_delete_table","datasets_execute_dml","datasets_create_table","datasets_truncate_table","datasets_enforce_table_ttl_retention_policy","datasets_enforce_row_ttl_retention_policy","datasets_calculate_affected_rows","model_training_run","models_deliver_model","models_train_classifier","health_check"]},"isRequired":true,"uniqueKey":"oneOf.18.type","typeLabel":"string"},"input":{"description":"A job input the spec does not describe a shape for. The server stores `input` as arbitrary JSON and does\nnot constrain it, so this is any JSON value.","examples":[{"dataset_id":10736,"compiled_sql":"SELECT `t`.`age` FROM narrative.datasets.ds_10736 `t`"},{}],"isRequired":true,"uniqueKey":"oneOf.18.input","typeLabel":"any"},"result":{"description":"A job result the spec does not describe a shape for. The server stores `result` as arbitrary JSON and does\nnot constrain it, so this is any JSON value. Null until the job reaches a terminal state.","examples":[{"row_count":100},{}],"isRequired":true,"uniqueKey":"oneOf.18.result","typeLabel":"any"},"compute_pool_id":{"oneOf":[{"description":"The compute pool associated with the job, if any.","type":"string","format":"uuid","uniqueKey":"oneOf.18.compute_pool_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The compute pool associated with the job, if any.","type":"null","format":"uuid","uniqueKey":"oneOf.18.compute_pool_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.18.compute_pool_id","typeLabel":"string\u003cuuid> | null"},"executor":{"oneOf":[{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"string","uniqueKey":"oneOf.18.executor.oneOf.0","typeLabel":"string"},{"description":"The internal job executor tied to the job. Null until an executor picks the job up.","type":"null","uniqueKey":"oneOf.18.executor.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.18.executor","typeLabel":"string | null"},"dequeued_at":{"oneOf":[{"description":"When the job was taken off the queue. Null while it is still queued.","type":"string","format":"date-time","uniqueKey":"oneOf.18.dequeued_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"When the job was taken off the queue. Null while it is still queued.","type":"null","format":"date-time","uniqueKey":"oneOf.18.dequeued_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.18.dequeued_at","typeLabel":"string\u003cdate-time> | null"},"ended_at":{"oneOf":[{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"string","format":"date-time","uniqueKey":"oneOf.18.ended_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"description":"The timestamp representing when the job finished. Null until the job reaches a terminal state.","type":"null","format":"date-time","uniqueKey":"oneOf.18.ended_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.18.ended_at","typeLabel":"string\u003cdate-time> | null"},"workflow_id":{"oneOf":[{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"string","format":"uuid","uniqueKey":"oneOf.18.workflow_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow that enqueued the job. Null for jobs not enqueued by a workflow.","type":"null","format":"uuid","uniqueKey":"oneOf.18.workflow_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.18.workflow_id","typeLabel":"string\u003cuuid> | null"},"workflow_run_id":{"oneOf":[{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"string","format":"uuid","uniqueKey":"oneOf.18.workflow_run_id.oneOf.0","typeLabel":"string\u003cuuid>"},{"description":"The id of the workflow run that enqueued the job. Null for jobs not enqueued by a workflow run.","type":"null","format":"uuid","uniqueKey":"oneOf.18.workflow_run_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.18.workflow_run_id","typeLabel":"string\u003cuuid> | null"}},"uniqueKey":"oneOf.18","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"job_id":"2a5b9ad7-dc8f-47bb-8e62-843a38f8054c","company_id":1,"data_plane_id":"f79cbdae-4848-47ca-95e8-69588364d185","compute_pool_id":null,"request_source":{"type":"api_user","company_id":1,"user_id":407},"state":"completed","type":"materialize-view","operator_type":"materialized-view-refresh","tags":[],"input":{"nql":"CREATE MATERIALIZED VIEW \"test_stats\" AS SELECT \"value\" FROM \"company_data\".\"10674\"","compiled_select":"SELECT\n `ds_10674`.`value`\nFROM\n narrative.datasets.ds_10674 `ds_10674`","create_as_view":null,"dataset_id":10736,"billing_enabled":null,"stats_enabled":true,"contains_delta_syntax":null,"first_run":false,"merge":true,"partitions":null,"snowflake_create_table":null,"snowflake_insert_statement":null,"chunk_metadata":null,"nio_last_modified_at":null,"delta_dataset_bounds":null,"write_mode":"append"},"executor":"job-executor-98e1f48e-bf54-4f11-bbd1-73c445120266","execution_cluster":"shared","idempotency_key":"10736:29329c64e7b8a4eda86aaabe04872b832ab456b5543d0c259c812525391f158c:669a5f8e4f373c2f907700decde47511aac6470f5698e2b856fb07f09160e5f2","result":{"dataset_id":10736,"snapshot_id":1724919539450264600,"recalculation_id":"abf9a2ec-426b-4751-bd16-fcb435061925","row_stats":null},"dequeued_at":"2023-10-31T11:19:13.400498Z","created_at":"2023-10-31T11:19:13.400498Z","updated_at":"2023-10-31T11:25:08.327209Z","attempted_at":"2023-10-31T11:19:13.400498Z","attempt_version":1,"ended_at":"2023-10-31T11:25:08.327194Z","workflow_id":null,"workflow_run_id":null}}},"exampleType":"generated"}},"exampleType":"generated"},"a7ca9bee-317f-48c9-885f-ba6a8746acf4":{"description":"The dataset is not active, or it is not managed by Narrative, such as a dataset created from a\nreference to a Snowflake table or view.","content":{"application/json":{"schema":{"type":"object","required":["error","error_description"],"properties":{"error":{"type":"string","example":"Unauthorized","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"error_description":{"type":"string","example":"You are not authorized to use this endpoint.","isRequired":true,"uniqueKey":"error_description","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"Unauthorized","error_description":"You are not authorized to use this endpoint."}}},"exampleType":"generated"}},"exampleType":"generated"},"33a71da0-d9b4-439e-9d6e-fcec582f76fc":{"description":"The dataset was not found.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"0f270d3d-1fbb-41f0-b5ef-50fed0cdb6c1":{"BearerAuth":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"190e6995-21fb-418b-bbfe-8c27e30d5b55":{"url":"https://api-dev.narrative.io"},"1dc6c444-4c87-47b0-b19f-59c81fc72525":{"url":"https://api.narrative.io"}},"schemas":{"c670553c-4370-4369-a11e-b426701ce2b9":{"oneOf":[{"type":"object","title":"Text","description":"A single block inside a message. Messages carry an ordered list of blocks. Six\nvariants discriminated by `type`:\n\n- `text` — plain text content. The dominant variant for user messages and final\n assistant answers.\n- `tool_use` — the model requesting a tool call. Carries the call's `tool_use_id`\n (used to match it with the subsequent result), the fully-aliased `name`, and the\n `arguments` the model produced.\n- `tool_result` — the response to a `tool_use`. References the same `tool_use_id`\n and carries nested content blocks with the actual result text. `is_error` flags\n tool failures so the model can decide how to react.\n- `reasoning` — the model's own working, present on an assistant turn when the run\n asked for thinking (`defaults.thinking`). It comes **first** in the turn, ahead of\n the answer. `text` is optional: some models return their reasoning as words, others\n return only a `signature` and keep the words to themselves.\n- `redacted_reasoning` — reasoning the provider encrypted rather than returned. Opaque\n base64; there is nothing to read, and it exists so a turn can still be replayed\n intact.\n- `image` — an image in a user message, or inside a `tool_result`. Either the caller\n sent it, or an MCP tool returned it. See `ImageBlock`.\n\nThe discriminator field is `type`. Use it to dispatch in your client.\n\nEach block may also carry an **`id`** alongside its own fields (`b_\u003cjob>_\u003cordinal>`), the identifier\nit was given where it was produced. Blocks a caller sent, and turns stored before ids existed, have\nnone. `final_answer_from` on the message points at ids, which is how a reader knows which block to\nrender as the reply — see the note there.\n\nReasoning blocks are passed through as the model produced them, `signature` included.\nA client that wants to continue a conversation exactly as the model left it can send\nthem back verbatim; one that only wants to show the answer can drop them. The signature\nis meaningful only to the provider — treat it as opaque and don't parse it.","required":["type","text"],"example":{"type":"text","text":"What is 2 + 2?"},"properties":{"type":{"type":"string","enum":["text"],"isRequired":true},"text":{"type":"string","isRequired":true},"id":{"type":"string","description":"The id this block was produced under, when we produced it. Absent on blocks a caller sent\nand on turns stored before ids existed.","example":"b_c08cf800_01"}}},{"type":"object","title":"ToolUse","description":"A single block inside a message. Messages carry an ordered list of blocks. Six\nvariants discriminated by `type`:\n\n- `text` — plain text content. The dominant variant for user messages and final\n assistant answers.\n- `tool_use` — the model requesting a tool call. Carries the call's `tool_use_id`\n (used to match it with the subsequent result), the fully-aliased `name`, and the\n `arguments` the model produced.\n- `tool_result` — the response to a `tool_use`. References the same `tool_use_id`\n and carries nested content blocks with the actual result text. `is_error` flags\n tool failures so the model can decide how to react.\n- `reasoning` — the model's own working, present on an assistant turn when the run\n asked for thinking (`defaults.thinking`). It comes **first** in the turn, ahead of\n the answer. `text` is optional: some models return their reasoning as words, others\n return only a `signature` and keep the words to themselves.\n- `redacted_reasoning` — reasoning the provider encrypted rather than returned. Opaque\n base64; there is nothing to read, and it exists so a turn can still be replayed\n intact.\n- `image` — an image in a user message, or inside a `tool_result`. Either the caller\n sent it, or an MCP tool returned it. See `ImageBlock`.\n\nThe discriminator field is `type`. Use it to dispatch in your client.\n\nEach block may also carry an **`id`** alongside its own fields (`b_\u003cjob>_\u003cordinal>`), the identifier\nit was given where it was produced. Blocks a caller sent, and turns stored before ids existed, have\nnone. `final_answer_from` on the message points at ids, which is how a reader knows which block to\nrender as the reply — see the note there.\n\nReasoning blocks are passed through as the model produced them, `signature` included.\nA client that wants to continue a conversation exactly as the model left it can send\nthem back verbatim; one that only wants to show the answer can drop them. The signature\nis meaningful only to the provider — treat it as opaque and don't parse it.","required":["type","tool_use_id","name","arguments"],"properties":{"type":{"type":"string","enum":["tool_use"],"isRequired":true},"tool_use_id":{"type":"string","description":"Server-assigned identifier the model produced when emitting the tool call.\nUse this to match a `tool_result` with its `tool_use`, and to fill\n`outputs[].tool_use_id` when resuming a `requires_action` run.","example":"tooluse_DWXPKZ50JDGib5GmShyUgJ","isRequired":true},"name":{"type":"string","description":"Fully-aliased tool name (`{alias}-{tool_name}`) — the same string the model\nsaw in its tool catalog. The alias prefix is how the platform routes the call\nback to its definition.","example":"docs-search_narrative_i_o_knowledge_base","isRequired":true},"arguments":{"type":"object","description":"Arguments object produced by the model. Must conform to the tool's\n`input_schema` — if the model produced something that doesn't validate, the\nrun terminates with the\n[MCP Tool Argument Validation Failed](https://docs.narrative.io/reference/architecture/agent-conversations/errors/mcp-tool-validation)\nerror for server-side tools, or surfaces in `pending_tool_calls` as-is for\nclient-side tools.","example":{"query":"rate limiting"},"isRequired":true},"id":{"type":"string","description":"The id this block was produced under, when we produced it. Absent on blocks a caller sent\nand on turns stored before ids existed.","example":"b_c08cf800_01"}}},{"type":"object","title":"ToolResult","description":"A single block inside a message. Messages carry an ordered list of blocks. Six\nvariants discriminated by `type`:\n\n- `text` — plain text content. The dominant variant for user messages and final\n assistant answers.\n- `tool_use` — the model requesting a tool call. Carries the call's `tool_use_id`\n (used to match it with the subsequent result), the fully-aliased `name`, and the\n `arguments` the model produced.\n- `tool_result` — the response to a `tool_use`. References the same `tool_use_id`\n and carries nested content blocks with the actual result text. `is_error` flags\n tool failures so the model can decide how to react.\n- `reasoning` — the model's own working, present on an assistant turn when the run\n asked for thinking (`defaults.thinking`). It comes **first** in the turn, ahead of\n the answer. `text` is optional: some models return their reasoning as words, others\n return only a `signature` and keep the words to themselves.\n- `redacted_reasoning` — reasoning the provider encrypted rather than returned. Opaque\n base64; there is nothing to read, and it exists so a turn can still be replayed\n intact.\n- `image` — an image in a user message, or inside a `tool_result`. Either the caller\n sent it, or an MCP tool returned it. See `ImageBlock`.\n\nThe discriminator field is `type`. Use it to dispatch in your client.\n\nEach block may also carry an **`id`** alongside its own fields (`b_\u003cjob>_\u003cordinal>`), the identifier\nit was given where it was produced. Blocks a caller sent, and turns stored before ids existed, have\nnone. `final_answer_from` on the message points at ids, which is how a reader knows which block to\nrender as the reply — see the note there.\n\nReasoning blocks are passed through as the model produced them, `signature` included.\nA client that wants to continue a conversation exactly as the model left it can send\nthem back verbatim; one that only wants to show the answer can drop them. The signature\nis meaningful only to the provider — treat it as opaque and don't parse it.","required":["type","tool_use_id","content","is_error"],"properties":{"type":{"type":"string","enum":["tool_result"],"isRequired":true},"tool_use_id":{"type":"string","description":"The `tool_use_id` from the matching `tool_use` block on the prior assistant turn.","example":"tooluse_DWXPKZ50JDGib5GmShyUgJ","isRequired":true},"content":{"type":"array","description":"Nested content blocks carrying the actual result: `text` blocks, plus `image`\nblocks when the tool returned images. Almost always a single `text` block; the\nplatform splits long results into multiple text blocks when the underlying MCP\nserver returns multiple chunks. An image an MCP tool returned that a model can't\nread (an unsupported type, or over the size limit) is replaced with a `text`\nblock saying so.","items":{"$circularRef":"c670553c-4370-4369-a11e-b426701ce2b9"},"isRequired":true},"is_error":{"type":"boolean","description":"Whether the tool call failed. The model decides how to react to errors —\nretry, ask the user, fall through to a partial answer, etc. Note that an\nMCP server returning a non-2xx response that the platform can still parse\ncounts as `is_error: false` (the tool *succeeded* in returning a result, even\nif that result reports an underlying failure).","isRequired":true},"id":{"type":"string","description":"The id this block was produced under, when we produced it. Absent on blocks a caller sent\nand on turns stored before ids existed.","example":"b_c08cf800_01"}}},{"type":"object","title":"Reasoning","description":"A single block inside a message. Messages carry an ordered list of blocks. Six\nvariants discriminated by `type`:\n\n- `text` — plain text content. The dominant variant for user messages and final\n assistant answers.\n- `tool_use` — the model requesting a tool call. Carries the call's `tool_use_id`\n (used to match it with the subsequent result), the fully-aliased `name`, and the\n `arguments` the model produced.\n- `tool_result` — the response to a `tool_use`. References the same `tool_use_id`\n and carries nested content blocks with the actual result text. `is_error` flags\n tool failures so the model can decide how to react.\n- `reasoning` — the model's own working, present on an assistant turn when the run\n asked for thinking (`defaults.thinking`). It comes **first** in the turn, ahead of\n the answer. `text` is optional: some models return their reasoning as words, others\n return only a `signature` and keep the words to themselves.\n- `redacted_reasoning` — reasoning the provider encrypted rather than returned. Opaque\n base64; there is nothing to read, and it exists so a turn can still be replayed\n intact.\n- `image` — an image in a user message, or inside a `tool_result`. Either the caller\n sent it, or an MCP tool returned it. See `ImageBlock`.\n\nThe discriminator field is `type`. Use it to dispatch in your client.\n\nEach block may also carry an **`id`** alongside its own fields (`b_\u003cjob>_\u003cordinal>`), the identifier\nit was given where it was produced. Blocks a caller sent, and turns stored before ids existed, have\nnone. `final_answer_from` on the message points at ids, which is how a reader knows which block to\nrender as the reply — see the note there.\n\nReasoning blocks are passed through as the model produced them, `signature` included.\nA client that wants to continue a conversation exactly as the model left it can send\nthem back verbatim; one that only wants to show the answer can drop them. The signature\nis meaningful only to the provider — treat it as opaque and don't parse it.","required":["type","signature"],"example":{"type":"reasoning","signature":"CAIS6QMKcAgQEAEYAipATBOWJItj3lNDm2ZmBW70v+WJ5oI6W68N…"},"properties":{"type":{"type":"string","enum":["reasoning"],"isRequired":true},"signature":{"type":"string","description":"Provider-issued signature over the reasoning. Opaque: not a hash you can verify\nor a token you can decode. Send the block back unchanged to continue a turn as\nthe model left it, or ignore it.","example":"CAIS6QMKcAgQEAEYAipATBOWJItj3lNDm2ZmBW70v+WJ5oI6W68N…","isRequired":true},"id":{"type":"string","description":"The id this block was produced under, when we produced it. Absent on blocks a caller sent\nand on turns stored before ids existed.","example":"b_c08cf800_01"},"text":{"type":"string","description":"The model's working, when it returns it as words. Absent when the model reasoned\nbut withheld the text — the Opus models do this, and `signature` is then the only\nevidence the turn reasoned at all. Never assume this field is present.","example":"Cleo cannot be Monday, so the only assignment left is…"}}},{"type":"object","title":"RedactedReasoning","description":"A single block inside a message. Messages carry an ordered list of blocks. Six\nvariants discriminated by `type`:\n\n- `text` — plain text content. The dominant variant for user messages and final\n assistant answers.\n- `tool_use` — the model requesting a tool call. Carries the call's `tool_use_id`\n (used to match it with the subsequent result), the fully-aliased `name`, and the\n `arguments` the model produced.\n- `tool_result` — the response to a `tool_use`. References the same `tool_use_id`\n and carries nested content blocks with the actual result text. `is_error` flags\n tool failures so the model can decide how to react.\n- `reasoning` — the model's own working, present on an assistant turn when the run\n asked for thinking (`defaults.thinking`). It comes **first** in the turn, ahead of\n the answer. `text` is optional: some models return their reasoning as words, others\n return only a `signature` and keep the words to themselves.\n- `redacted_reasoning` — reasoning the provider encrypted rather than returned. Opaque\n base64; there is nothing to read, and it exists so a turn can still be replayed\n intact.\n- `image` — an image in a user message, or inside a `tool_result`. Either the caller\n sent it, or an MCP tool returned it. See `ImageBlock`.\n\nThe discriminator field is `type`. Use it to dispatch in your client.\n\nEach block may also carry an **`id`** alongside its own fields (`b_\u003cjob>_\u003cordinal>`), the identifier\nit was given where it was produced. Blocks a caller sent, and turns stored before ids existed, have\nnone. `final_answer_from` on the message points at ids, which is how a reader knows which block to\nrender as the reply — see the note there.\n\nReasoning blocks are passed through as the model produced them, `signature` included.\nA client that wants to continue a conversation exactly as the model left it can send\nthem back verbatim; one that only wants to show the answer can drop them. The signature\nis meaningful only to the provider — treat it as opaque and don't parse it.","required":["type","data"],"example":{"type":"redacted_reasoning","data":"ZW5jcnlwdGVkLXJlYXNvbmluZy1ieXRlcw=="},"properties":{"type":{"type":"string","enum":["redacted_reasoning"],"isRequired":true},"data":{"type":"string","description":"Base64 of the encrypted reasoning. Nothing to display. Kept so the turn can be\nreplayed whole.","example":"ZW5jcnlwdGVkLXJlYXNvbmluZy1ieXRlcw==","isRequired":true},"id":{"type":"string","description":"The id this block was produced under, when we produced it. Absent on blocks a caller sent\nand on turns stored before ids existed.","example":"b_c08cf800_01"}}},{"type":"object","title":"Image","description":"A single block inside a message. Messages carry an ordered list of blocks. Six\nvariants discriminated by `type`:\n\n- `text` — plain text content. The dominant variant for user messages and final\n assistant answers.\n- `tool_use` — the model requesting a tool call. Carries the call's `tool_use_id`\n (used to match it with the subsequent result), the fully-aliased `name`, and the\n `arguments` the model produced.\n- `tool_result` — the response to a `tool_use`. References the same `tool_use_id`\n and carries nested content blocks with the actual result text. `is_error` flags\n tool failures so the model can decide how to react.\n- `reasoning` — the model's own working, present on an assistant turn when the run\n asked for thinking (`defaults.thinking`). It comes **first** in the turn, ahead of\n the answer. `text` is optional: some models return their reasoning as words, others\n return only a `signature` and keep the words to themselves.\n- `redacted_reasoning` — reasoning the provider encrypted rather than returned. Opaque\n base64; there is nothing to read, and it exists so a turn can still be replayed\n intact.\n- `image` — an image in a user message, or inside a `tool_result`. Either the caller\n sent it, or an MCP tool returned it. See `ImageBlock`.\n\nThe discriminator field is `type`. Use it to dispatch in your client.\n\nEach block may also carry an **`id`** alongside its own fields (`b_\u003cjob>_\u003cordinal>`), the identifier\nit was given where it was produced. Blocks a caller sent, and turns stored before ids existed, have\nnone. `final_answer_from` on the message points at ids, which is how a reader knows which block to\nrender as the reply — see the note there.\n\nReasoning blocks are passed through as the model produced them, `signature` included.\nA client that wants to continue a conversation exactly as the model left it can send\nthem back verbatim; one that only wants to show the answer can drop them. The signature\nis meaningful only to the provider — treat it as opaque and don't parse it.","required":["type","source"],"example":{"type":"image","source":{"type":"base64","media_type":"image/png","data":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="}},"properties":{"type":{"type":"string","enum":["image"],"isRequired":true},"source":{"type":"object","required":["type","media_type","data"],"properties":{"type":{"type":"string","enum":["base64"],"isRequired":true},"media_type":{"type":"string","enum":["image/jpeg","image/png","image/gif","image/webp"],"isRequired":true},"data":{"type":"string","description":"The image bytes, base64-encoded.","example":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==","isRequired":true}},"isRequired":true},"id":{"type":"string","description":"The id this block was produced under, when we produced it. Absent on blocks a caller sent\nand on turns stored before ids existed.","example":"b_c08cf800_01"}}}]},"a6fba766-4e0f-41b7-bcf4-b64b3c977afb":{"oneOf":[{"type":"object","required":["type","items"],"properties":{"type":{"type":"string","description":"An array with elements of any data type.","enum":["array"],"isRequired":true},"items":{"oneOf":[{"isRequired":true}],"isRequired":true},"validations":{"type":"array","description":"A raw Spark SQL expression determining whether a value for the given column is valid or not.\n\nIf more than one validation is specified then _all_ the validation must evaluate to `true` for the column value to be considered valid.\n\nIf `validations` is not specified or empty then all rows will match the access rule.\n\nE.g. for a dataset with the following type definition:\n\n```\n{\n \"type\": \"object\",\n \"properties\": {\n \"idValue\": {\n \"type\": \"string\"\n },\n \"idType\": {\n \"type\": \"string\",\n \"enum\": [\n \"idfa\",\n \"adid\"\n ]\n },\n \"timestamp\": {\n \"type\": \"timestamptz\"\n }\n },\n \"required\": [\n \"idValue\"\n ]\n}\n```\n\nValid constraints include:\n\n- Is the ID type IDFA?\n\n```sql\nidType = 'idfa'\n```\n- Is the ID type non-null?\n\n```sql\nidType is not null\n```\n- Was the row collected within the last 90 days?\n\n```sql\ntimestamp > date_sub(current_date(), 90)\n```","items":{"type":"string"}}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"True/false values. Input values must be one of `true` or `false`.","enum":["boolean"],"isRequired":true},"validations":{"type":"array","description":"A raw Spark SQL expression determining whether a value for the given column is valid or not.\n\nIf more than one validation is specified then _all_ the validation must evaluate to `true` for the column value to be considered valid.\n\nIf `validations` is not specified or empty then all rows will match the access rule.\n\nE.g. for a dataset with the following type definition:\n\n```\n{\n \"type\": \"object\",\n \"properties\": {\n \"idValue\": {\n \"type\": \"string\"\n },\n \"idType\": {\n \"type\": \"string\",\n \"enum\": [\n \"idfa\",\n \"adid\"\n ]\n },\n \"timestamp\": {\n \"type\": \"timestamptz\"\n }\n },\n \"required\": [\n \"idValue\"\n ]\n}\n```\n\nValid constraints include:\n\n- Is the ID type IDFA?\n\n```sql\nidType = 'idfa'\n```\n- Is the ID type non-null?\n\n```sql\nidType is not null\n```\n- Was the row collected within the last 90 days?\n\n```sql\ntimestamp > date_sub(current_date(), 90)\n```","items":{"type":"string"}}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"64-bit IEEE 754 floating point values.","enum":["double"],"isRequired":true},"enum":{"type":"array","description":"An optional set of possible values for the field.","items":{"type":"number","format":"double"}},"validations":{"type":"array","description":"A raw Spark SQL expression determining whether a value for the given column is valid or not.\n\nIf more than one validation is specified then _all_ the validation must evaluate to `true` for the column value to be considered valid.\n\nIf `validations` is not specified or empty then all rows will match the access rule.\n\nE.g. for a dataset with the following type definition:\n\n```\n{\n \"type\": \"object\",\n \"properties\": {\n \"idValue\": {\n \"type\": \"string\"\n },\n \"idType\": {\n \"type\": \"string\",\n \"enum\": [\n \"idfa\",\n \"adid\"\n ]\n },\n \"timestamp\": {\n \"type\": \"timestamptz\"\n }\n },\n \"required\": [\n \"idValue\"\n ]\n}\n```\n\nValid constraints include:\n\n- Is the ID type IDFA?\n\n```sql\nidType = 'idfa'\n```\n- Is the ID type non-null?\n\n```sql\nidType is not null\n```\n- Was the row collected within the last 90 days?\n\n```sql\ntimestamp > date_sub(current_date(), 90)\n```","items":{"type":"string"}}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"64-bit signed integer values.","enum":["long"],"isRequired":true},"enum":{"type":"array","description":"An optional set of possible values for the field.","items":{"type":"integer","format":"int64"}},"validations":{"type":"array","description":"A raw Spark SQL expression determining whether a value for the given column is valid or not.\n\nIf more than one validation is specified then _all_ the validation must evaluate to `true` for the column value to be considered valid.\n\nIf `validations` is not specified or empty then all rows will match the access rule.\n\nE.g. for a dataset with the following type definition:\n\n```\n{\n \"type\": \"object\",\n \"properties\": {\n \"idValue\": {\n \"type\": \"string\"\n },\n \"idType\": {\n \"type\": \"string\",\n \"enum\": [\n \"idfa\",\n \"adid\"\n ]\n },\n \"timestamp\": {\n \"type\": \"timestamptz\"\n }\n },\n \"required\": [\n \"idValue\"\n ]\n}\n```\n\nValid constraints include:\n\n- Is the ID type IDFA?\n\n```sql\nidType = 'idfa'\n```\n- Is the ID type non-null?\n\n```sql\nidType is not null\n```\n- Was the row collected within the last 90 days?\n\n```sql\ntimestamp > date_sub(current_date(), 90)\n```","items":{"type":"string"}}}},{"type":"object","required":["type","properties"],"properties":{"type":{"description":"A record consisting of named fields of any type.","enum":["object"],"type":"string","isRequired":true},"properties":{"type":"object","description":"A map from field names to field types.\n\nField names must consist of only alphanumeric characters or underscores and be \u003c 255 characters long.","additionalProperties":{"type":"object","properties":{"order":{"type":"integer","description":"The zero-based position of the field among its siblings. Responses always carry it. For a `flat` file\ntype it is the column's position in the input file, so a request should set it rather than rely on the\norder of the keys in `properties`."},"display_name":{"type":"string","description":"A name that will be represent at User Interface."},"approximate_cardinality":{"type":"integer","description":"An optional estimate of how many distinct values of the field will be provided to Narrative. Narrative uses this information to optimizer buyer experience."},"description":{"type":"string","description":"A description of the named field."}}},"isRequired":true},"required":{"description":"An optional array of properties whose values are never missing or null.","type":"array","items":{"type":"string"}},"unsellable":{"description":"An optional array of properties that cannot be sold to buyers.","type":"array","items":{"type":"string"}},"sensitive":{"description":"An optional array of properties that are sensitive. Data in sensitive fields are redacted when showed to Narrative users via the UI or API but can still be bought and sold.","type":"array","items":{"type":"string"}}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"Abitrary-length character sequences encoded with UTF-8.","enum":["string"],"isRequired":true},"enum":{"type":"array","description":"An optional set of possible values for the field.","items":{"type":"string"}},"validations":{"type":"array","description":"A raw Spark SQL expression determining whether a value for the given column is valid or not.\n\nIf more than one validation is specified then _all_ the validation must evaluate to `true` for the column value to be considered valid.\n\nIf `validations` is not specified or empty then all rows will match the access rule.\n\nE.g. for a dataset with the following type definition:\n\n```\n{\n \"type\": \"object\",\n \"properties\": {\n \"idValue\": {\n \"type\": \"string\"\n },\n \"idType\": {\n \"type\": \"string\",\n \"enum\": [\n \"idfa\",\n \"adid\"\n ]\n },\n \"timestamp\": {\n \"type\": \"timestamptz\"\n }\n },\n \"required\": [\n \"idValue\"\n ]\n}\n```\n\nValid constraints include:\n\n- Is the ID type IDFA?\n\n```sql\nidType = 'idfa'\n```\n- Is the ID type non-null?\n\n```sql\nidType is not null\n```\n- Was the row collected within the last 90 days?\n\n```sql\ntimestamp > date_sub(current_date(), 90)\n```","items":{"type":"string"}}}},{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"Timestamp with timezone, stored as microseconds. Input values are expected to be valid [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) strings.","enum":["timestamptz"],"isRequired":true},"validations":{"type":"array","description":"A raw Spark SQL expression determining whether a value for the given column is valid or not.\n\nIf more than one validation is specified then _all_ the validation must evaluate to `true` for the column value to be considered valid.\n\nIf `validations` is not specified or empty then all rows will match the access rule.\n\nE.g. for a dataset with the following type definition:\n\n```\n{\n \"type\": \"object\",\n \"properties\": {\n \"idValue\": {\n \"type\": \"string\"\n },\n \"idType\": {\n \"type\": \"string\",\n \"enum\": [\n \"idfa\",\n \"adid\"\n ]\n },\n \"timestamp\": {\n \"type\": \"timestamptz\"\n }\n },\n \"required\": [\n \"idValue\"\n ]\n}\n```\n\nValid constraints include:\n\n- Is the ID type IDFA?\n\n```sql\nidType = 'idfa'\n```\n- Is the ID type non-null?\n\n```sql\nidType is not null\n```\n- Was the row collected within the last 90 days?\n\n```sql\ntimestamp > date_sub(current_date(), 90)\n```","items":{"type":"string"}}}}]}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"https://docs-cdn.narrative.io/api-reference/main/openapi.json"},"subdomain":"narrative-07c7a1f7","siteName":"Narrative I/O Knowledge Base","title":"Truncate a dataset - Narrative I/O Knowledge Base","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-26T20:47:07.336Z","originalFileLocation":"api-reference/datasets/truncate-a-dataset.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Truncates a dataset. Removes all rows from the dataset but leaves the dataset intact. The rows are removed by a job, which is returned.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Narrative I/O Knowledge Base\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Truncate a dataset - Narrative I/O Knowledge Base\">\u003cmeta data-mint-head property=\"og:description\" content=\"Truncates a dataset. Removes all rows from the dataset but leaves the dataset intact. The rows are removed by a job, which is returned.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Narrative I/O Knowledge Base\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.narrative.io/api-reference/datasets/truncate-a-dataset\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://narrative-07c7a1f7.mintlify.app/_mintlify/api/og/v2?division=Datasets\u0026amp;title=Truncate+a+dataset\u0026amp;description=Truncates+a+dataset.%0A%0ARemoves+all+rows+from+the+dataset+but+leaves+the+dataset+intact.+The+rows+are+removed+by+a+job%2C+which%0Ais+returned.\u0026amp;theme=ee973f81a9436b7406ccdb45\u0026amp;signature=a5b05096cc2901fca9afd537b72fcc717a7291d2ffbb7136f8623835f8f58731\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Truncate a dataset - Narrative I/O Knowledge Base\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Truncates a dataset. Removes all rows from the dataset but leaves the dataset intact. The rows are removed by a job, which is returned.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://narrative-07c7a1f7.mintlify.app/_mintlify/api/og/v2?division=Datasets\u0026amp;title=Truncate+a+dataset\u0026amp;description=Truncates+a+dataset.%0A%0ARemoves+all+rows+from+the+dataset+but+leaves+the+dataset+intact.+The+rows+are+removed+by+a+job%2C+which%0Ais+returned.\u0026amp;theme=ee973f81a9436b7406ccdb45\u0026amp;signature=a5b05096cc2901fca9afd537b72fcc717a7291d2ffbb7136f8623835f8f58731\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Narrative I/O Knowledge Base\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1438F5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.narrative.io/api-reference/datasets/truncate-a-dataset\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/datasets/truncate-a-dataset.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.narrative.io/#organization\",\"name\":\"Narrative I/O Knowledge Base\",\"url\":\"https://docs.narrative.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/narrative-07c7a1f7/ia6SQX79O4nc7uYf/logo/banner.png?fit=max\u0026auto=format\u0026n=ia6SQX79O4nc7uYf\u0026q=85\u0026s=99860b25011c79366624a87d1f648861\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.narrative.io#website\",\"name\":\"Narrative I/O Knowledge Base\",\"url\":\"https://docs.narrative.io\",\"publisher\":{\"@id\":\"https://docs.narrative.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.narrative.io/api-reference/datasets/truncate-a-dataset#webpage\",\"url\":\"https://docs.narrative.io/api-reference/datasets/truncate-a-dataset\",\"name\":\"Truncate a dataset\",\"description\":\"Truncates a dataset. Removes all rows from the dataset but leaves the dataset intact. The rows are removed by a job, which is returned.\",\"dateModified\":\"2026-10-26T20:47:07.336Z\",\"isPartOf\":{\"@id\":\"https://docs.narrative.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.narrative.io/api-reference/datasets/truncate-a-dataset#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.narrative.io/api-reference/datasets/truncate-a-dataset#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Datasets\",\"item\":\"https://docs.narrative.io/api-reference/datasets/get-datasets\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Truncate a dataset\",\"item\":\"https://docs.narrative.io/api-reference/datasets/truncate-a-dataset\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.narrative.io/api-reference/datasets/truncate-a-dataset#apireference\",\"headline\":\"Truncate a dataset\",\"name\":\"Truncate a dataset\",\"description\":\"Truncates a dataset. Removes all rows from the dataset but leaves the dataset intact. The rows are removed by a job, which is returned.\",\"url\":\"https://docs.narrative.io/api-reference/datasets/truncate-a-dataset\",\"mainEntityOfPage\":{\"@id\":\"https://docs.narrative.io/api-reference/datasets/truncate-a-dataset#webpage\"},\"dateModified\":\"2026-10-26T20:47:07.336Z\",\"publisher\":{\"@id\":\"https://docs.narrative.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.narrative.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Narrative I/O Knowledge Base\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Narrative I/O Knowledge Base","nav":{"global":{"anchors":[{"anchor":"Release Notes","icon":"clock-rotate-left","href":"/release-notes"}]},"tabs":[{"tab":"Getting Started","pages":[{"title":"Getting Started","href":"/getting-started/create-account"}]},{"tab":"Concepts","pages":[{"title":"Concepts","href":"/concepts"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides"}]},{"tab":"Cookbooks","pages":[{"title":"Cookbooks","href":"/cookbooks"}]},{"tab":"Reference","pages":[{"title":"Reference","href":"/reference"}]},{"tab":"Connectors","pages":[{"title":"Connectors","href":"/reference/connectors"}]},{"tab":"NQL","pages":[{"title":"NQL","href":"/nql"}]},{"tab":"API Documentation","groups":[{"group":"Access Rules","pages":[{"title":"Get an Access Rule by id (V2)","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/access-rules/{access_rule_id}","href":"/api-reference/access-rules/get-an-access-rule-by-id-v2"},{"title":"Update an Access Rule by id (V2)","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /v2/access-rules/{access_rule_id}","href":"/api-reference/access-rules/update-an-access-rule-by-id-v2"},{"title":"Delete an access rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /v2/access-rules/{access_rule_id}","href":"/api-reference/access-rules/delete-an-access-rule"},{"title":"Get the query policy of an Access Rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/access-rules/{access_rule_id}/query-policy","href":"/api-reference/access-rules/get-the-query-policy-of-an-access-rule"},{"title":"Set the query policy of an Access Rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /v2/access-rules/{access_rule_id}/query-policy","href":"/api-reference/access-rules/set-the-query-policy-of-an-access-rule"},{"title":"Remove the query policy of an Access Rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /v2/access-rules/{access_rule_id}/query-policy","href":"/api-reference/access-rules/remove-the-query-policy-of-an-access-rule"},{"title":"Get an Access Rule by name (V2)","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/access-rules/{company_slug}/{access_rule_name}","href":"/api-reference/access-rules/get-an-access-rule-by-name-v2"},{"title":"Get all accessible Access Rules (V2)","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/access-rules","href":"/api-reference/access-rules/get-all-accessible-access-rules-v2"},{"title":"Create a new Access Rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/access-rules","href":"/api-reference/access-rules/create-a-new-access-rule"}]},{"group":"Access Tokens","pages":[{"title":"List System Access Tokens","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /access-tokens/tokens","href":"/api-reference/access-tokens/list-system-access-tokens"},{"title":"Create a System Access Token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /access-tokens/tokens","href":"/api-reference/access-tokens/create-a-system-access-token"},{"title":"Get a System Access Token by id","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /access-tokens/tokens/{access_token_id}","href":"/api-reference/access-tokens/get-a-system-access-token-by-id"},{"title":"Update a System Access Token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /access-tokens/tokens/{access_token_id}","href":"/api-reference/access-tokens/update-a-system-access-token"},{"title":"Delete a System Access Token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /access-tokens/tokens/{access_token_id}","href":"/api-reference/access-tokens/delete-a-system-access-token"}]},{"group":"Agent Conversations","pages":[{"title":"List the calling user's agent conversations","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /agents/conversations","href":"/api-reference/agent-conversations/list-the-calling-users-agent-conversations"},{"title":"Create an agent conversation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /agents/conversations","href":"/api-reference/agent-conversations/create-an-agent-conversation"},{"title":"Get an agent conversation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /agents/conversations/{id}","href":"/api-reference/agent-conversations/get-an-agent-conversation"},{"title":"List conversation messages (delta read by version cursor)","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /agents/conversations/{id}/messages","href":"/api-reference/agent-conversations/list-conversation-messages-delta-read-by-version-cursor"},{"title":"Start a new run on the conversation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /agents/conversations/{id}/runs","href":"/api-reference/agent-conversations/start-a-new-run-on-the-conversation"},{"title":"Stop waiting on a handle","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /agents/conversations/{id}/waitables/{handle}/cancel","href":"/api-reference/agent-conversations/stop-waiting-on-a-handle"},{"title":"Get a run's current state","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /agents/runs/{id}","href":"/api-reference/agent-conversations/get-a-runs-current-state"}]},{"group":"App API","pages":[{"title":"Delivery Commands","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v1/app/commands/delivery","href":"/api-reference/app-api/delivery-commands"},{"title":"Delivery Files","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v1/app/commands/delivery/{delivery_id}/files","href":"/api-reference/app-api/delivery-files"},{"title":"Download file","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v1/app/commands/delivery/{delivery_id}/download/{filename}","href":"/api-reference/app-api/download-file"}]},{"group":"App Invites","pages":[{"title":"List App Invites","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /app-invites","href":"/api-reference/app-invites/list-app-invites"},{"title":"Create App Invite","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /app-invites","href":"/api-reference/app-invites/create-app-invite"},{"title":"Get App Invite","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /app-invites/{id}","href":"/api-reference/app-invites/get-app-invite"},{"title":"Archive App Invite","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /app-invites/{id}","href":"/api-reference/app-invites/archive-app-invite"},{"title":"Activate App Invite","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /app-invites/{id}/activate","href":"/api-reference/app-invites/activate-app-invite"},{"title":"Get App Invite By Code","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /app-invites/codes/{code}","href":"/api-reference/app-invites/get-app-invite-by-code"}]},{"group":"Apps","pages":[{"title":"Lists apps","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /apps","href":"/api-reference/apps/lists-apps"},{"title":"Publish app event","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /apps/events","href":"/api-reference/apps/publish-app-event"},{"title":"List installed app interfaces","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /apps/installed/interfaces","href":"/api-reference/apps/list-installed-app-interfaces"},{"title":"List app interfaces","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /apps/{app_id}/interfaces","href":"/api-reference/apps/list-app-interfaces"},{"title":"Get an app interface","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /apps/{app_id}/interfaces/{interface_id}","href":"/api-reference/apps/get-an-app-interface"},{"title":"Lists profiles","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /apps/{app_slug}/profiles","href":"/api-reference/apps/lists-profiles"},{"title":"Get an app's v1 manifest","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /apps/{app_slug}/manifest","href":"/api-reference/apps/get-an-apps-v1-manifest"},{"title":"List Apps","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/apps","href":"/api-reference/apps/list-apps"},{"title":"Create App","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/apps","href":"/api-reference/apps/create-app"},{"title":"Get App","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/apps/{slug}","href":"/api-reference/apps/get-app"},{"title":"Archive App","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /v2/apps/{slug}","href":"/api-reference/apps/archive-app"},{"title":"Replace App Manifest","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /v2/apps/{slug}/manifest","href":"/api-reference/apps/replace-app-manifest"},{"title":"Patch App Manifest","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json patch /v2/apps/{slug}/manifest","href":"/api-reference/apps/patch-app-manifest"},{"title":"Generate App Credentials","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/apps/{slug}/credentials/generate","href":"/api-reference/apps/generate-app-credentials"}]},{"group":"Attributes","pages":[{"title":"Get attributes","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /attributes","href":"/api-reference/attributes/get-attributes"},{"title":"Create an attribute","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /attributes","href":"/api-reference/attributes/create-an-attribute"},{"title":"Get an attribute","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /attributes/{attribute_name_or_id}","href":"/api-reference/attributes/get-an-attribute"},{"title":"Update an attribute","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /attributes/{attribute_name_or_id}","href":"/api-reference/attributes/update-an-attribute"},{"title":"Delete an attribute","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /attributes/{attribute_name_or_id}","href":"/api-reference/attributes/delete-an-attribute"},{"title":"Get attribute references.","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /attributes/{attribute_name_or_id}/references","href":"/api-reference/attributes/get-attribute-references"},{"title":"Get the derivation graph around an attribute.","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /attributes/{attribute_name_or_id}/derivation-graph","href":"/api-reference/attributes/get-the-derivation-graph-around-an-attribute"}]},{"group":"Auth","pages":[{"title":"Request or refresh an OAuth token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /oauth/token","href":"/api-reference/auth/request-or-refresh-an-oauth-token"}]},{"group":"Authentication","pages":[{"title":"Sign in with a Stytch B2B session token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /authentication/b2b/login","href":"/api-reference/authentication/sign-in-with-a-stytch-b2b-session-token"},{"title":"Register with a Stytch B2B session token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /authentication/b2b/register","href":"/api-reference/authentication/register-with-a-stytch-b2b-session-token"},{"title":"Check whether a Stytch B2B member is registered on Narrative","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /authentication/b2b/registration-status","href":"/api-reference/authentication/check-whether-a-stytch-b2b-member-is-registered-on-narrative"},{"title":"Exchange a user token for one scoped to another company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /authentication/exchange-token","href":"/api-reference/authentication/exchange-a-user-token-for-one-scoped-to-another-company"},{"title":"Sign in with a Stytch session token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /authentication/login","href":"/api-reference/authentication/sign-in-with-a-stytch-session-token"},{"title":"Register with a Stytch session token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /authentication/register","href":"/api-reference/authentication/register-with-a-stytch-session-token"},{"title":"Check whether a Stytch Magic Links or OAuth user is registered on Narrative","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /authentication/registration-status","href":"/api-reference/authentication/check-whether-a-stytch-magic-links-or-oauth-user-is-registered-on-narrative"}]},{"group":"Billings","pages":[{"title":"Get dataset storage billing","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /admin/billings/dataset-storage-billing","href":"/api-reference/billings/get-dataset-storage-billing"},{"title":"Get dataset storage billing for company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /billings/dataset-storage-billing","href":"/api-reference/billings/get-dataset-storage-billing-for-company"}]},{"group":"Companies","pages":[{"title":"Lists Company Domains","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /companies/{company_id}/domains","href":"/api-reference/companies/lists-company-domains"},{"title":"Get a presigned URL to upload company logo","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /admin/companies/logo-upload-url","href":"/api-reference/companies/get-a-presigned-url-to-upload-company-logo"}]},{"group":"Company","pages":[{"title":"Get a company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /companies/{company_id}","href":"/api-reference/company/get-a-company"},{"title":"Get a company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /company/{company_id}","href":"/api-reference/company/get-a-company-1"},{"title":"Update a company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /company/{company_id}","href":"/api-reference/company/update-a-company"},{"title":"Delete (archive) a company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /company/{company_id}","href":"/api-reference/company/delete-archive-a-company"},{"title":"Clear the company's default compute pool for a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /company/{company_id}/data-planes/{data_plane_id}/default-compute-pool","href":"/api-reference/company/clear-the-companys-default-compute-pool-for-a-data-plane"},{"title":"Set the company's default compute pool for a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /company/{company_id}/data-planes/{data_plane_id}/default-compute-pool/{compute_pool_id}","href":"/api-reference/company/set-the-companys-default-compute-pool-for-a-data-plane"},{"title":"Update a user","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /users/{user_id}","href":"/api-reference/company/update-a-user"}]},{"group":"Company Marketing Information","pages":[{"title":"Returns the company and user associated with the token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /company-info/whoami","href":"/api-reference/company-marketing-information/returns-the-company-and-user-associated-with-the-token"},{"title":"Get marketing details on a company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /company-info/{company_id}","href":"/api-reference/company-marketing-information/get-marketing-details-on-a-company"}]},{"group":"Compute Pools","pages":[{"title":"List compute pools","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /data-planes/{data_plane_id}/compute-pools","href":"/api-reference/compute-pools/list-compute-pools"},{"title":"Create a compute pool","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /data-planes/{data_plane_id}/compute-pools","href":"/api-reference/compute-pools/create-a-compute-pool"},{"title":"Get a compute pool by ID","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /data-planes/{data_plane_id}/compute-pools/{compute_pool_id}","href":"/api-reference/compute-pools/get-a-compute-pool-by-id"},{"title":"Update a compute pool","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /data-planes/{data_plane_id}/compute-pools/{compute_pool_id}","href":"/api-reference/compute-pools/update-a-compute-pool"},{"title":"Archive a compute pool","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /data-planes/{data_plane_id}/compute-pools/{compute_pool_id}","href":"/api-reference/compute-pools/archive-a-compute-pool"}]},{"group":"Connections","pages":[{"title":"List connections","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/connections","href":"/api-reference/connections/list-connections"},{"title":"Create a connection","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/connections","href":"/api-reference/connections/create-a-connection"},{"title":"Get a connection","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/connections/{connection_id}","href":"/api-reference/connections/get-a-connection"},{"title":"Archive a connection","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /v2/connections/{connection_id}","href":"/api-reference/connections/archive-a-connection"}]},{"group":"Data Planes","pages":[{"title":"List data planes","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /data-planes","href":"/api-reference/data-planes/list-data-planes"},{"title":"Create a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /data-planes","href":"/api-reference/data-planes/create-a-data-plane"},{"title":"Get a data plane by ID","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /data-planes/{data_plane_id}","href":"/api-reference/data-planes/get-a-data-plane-by-id"},{"title":"Archive a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /data-planes/{data_plane_id}","href":"/api-reference/data-planes/archive-a-data-plane"},{"title":"Update a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json patch /data-planes/{data_plane_id}","href":"/api-reference/data-planes/update-a-data-plane"},{"title":"Data plane heartbeat","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /data-planes/{data_plane_id}/heartbeat","href":"/api-reference/data-planes/data-plane-heartbeat"},{"title":"Trigger a health check","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /data-planes/{data_plane_id}/health-check","href":"/api-reference/data-planes/trigger-a-health-check"},{"title":"Replace the collaborators on a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /data-planes/{data_plane_id}/collaborators","href":"/api-reference/data-planes/replace-the-collaborators-on-a-data-plane"},{"title":"Add a collaborator to a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /data-planes/{data_plane_id}/collaborators/{collaborator_company_id}","href":"/api-reference/data-planes/add-a-collaborator-to-a-data-plane"},{"title":"Remove a collaborator from a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /data-planes/{data_plane_id}/collaborators/{collaborator_company_id}","href":"/api-reference/data-planes/remove-a-collaborator-from-a-data-plane"},{"title":"Set the default compute pool for a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /data-planes/{data_plane_id}/default-compute-pool/{compute_pool_id}","href":"/api-reference/data-planes/set-the-default-compute-pool-for-a-data-plane"},{"title":"Clear the default compute pool for a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /data-planes/{data_plane_id}/default-compute-pool","href":"/api-reference/data-planes/clear-the-default-compute-pool-for-a-data-plane"}]},{"group":"Dataset Configuration","pages":[{"title":"Preview snapshot expirations","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/retention-policy/preview","href":"/api-reference/dataset-configuration/preview-snapshot-expirations"},{"title":"Upsert retention policies for a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/retention-policy","href":"/api-reference/dataset-configuration/upsert-retention-policies-for-a-dataset"}]},{"group":"Dataset Files","pages":[{"title":"Files added","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/snapshots/{snapshot_id}/files-added","href":"/api-reference/dataset-files/files-added"},{"title":"Find snapshots","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/find-snapshots","href":"/api-reference/dataset-files/find-snapshots"},{"title":"Find files","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/find-files","href":"/api-reference/dataset-files/find-files"},{"title":"Issue file download url","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/snapshots/{snapshot_id}/files-added/{file_id}/download","href":"/api-reference/dataset-files/issue-file-download-url"}]},{"group":"Dataset Refresh","pages":[{"title":"Update the materialized view refresh configuration","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/refresh-schedule","href":"/api-reference/dataset-refresh/update-the-materialized-view-refresh-configuration"},{"title":"Create a refresh schedule for an existing materialized view","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/refresh-schedule","href":"/api-reference/dataset-refresh/create-a-refresh-schedule-for-an-existing-materialized-view"},{"title":"Archive the materialized view refresh configuration","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /datasets/{dataset_id}/refresh-schedule","href":"/api-reference/dataset-refresh/archive-the-materialized-view-refresh-configuration"},{"title":"Run a materialized view refresh now","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/refresh-materialized-view","href":"/api-reference/dataset-refresh/run-a-materialized-view-refresh-now"}]},{"group":"Dataset Samples","pages":[{"title":"Sample a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/sample","href":"/api-reference/dataset-samples/sample-a-dataset"},{"title":"Upload a sample","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/sample","href":"/api-reference/dataset-samples/upload-a-sample"},{"title":"Delete a sample","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /datasets/{dataset_id}/sample","href":"/api-reference/dataset-samples/delete-a-sample"},{"title":"Sample a dataset (Admin)","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/admin/sample","href":"/api-reference/dataset-samples/sample-a-dataset-admin"},{"title":"Request Dataset Sample","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/request-sample","href":"/api-reference/dataset-samples/request-dataset-sample"},{"title":"Sample a dataset and redact the sample","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/datasets/{dataset_id}/request-sample","href":"/api-reference/dataset-samples/sample-a-dataset-and-redact-the-sample"},{"title":"Get a dataset's sample redaction","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/redaction","href":"/api-reference/dataset-samples/get-a-datasets-sample-redaction"},{"title":"Upload a dataset's sample redaction","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/redaction","href":"/api-reference/dataset-samples/upload-a-datasets-sample-redaction"},{"title":"Delete a dataset's sample redaction","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /datasets/{dataset_id}/redaction","href":"/api-reference/dataset-samples/delete-a-datasets-sample-redaction"},{"title":"Sample a dataset with its redaction applied","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/sample/redacted","href":"/api-reference/dataset-samples/sample-a-dataset-with-its-redaction-applied"},{"title":"Sampled Mappings","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/sample/mappings","href":"/api-reference/dataset-samples/sampled-mappings"}]},{"group":"Dataset Statistics","pages":[{"title":"Get Statistics Configuration","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/statistics-configuration","href":"/api-reference/dataset-statistics/get-statistics-configuration"},{"title":"Put Statistics Configuration","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/statistics-configuration","href":"/api-reference/dataset-statistics/put-statistics-configuration"},{"title":"Disable Statistics Configuration","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /datasets/{dataset_id}/statistics-configuration","href":"/api-reference/dataset-statistics/disable-statistics-configuration"}]},{"group":"Datasets","pages":[{"title":"Get datasets","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets","href":"/api-reference/datasets/get-datasets"},{"title":"Create a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets","href":"/api-reference/datasets/create-a-dataset"},{"title":"Get a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}","href":"/api-reference/datasets/get-a-dataset"},{"title":"Update a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}","href":"/api-reference/datasets/update-a-dataset"},{"title":"Delete a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /datasets/{dataset_id}","href":"/api-reference/datasets/delete-a-dataset"},{"title":"Activate a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/activate","href":"/api-reference/datasets/activate-a-dataset"},{"title":"Activate a dataset","description":"Activates a dataset.\n\nThis locks in the schema and allows Narrative to begin ingesting data.","deprecated":true,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/activate","href":"/api-reference/datasets/activate-a-dataset-1"},{"title":"Truncate a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/truncate","href":"/api-reference/datasets/truncate-a-dataset"},{"title":"Get admin info for a dataset","description":"Get a dataset including information about the backing [Iceberg table](http://iceberg.apache.org/).","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/admin","href":"/api-reference/datasets/get-admin-info-for-a-dataset"},{"title":"Update a dataset's partition spec","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/admin/partition-spec","href":"/api-reference/datasets/update-a-datasets-partition-spec"},{"title":"Get dataset statistics","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/stats","href":"/api-reference/datasets/get-dataset-statistics"},{"title":"Get detailed statistics","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/column-stats","href":"/api-reference/datasets/get-detailed-statistics"},{"title":"Create or Update detailed statistics","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/column-stats","href":"/api-reference/datasets/create-or-update-detailed-statistics"},{"title":"Submit recalculation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/column-stats/recalculate","href":"/api-reference/datasets/submit-recalculation"},{"title":"Get detailed statistics for a snapshot","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/column-stats/{snapshot_id}","href":"/api-reference/datasets/get-detailed-statistics-for-a-snapshot"},{"title":"Combine snapshot metrics","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/combine","href":"/api-reference/datasets/combine-snapshot-metrics"},{"title":"Ingest a file","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/upload","href":"/api-reference/datasets/ingest-a-file"},{"title":"Issue an ingestion token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/upload/token","href":"/api-reference/datasets/issue-an-ingestion-token"},{"title":"Metrics","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/metrics","href":"/api-reference/datasets/metrics"},{"title":"Metrics","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/snapshots/{snapshot_id}/column-stats","href":"/api-reference/datasets/metrics-1"},{"title":"Get Metrics Configuration","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/stats-config","href":"/api-reference/datasets/get-metrics-configuration"},{"title":"Put Metrics Configuration","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/stats-config","href":"/api-reference/datasets/put-metrics-configuration"},{"title":"Disable configuration","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /datasets/{dataset_id}/stats-config","href":"/api-reference/datasets/disable-configuration"},{"title":"Derive the configuration","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/derive-stats-config","href":"/api-reference/datasets/derive-the-configuration"},{"title":"Enable configuration","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/enable-stats-config","href":"/api-reference/datasets/enable-configuration"},{"title":"List connector interfaces compatible with a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/interfaces","href":"/api-reference/datasets/list-connector-interfaces-compatible-with-a-dataset"}]},{"group":"Derivations","pages":[{"title":"Get derivation rules","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /derivations","href":"/api-reference/derivations/get-derivation-rules"},{"title":"Create a derivation rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /derivations","href":"/api-reference/derivations/create-a-derivation-rule"},{"title":"Get a derivation rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /derivations/{derivation_id}","href":"/api-reference/derivations/get-a-derivation-rule"},{"title":"Delete a derivation rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /derivations/{derivation_id}","href":"/api-reference/derivations/delete-a-derivation-rule"},{"title":"Update a derivation rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json patch /derivations/{derivation_id}","href":"/api-reference/derivations/update-a-derivation-rule"}]},{"group":"Encryption Materials","pages":[{"title":"List encryption materials","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /encryption-materials","href":"/api-reference/encryption-materials/list-encryption-materials"},{"title":"Create an encryption material","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /encryption-materials","href":"/api-reference/encryption-materials/create-an-encryption-material"},{"title":"List decrypted encryption materials","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /encryption-materials/decrypted","href":"/api-reference/encryption-materials/list-decrypted-encryption-materials"},{"title":"Get an encryption material","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /encryption-materials/{encryption_material_id}","href":"/api-reference/encryption-materials/get-an-encryption-material"},{"title":"Update an encryption material","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /encryption-materials/{encryption_material_id}","href":"/api-reference/encryption-materials/update-an-encryption-material"},{"title":"Archive an encryption material","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /encryption-materials/{encryption_material_id}","href":"/api-reference/encryption-materials/archive-an-encryption-material"}]},{"group":"Installations","pages":[{"title":"List Installations","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /installations","href":"/api-reference/installations/list-installations"},{"title":"Create Installation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /installations","href":"/api-reference/installations/create-installation"},{"title":"Whoami Installation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /installations/whoami","href":"/api-reference/installations/whoami-installation"},{"title":"Get Installation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /installations/{id}","href":"/api-reference/installations/get-installation"},{"title":"Delete Installation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /installations/{id}","href":"/api-reference/installations/delete-installation"},{"title":"Create Installation Token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /installations/{id}/token","href":"/api-reference/installations/create-installation-token"}]},{"group":"Jobs","pages":[{"title":"Get jobs","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /jobs","href":"/api-reference/jobs/get-jobs"},{"title":"Get a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /jobs/{job_id}","href":"/api-reference/jobs/get-a-job"},{"title":"Run a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /jobs/{job_id}/run","href":"/api-reference/jobs/run-a-job"},{"title":"Schedule a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /jobs/{job_id}/schedule","href":"/api-reference/jobs/schedule-a-job"},{"title":"Complete a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /jobs/{job_id}/complete","href":"/api-reference/jobs/complete-a-job"},{"title":"Fail a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /jobs/{job_id}/fail","href":"/api-reference/jobs/fail-a-job"},{"title":"Request cancellation of a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /jobs/{job_id}/request-cancellation","href":"/api-reference/jobs/request-cancellation-of-a-job"},{"title":"Cancel a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /jobs/{job_id}/cancel","href":"/api-reference/jobs/cancel-a-job"},{"title":"Reschedule a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /jobs/{job_id}/reschedule","href":"/api-reference/jobs/reschedule-a-job"}]},{"group":"Mappings","pages":[{"title":"Get mappings","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /mappings","href":"/api-reference/mappings/get-mappings"},{"title":"Get mapping","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /mappings/{mapping_id}","href":"/api-reference/mappings/get-mapping"},{"title":"Update a mapping","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /mappings/{mapping_id}","href":"/api-reference/mappings/update-a-mapping"},{"title":"Delete a mapping","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /mappings/{mapping_id}","href":"/api-reference/mappings/delete-a-mapping"},{"title":"Accept a mapping","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /mappings/{mapping_id}/accept","href":"/api-reference/mappings/accept-a-mapping"},{"title":"Get mappings for a company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /mappings/companies/{company_id}","href":"/api-reference/mappings/get-mappings-for-a-company"},{"title":"Create a mapping","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /mappings/companies/{company_id}","href":"/api-reference/mappings/create-a-mapping"},{"title":"Get mapping preview","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /mappings/{mapping_id}/sample","href":"/api-reference/mappings/get-mapping-preview"},{"title":"Test Mapping","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /mappings/test","href":"/api-reference/mappings/test-mapping"}]},{"group":"MCP Connections","pages":[{"title":"List the calling user's external MCP connections","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /mcp-connections","href":"/api-reference/mcp-connections/list-the-calling-users-external-mcp-connections"},{"title":"Begin connecting an external MCP server","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /mcp-connections","href":"/api-reference/mcp-connections/begin-connecting-an-external-mcp-server"},{"title":"OAuth redirect target that receives the authorization code","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /mcp-connections/callback","href":"/api-reference/mcp-connections/oauth-redirect-target-that-receives-the-authorization-code"},{"title":"Finish connecting an external MCP server","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /mcp-connections/complete","href":"/api-reference/mcp-connections/finish-connecting-an-external-mcp-server"},{"title":"Get one of the calling user's MCP connections","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /mcp-connections/{id}","href":"/api-reference/mcp-connections/get-one-of-the-calling-users-mcp-connections"},{"title":"Delete one of the calling user's MCP connections","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /mcp-connections/{id}","href":"/api-reference/mcp-connections/delete-one-of-the-calling-users-mcp-connections"}]},{"group":"Model Inference","pages":[{"title":"Run model inference","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /model-inference/run","href":"/api-reference/model-inference/run-model-inference"}]},{"group":"Model Training","pages":[{"title":"Fine-tune a model","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /model-training/run","href":"/api-reference/model-training/fine-tune-a-model"},{"title":"Train a classifier","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v1/model-training/train-classifier","href":"/api-reference/model-training/train-a-classifier"}]},{"group":"Models","pages":[{"title":"Get models","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /models","href":"/api-reference/models/get-models"},{"title":"Get a model","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /models/{model_id}","href":"/api-reference/models/get-a-model"},{"title":"Update a model","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /models/{model_id}","href":"/api-reference/models/update-a-model"},{"title":"Archive a model","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /models/{model_id}","href":"/api-reference/models/archive-a-model"}]},{"group":"NQL","pages":[{"title":"Validate an NQL statement","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /nql/validate","href":"/api-reference/nql/validate-an-nql-statement"},{"title":"Parse an NQL statement","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /nql/parse","href":"/api-reference/nql/parse-an-nql-statement"},{"title":"Execute an NQL statement","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v1/nql/execute","href":"/api-reference/nql/execute-an-nql-statement"},{"title":"Get a forecast job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /nql/{job_id}","href":"/api-reference/nql/get-a-forecast-job"}]},{"group":"Permissions","pages":[{"title":"Create a permission","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /admin/permissions","href":"/api-reference/permissions/create-a-permission"}]},{"group":"Profiles","pages":[{"title":"Returns app profiles","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /installations/{installation_id}/profiles","href":"/api-reference/profiles/returns-app-profiles"},{"title":"Creates an app profile","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /installations/{installation_id}/profiles","href":"/api-reference/profiles/creates-an-app-profile"},{"title":"Returns profile with {profile_id}","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /installations/{installation_id}/profiles/{app_profile_id}","href":"/api-reference/profiles/returns-profile-with-"},{"title":"Updates an existing app profile","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /installations/{installation_id}/profiles/{app_profile_id}","href":"/api-reference/profiles/updates-an-existing-app-profile"},{"title":"Enables a profile","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /installations/{installation_id}/profiles/{app_profile_id}/enable","href":"/api-reference/profiles/enables-a-profile"},{"title":"Disables a profile","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /installations/{installation_id}/profiles/{app_profile_id}/disable","href":"/api-reference/profiles/disables-a-profile"},{"title":"Archives a profile","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /installations/{installation_id}/profiles/{app_profile_id}/archive","href":"/api-reference/profiles/archives-a-profile"}]},{"group":"Queries","pages":[{"title":"Get a query by id","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/queries/{query_id}","href":"/api-reference/queries/get-a-query-by-id"},{"title":"Deletes a query","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /v2/queries/{query_id}","href":"/api-reference/queries/deletes-a-query"},{"title":"Get accessible queries","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/queries","href":"/api-reference/queries/get-accessible-queries"},{"title":"Create a query","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/queries","href":"/api-reference/queries/create-a-query"}]},{"group":"Resources","pages":[{"title":"Get buckets","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /resources/buckets","href":"/api-reference/resources/get-buckets"},{"title":"Create bucket","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /resources/buckets","href":"/api-reference/resources/create-bucket"},{"title":"Update access type","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /resources/update-access","href":"/api-reference/resources/update-access-type"}]},{"group":"Schema Inference","pages":[{"title":"Infer the dataset schema of a file passed by multipart file.","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/inference","href":"/api-reference/schema-inference/infer-the-dataset-schema-of-a-file-passed-by-multipart-file"}]},{"group":"Uploads","pages":[{"title":"Upload a file","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /uploads/{upload_path}","href":"/api-reference/uploads/upload-a-file"}]},{"group":"Usage","pages":[{"title":"Create a usage event","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /usage","href":"/api-reference/usage/create-a-usage-event"}]},{"group":"Views","pages":[{"title":"Get a view by id","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/views/{view_id}","href":"/api-reference/views/get-a-view-by-id"},{"title":"Updates a view","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /v2/views/{view_id}","href":"/api-reference/views/updates-a-view"},{"title":"Archives a view","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /v2/views/{view_id}","href":"/api-reference/views/archives-a-view"},{"title":"Get accessible views","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/views","href":"/api-reference/views/get-accessible-views"},{"title":"Create a view","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/views","href":"/api-reference/views/create-a-view"}]},{"group":"Webhooks","pages":[{"title":"List webhook subscriptions","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /webhooks","href":"/api-reference/webhooks/list-webhook-subscriptions"},{"title":"Create a webhook subscription","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /webhooks","href":"/api-reference/webhooks/create-a-webhook-subscription"},{"title":"Get a webhook subscription by ID","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /webhooks/{webhook_subscription_id}","href":"/api-reference/webhooks/get-a-webhook-subscription-by-id"},{"title":"Archive a webhook subscription","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /webhooks/{webhook_subscription_id}","href":"/api-reference/webhooks/archive-a-webhook-subscription"},{"title":"Event delivery","version":null,"deprecated":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json webhook webhookDelivery","href":"/api-reference/webhooks/event-delivery"}]},{"group":"Whoami","pages":[{"title":"Get a current user","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /whoami","href":"/api-reference/whoami/get-a-current-user"}]},{"group":"Workflows","pages":[{"title":"List workflows","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /workflows","href":"/api-reference/workflows/list-workflows"},{"title":"Create a workflow","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /workflows","href":"/api-reference/workflows/create-a-workflow"},{"title":"Get a workflow","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /workflows/{workflow_id}","href":"/api-reference/workflows/get-a-workflow"},{"title":"Archive a workflow","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /workflows/{workflow_id}","href":"/api-reference/workflows/archive-a-workflow"},{"title":"Trigger a workflow","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /workflows/{workflow_id}/trigger","href":"/api-reference/workflows/trigger-a-workflow"},{"title":"Schedule a workflow","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /workflows/{workflow_id}/schedule","href":"/api-reference/workflows/schedule-a-workflow"},{"title":"Remove a workflow schedule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /workflows/{workflow_id}/schedule","href":"/api-reference/workflows/remove-a-workflow-schedule"},{"title":"Cancel a workflow execution","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /workflows/{workflow_id}/cancel","href":"/api-reference/workflows/cancel-a-workflow-execution"},{"title":"List workflow runs","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /workflows/{workflow_id}/runs","href":"/api-reference/workflows/list-workflow-runs"},{"title":"Cancel a specific workflow run","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /workflows/{workflow_id}/runs/{run_id}/cancel","href":"/api-reference/workflows/cancel-a-specific-workflow-run"}]}]}]},"title":"Truncate a dataset - Narrative I/O Knowledge Base","buildId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","deploymentId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-rfhihCWU.js","utils-BmH1XFxk.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BcNsxPKB.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BAES3tkd.js","snippetPresets-DCMQBKLP.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-D6l_bzE9.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BOktbnNh.js","shallow-BCs8SgM7.js","getApiPlaygroundDisplay-DEmW5bJB.js","CodeSnippet-CpZOpB9C.js","CodeSnippets-BOBDqibl.js","Page-D5fEM6aW.js","getPastedJson-DH2JBvmr.js","icon-BBJH-kKh.js","MethodPill-D2Sd5NLC.js","DuplicateIcon-CGgfL2qN.js","createIcon-BKudBBzi.js","DynamicMarkdown-85clUA0i.js","SectionHeading-D0JiMgDx.js","axios-vUo_bRtp.js","Markdown-Cfiy0xZO.js","clsx-rL8ZCCw4.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-aeztFa9U.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BywkCr5C.js"]}