{"openapi":"3.1.0","info":{"title":"Lainstack API","description":"The Lainstack operations integrations can call: run automations and read their runs, work the review queue, and read reference tables. Each operation starts with the credentials it accepts:\n\n- **API key**: an organization API key as `Authorization: Bearer lsk_…`, with the scope the operation names.\n- **Endpoint key** and **Secret URL**: the webhook ingresses that start runs, authenticated by their URL and the trigger's own secret.\n\nThe same requirements are in each operation's OpenAPI `security`, and the label in `x-lainstack-auth`.","version":"1.0.0"},"tags":[{"name":"Automations","description":"Read the automations in a workspace."},{"name":"Runs","description":"Start automation runs, list the operations you can run, and read runs and their outputs."},{"name":"Triggers and webhooks","description":"Receive webhook calls and inbound callbacks that start automations."},{"name":"Escalations","description":"Read the review queue and decide review issues."},{"name":"Reference tables","description":"Read the reference tables in a workspace and their rows."},{"name":"Health","description":"Check that the API is up."}],"x-tagGroups":[{"name":"Automations","tags":["Automations","Runs","Triggers and webhooks"]},{"name":"Review","tags":["Escalations"]},{"name":"Data lake","tags":["Reference tables"]},{"name":"Service","tags":["Health"]}],"components":{"schemas":{"valueInputData":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"$ref":"#/components/schemas/valueInputDataRecord"},{"$ref":"#/components/schemas/valueInputDataList"}]},"valueInputDataRecord":{"type":"object","maxProperties":100,"propertyNames":{"type":"string","minLength":1,"maxLength":240},"additionalProperties":{"$ref":"#/components/schemas/valueInputData"},"not":{"anyOf":[{"required":["__resolution"]},{"required":["__kind"],"properties":{"__kind":{"enum":["file","collection","spill"]}}}]}},"valueInputDataList":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/valueInputData"}},"valueInputNative":{"oneOf":[{"type":"object","properties":{"kind":{"const":"unset"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"literal"},"value":{"$ref":"#/components/schemas/valueInputData"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"reference"},"reference":{"$ref":"#/components/schemas/valueInputReference"}},"required":["kind","reference"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"template"},"parts":{"type":"array","minItems":1,"maxItems":32,"items":{"$ref":"#/components/schemas/valueInputTextPart"}}},"required":["kind","parts"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"record"},"fields":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":240},"input":{"$ref":"#/components/schemas/valueInputNative"}},"required":["key","input"],"additionalProperties":false}}},"required":["kind","fields"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"list"},"items":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/valueInputNative"}}},"required":["kind","items"],"additionalProperties":false},{"$ref":"#/components/schemas/valueInputEach"}]},"valueInputTableRow":{"type":"object","maxProperties":100,"propertyNames":{"type":"string","minLength":1,"maxLength":240},"additionalProperties":{"$ref":"#/components/schemas/valueInputNative"}},"valueInputReferenceSource":{"oneOf":[{"type":"object","properties":{"kind":{"const":"blockOutput"},"blockId":{"type":"string","minLength":1,"maxLength":240,"pattern":"^\\S(?:[\\s\\S]*\\S)?$"},"outputId":{"type":"string","minLength":1,"maxLength":240,"pattern":"^\\S(?:[\\s\\S]*\\S)?$"}},"required":["kind","blockId","outputId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"context"},"sourceId":{"type":"string","minLength":1,"maxLength":240,"pattern":"^\\S(?:[\\s\\S]*\\S)?$"}},"required":["kind","sourceId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"item"},"itemName":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"}},"required":["kind","itemName"],"additionalProperties":false}]},"valueInputEach":{"type":"object","properties":{"kind":{"const":"each"},"source":{"$ref":"#/components/schemas/valueInputReference"},"itemName":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$"},"input":{"$ref":"#/components/schemas/valueInputNative"}},"required":["kind","source","itemName","input"],"additionalProperties":false},"valueInputReference":{"type":"object","properties":{"source":{"$ref":"#/components/schemas/valueInputReferenceSource"},"path":{"type":"array","maxItems":32,"items":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"integer","minimum":0}]}},"optional":{"const":true},"transforms":{"type":"array","minItems":1,"maxItems":8,"items":{"oneOf":[{"type":"object","properties":{"op":{"const":"upper"}},"required":["op"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"lower"}},"required":["op"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"trim"}},"required":["op"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"replace"},"from":{"type":"string","maxLength":10000},"to":{"type":"string","maxLength":10000}},"required":["op","from","to"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"slice"},"start":{"type":"integer","minimum":-1000000,"maximum":1000000},"end":{"type":"integer","minimum":-1000000,"maximum":1000000}},"required":["op","start"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"split"},"separator":{"type":"string","maxLength":10000}},"required":["op","separator"],"additionalProperties":false},{"type":"object","properties":{"op":{"const":"join"},"separator":{"type":"string","maxLength":10000}},"required":["op","separator"],"additionalProperties":false}]}}},"required":["source","path"],"additionalProperties":false},"valueInputTextPart":{"oneOf":[{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maxLength":10000}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"reference"},"reference":{"$ref":"#/components/schemas/valueInputReference"}},"required":["kind","reference"],"additionalProperties":false}]},"valueInput":{"oneOf":[{"type":"object","properties":{"kind":{"const":"unset"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"literal"},"value":{"$ref":"#/components/schemas/valueInputData"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"reference"},"reference":{"$ref":"#/components/schemas/valueInputReference"}},"required":["kind","reference"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"template"},"parts":{"type":"array","minItems":1,"maxItems":32,"items":{"$ref":"#/components/schemas/valueInputTextPart"}}},"required":["kind","parts"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"record"},"fields":{"type":"array","maxItems":100,"uniqueItems":true,"items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":240},"input":{"$ref":"#/components/schemas/valueInput"}},"required":["key","input"],"additionalProperties":false}}},"required":["kind","fields"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"list"},"items":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/valueInputNative"}}},"required":["kind","items"],"additionalProperties":false},{"$ref":"#/components/schemas/valueInputEach"},{"type":"object","properties":{"kind":{"const":"table"},"rows":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/valueInputTableRow"}}},"required":["kind","rows"],"additionalProperties":false}]},"valueSchemaTextConstraints":{"type":"object","properties":{"minLength":{"type":"integer","minimum":0},"maxLength":{"type":"integer","minimum":0},"pattern":{"type":"string","maxLength":512}},"additionalProperties":false},"valueSchemaNumberDimensionContext":{"oneOf":[{"type":"object","properties":{"kind":{"const":"countedUnit"},"unit":{"type":"string","minLength":1,"maxLength":160}},"required":["kind","unit"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"currency"},"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["kind","currencyCode"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"currencyRate"},"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$"},"basis":{"type":"string","minLength":1,"maxLength":160}},"required":["kind","currencyCode","basis"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"referenceCondition"},"profile":{"type":"string","minLength":1,"maxLength":160}},"required":["kind","profile"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"basis"},"basis":{"type":"string","minLength":1,"maxLength":160}},"required":["kind","basis"],"additionalProperties":false}]},"valueSchemaNumberDimension":{"type":"object","properties":{"registryRevision":{"type":"string","minLength":1,"maxLength":256},"kind":{"type":"string","minLength":1,"maxLength":160},"unit":{"type":"string","minLength":1,"maxLength":80},"context":{"$ref":"#/components/schemas/valueSchemaNumberDimensionContext"}},"required":["registryRevision","kind"],"additionalProperties":false},"valueSchemaNumberConstraints":{"type":"object","properties":{"minimum":{"type":"number"},"maximum":{"type":"number"},"integer":{"const":true},"precision":{"type":"integer","minimum":0,"maximum":15},"allowedValues":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"number"}}},"additionalProperties":false},"valueSchemaListConstraints":{"type":"object","properties":{"minItems":{"type":"integer","minimum":0},"maxItems":{"type":"integer","minimum":0}},"additionalProperties":false},"valueSchemaClassificationSelection":{"type":"object","properties":{"scheme":{"type":"string","minLength":1,"maxLength":160},"revision":{"type":"string","minLength":1,"maxLength":160}},"required":["scheme","revision"],"additionalProperties":false},"valueSchemaText":{"type":"object","properties":{"kind":{"const":"text"},"format":{"enum":["text","url","email","xml","json","date","datetime","timezone"]},"nullable":{"type":"boolean"},"constraints":{"$ref":"#/components/schemas/valueSchemaTextConstraints"},"sensitivity":{"enum":["safe","sensitive"]}},"required":["kind"],"additionalProperties":false},"valueSchemaNumber":{"type":"object","properties":{"kind":{"const":"number"},"dimension":{"$ref":"#/components/schemas/valueSchemaNumberDimension"},"nullable":{"type":"boolean"},"constraints":{"$ref":"#/components/schemas/valueSchemaNumberConstraints"},"sensitivity":{"enum":["safe","sensitive"]}},"required":["kind"],"additionalProperties":false},"valueSchemaBoolean":{"type":"object","properties":{"kind":{"const":"boolean"},"nullable":{"type":"boolean"},"sensitivity":{"enum":["safe","sensitive"]}},"required":["kind"],"additionalProperties":false},"valueSchemaNull":{"type":"object","properties":{"kind":{"const":"null"}},"required":["kind"],"additionalProperties":false},"valueSchemaEnum":{"type":"object","properties":{"kind":{"const":"enum"},"values":{"type":"array","minItems":1,"maxItems":100,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":240}},"classification":{"$ref":"#/components/schemas/valueSchemaClassificationSelection"},"nullable":{"type":"boolean"},"sensitivity":{"enum":["safe","sensitive"]}},"required":["kind"],"anyOf":[{"required":["values"]},{"required":["classification"]}],"additionalProperties":false},"valueSchemaRecord":{"type":"object","properties":{"kind":{"const":"record"},"fields":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":240},"required":{"type":"boolean"},"schema":{"$ref":"#/components/schemas/valueSchema"}},"required":["key","required","schema"],"additionalProperties":false}},"exclusive":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","properties":{"keys":{"type":"array","minItems":2,"maxItems":100,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":240}},"required":{"type":"boolean"}},"required":["keys","required"],"additionalProperties":false}},"nullable":{"type":"boolean"},"sensitivity":{"enum":["safe","sensitive"]}},"required":["kind","fields"],"additionalProperties":false},"valueSchemaUniformList":{"type":"object","properties":{"kind":{"const":"list"},"mode":{"const":"uniform"},"element":{"$ref":"#/components/schemas/valueSchemaNative"},"nullable":{"type":"boolean"},"constraints":{"$ref":"#/components/schemas/valueSchemaListConstraints"},"sensitivity":{"enum":["safe","sensitive"]}},"required":["kind","mode","element"],"additionalProperties":false},"valueSchemaTupleList":{"type":"object","properties":{"kind":{"const":"list"},"mode":{"const":"tuple"},"elements":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/valueSchemaNative"}},"nullable":{"type":"boolean"},"constraints":{"$ref":"#/components/schemas/valueSchemaListConstraints"},"sensitivity":{"enum":["safe","sensitive"]}},"required":["kind","mode","elements"],"additionalProperties":false},"valueSchemaNativeRecord":{"type":"object","properties":{"kind":{"const":"record"},"fields":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":240},"required":{"type":"boolean"},"schema":{"$ref":"#/components/schemas/valueSchemaNative"}},"required":["key","required","schema"],"additionalProperties":false}},"exclusive":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","properties":{"keys":{"type":"array","minItems":2,"maxItems":100,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":240}},"required":{"type":"boolean"}},"required":["keys","required"],"additionalProperties":false}},"nullable":{"type":"boolean"},"sensitivity":{"enum":["safe","sensitive"]}},"required":["kind","fields"],"additionalProperties":false},"valueSchemaNativeUniformList":{"type":"object","properties":{"kind":{"const":"list"},"mode":{"const":"uniform"},"element":{"$ref":"#/components/schemas/valueSchemaNative"},"nullable":{"type":"boolean"},"constraints":{"$ref":"#/components/schemas/valueSchemaListConstraints"},"sensitivity":{"enum":["safe","sensitive"]}},"required":["kind","mode","element"],"additionalProperties":false},"valueSchemaNativeTupleList":{"type":"object","properties":{"kind":{"const":"list"},"mode":{"const":"tuple"},"elements":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/valueSchemaNative"}},"nullable":{"type":"boolean"},"constraints":{"$ref":"#/components/schemas/valueSchemaListConstraints"},"sensitivity":{"enum":["safe","sensitive"]}},"required":["kind","mode","elements"],"additionalProperties":false},"valueSchemaNative":{"oneOf":[{"$ref":"#/components/schemas/valueSchemaText"},{"$ref":"#/components/schemas/valueSchemaNumber"},{"$ref":"#/components/schemas/valueSchemaBoolean"},{"$ref":"#/components/schemas/valueSchemaNull"},{"$ref":"#/components/schemas/valueSchemaEnum"},{"$ref":"#/components/schemas/valueSchemaNativeRecord"},{"$ref":"#/components/schemas/valueSchemaNativeUniformList"},{"$ref":"#/components/schemas/valueSchemaNativeTupleList"}]},"valueSchemaTableDocument":{"type":"object","properties":{"kind":{"const":"document"},"nullable":{"type":"boolean"}},"required":["kind"],"additionalProperties":false},"valueSchemaTableColumnValue":{"oneOf":[{"$ref":"#/components/schemas/valueSchemaNative"},{"$ref":"#/components/schemas/valueSchemaTableDocument"}]},"valueSchemaTableColumn":{"type":"object","properties":{"columnId":{"type":"string","minLength":1,"maxLength":160},"name":{"type":"string","minLength":1,"maxLength":240},"valueSchema":{"$ref":"#/components/schemas/valueSchemaTableColumnValue"},"description":{"type":"string","maxLength":500},"examples":{"type":"array","maxItems":8,"items":{"type":"string","maxLength":200}},"source":{"type":"object","properties":{"originalHeader":{"type":"string","maxLength":240},"sourceColumnId":{"type":"string","minLength":1,"maxLength":160}},"additionalProperties":false}},"required":["columnId","name","valueSchema"],"additionalProperties":false},"valueSchemaTableSchema":{"type":"object","properties":{"shape":{"const":"table"},"fingerprint":{"type":"string","maxLength":256,"pattern":"^sha256:[0-9a-f]{64}$"},"columns":{"type":"array","minItems":1,"maxItems":32,"items":{"$ref":"#/components/schemas/valueSchemaTableColumn"}}},"required":["shape","fingerprint","columns"],"additionalProperties":false},"valueSchemaTable":{"type":"object","properties":{"kind":{"const":"table"},"schema":{"$ref":"#/components/schemas/valueSchemaTableSchema"}},"required":["kind"],"additionalProperties":false},"valueSchema":{"oneOf":[{"$ref":"#/components/schemas/valueSchemaText"},{"$ref":"#/components/schemas/valueSchemaNumber"},{"$ref":"#/components/schemas/valueSchemaBoolean"},{"$ref":"#/components/schemas/valueSchemaNull"},{"$ref":"#/components/schemas/valueSchemaEnum"},{"$ref":"#/components/schemas/valueSchemaRecord"},{"$ref":"#/components/schemas/valueSchemaUniformList"},{"$ref":"#/components/schemas/valueSchemaTupleList"},{"$ref":"#/components/schemas/valueSchemaTable"}]},"zod_3c99936e___schema0":{"anyOf":[{"type":"object","properties":{"==":{"type":"array","prefixItems":[{"type":"object","properties":{"var":{"type":"string","minLength":1,"maxLength":160}},"required":["var"],"additionalProperties":false},{}],"items":false,"minItems":2,"maxItems":2}},"required":["=="],"additionalProperties":false},{"type":"object","properties":{"in":{"type":"array","prefixItems":[{"type":"object","properties":{"var":{"type":"string","minLength":1,"maxLength":160}},"required":["var"],"additionalProperties":false},{"maxItems":64,"type":"array","items":{}}],"items":false,"minItems":2,"maxItems":2}},"required":["in"],"additionalProperties":false},{"type":"object","properties":{"!!":{"type":"object","properties":{"var":{"type":"string","minLength":1,"maxLength":160}},"required":["var"],"additionalProperties":false}},"required":["!!"],"additionalProperties":false},{"type":"object","properties":{"!":{"$ref":"#/components/schemas/zod_3c99936e___schema0"}},"required":["!"],"additionalProperties":false},{"type":"object","properties":{"and":{"minItems":1,"maxItems":16,"type":"array","items":{"$ref":"#/components/schemas/zod_3c99936e___schema0"}}},"required":["and"],"additionalProperties":false},{"type":"object","properties":{"or":{"minItems":1,"maxItems":16,"type":"array","items":{"$ref":"#/components/schemas/zod_3c99936e___schema0"}}},"required":["or"],"additionalProperties":false}]},"zod_a6f84314___schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/zod_a6f84314___schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/zod_a6f84314___schema0"}}]},"ProblemDetails":{"type":"object","description":"RFC 9457 problem details.","properties":{"type":{"type":"string","description":"Always about:blank."},"title":{"type":"string","description":"The HTTP status text."},"status":{"type":"integer","description":"The HTTP status code."},"detail":{"type":"string","description":"What went wrong, for a person to read."},"code":{"type":"string","description":"Machine-readable error code in lower snake case."},"details":{"description":"Structured context for the error. Present only for some codes."}},"required":["type","title","status","detail","code"],"example":{"type":"about:blank","title":"Not Found","status":404,"detail":"Workspace not found","code":"not_found"}}},"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"lsk_<region>_<random>","description":"An organization API key, sent as `Authorization: Bearer lsk_…`. Organization admins create keys with the scopes and workspaces each key may use. Only operations that list this scheme accept a key, and each names the scope it needs."},"endpointSecret":{"type":"apiKey","in":"header","name":"x-automation-api-key","description":"The secret of an API trigger that uses API key authentication. It can also be sent as `Authorization: Bearer <secret>`. It is not an organization API key."},"endpointSignature":{"type":"apiKey","in":"header","name":"x-automation-signature","description":"For an API trigger that uses HMAC authentication: `sha256=` followed by the hex HMAC-SHA256 of `<timestamp>.<raw body>`, keyed with the trigger secret. Send the same timestamp in `x-automation-timestamp`; it must be within 5 minutes of the server clock."}}},"paths":{"/api/workspaces/{workspaceId}/automations":{"get":{"tags":["Automations"],"summary":"List workspace automations","operationId":"listAutomations","description":"**Authentication: API key.** Accepts an organization API key with the `automation:read` scope, or the web app's browser session.\n\nLists every automation in the workspace with its status, graph, endpoint and release aliases. The list is not paginated. Requires the `automation:read` permission; an organization API key with the `automation:read` scope also works.","parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The workspace's id.","example":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e"}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Unique id of the automation."},"organizationId":{"type":"string","minLength":1,"description":"Id of the organization the automation belongs to."},"workspaceId":{"type":"string","minLength":1,"description":"Id of the workspace the automation belongs to."},"name":{"type":"string","minLength":1,"description":"Name of the automation."},"description":{"description":"What the automation does, in the author's words. Null when not set.","type":["string","null"]},"status":{"type":"string","enum":["draft","active","disabled"],"description":"`draft` has never been published, `active` runs on its triggers, `disabled` is paused."},"version":{"type":"integer","description":"Version counter of the automation, which increases with each publish."},"graphRevision":{"type":"integer","description":"Counter that increases with each edit to the draft graph. Pass it as `expectedGraphRevision` to detect concurrent edits."},"hasDraftChanges":{"description":"True when the draft graph differs from the live revision. Absent in list responses.","type":"boolean"},"graph":{"type":"object","properties":{"entryBlockId":{"type":"string","maxLength":120,"description":"Id of the block a run starts at. Empty when the graph has no blocks."},"blocks":{"maxItems":256,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Id of the block, unique within the graph. Other blocks refer to its output by this id."},"type":{"type":"string","minLength":1,"maxLength":160,"description":"Key of the block type, as listed by List available automation block types."},"title":{"description":"Display name of the block. Absent when not set.","type":"string","minLength":1,"maxLength":120},"provider":{"description":"Where the block type comes from: `core` blocks ship with Lainstack and `external` blocks come from a plugin. Absent when not set.","type":"string","enum":["core","external"]},"position":{"description":"Where the block sits on the editor canvas. Absent when no position is saved.","type":"object","properties":{"x":{"type":"number","description":"Horizontal position of the block on the editor canvas."},"y":{"type":"number","description":"Vertical position of the block on the editor canvas."}},"required":["x","y"],"additionalProperties":false},"config":{"description":"The block's settings, keyed by setting name. The allowed keys and values depend on the block type.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"onCorrectableFailure":{"description":"What the block does when it fails in a way a person could fix. `fail` fails the run; `request_correction` pauses it and asks for a correction.","type":"string","enum":["fail","request_correction"]},"sampleOutput":{"description":"A sample of the block's output kept for building and testing downstream blocks. Absent when no sample was saved."},"sampleOutputDraftedByAgent":{"description":"True while `sampleOutput` is as an Agent drafted it. Absent once a person edits or captures the sample.","type":"boolean","const":true}},"required":["id","type"],"additionalProperties":false},"description":"The blocks in the graph, at most 256."},"connections":{"maxItems":1024,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"description":"Id of the connection, unique within the graph."},"sourceBlockId":{"type":"string","minLength":1,"maxLength":120,"description":"Id of the block the connection starts from."},"sourcePortId":{"type":"string","minLength":1,"maxLength":120,"description":"Id of the output port on the source block."},"targetBlockId":{"type":"string","minLength":1,"maxLength":120,"description":"Id of the block the connection leads to."},"targetPortId":{"type":"string","minLength":1,"maxLength":120,"description":"Id of the input port on the target block."}},"required":["id","sourceBlockId","sourcePortId","targetBlockId","targetPortId"],"additionalProperties":false},"description":"The connections that link block ports, at most 1,024."},"triggerRoutes":{"description":"Which trigger block starts a run for each trigger type, at most 32. Absent when no routes are set.","maxItems":32,"type":"array","items":{"type":"object","properties":{"triggerBlockKey":{"type":"string","minLength":1,"maxLength":160,"description":"Key of the trigger block type this route applies to, or `*` or `default` for a fallback route."},"triggerBlockId":{"type":"string","minLength":1,"maxLength":120,"description":"Id of the trigger block that starts a run for this route."}},"required":["triggerBlockKey","triggerBlockId"],"additionalProperties":false}}},"required":["entryBlockId","blocks","connections"],"additionalProperties":false,"description":"The draft graph of blocks and connections."},"endpoint":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the endpoint accepts requests."},"endpointKey":{"type":"string","minLength":1,"description":"The key in the endpoint's invoke URL."},"authMode":{"type":"string","enum":["none","api_key","hmac_sha256"],"description":"How callers prove who they are: `none` accepts any request, `api_key` checks a shared secret, `hmac_sha256` checks a signature of the body."},"secretSet":{"type":"boolean","description":"Whether the endpoint has a secret. The secret itself is never returned."},"allowedIps":{"type":"array","items":{"type":"string"},"description":"IP addresses or CIDR ranges that may call the endpoint. Empty when any address may."}},"required":["enabled","endpointKey","authMode","secretSet","allowedIps"],"additionalProperties":false},{"type":"null"}],"description":"The webhook endpoint settings. Null when the automation has no endpoint."},"publishedAt":{"description":"When the automation was last published, as an ISO 8601 timestamp. Null if it was never published.","type":["string","null"]},"createdAt":{"type":"string","minLength":1,"description":"When the automation was created, as an ISO 8601 timestamp."},"updatedAt":{"type":"string","minLength":1,"description":"When the automation was last changed, as an ISO 8601 timestamp."},"releaseAliases":{"type":"array","items":{"type":"object","properties":{"alias":{"type":"string","enum":["live","canary"],"description":"Name of the alias. `live` serves all runs; `canary` serves a share of them."},"revision":{"type":"integer","minimum":1,"description":"Number of the published revision the alias points at."},"rolloutPercentage":{"type":"integer","minimum":0,"maximum":100,"description":"Percentage of runs the alias serves, from 0 to 100."}},"required":["alias","revision","rolloutPercentage"],"additionalProperties":false},"description":"The automation's release aliases, each pointing at a published revision."},"runCount":{"type":"integer","minimum":0,"description":"How many runs the automation has started."}},"required":["id","organizationId","workspaceId","name","description","status","version","graphRevision","graph","endpoint","publishedAt","createdAt","updatedAt","releaseAliases","runCount"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false},"example":{"data":[{"id":"0195f3b4-1a2b-7c3d-8e4f-5a6b7c8d9e0f","organizationId":"0195f3a1-2b3c-7d4e-8f5a-6b7c8d9e0f1a","workspaceId":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e","name":"Request intake","description":"Records each submitted request in the Requests table.","status":"active","version":3,"graphRevision":7,"hasDraftChanges":false,"graph":{"entryBlockId":"request_form","blocks":[{"id":"request_form","type":"@lainstack/operation/submitted-trigger","provider":"core","config":{"formTitle":"Submit a request","fields":[{"key":"requestId","label":"Request ID","type":"text","required":true},{"key":"summary","label":"Summary","type":"textarea","required":false}]}},{"id":"received_at","type":"@lainstack/time/current","provider":"core","config":{"timezone":{"kind":"literal","value":"UTC"}}},{"id":"record_request","type":"@lainstack/reference-table/write","provider":"core"}],"connections":[{"id":"request_form-received_at","sourceBlockId":"request_form","sourcePortId":"out","targetBlockId":"received_at","targetPortId":"in"},{"id":"received_at-record_request","sourceBlockId":"received_at","sourcePortId":"out","targetBlockId":"record_request","targetPortId":"in"}]},"endpoint":null,"publishedAt":"2026-10-20T16:02:11.000Z","createdAt":"2026-10-14T10:31:47.000Z","updatedAt":"2026-10-20T16:02:11.000Z","releaseAliases":[{"alias":"live","revision":3,"rolloutPercentage":100}],"runCount":128}]}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"security":[{"apiKey":["automation:read"]}],"x-lainstack-auth":{"label":"API key","description":"Accepts an organization API key with the `automation:read` scope, or the web app's browser session."}}},"/api/workspaces/{workspaceId}/automations/{automationId}":{"get":{"tags":["Automations"],"summary":"Get workspace automation","operationId":"getAutomation","description":"**Authentication: API key.** Accepts an organization API key with the `automation:read` scope, or the web app's browser session.\n\nReturns one automation with its status, draft graph, endpoint settings and release aliases. Requires the `automation:read` permission.","parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The workspace's id.","example":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e"},{"name":"automationId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The automation's id.","example":"0195f3b4-1a2b-7c3d-8e4f-5a6b7c8d9e0f"}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Unique id of the automation."},"organizationId":{"type":"string","minLength":1,"description":"Id of the organization the automation belongs to."},"workspaceId":{"type":"string","minLength":1,"description":"Id of the workspace the automation belongs to."},"name":{"type":"string","minLength":1,"description":"Name of the automation."},"description":{"description":"What the automation does, in the author's words. Null when not set.","type":["string","null"]},"status":{"type":"string","enum":["draft","active","disabled"],"description":"`draft` has never been published, `active` runs on its triggers, `disabled` is paused."},"version":{"type":"integer","description":"Version counter of the automation, which increases with each publish."},"graphRevision":{"type":"integer","description":"Counter that increases with each edit to the draft graph. Pass it as `expectedGraphRevision` to detect concurrent edits."},"hasDraftChanges":{"description":"True when the draft graph differs from the live revision. Absent in list responses.","type":"boolean"},"graph":{"type":"object","properties":{"entryBlockId":{"type":"string","maxLength":120,"description":"Id of the block a run starts at. Empty when the graph has no blocks."},"blocks":{"maxItems":256,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Id of the block, unique within the graph. Other blocks refer to its output by this id."},"type":{"type":"string","minLength":1,"maxLength":160,"description":"Key of the block type, as listed by List available automation block types."},"title":{"description":"Display name of the block. Absent when not set.","type":"string","minLength":1,"maxLength":120},"provider":{"description":"Where the block type comes from: `core` blocks ship with Lainstack and `external` blocks come from a plugin. Absent when not set.","type":"string","enum":["core","external"]},"position":{"description":"Where the block sits on the editor canvas. Absent when no position is saved.","type":"object","properties":{"x":{"type":"number","description":"Horizontal position of the block on the editor canvas."},"y":{"type":"number","description":"Vertical position of the block on the editor canvas."}},"required":["x","y"],"additionalProperties":false},"config":{"description":"The block's settings, keyed by setting name. The allowed keys and values depend on the block type.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"onCorrectableFailure":{"description":"What the block does when it fails in a way a person could fix. `fail` fails the run; `request_correction` pauses it and asks for a correction.","type":"string","enum":["fail","request_correction"]},"sampleOutput":{"description":"A sample of the block's output kept for building and testing downstream blocks. Absent when no sample was saved."},"sampleOutputDraftedByAgent":{"description":"True while `sampleOutput` is as an Agent drafted it. Absent once a person edits or captures the sample.","type":"boolean","const":true}},"required":["id","type"],"additionalProperties":false},"description":"The blocks in the graph, at most 256."},"connections":{"maxItems":1024,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"description":"Id of the connection, unique within the graph."},"sourceBlockId":{"type":"string","minLength":1,"maxLength":120,"description":"Id of the block the connection starts from."},"sourcePortId":{"type":"string","minLength":1,"maxLength":120,"description":"Id of the output port on the source block."},"targetBlockId":{"type":"string","minLength":1,"maxLength":120,"description":"Id of the block the connection leads to."},"targetPortId":{"type":"string","minLength":1,"maxLength":120,"description":"Id of the input port on the target block."}},"required":["id","sourceBlockId","sourcePortId","targetBlockId","targetPortId"],"additionalProperties":false},"description":"The connections that link block ports, at most 1,024."},"triggerRoutes":{"description":"Which trigger block starts a run for each trigger type, at most 32. Absent when no routes are set.","maxItems":32,"type":"array","items":{"type":"object","properties":{"triggerBlockKey":{"type":"string","minLength":1,"maxLength":160,"description":"Key of the trigger block type this route applies to, or `*` or `default` for a fallback route."},"triggerBlockId":{"type":"string","minLength":1,"maxLength":120,"description":"Id of the trigger block that starts a run for this route."}},"required":["triggerBlockKey","triggerBlockId"],"additionalProperties":false}}},"required":["entryBlockId","blocks","connections"],"additionalProperties":false,"description":"The draft graph of blocks and connections."},"endpoint":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the endpoint accepts requests."},"endpointKey":{"type":"string","minLength":1,"description":"The key in the endpoint's invoke URL."},"authMode":{"type":"string","enum":["none","api_key","hmac_sha256"],"description":"How callers prove who they are: `none` accepts any request, `api_key` checks a shared secret, `hmac_sha256` checks a signature of the body."},"secretSet":{"type":"boolean","description":"Whether the endpoint has a secret. The secret itself is never returned."},"allowedIps":{"type":"array","items":{"type":"string"},"description":"IP addresses or CIDR ranges that may call the endpoint. Empty when any address may."}},"required":["enabled","endpointKey","authMode","secretSet","allowedIps"],"additionalProperties":false},{"type":"null"}],"description":"The webhook endpoint settings. Null when the automation has no endpoint."},"publishedAt":{"description":"When the automation was last published, as an ISO 8601 timestamp. Null if it was never published.","type":["string","null"]},"createdAt":{"type":"string","minLength":1,"description":"When the automation was created, as an ISO 8601 timestamp."},"updatedAt":{"type":"string","minLength":1,"description":"When the automation was last changed, as an ISO 8601 timestamp."},"releaseAliases":{"type":"array","items":{"type":"object","properties":{"alias":{"type":"string","enum":["live","canary"],"description":"Name of the alias. `live` serves all runs; `canary` serves a share of them."},"revision":{"type":"integer","minimum":1,"description":"Number of the published revision the alias points at."},"rolloutPercentage":{"type":"integer","minimum":0,"maximum":100,"description":"Percentage of runs the alias serves, from 0 to 100."}},"required":["alias","revision","rolloutPercentage"],"additionalProperties":false},"description":"The automation's release aliases, each pointing at a published revision."},"runCount":{"type":"integer","minimum":0,"description":"How many runs the automation has started."}},"required":["id","organizationId","workspaceId","name","description","status","version","graphRevision","graph","endpoint","publishedAt","createdAt","updatedAt","releaseAliases","runCount"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"id":"0195f3b4-1a2b-7c3d-8e4f-5a6b7c8d9e0f","organizationId":"0195f3a1-2b3c-7d4e-8f5a-6b7c8d9e0f1a","workspaceId":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e","name":"Request intake","description":"Records each submitted request in the Requests table.","status":"active","version":3,"graphRevision":7,"hasDraftChanges":false,"graph":{"entryBlockId":"request_form","blocks":[{"id":"request_form","type":"@lainstack/operation/submitted-trigger","provider":"core","config":{"formTitle":"Submit a request","fields":[{"key":"requestId","label":"Request ID","type":"text","required":true},{"key":"summary","label":"Summary","type":"textarea","required":false}]}},{"id":"received_at","type":"@lainstack/time/current","provider":"core","config":{"timezone":{"kind":"literal","value":"UTC"}}},{"id":"record_request","type":"@lainstack/reference-table/write","provider":"core"}],"connections":[{"id":"request_form-received_at","sourceBlockId":"request_form","sourcePortId":"out","targetBlockId":"received_at","targetPortId":"in"},{"id":"received_at-record_request","sourceBlockId":"received_at","sourcePortId":"out","targetBlockId":"record_request","targetPortId":"in"}]},"endpoint":null,"publishedAt":"2026-10-20T16:02:11.000Z","createdAt":"2026-10-14T10:31:47.000Z","updatedAt":"2026-10-20T16:02:11.000Z","releaseAliases":[{"alias":"live","revision":3,"rolloutPercentage":100}],"runCount":128}}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"security":[{"apiKey":["automation:read"]}],"x-lainstack-auth":{"label":"API key","description":"Accepts an organization API key with the `automation:read` scope, or the web app's browser session."}}},"/api/workspaces/{workspaceId}/automation-run-evidence":{"get":{"tags":["Runs"],"summary":"List automation runs","operationId":"listRuns","description":"**Authentication: API key.** Accepts an organization API key with the `automation:read` scope, or the web app's browser session.\n\nLists the workspace's runs, newest first, 50 per page by default (up to 200). Filter by automation, status, mode, start time, trigger, review state or free text. Pass nextCursor from the response as cursor to read the next page. Requires the `automation:read` permission.","parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The workspace's id.","example":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":2048},"description":"Cursor from the previous page's nextCursor. Omit it to read the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200},"description":"How many runs to return, from 1 to 200. Defaults to 50."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","running","waiting","success","failed","cancelled","suspended"]},"description":"Only return runs in this status."},{"name":"automation_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":240},"description":"Only return runs of this automation."},{"name":"started_from","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Only return runs started at or after this ISO 8601 timestamp."},{"name":"started_to","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Only return runs started at or before this ISO 8601 timestamp. Cannot be combined with started_before."},{"name":"started_before","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Only return runs started before this ISO 8601 timestamp. Cannot be combined with started_to."},{"name":"billable","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean","const":true},{"type":"string","const":"true"}]},"description":"Pass `true` to only return live runs that no other run started."},{"name":"mode","in":"query","required":false,"schema":{"type":"string","enum":["live","draft","any"]},"description":"Only return runs in this mode: `live`, `draft`, or `any` for every run. Omit it for live runs."},{"name":"initiated_by_actor_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":240},"description":"Only return runs started by this user or service."},{"name":"submission_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":240},"description":"Only return runs started by this form submission."},{"name":"parent_run_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":240},"description":"Only return runs started by a Run automation block of this run."},{"name":"failure_code","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64},"description":"Only return runs that failed with this failure code."},{"name":"failed_block_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":240},"description":"Only return runs that failed at this block."},{"name":"trigger","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":255},"description":"Only return runs whose trigger block id or trigger reference contains this text."},{"name":"review","in":"query","required":false,"schema":{"type":"string","enum":["open","none"]},"description":"`open` returns runs with an open review issue; `none` returns runs without one."},{"name":"search","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":255},"description":"Only return runs whose id, trigger reference, automation name, display name or display reference contains this text."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["started_at_desc","started_at_asc"]},"description":"Order by start time: `started_at_desc` (newest first, the default) or `started_at_asc`."}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"items":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":240,"description":"Unique id of the run."},"automation":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":240,"description":"Unique id of the automation."},"name":{"type":"string","maxLength":240,"description":"Name of the automation."}},"required":["id","name"],"additionalProperties":false,"description":"The automation the run belongs to."},"parent":{"description":"The run whose Run automation block started this run. Null or absent when no other run started it.","anyOf":[{"type":"object","properties":{"runId":{"type":"string","minLength":1,"maxLength":240,"description":"Unique id of the parent run."},"automationName":{"type":"string","maxLength":240,"description":"Name of the parent run's automation."}},"required":["runId","automationName"],"additionalProperties":false},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}],"description":"Name shown for the run. Null when none was recorded."},"displayReference":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"description":"Short reference shown for the run. Null when none was recorded."},"status":{"type":"string","enum":["pending","running","waiting","success","failed","cancelled","suspended"],"description":"Where the run is in its lifecycle. `pending` and `running` are in progress, `waiting` and `suspended` are paused, and `success`, `failed` and `cancelled` are final."},"agentOutcome":{"anyOf":[{"type":"string","enum":["completed","failed","rejected","cancelled","expired","unsupported"],"description":"How the agent's work ended: `completed`, `failed`, `rejected` (a person rejected an approval request), `cancelled`, `expired` (an approval request timed out) or `unsupported` (the agent could not run, for example because it is not published)."},{"type":"null"}],"description":"Result of the run's agent. Null when no agent answered the run."},"terminalCode":{"anyOf":[{"type":"string","enum":["agent_terminal","block_failed","init_failed","dispatch_failed","correction_dispatch_authority_lost","correction_credential_unavailable","correction_contract_unavailable","correction_attempts_exhausted","cancelled","orphaned","reply_unresolved","return_unresolved"]},{"type":"null"}],"description":"Why the run ended, for example `block_failed` or `cancelled`. Null while the run is in progress or when no code was recorded."},"failedBlockId":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}],"description":"Id of the block that failed the run. Null when no block failed."},"recoveryState":{"anyOf":[{"type":"string","enum":["failed","resuming","recovered","failed_again","dismissed"]},{"type":"null"}],"description":"Where a failed run stands after it failed: `failed` until it is resumed or dismissed, `resuming` while a resume runs, then `recovered` or `failed_again`. Null for runs that did not fail."},"resumedAsRunId":{"description":"The run that resumed this one. Present only when reading one run.","type":["string","null"]},"resumeFailureMessage":{"description":"Why the run that resumed this one failed. Present only when reading one run.","type":["string","null"]},"dismissReason":{"description":"Why the run was dismissed. Null or absent when it was not.","type":["string","null"]},"failure":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,63}$","description":"Error code of the failure, in snake case."},"message":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}],"description":"Message the block raised, with sensitive values removed. Null when the block gave none."}},"required":["code","message"],"additionalProperties":false},{"type":"null"}],"description":"Why the failed block failed. Null when the run did not fail at a block."},"outcome":{"default":null,"description":"How the run reads when it ends: the label and tone of the last outcome port a step routed to. Null when no step routed to one.","anyOf":[{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"tone":{"type":"string","enum":["success","neutral","attention","failure"]}},"required":["label","tone"],"additionalProperties":false},{"type":"null"}]},"replyResolutionCode":{"anyOf":[{"type":"string","enum":["agent_fallback"]},{"type":"null"}],"description":"Set to `agent_fallback` when the run's reply could not be resolved and the agent's own reply was used. Null otherwise."},"mode":{"type":"string","enum":["live","draft"],"description":"How the run was executed: `live` for a published automation (resumed runs included), `draft` for a run of the draft."},"source":{"default":null,"description":"The earlier run this run was started from, for a resumed run or a draft run started from a past run. Null otherwise.","anyOf":[{"type":"object","properties":{"runId":{"type":"string","minLength":1,"maxLength":240,"description":"Unique id of the run this run reused."},"blockId":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}],"description":"Id of the block this run started from. Null when none was recorded."},"displayReference":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"description":"Short reference shown for the source run. Null when none was recorded."},"attempt":{"type":"integer","minimum":2,"description":"Which attempt this run is: 2 for the first resume of a run, then rising by one."}},"required":["runId","blockId","displayReference","attempt"],"additionalProperties":false},{"type":"null"}]},"runChannel":{"type":"string","enum":["batch","chat","assigned","unattended"],"description":"The channel the run came in on: `batch` for ordinary runs, `chat` for agent chat turns, `assigned` for assigned work and `watch` for watched work."},"submissionId":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}],"description":"Id of the form submission that started the run. Null when it did not come from a form."},"thinnedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the run's payload data was thinned away to save space, as an ISO 8601 timestamp. Null while the data is intact."},"executionDisposition":{"description":"Whether the run executed. `executed` is the normal case; the `no_execution_*` values mean the run was recorded but nothing ran. Absent on runs that predate this field.","type":"string","enum":["executed","no_execution_unpublished","no_execution_manual_invocation_unavailable"]},"trigger":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the trigger block that started the run."},"reference":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"recorded","description":"Always `recorded`: the trigger input was stored."},"digest":{"type":"string","pattern":"^tr1_[A-Za-z0-9_-]{43}$","description":"Opaque reference to the recorded trigger input."}},"required":["state","digest"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unavailable","description":"Always `unavailable`: no trigger input was stored."},"reason":{"type":"string","const":"not_recorded","description":"Always `not_recorded`."}},"required":["state","reason"],"additionalProperties":false}],"description":"Reference to the input the trigger received."}},"required":["blockId","reference"],"additionalProperties":false,"description":"The trigger that started the run."},"initiatedByActorId":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}],"description":"Id of the user or service that started the run. Null when it started on its own, for example from a webhook."},"reviewIssueId":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}],"description":"Id of the review issue the run was started for. Null when it was not started for one."},"revisionReference":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"recorded","description":"Always `recorded`: the revision is known."},"id":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the published revision the run executed."}},"required":["state","id"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unavailable","description":"Always `unavailable`: the revision is not known."},"reason":{"type":"string","const":"not_recorded","description":"Always `not_recorded`."}},"required":["state","reason"],"additionalProperties":false}],"description":"The published revision of the automation the run executed."},"startedAt":{"type":"string","format":"date-time","description":"When the run started, as an ISO 8601 timestamp."},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the run finished, as an ISO 8601 timestamp. Null while the run is in progress."},"activeWait":{"description":"The wait the run is paused on. Null or absent when the run is not waiting.","anyOf":[{"type":"object","properties":{"stepId":{"type":"string","minLength":1,"maxLength":240,"description":"Unique id of the waiting step."},"blockId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the block the step runs."},"blockType":{"type":"string","minLength":1,"maxLength":240,"description":"Type of the block the step runs."},"provider":{"type":"string","minLength":1,"maxLength":160,"description":"Provider that supplies the block."},"occurrenceId":{"type":"string","pattern":"^roc_[A-Za-z0-9_-]{43}$","description":"Unique id of this execution of the step."},"startedAt":{"type":"string","format":"date-time","description":"When the wait began, as an ISO 8601 timestamp."},"until":{"type":"string","format":"date-time","description":"When the wait ends, as an ISO 8601 timestamp."}},"required":["stepId","blockId","blockType","provider","occurrenceId","startedAt","until"],"additionalProperties":false},{"type":"null"}]},"aiUsage":{"default":null,"description":"Token use and cost of the run's AI calls. Null when the run made none.","anyOf":[{"type":"object","properties":{"factCount":{"type":"integer","exclusiveMinimum":0,"description":"Number of model calls counted."},"inputTokensTotal":{"description":"Total input tokens, as a decimal string. Absent when not reported.","type":"string","maxLength":30,"pattern":"^\\d+$"},"outputTokensTotal":{"description":"Total output tokens, as a decimal string. Absent when not reported.","type":"string","maxLength":30,"pattern":"^\\d+$"},"cacheReadInputTokens":{"description":"Input tokens read from the prompt cache, as a decimal string. Absent when not reported.","type":"string","maxLength":30,"pattern":"^\\d+$"},"cacheWriteInputTokens":{"description":"Input tokens written to the prompt cache, as a decimal string. Absent when not reported.","type":"string","maxLength":30,"pattern":"^\\d+$"},"reasoningOutputTokens":{"description":"Output tokens spent on reasoning, as a decimal string. Absent when not reported.","type":"string","maxLength":30,"pattern":"^\\d+$"},"usageCompleteness":{"type":"string","enum":["unknown","partial","complete"],"description":"Whether every counted call reported its token usage: `complete`, `partial` or `unknown`."},"cost":{"oneOf":[{"type":"object","properties":{"completeness":{"type":"string","const":"complete","description":"The cost covers every counted call."},"knownMicrousd":{"type":"string","maxLength":30,"pattern":"^\\d+$","description":"Estimated cost in micro-USD (millionths of a US dollar), as a decimal string."}},"required":["completeness","knownMicrousd"],"additionalProperties":false},{"type":"object","properties":{"completeness":{"type":"string","const":"partial","description":"The cost covers only some of the counted calls."},"knownMicrousd":{"type":"string","maxLength":30,"pattern":"^\\d+$","description":"Estimated cost of the calls that could be priced, in micro-USD (millionths of a US dollar), as a decimal string."}},"required":["completeness","knownMicrousd"],"additionalProperties":false},{"type":"object","properties":{"completeness":{"type":"string","const":"unknown","description":"The cost could not be estimated."},"reason":{"type":"string","enum":["missing_usage","unpriced_route","external_subscription","route_mismatch","mixed"],"description":"Why no cost could be estimated: usage was not reported, the model has no list price, it is covered by an external subscription, the priced route did not match, or several of these apply."}},"required":["completeness","reason"],"additionalProperties":false}],"description":"Estimated cost of the counted calls."}},"required":["factCount","usageCompleteness","cost"],"additionalProperties":false},{"type":"null"}]}},"required":["id","automation","displayName","displayReference","status","agentOutcome","terminalCode","failedBlockId","recoveryState","failure","outcome","replyResolutionCode","mode","source","runChannel","submissionId","thinnedAt","trigger","initiatedByActorId","reviewIssueId","revisionReference","startedAt","completedAt","aiUsage"],"additionalProperties":false},"description":"The runs on this page."},"nextCursor":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"description":"Cursor for the next page. Null on the last page."}},"required":["items","nextCursor"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"items":[{"id":"0195f3c8-6e7f-7a8b-9c0d-1e2f3a4b5c6d","automation":{"id":"0195f3b4-1a2b-7c3d-8e4f-5a6b7c8d9e0f","name":"Request intake"},"parent":null,"displayName":"REQ-1042","displayReference":null,"status":"success","agentOutcome":null,"terminalCode":null,"failedBlockId":null,"recoveryState":null,"failure":null,"outcome":null,"replyResolutionCode":null,"mode":"live","runChannel":"batch","submissionId":"0195f3c7-5d6e-7f7a-8b9c-0d1e2f3a4b5c","thinnedAt":null,"trigger":{"blockId":"request_form","reference":{"state":"unavailable","reason":"not_recorded"}},"initiatedByActorId":"0195f39f-5e6f-7a7b-8c9d-0e1f2a3b4c5d","reviewIssueId":null,"revisionReference":{"state":"recorded","id":"0195f3c0-2d3e-7f4a-8b5c-6d7e8f9a0b1c"},"startedAt":"2026-10-29T09:14:03.120Z","completedAt":"2026-10-29T09:14:05.482Z","activeWait":null,"aiUsage":null}],"nextCursor":null}}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Unprocessable Entity","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"security":[{"apiKey":["automation:read"]}],"x-lainstack-auth":{"label":"API key","description":"Accepts an organization API key with the `automation:read` scope, or the web app's browser session."}}},"/api/workspaces/{workspaceId}/automation-run-evidence/{runId}":{"get":{"tags":["Runs"],"summary":"Get a run's evidence","operationId":"getRun","description":"**Authentication: API key.** Accepts an organization API key with the `automation:read` scope, or the web app's browser session.\n\nReturns one run with its status, timing, trigger and the evidence of each step. Poll it to follow a run started by Run workspace automation until the status is terminal. Requires the `automation:read` permission.","parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The workspace's id.","example":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e"},{"name":"runId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The run's id, as returned by Run workspace automation or List automation runs.","example":"0195f3c8-6e7f-7a8b-9c0d-1e2f3a4b5c6d"}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"summary":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":240,"description":"Unique id of the run."},"automation":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":240,"description":"Unique id of the automation."},"name":{"type":"string","maxLength":240,"description":"Name of the automation."}},"required":["id","name"],"additionalProperties":false,"description":"The automation the run belongs to."},"parent":{"description":"The run whose Run automation block started this run. Null or absent when no other run started it.","anyOf":[{"type":"object","properties":{"runId":{"type":"string","minLength":1,"maxLength":240,"description":"Unique id of the parent run."},"automationName":{"type":"string","maxLength":240,"description":"Name of the parent run's automation."}},"required":["runId","automationName"],"additionalProperties":false},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}],"description":"Name shown for the run. Null when none was recorded."},"displayReference":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"description":"Short reference shown for the run. Null when none was recorded."},"status":{"type":"string","enum":["pending","running","waiting","success","failed","cancelled","suspended"],"description":"Where the run is in its lifecycle. `pending` and `running` are in progress, `waiting` and `suspended` are paused, and `success`, `failed` and `cancelled` are final."},"agentOutcome":{"anyOf":[{"type":"string","enum":["completed","failed","rejected","cancelled","expired","unsupported"],"description":"How the agent's work ended: `completed`, `failed`, `rejected` (a person rejected an approval request), `cancelled`, `expired` (an approval request timed out) or `unsupported` (the agent could not run, for example because it is not published)."},{"type":"null"}],"description":"Result of the run's agent. Null when no agent answered the run."},"terminalCode":{"anyOf":[{"type":"string","enum":["agent_terminal","block_failed","init_failed","dispatch_failed","correction_dispatch_authority_lost","correction_credential_unavailable","correction_contract_unavailable","correction_attempts_exhausted","cancelled","orphaned","reply_unresolved","return_unresolved"]},{"type":"null"}],"description":"Why the run ended, for example `block_failed` or `cancelled`. Null while the run is in progress or when no code was recorded."},"failedBlockId":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}],"description":"Id of the block that failed the run. Null when no block failed."},"recoveryState":{"anyOf":[{"type":"string","enum":["failed","resuming","recovered","failed_again","dismissed"]},{"type":"null"}],"description":"Where a failed run stands after it failed: `failed` until it is resumed or dismissed, `resuming` while a resume runs, then `recovered` or `failed_again`. Null for runs that did not fail."},"resumedAsRunId":{"description":"The run that resumed this one. Present only when reading one run.","type":["string","null"]},"resumeFailureMessage":{"description":"Why the run that resumed this one failed. Present only when reading one run.","type":["string","null"]},"dismissReason":{"description":"Why the run was dismissed. Null or absent when it was not.","type":["string","null"]},"failure":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,63}$","description":"Error code of the failure, in snake case."},"message":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}],"description":"Message the block raised, with sensitive values removed. Null when the block gave none."}},"required":["code","message"],"additionalProperties":false},{"type":"null"}],"description":"Why the failed block failed. Null when the run did not fail at a block."},"outcome":{"default":null,"description":"How the run reads when it ends: the label and tone of the last outcome port a step routed to. Null when no step routed to one.","anyOf":[{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"tone":{"type":"string","enum":["success","neutral","attention","failure"]}},"required":["label","tone"],"additionalProperties":false},{"type":"null"}]},"replyResolutionCode":{"anyOf":[{"type":"string","enum":["agent_fallback"]},{"type":"null"}],"description":"Set to `agent_fallback` when the run's reply could not be resolved and the agent's own reply was used. Null otherwise."},"mode":{"type":"string","enum":["live","draft"],"description":"How the run was executed: `live` for a published automation (resumed runs included), `draft` for a run of the draft."},"source":{"default":null,"description":"The earlier run this run was started from, for a resumed run or a draft run started from a past run. Null otherwise.","anyOf":[{"type":"object","properties":{"runId":{"type":"string","minLength":1,"maxLength":240,"description":"Unique id of the run this run reused."},"blockId":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}],"description":"Id of the block this run started from. Null when none was recorded."},"displayReference":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"description":"Short reference shown for the source run. Null when none was recorded."},"attempt":{"type":"integer","minimum":2,"description":"Which attempt this run is: 2 for the first resume of a run, then rising by one."}},"required":["runId","blockId","displayReference","attempt"],"additionalProperties":false},{"type":"null"}]},"runChannel":{"type":"string","enum":["batch","chat","assigned","unattended"],"description":"The channel the run came in on: `batch` for ordinary runs, `chat` for agent chat turns, `assigned` for assigned work and `watch` for watched work."},"submissionId":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}],"description":"Id of the form submission that started the run. Null when it did not come from a form."},"thinnedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the run's payload data was thinned away to save space, as an ISO 8601 timestamp. Null while the data is intact."},"executionDisposition":{"description":"Whether the run executed. `executed` is the normal case; the `no_execution_*` values mean the run was recorded but nothing ran. Absent on runs that predate this field.","type":"string","enum":["executed","no_execution_unpublished","no_execution_manual_invocation_unavailable"]},"trigger":{"type":"object","properties":{"blockId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the trigger block that started the run."},"reference":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"recorded","description":"Always `recorded`: the trigger input was stored."},"digest":{"type":"string","pattern":"^tr1_[A-Za-z0-9_-]{43}$","description":"Opaque reference to the recorded trigger input."}},"required":["state","digest"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unavailable","description":"Always `unavailable`: no trigger input was stored."},"reason":{"type":"string","const":"not_recorded","description":"Always `not_recorded`."}},"required":["state","reason"],"additionalProperties":false}],"description":"Reference to the input the trigger received."}},"required":["blockId","reference"],"additionalProperties":false,"description":"The trigger that started the run."},"initiatedByActorId":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}],"description":"Id of the user or service that started the run. Null when it started on its own, for example from a webhook."},"reviewIssueId":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}],"description":"Id of the review issue the run was started for. Null when it was not started for one."},"revisionReference":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"recorded","description":"Always `recorded`: the revision is known."},"id":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the published revision the run executed."}},"required":["state","id"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unavailable","description":"Always `unavailable`: the revision is not known."},"reason":{"type":"string","const":"not_recorded","description":"Always `not_recorded`."}},"required":["state","reason"],"additionalProperties":false}],"description":"The published revision of the automation the run executed."},"startedAt":{"type":"string","format":"date-time","description":"When the run started, as an ISO 8601 timestamp."},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the run finished, as an ISO 8601 timestamp. Null while the run is in progress."},"activeWait":{"description":"The wait the run is paused on. Null or absent when the run is not waiting.","anyOf":[{"type":"object","properties":{"stepId":{"type":"string","minLength":1,"maxLength":240,"description":"Unique id of the waiting step."},"blockId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the block the step runs."},"blockType":{"type":"string","minLength":1,"maxLength":240,"description":"Type of the block the step runs."},"provider":{"type":"string","minLength":1,"maxLength":160,"description":"Provider that supplies the block."},"occurrenceId":{"type":"string","pattern":"^roc_[A-Za-z0-9_-]{43}$","description":"Unique id of this execution of the step."},"startedAt":{"type":"string","format":"date-time","description":"When the wait began, as an ISO 8601 timestamp."},"until":{"type":"string","format":"date-time","description":"When the wait ends, as an ISO 8601 timestamp."}},"required":["stepId","blockId","blockType","provider","occurrenceId","startedAt","until"],"additionalProperties":false},{"type":"null"}]},"aiUsage":{"default":null,"description":"Token use and cost of the run's AI calls. Null when the run made none.","anyOf":[{"type":"object","properties":{"factCount":{"type":"integer","exclusiveMinimum":0,"description":"Number of model calls counted."},"inputTokensTotal":{"description":"Total input tokens, as a decimal string. Absent when not reported.","type":"string","maxLength":30,"pattern":"^\\d+$"},"outputTokensTotal":{"description":"Total output tokens, as a decimal string. Absent when not reported.","type":"string","maxLength":30,"pattern":"^\\d+$"},"cacheReadInputTokens":{"description":"Input tokens read from the prompt cache, as a decimal string. Absent when not reported.","type":"string","maxLength":30,"pattern":"^\\d+$"},"cacheWriteInputTokens":{"description":"Input tokens written to the prompt cache, as a decimal string. Absent when not reported.","type":"string","maxLength":30,"pattern":"^\\d+$"},"reasoningOutputTokens":{"description":"Output tokens spent on reasoning, as a decimal string. Absent when not reported.","type":"string","maxLength":30,"pattern":"^\\d+$"},"usageCompleteness":{"type":"string","enum":["unknown","partial","complete"],"description":"Whether every counted call reported its token usage: `complete`, `partial` or `unknown`."},"cost":{"oneOf":[{"type":"object","properties":{"completeness":{"type":"string","const":"complete","description":"The cost covers every counted call."},"knownMicrousd":{"type":"string","maxLength":30,"pattern":"^\\d+$","description":"Estimated cost in micro-USD (millionths of a US dollar), as a decimal string."}},"required":["completeness","knownMicrousd"],"additionalProperties":false},{"type":"object","properties":{"completeness":{"type":"string","const":"partial","description":"The cost covers only some of the counted calls."},"knownMicrousd":{"type":"string","maxLength":30,"pattern":"^\\d+$","description":"Estimated cost of the calls that could be priced, in micro-USD (millionths of a US dollar), as a decimal string."}},"required":["completeness","knownMicrousd"],"additionalProperties":false},{"type":"object","properties":{"completeness":{"type":"string","const":"unknown","description":"The cost could not be estimated."},"reason":{"type":"string","enum":["missing_usage","unpriced_route","external_subscription","route_mismatch","mixed"],"description":"Why no cost could be estimated: usage was not reported, the model has no list price, it is covered by an external subscription, the priced route did not match, or several of these apply."}},"required":["completeness","reason"],"additionalProperties":false}],"description":"Estimated cost of the counted calls."}},"required":["factCount","usageCompleteness","cost"],"additionalProperties":false},{"type":"null"}]}},"required":["id","automation","displayName","displayReference","status","agentOutcome","terminalCode","failedBlockId","recoveryState","failure","outcome","replyResolutionCode","mode","source","runChannel","submissionId","thinnedAt","trigger","initiatedByActorId","reviewIssueId","revisionReference","startedAt","completedAt","aiUsage"],"additionalProperties":false,"description":"The run's status, timing, trigger and outcome."},"record":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"complete","description":"Always `complete`: every part was saved."},"gaps":{"maxItems":0,"type":"array","items":{"type":"string","enum":["flush_failed","step_write_failed","value_over_cap","values_unavailable"]},"description":"Always empty."}},"required":["status","gaps"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"incomplete","description":"Always `incomplete`: part of the record could not be saved."},"gaps":{"minItems":1,"type":"array","items":{"type":"string","enum":["flush_failed","step_write_failed","value_over_cap","values_unavailable"]},"description":"What is missing: `flush_failed` when some step facts were never written, `step_write_failed` when some step rows were not saved, `value_over_cap` when a value was too large to keep, `values_unavailable` when some step values could not be saved or read."}},"required":["status","gaps"],"additionalProperties":false}],"description":"Whether every part of the run's record was saved."},"executedRevision":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"available","description":"Always `available`: the executed revision is known."},"value":{"oneOf":[{"type":"object","properties":{"source":{"type":"string","const":"published_revision","description":"Always `published_revision`: the run executed a published revision."},"id":{"type":"string","minLength":1,"maxLength":240,"description":"Unique id of the published revision."},"revision":{"type":"integer","exclusiveMinimum":0,"description":"Revision number, counting from 1."},"entryBlockId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the block the run entered the graph at."},"topology":{"type":"object","properties":{"blocks":{"maxItems":256,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120,"description":"Unique id of the block."},"type":{"type":"string","minLength":1,"maxLength":160,"description":"Type of the block."},"title":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}],"description":"Title the author gave the block. Null when it has none."},"provider":{"anyOf":[{"type":"string","enum":["core","external"]},{"type":"null"}],"description":"Whether the block ships with Lainstack (`core`) or comes from a package (`external`)."},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number","description":"Horizontal position on the canvas."},"y":{"type":"number","description":"Vertical position on the canvas."}},"required":["x","y"],"additionalProperties":false},{"type":"null"}],"description":"Where the block sits on the canvas. Null when it has no position."}},"required":["id","type","title","provider","position"],"additionalProperties":false},"description":"The blocks of the executed revision."},"connections":{"maxItems":1024,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"description":"Unique id of the connection."},"sourceBlockId":{"type":"string","minLength":1,"maxLength":120,"description":"Id of the block the connection starts at."},"sourcePortId":{"type":"string","minLength":1,"maxLength":120,"description":"Id of the output port the connection starts at."},"targetBlockId":{"type":"string","minLength":1,"maxLength":120,"description":"Id of the block the connection ends at."},"targetPortId":{"type":"string","minLength":1,"maxLength":120,"description":"Id of the input port the connection ends at."}},"required":["id","sourceBlockId","sourcePortId","targetBlockId","targetPortId"],"additionalProperties":false},"description":"The connections between the blocks."},"triggerRoutes":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"triggerBlockKey":{"type":"string","minLength":1,"maxLength":160,"description":"Key that identifies the trigger."},"triggerBlockId":{"type":"string","minLength":1,"maxLength":120,"description":"Id of the trigger block the key routes to."}},"required":["triggerBlockKey","triggerBlockId"],"additionalProperties":false},"description":"How trigger keys map to trigger blocks."}},"required":["blocks","connections","triggerRoutes"],"additionalProperties":false,"description":"The shape of the executed graph."},"createdAt":{"type":"string","format":"date-time","description":"When the revision was published, as an ISO 8601 timestamp."}},"required":["source","id","revision","entryBlockId","topology","createdAt"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","const":"draft_snapshot","description":"Always `draft_snapshot`: the run executed a saved snapshot of the draft."},"id":{"type":"string","minLength":1,"maxLength":240,"description":"Unique id of the draft snapshot."},"graphRevision":{"anyOf":[{"type":"integer","exclusiveMinimum":0},{"type":"null"}],"description":"Revision counter of the draft graph the snapshot was taken from. Null when the snapshot holds a graph that was never saved as the draft."},"entryBlockId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the block the run entered the graph at."},"topology":{"type":"object","properties":{"blocks":{"maxItems":256,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":120,"description":"Unique id of the block."},"type":{"type":"string","minLength":1,"maxLength":160,"description":"Type of the block."},"title":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}],"description":"Title the author gave the block. Null when it has none."},"provider":{"anyOf":[{"type":"string","enum":["core","external"]},{"type":"null"}],"description":"Whether the block ships with Lainstack (`core`) or comes from a package (`external`)."},"position":{"anyOf":[{"type":"object","properties":{"x":{"type":"number","description":"Horizontal position on the canvas."},"y":{"type":"number","description":"Vertical position on the canvas."}},"required":["x","y"],"additionalProperties":false},{"type":"null"}],"description":"Where the block sits on the canvas. Null when it has no position."}},"required":["id","type","title","provider","position"],"additionalProperties":false},"description":"The blocks of the executed revision."},"connections":{"maxItems":1024,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"description":"Unique id of the connection."},"sourceBlockId":{"type":"string","minLength":1,"maxLength":120,"description":"Id of the block the connection starts at."},"sourcePortId":{"type":"string","minLength":1,"maxLength":120,"description":"Id of the output port the connection starts at."},"targetBlockId":{"type":"string","minLength":1,"maxLength":120,"description":"Id of the block the connection ends at."},"targetPortId":{"type":"string","minLength":1,"maxLength":120,"description":"Id of the input port the connection ends at."}},"required":["id","sourceBlockId","sourcePortId","targetBlockId","targetPortId"],"additionalProperties":false},"description":"The connections between the blocks."},"triggerRoutes":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"triggerBlockKey":{"type":"string","minLength":1,"maxLength":160,"description":"Key that identifies the trigger."},"triggerBlockId":{"type":"string","minLength":1,"maxLength":120,"description":"Id of the trigger block the key routes to."}},"required":["triggerBlockKey","triggerBlockId"],"additionalProperties":false},"description":"How trigger keys map to trigger blocks."}},"required":["blocks","connections","triggerRoutes"],"additionalProperties":false,"description":"The shape of the executed graph."}},"required":["source","id","graphRevision","entryBlockId","topology"],"additionalProperties":false}],"description":"The revision the run executed."}},"required":["state","value"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unavailable","description":"Always `unavailable`: the executed revision is not known."},"reason":{"type":"string","enum":["not_recorded","snapshot_invalid","no_execution_unpublished","no_execution_manual_invocation_unavailable"],"description":"Why the revision is not known."}},"required":["state","reason"],"additionalProperties":false}],"description":"The revision of the automation the run executed."},"completeness":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"complete","description":"Always `complete`: every step fact is recorded."},"stepFactCount":{"type":"integer","minimum":0,"description":"How many step facts the run has."}},"required":["state","stepFactCount"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"syncing","description":"Always `syncing`: the run is still writing its step facts."},"stepFactCount":{"type":"integer","minimum":0,"description":"How many step facts are recorded so far."},"lastFlushedOrdinal":{"type":"integer","minimum":0,"description":"Ordinal of the last step fact written so far."},"factsTruncated":{"type":"boolean","description":"Whether some step facts were left out."}},"required":["state","stepFactCount","lastFlushedOrdinal","factsTruncated"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"truncated","description":"Always `truncated`: step facts were cut off at a size limit."},"stepFactCount":{"type":"integer","minimum":0,"description":"How many step facts are recorded."},"lastFlushedOrdinal":{"type":"integer","minimum":0,"description":"Ordinal of the last step fact written."},"reason":{"type":"string","enum":["trace_budget","trace_fact"],"description":"Which limit cut the facts off: `trace_budget` for the run's total size, `trace_fact` for a single fact."}},"required":["state","stepFactCount","lastFlushedOrdinal","reason"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"incomplete","description":"Always `incomplete`: the step facts are missing or unreadable."},"stepFactCount":{"type":"integer","minimum":0,"description":"How many step facts could be read."},"lastFlushedOrdinal":{"type":"integer","minimum":0,"description":"Ordinal of the last step fact written."},"reason":{"type":"string","enum":["trace_missing","trace_invalid","retention_expired"],"description":"Whether the facts were never recorded, could not be read, or were removed when old run data was thinned."}},"required":["state","stepFactCount","lastFlushedOrdinal","reason"],"additionalProperties":false}],"description":"Whether the run's step facts are complete."},"input":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"inline","description":"Always `inline`: the value is recorded in full."},"value":{"description":"The recorded JSON value, at most 32 KiB, with secrets and storage locations removed."}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"redacted","description":"Always `redacted`: the value exists but is withheld."},"reason":{"type":"string","enum":["credential","secret","policy","size_limit"],"description":"Why the value is withheld, for example `size_limit` when it was too large."}},"required":["kind","reason"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unavailable","description":"Always `unavailable`: no value can be shown."},"reason":{"type":"string","enum":["not_recorded","not_produced","suspended","syncing","truncated","retention_expired","invalid_source"],"description":"Why there is no value, for example `not_produced` when the step made none or `retention_expired` when old run data was thinned."}},"required":["kind","reason"],"additionalProperties":false}],"description":"The input the run started with."},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"inline","description":"Always `inline`: the value is recorded in full."},"value":{"description":"The recorded JSON value, at most 32 KiB, with secrets and storage locations removed."}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"redacted","description":"Always `redacted`: the value exists but is withheld."},"reason":{"type":"string","enum":["credential","secret","policy","size_limit"],"description":"Why the value is withheld, for example `size_limit` when it was too large."}},"required":["kind","reason"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unavailable","description":"Always `unavailable`: no value can be shown."},"reason":{"type":"string","enum":["not_recorded","not_produced","suspended","syncing","truncated","retention_expired","invalid_source"],"description":"Why there is no value, for example `not_produced` when the step made none or `retention_expired` when old run data was thinned."}},"required":["kind","reason"],"additionalProperties":false}],"description":"The output the run produced."},"error":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"inline","description":"Always `inline`: the value is recorded in full."},"value":{"description":"The recorded JSON value, at most 32 KiB, with secrets and storage locations removed."}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"redacted","description":"Always `redacted`: the value exists but is withheld."},"reason":{"type":"string","enum":["credential","secret","policy","size_limit"],"description":"Why the value is withheld, for example `size_limit` when it was too large."}},"required":["kind","reason"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unavailable","description":"Always `unavailable`: no value can be shown."},"reason":{"type":"string","enum":["not_recorded","not_produced","suspended","syncing","truncated","retention_expired","invalid_source"],"description":"Why there is no value, for example `not_produced` when the step made none or `retention_expired` when old run data was thinned."}},"required":["kind","reason"],"additionalProperties":false}],"description":"The run's failure message, the same text as `summary.failure.message`. It is `unavailable` when the run has none."},"stepFacts":{"maxItems":10000,"type":"array","items":{"type":"object","properties":{"occurrenceId":{"type":"string","pattern":"^roc_[A-Za-z0-9_-]{43}$","description":"Unique id of this execution of the step."},"ordinal":{"type":"integer","exclusiveMinimum":0,"description":"Position of the step in the run, counting from 1 in the order steps finished."},"blockId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the block the step ran."},"blockType":{"type":"string","minLength":1,"maxLength":240,"description":"Type of the block the step ran."},"provider":{"type":"string","minLength":1,"maxLength":160,"description":"Provider that supplies the block."},"status":{"type":"string","enum":["running","success","waiting","blocked","failed","yield_fan_out","yield_agent","held"],"description":"How the step ended. `running` means it has not ended yet, `waiting` and `blocked` mean it paused, `yield_fan_out` and `yield_agent` mean it handed work to parallel items or an agent, and `held` means a draft run planned a write instead of making it."},"executedPortId":{"description":"Id of the output port the step routed to. Absent when it routed to none.","type":"string","minLength":1,"maxLength":240},"outcome":{"description":"Label and tone of the outcome port the step routed to. Absent when it routed to none.","type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"tone":{"type":"string","enum":["success","neutral","attention","failure"]}},"required":["label","tone"],"additionalProperties":false},"attempt":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"recorded","description":"Always `recorded`: the attempt number is known."},"value":{"type":"integer","exclusiveMinimum":0,"description":"Attempt number, counting from 1."}},"required":["state","value"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unavailable","description":"Always `unavailable`: the attempt number is not known."},"reason":{"type":"string","const":"not_recorded","description":"Always `not_recorded`."}},"required":["state","reason"],"additionalProperties":false}],"description":"Which attempt of the step this is."},"correction":{"description":"Correction details. Absent when the step is not part of a correction.","type":"object","properties":{"occurrenceId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the step execution the correction applies to."},"correctionRound":{"type":"integer","minimum":1,"maximum":10,"description":"Which correction round this execution belongs to."},"attempt":{"type":"integer","minimum":0,"maximum":10,"description":"Attempt within the correction round."}},"required":["occurrenceId","correctionRound","attempt"],"additionalProperties":false},"loopCoordinates":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"recorded","description":"Always `recorded`: the step ran inside a loop."},"path":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"object","properties":{"loopBlockId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the loop block."},"iteration":{"type":"integer","minimum":0,"description":"Zero-based iteration of the loop."},"itemIndex":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Zero-based index of the item being processed. Null when the loop is not over items."},"batchIndex":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Zero-based index of the batch being processed. Null when the loop is not in batches."}},"required":["loopBlockId","iteration","itemIndex","batchIndex"],"additionalProperties":false},"description":"The loops the step ran in, outermost first."}},"required":["state","path"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"not_applicable","description":"Always `not_applicable`: the step did not run in a loop."}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unavailable","description":"Always `unavailable`: loop position is not known."},"reason":{"type":"string","const":"not_recorded","description":"Always `not_recorded`."}},"required":["state","reason"],"additionalProperties":false}],"description":"Where the step sat in any loops."},"startedAt":{"type":"string","format":"date-time","description":"When the step started, as an ISO 8601 timestamp."},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the step ended, as an ISO 8601 timestamp. Null while it has not ended."},"durationMs":{"type":"number","minimum":0,"description":"How long the step took, in milliseconds. 0 while it has not ended."},"input":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"inline","description":"Always `inline`: the value is recorded in full."},"value":{"description":"The recorded JSON value, at most 32 KiB, with secrets and storage locations removed."}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"redacted","description":"Always `redacted`: the value exists but is withheld."},"reason":{"type":"string","enum":["credential","secret","policy","size_limit"],"description":"Why the value is withheld, for example `size_limit` when it was too large."}},"required":["kind","reason"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unavailable","description":"Always `unavailable`: no value can be shown."},"reason":{"type":"string","enum":["not_recorded","not_produced","suspended","syncing","truncated","retention_expired","invalid_source"],"description":"Why there is no value, for example `not_produced` when the step made none or `retention_expired` when old run data was thinned."}},"required":["kind","reason"],"additionalProperties":false}],"description":"The input the step received."},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"inline","description":"Always `inline`: the value is recorded in full."},"value":{"description":"The recorded JSON value, at most 32 KiB, with secrets and storage locations removed."}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"redacted","description":"Always `redacted`: the value exists but is withheld."},"reason":{"type":"string","enum":["credential","secret","policy","size_limit"],"description":"Why the value is withheld, for example `size_limit` when it was too large."}},"required":["kind","reason"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unavailable","description":"Always `unavailable`: no value can be shown."},"reason":{"type":"string","enum":["not_recorded","not_produced","suspended","syncing","truncated","retention_expired","invalid_source"],"description":"Why there is no value, for example `not_produced` when the step made none or `retention_expired` when old run data was thinned."}},"required":["kind","reason"],"additionalProperties":false}],"description":"The output the step produced."},"error":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"inline","description":"Always `inline`: the value is recorded in full."},"value":{"description":"The recorded JSON value, at most 32 KiB, with secrets and storage locations removed."}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"redacted","description":"Always `redacted`: the value exists but is withheld."},"reason":{"type":"string","enum":["credential","secret","policy","size_limit"],"description":"Why the value is withheld, for example `size_limit` when it was too large."}},"required":["kind","reason"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unavailable","description":"Always `unavailable`: no value can be shown."},"reason":{"type":"string","enum":["not_recorded","not_produced","suspended","syncing","truncated","retention_expired","invalid_source"],"description":"Why there is no value, for example `not_produced` when the step made none or `retention_expired` when old run data was thinned."}},"required":["kind","reason"],"additionalProperties":false}],"description":"The step's failure message, with secrets removed. It is `unavailable` when the step did not fail."}},"required":["occurrenceId","ordinal","blockId","blockType","provider","status","attempt","loopCoordinates","startedAt","completedAt","durationMs","input","output","error"],"additionalProperties":false},"description":"The recorded steps of the run, in order, up to 10,000."},"resourceCatalog":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"available","description":"Always `available`: the catalog is included."},"value":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1,"description":"Version of the resource catalog format."},"runId":{"type":"string","minLength":1,"description":"Unique id of the run the resources belong to."},"items":{"type":"array","items":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1,"description":"Version of the resource descriptor format."},"resourceId":{"type":"string","pattern":"^rr1_[A-Za-z0-9_-]{43}$","description":"Unique id of the resource."},"runId":{"type":"string","minLength":1,"description":"Unique id of the run the resource belongs to."},"executionOccurrenceId":{"description":"Unique id of the step execution that produced the resource. Absent when no step did.","type":"string","pattern":"^roc_[A-Za-z0-9_-]{43}$"},"resourceVersion":{"type":"string","pattern":"^rv1_[A-Za-z0-9_-]{43}$","description":"Version of the resource. Pass it when reading the resource's content, preview or rows."},"kind":{"type":"string","enum":["json","text","file","image","pdf","email","email-body","email-attachment","table","run-trace","error","provenance","unknown"],"description":"What kind of content the resource holds."},"label":{"type":"string","minLength":1,"description":"Name shown for the resource."},"description":{"description":"Short description of the resource. Absent when none was set.","type":"string","minLength":1},"roles":{"type":"array","items":{"type":"string","minLength":1},"description":"The roles the resource plays in the run, sorted, for example `attachment`."},"source":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"run.output","description":"Always `run.output`: the value is part of the run's output."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"trigger.payload","description":"Always `trigger.payload`: the value is part of the trigger input."},"triggerBlockId":{"type":"string","minLength":1,"description":"Id of the trigger block that received the input."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","triggerBlockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block.input","description":"Always `block.input`: the value is part of a step's input."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block.output","description":"Always `block.output`: the value is part of a step's output."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"inspection.field","description":"Always `inspection.field`: the value is a field of a step inspection."},"activityId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Id of the activity the field belongs to. Null when it belongs to no activity."},"occurrenceId":{"type":"string","pattern":"^roc_[A-Za-z0-9_-]{43}$","description":"Unique id of the step execution."},"attempt":{"type":"integer","exclusiveMinimum":0,"description":"Attempt number of the step execution, counting from 1."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"phase":{"type":"string","enum":["input","output"],"description":"Whether the field is part of the step's input or its output."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","activityId","occurrenceId","attempt","blockId","phase","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fanout.item","description":"Always `fanout.item`: the value is an item a step fanned out."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"itemIndex":{"type":"integer","minimum":0,"description":"Zero-based index of the item."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","itemIndex","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fanout.result","description":"Always `fanout.result`: the value is the result for a fanned-out item."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"resultIndex":{"type":"integer","minimum":0,"description":"Zero-based index of the result."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","resultIndex","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"artifact","description":"Always `artifact`: the value is an artifact of the run."},"artifactId":{"type":"string","minLength":1,"description":"Unique id of the artifact."},"occurrenceId":{"description":"Unique id of the step execution that produced the artifact. Absent when none did.","type":"string","minLength":1},"blockId":{"description":"Id of the block that produced the artifact. Absent when no block did.","type":"string","minLength":1},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","artifactId","path"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","const":"file","description":"Always `file`: the resource is a file."},"origin":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"run.output","description":"Always `run.output`: the value is part of the run's output."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"trigger.payload","description":"Always `trigger.payload`: the value is part of the trigger input."},"triggerBlockId":{"type":"string","minLength":1,"description":"Id of the trigger block that received the input."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","triggerBlockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block.input","description":"Always `block.input`: the value is part of a step's input."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block.output","description":"Always `block.output`: the value is part of a step's output."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"inspection.field","description":"Always `inspection.field`: the value is a field of a step inspection."},"activityId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Id of the activity the field belongs to. Null when it belongs to no activity."},"occurrenceId":{"type":"string","pattern":"^roc_[A-Za-z0-9_-]{43}$","description":"Unique id of the step execution."},"attempt":{"type":"integer","exclusiveMinimum":0,"description":"Attempt number of the step execution, counting from 1."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"phase":{"type":"string","enum":["input","output"],"description":"Whether the field is part of the step's input or its output."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","activityId","occurrenceId","attempt","blockId","phase","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fanout.item","description":"Always `fanout.item`: the value is an item a step fanned out."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"itemIndex":{"type":"integer","minimum":0,"description":"Zero-based index of the item."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","itemIndex","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fanout.result","description":"Always `fanout.result`: the value is the result for a fanned-out item."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"resultIndex":{"type":"integer","minimum":0,"description":"Zero-based index of the result."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","resultIndex","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"artifact","description":"Always `artifact`: the value is an artifact of the run."},"artifactId":{"type":"string","minLength":1,"description":"Unique id of the artifact."},"occurrenceId":{"description":"Unique id of the step execution that produced the artifact. Absent when none did.","type":"string","minLength":1},"blockId":{"description":"Id of the block that produced the artifact. Absent when no block did.","type":"string","minLength":1},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","artifactId","path"],"additionalProperties":false}],"description":"Where in the run the file reference was found."}},"required":["kind","origin"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"collection","description":"Always `collection`: the resource is a collection of rows."},"origin":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"run.output","description":"Always `run.output`: the value is part of the run's output."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"trigger.payload","description":"Always `trigger.payload`: the value is part of the trigger input."},"triggerBlockId":{"type":"string","minLength":1,"description":"Id of the trigger block that received the input."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","triggerBlockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block.input","description":"Always `block.input`: the value is part of a step's input."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block.output","description":"Always `block.output`: the value is part of a step's output."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"inspection.field","description":"Always `inspection.field`: the value is a field of a step inspection."},"activityId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Id of the activity the field belongs to. Null when it belongs to no activity."},"occurrenceId":{"type":"string","pattern":"^roc_[A-Za-z0-9_-]{43}$","description":"Unique id of the step execution."},"attempt":{"type":"integer","exclusiveMinimum":0,"description":"Attempt number of the step execution, counting from 1."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"phase":{"type":"string","enum":["input","output"],"description":"Whether the field is part of the step's input or its output."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","activityId","occurrenceId","attempt","blockId","phase","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fanout.item","description":"Always `fanout.item`: the value is an item a step fanned out."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"itemIndex":{"type":"integer","minimum":0,"description":"Zero-based index of the item."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","itemIndex","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fanout.result","description":"Always `fanout.result`: the value is the result for a fanned-out item."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"resultIndex":{"type":"integer","minimum":0,"description":"Zero-based index of the result."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","resultIndex","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"artifact","description":"Always `artifact`: the value is an artifact of the run."},"artifactId":{"type":"string","minLength":1,"description":"Unique id of the artifact."},"occurrenceId":{"description":"Unique id of the step execution that produced the artifact. Absent when none did.","type":"string","minLength":1},"blockId":{"description":"Id of the block that produced the artifact. Absent when no block did.","type":"string","minLength":1},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","artifactId","path"],"additionalProperties":false}],"description":"Where in the run the collection reference was found."}},"required":["kind","origin"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"run.trace","description":"Always `run.trace`: the resource is the run's trace."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"loop.item.trace","description":"Always `loop.item.trace`: the resource is the trace of one loop item."},"loopBlockId":{"type":"string","minLength":1,"description":"Id of the loop block."},"jobId":{"type":"string","minLength":1,"description":"Unique id of the job that ran the item."},"itemIndex":{"type":"integer","minimum":0,"description":"Zero-based index of the loop item."},"lineageDigests":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"description":"Digests that identify the item's place in nested loops."}},"required":["kind","loopBlockId","jobId","itemIndex","lineageDigests"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"step.error","description":"Always `step.error`: the resource is a step's error."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."}},"required":["kind","occurrenceId","blockId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"step.trace","description":"Always `step.trace`: the resource is a step's trace."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"ordinal":{"type":"integer","minimum":0,"description":"Position of the step in the run."}},"required":["kind","occurrenceId","blockId","ordinal"],"additionalProperties":false}],"description":"Where in the run the resource came from."},"contentType":{"description":"Media type of the content. Absent when unknown.","type":"string","minLength":1},"filename":{"description":"File name of the content. Absent when it has none.","type":"string","minLength":1},"extension":{"description":"File extension of the content. Absent when unknown.","type":"string","minLength":1},"byteSize":{"description":"Size of the content in bytes. Absent when unknown.","type":"integer","minimum":0},"checksumAvailable":{"type":"boolean","description":"Whether a checksum of the content is recorded."},"truncated":{"type":"boolean","description":"Whether the stored content was cut short."},"preferredViewers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":160,"pattern":"^@[a-z0-9][a-z0-9-]*(?:\\/[a-z0-9][a-z0-9-]*){2,}$"},"description":"Ids of the viewers best suited to show the resource, in order of preference."},"capabilities":{"type":"array","items":{"type":"string","enum":["preview","download","range","paginate","metadata"]},"description":"What can be done with the resource: `metadata`, `preview`, `paginate`, `range` or `download`."},"preview":{"description":"How the resource can be previewed. Absent when it cannot.","type":"object","properties":{"available":{"type":"boolean","description":"Whether the resource can be previewed."},"contentType":{"description":"Media type of the preview.","type":"string","minLength":1},"maxBytes":{"description":"Largest preview the server returns, in bytes.","type":"integer","exclusiveMinimum":0},"modes":{"description":"The preview modes the resource supports.","type":"array","items":{"type":"string","enum":["metadata","inline","content","download"]}}},"required":["available"],"additionalProperties":false},"range":{"description":"Whether byte ranges can be requested. Absent when they cannot.","type":"object","properties":{"supported":{"type":"boolean","description":"Whether byte ranges of the content can be requested."},"unit":{"description":"Unit of ranges. Always `bytes` when present.","type":"string","const":"bytes"}},"required":["supported"],"additionalProperties":false},"pagination":{"description":"How the resource can be read page by page. Absent when it cannot.","type":"object","properties":{"supported":{"type":"boolean","description":"Whether the content can be read page by page."},"defaultPageSize":{"description":"Number of rows in a page when no limit is given.","type":"integer","exclusiveMinimum":0},"maxPageSize":{"description":"Largest number of rows a page can hold.","type":"integer","exclusiveMinimum":0}},"required":["supported"],"additionalProperties":false}},"required":["schemaVersion","resourceId","runId","resourceVersion","kind","label","roles","source","checksumAvailable","truncated","preferredViewers","capabilities"],"additionalProperties":false},"description":"The resources on this page, ordered by resourceId."},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":2048},{"type":"null"}],"description":"Cursor for the next page. Null on the last page."},"catalogVersion":{"type":"string","pattern":"^cv1_[A-Za-z0-9_-]{43}$","description":"Opaque version of the catalog, which changes when the run's resources change."},"completeness":{"type":"object","properties":{"complete":{"type":"boolean","description":"Whether the catalog lists every resource of the run."},"reasons":{"type":"array","items":{"type":"string","enum":["step-rows-capped","snapshot-node-limit","snapshot-depth-limit","snapshot-byte-limit","trace-syncing","trace-ranges-truncated","trace-facts-capped","trace-facts-truncated","trace-output-refs-truncated","trace-child-refs-truncated","review-disclosure-incomplete","retention-expired"]},"description":"Why the catalog may be missing resources. Empty when it is complete."}},"required":["complete","reasons"],"additionalProperties":false,"description":"Whether the catalog is complete."}},"required":["schemaVersion","runId","items","nextCursor","catalogVersion","completeness"],"additionalProperties":false,"description":"The first page of the run's resources, at most 100 items."}},"required":["state","value"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unavailable","description":"Always `unavailable`: no catalog is included."},"reason":{"type":"string","enum":["not_recorded","syncing","invalid_source"],"description":"Why the catalog is not included."}},"required":["state","reason"],"additionalProperties":false}],"description":"The files and collections the run read or produced."},"reviewIssues":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"issueInstanceId":{"type":"string","minLength":1,"maxLength":240,"description":"Unique id of the review issue."},"executionOccurrenceId":{"type":"string","pattern":"^roc_[A-Za-z0-9_-]{43}$","description":"Id of the step execution that raised the issue."},"requestKind":{"type":"string","enum":["approval","correction"],"description":"What the issue asks for: an `approval` decision or a `correction` of the data."},"status":{"type":"string","enum":["open","resolved","expired","canceled"],"description":"Where the issue stands. Only `open` issues still wait for a person."},"title":{"type":"string","minLength":1,"maxLength":240,"description":"Title of the issue."},"createdAt":{"type":"string","format":"date-time","description":"When the issue was raised, as an ISO 8601 timestamp."},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the issue was resolved, as an ISO 8601 timestamp. Null while it is open."}},"required":["issueInstanceId","executionOccurrenceId","requestKind","status","title","createdAt","resolvedAt"],"additionalProperties":false},"description":"Review issues raised during the run, up to 1,000."},"reviewIssuesTruncated":{"type":"boolean","description":"Whether the run raised more review issues than are listed."},"referenceProvenance":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"complete","description":"Always `complete`: provenance is included."},"items":{"maxItems":10000,"type":"array","items":{"type":"object","properties":{"producer":{"type":"object","properties":{"stepOrdinal":{"type":"integer","exclusiveMinimum":0,"description":"Ordinal of the step that produced the value."},"blockId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the block that produced the value."},"outputPath":{"maxItems":64,"type":"array","items":{"type":"string","maxLength":256},"description":"Path to the value inside the producing step's output."}},"required":["stepOrdinal","blockId","outputPath"],"additionalProperties":false,"description":"The step that produced the referenced value."},"consumer":{"type":"object","properties":{"stepOrdinal":{"type":"integer","exclusiveMinimum":0,"description":"Ordinal of the step that used the value."},"blockId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the block that used the value."},"inputPath":{"maxItems":64,"type":"array","items":{"type":"string","maxLength":256},"description":"Path to the field of the consuming step's input that holds the value."}},"required":["stepOrdinal","blockId","inputPath"],"additionalProperties":false,"description":"The step that used the referenced value."},"result":{"type":"string","enum":["resolved","unavailable","redacted"],"description":"Whether the reference was filled in, could not be, or was withheld."}},"required":["producer","consumer","result"],"additionalProperties":false},"description":"Where each value used by a step came from."}},"required":["state","items"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"unavailable","description":"Always `unavailable`: provenance is not included."},"reason":{"type":"string","enum":["not_recorded","syncing","truncated","retention_expired","invalid_source"],"description":"Why provenance is not included."}},"required":["state","reason"],"additionalProperties":false}],"description":"Which step produced each value that a later step used."}},"required":["summary","record","executedRevision","completeness","input","output","error","stepFacts","resourceCatalog","reviewIssues","reviewIssuesTruncated","referenceProvenance"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"summary":{"id":"0195f3c8-6e7f-7a8b-9c0d-1e2f3a4b5c6d","automation":{"id":"0195f3b4-1a2b-7c3d-8e4f-5a6b7c8d9e0f","name":"Request intake"},"parent":null,"displayName":"REQ-1042","displayReference":null,"status":"success","agentOutcome":null,"terminalCode":null,"failedBlockId":null,"recoveryState":null,"failure":null,"outcome":null,"replyResolutionCode":null,"mode":"live","runChannel":"batch","submissionId":"0195f3c7-5d6e-7f7a-8b9c-0d1e2f3a4b5c","thinnedAt":null,"trigger":{"blockId":"request_form","reference":{"state":"unavailable","reason":"not_recorded"}},"initiatedByActorId":"0195f39f-5e6f-7a7b-8c9d-0e1f2a3b4c5d","reviewIssueId":null,"revisionReference":{"state":"recorded","id":"0195f3c0-2d3e-7f4a-8b5c-6d7e8f9a0b1c"},"startedAt":"2026-10-29T09:14:03.120Z","completedAt":"2026-10-29T09:14:05.482Z","activeWait":null,"aiUsage":null},"executedRevision":{"state":"unavailable","reason":"not_recorded"},"completeness":{"state":"complete","stepFactCount":0},"input":{"kind":"inline","value":{"requestId":"REQ-1042"}},"output":{"kind":"inline","value":{"receivedAt":"2026-10-29T09:14:05.482Z"}},"error":{"kind":"unavailable","reason":"not_recorded"},"stepFacts":[],"resourceCatalog":{"state":"unavailable","reason":"not_recorded"},"reviewIssues":[],"record":{"status":"complete","gaps":[]},"reviewIssuesTruncated":false,"referenceProvenance":{"state":"unavailable","reason":"not_recorded"}}}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Unprocessable Entity","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"security":[{"apiKey":["automation:read"]}],"x-lainstack-auth":{"label":"API key","description":"Accepts an organization API key with the `automation:read` scope, or the web app's browser session."}}},"/api/workspaces/{workspaceId}/automation-runs/{runId}/resources":{"get":{"tags":["Runs"],"summary":"List automation run resources","description":"**Authentication: API key.** Accepts an organization API key with the `automation:read` scope, or the web app's browser session.\n\nLists the files and collections a run read or produced, ordered by resource id, 50 per page by default (up to 100). Filter by kind, source kind, step or role. Pass nextCursor from the response as cursor to read the next page. Requires the `automation:read` permission.","parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The workspace's id.","example":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e"},{"name":"runId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The run's id, as returned by Run workspace automation or List automation runs.","example":"0195f3c8-6e7f-7a8b-9c0d-1e2f3a4b5c6d"},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"description":"How many resources to return, from 1 to 100. Defaults to 50."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":2048},"description":"Cursor from the previous page's nextCursor. Omit it to read the first page."},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["json","text","file","image","pdf","email","email-body","email-attachment","table","run-trace","error","provenance","unknown"]},"description":"Only return resources of this kind."},{"name":"sourceKind","in":"query","required":false,"schema":{"type":"string","enum":["run.output","trigger.payload","block.input","block.output","inspection.field","fanout.item","fanout.result","artifact","file","collection","run.trace","loop.item.trace","step.error","step.trace"]},"description":"Only return resources that came from this kind of source."},{"name":"occurrenceId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":255},"description":"Only return resources that came from this step execution."},{"name":"role","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":255},"description":"Only return resources that have this role."}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1,"description":"Version of the resource catalog format."},"runId":{"type":"string","minLength":1,"description":"Unique id of the run the resources belong to."},"items":{"type":"array","items":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1,"description":"Version of the resource descriptor format."},"resourceId":{"type":"string","pattern":"^rr1_[A-Za-z0-9_-]{43}$","description":"Unique id of the resource."},"runId":{"type":"string","minLength":1,"description":"Unique id of the run the resource belongs to."},"executionOccurrenceId":{"description":"Unique id of the step execution that produced the resource. Absent when no step did.","type":"string","pattern":"^roc_[A-Za-z0-9_-]{43}$"},"resourceVersion":{"type":"string","pattern":"^rv1_[A-Za-z0-9_-]{43}$","description":"Version of the resource. Pass it when reading the resource's content, preview or rows."},"kind":{"type":"string","enum":["json","text","file","image","pdf","email","email-body","email-attachment","table","run-trace","error","provenance","unknown"],"description":"What kind of content the resource holds."},"label":{"type":"string","minLength":1,"description":"Name shown for the resource."},"description":{"description":"Short description of the resource. Absent when none was set.","type":"string","minLength":1},"roles":{"type":"array","items":{"type":"string","minLength":1},"description":"The roles the resource plays in the run, sorted, for example `attachment`."},"source":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"run.output","description":"Always `run.output`: the value is part of the run's output."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"trigger.payload","description":"Always `trigger.payload`: the value is part of the trigger input."},"triggerBlockId":{"type":"string","minLength":1,"description":"Id of the trigger block that received the input."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","triggerBlockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block.input","description":"Always `block.input`: the value is part of a step's input."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block.output","description":"Always `block.output`: the value is part of a step's output."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"inspection.field","description":"Always `inspection.field`: the value is a field of a step inspection."},"activityId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Id of the activity the field belongs to. Null when it belongs to no activity."},"occurrenceId":{"type":"string","pattern":"^roc_[A-Za-z0-9_-]{43}$","description":"Unique id of the step execution."},"attempt":{"type":"integer","exclusiveMinimum":0,"description":"Attempt number of the step execution, counting from 1."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"phase":{"type":"string","enum":["input","output"],"description":"Whether the field is part of the step's input or its output."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","activityId","occurrenceId","attempt","blockId","phase","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fanout.item","description":"Always `fanout.item`: the value is an item a step fanned out."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"itemIndex":{"type":"integer","minimum":0,"description":"Zero-based index of the item."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","itemIndex","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fanout.result","description":"Always `fanout.result`: the value is the result for a fanned-out item."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"resultIndex":{"type":"integer","minimum":0,"description":"Zero-based index of the result."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","resultIndex","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"artifact","description":"Always `artifact`: the value is an artifact of the run."},"artifactId":{"type":"string","minLength":1,"description":"Unique id of the artifact."},"occurrenceId":{"description":"Unique id of the step execution that produced the artifact. Absent when none did.","type":"string","minLength":1},"blockId":{"description":"Id of the block that produced the artifact. Absent when no block did.","type":"string","minLength":1},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","artifactId","path"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","const":"file","description":"Always `file`: the resource is a file."},"origin":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"run.output","description":"Always `run.output`: the value is part of the run's output."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"trigger.payload","description":"Always `trigger.payload`: the value is part of the trigger input."},"triggerBlockId":{"type":"string","minLength":1,"description":"Id of the trigger block that received the input."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","triggerBlockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block.input","description":"Always `block.input`: the value is part of a step's input."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block.output","description":"Always `block.output`: the value is part of a step's output."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"inspection.field","description":"Always `inspection.field`: the value is a field of a step inspection."},"activityId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Id of the activity the field belongs to. Null when it belongs to no activity."},"occurrenceId":{"type":"string","pattern":"^roc_[A-Za-z0-9_-]{43}$","description":"Unique id of the step execution."},"attempt":{"type":"integer","exclusiveMinimum":0,"description":"Attempt number of the step execution, counting from 1."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"phase":{"type":"string","enum":["input","output"],"description":"Whether the field is part of the step's input or its output."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","activityId","occurrenceId","attempt","blockId","phase","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fanout.item","description":"Always `fanout.item`: the value is an item a step fanned out."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"itemIndex":{"type":"integer","minimum":0,"description":"Zero-based index of the item."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","itemIndex","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fanout.result","description":"Always `fanout.result`: the value is the result for a fanned-out item."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"resultIndex":{"type":"integer","minimum":0,"description":"Zero-based index of the result."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","resultIndex","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"artifact","description":"Always `artifact`: the value is an artifact of the run."},"artifactId":{"type":"string","minLength":1,"description":"Unique id of the artifact."},"occurrenceId":{"description":"Unique id of the step execution that produced the artifact. Absent when none did.","type":"string","minLength":1},"blockId":{"description":"Id of the block that produced the artifact. Absent when no block did.","type":"string","minLength":1},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","artifactId","path"],"additionalProperties":false}],"description":"Where in the run the file reference was found."}},"required":["kind","origin"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"collection","description":"Always `collection`: the resource is a collection of rows."},"origin":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"run.output","description":"Always `run.output`: the value is part of the run's output."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"trigger.payload","description":"Always `trigger.payload`: the value is part of the trigger input."},"triggerBlockId":{"type":"string","minLength":1,"description":"Id of the trigger block that received the input."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","triggerBlockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block.input","description":"Always `block.input`: the value is part of a step's input."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block.output","description":"Always `block.output`: the value is part of a step's output."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"inspection.field","description":"Always `inspection.field`: the value is a field of a step inspection."},"activityId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Id of the activity the field belongs to. Null when it belongs to no activity."},"occurrenceId":{"type":"string","pattern":"^roc_[A-Za-z0-9_-]{43}$","description":"Unique id of the step execution."},"attempt":{"type":"integer","exclusiveMinimum":0,"description":"Attempt number of the step execution, counting from 1."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"phase":{"type":"string","enum":["input","output"],"description":"Whether the field is part of the step's input or its output."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","activityId","occurrenceId","attempt","blockId","phase","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fanout.item","description":"Always `fanout.item`: the value is an item a step fanned out."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"itemIndex":{"type":"integer","minimum":0,"description":"Zero-based index of the item."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","itemIndex","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fanout.result","description":"Always `fanout.result`: the value is the result for a fanned-out item."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"resultIndex":{"type":"integer","minimum":0,"description":"Zero-based index of the result."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","resultIndex","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"artifact","description":"Always `artifact`: the value is an artifact of the run."},"artifactId":{"type":"string","minLength":1,"description":"Unique id of the artifact."},"occurrenceId":{"description":"Unique id of the step execution that produced the artifact. Absent when none did.","type":"string","minLength":1},"blockId":{"description":"Id of the block that produced the artifact. Absent when no block did.","type":"string","minLength":1},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","artifactId","path"],"additionalProperties":false}],"description":"Where in the run the collection reference was found."}},"required":["kind","origin"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"run.trace","description":"Always `run.trace`: the resource is the run's trace."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"loop.item.trace","description":"Always `loop.item.trace`: the resource is the trace of one loop item."},"loopBlockId":{"type":"string","minLength":1,"description":"Id of the loop block."},"jobId":{"type":"string","minLength":1,"description":"Unique id of the job that ran the item."},"itemIndex":{"type":"integer","minimum":0,"description":"Zero-based index of the loop item."},"lineageDigests":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"description":"Digests that identify the item's place in nested loops."}},"required":["kind","loopBlockId","jobId","itemIndex","lineageDigests"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"step.error","description":"Always `step.error`: the resource is a step's error."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."}},"required":["kind","occurrenceId","blockId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"step.trace","description":"Always `step.trace`: the resource is a step's trace."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"ordinal":{"type":"integer","minimum":0,"description":"Position of the step in the run."}},"required":["kind","occurrenceId","blockId","ordinal"],"additionalProperties":false}],"description":"Where in the run the resource came from."},"contentType":{"description":"Media type of the content. Absent when unknown.","type":"string","minLength":1},"filename":{"description":"File name of the content. Absent when it has none.","type":"string","minLength":1},"extension":{"description":"File extension of the content. Absent when unknown.","type":"string","minLength":1},"byteSize":{"description":"Size of the content in bytes. Absent when unknown.","type":"integer","minimum":0},"checksumAvailable":{"type":"boolean","description":"Whether a checksum of the content is recorded."},"truncated":{"type":"boolean","description":"Whether the stored content was cut short."},"preferredViewers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":160,"pattern":"^@[a-z0-9][a-z0-9-]*(?:\\/[a-z0-9][a-z0-9-]*){2,}$"},"description":"Ids of the viewers best suited to show the resource, in order of preference."},"capabilities":{"type":"array","items":{"type":"string","enum":["preview","download","range","paginate","metadata"]},"description":"What can be done with the resource: `metadata`, `preview`, `paginate`, `range` or `download`."},"preview":{"description":"How the resource can be previewed. Absent when it cannot.","type":"object","properties":{"available":{"type":"boolean","description":"Whether the resource can be previewed."},"contentType":{"description":"Media type of the preview.","type":"string","minLength":1},"maxBytes":{"description":"Largest preview the server returns, in bytes.","type":"integer","exclusiveMinimum":0},"modes":{"description":"The preview modes the resource supports.","type":"array","items":{"type":"string","enum":["metadata","inline","content","download"]}}},"required":["available"],"additionalProperties":false},"range":{"description":"Whether byte ranges can be requested. Absent when they cannot.","type":"object","properties":{"supported":{"type":"boolean","description":"Whether byte ranges of the content can be requested."},"unit":{"description":"Unit of ranges. Always `bytes` when present.","type":"string","const":"bytes"}},"required":["supported"],"additionalProperties":false},"pagination":{"description":"How the resource can be read page by page. Absent when it cannot.","type":"object","properties":{"supported":{"type":"boolean","description":"Whether the content can be read page by page."},"defaultPageSize":{"description":"Number of rows in a page when no limit is given.","type":"integer","exclusiveMinimum":0},"maxPageSize":{"description":"Largest number of rows a page can hold.","type":"integer","exclusiveMinimum":0}},"required":["supported"],"additionalProperties":false}},"required":["schemaVersion","resourceId","runId","resourceVersion","kind","label","roles","source","checksumAvailable","truncated","preferredViewers","capabilities"],"additionalProperties":false},"description":"The resources on this page, ordered by resourceId."},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":2048},{"type":"null"}],"description":"Cursor for the next page. Null on the last page."},"catalogVersion":{"type":"string","pattern":"^cv1_[A-Za-z0-9_-]{43}$","description":"Opaque version of the catalog, which changes when the run's resources change."},"completeness":{"type":"object","properties":{"complete":{"type":"boolean","description":"Whether the catalog lists every resource of the run."},"reasons":{"type":"array","items":{"type":"string","enum":["step-rows-capped","snapshot-node-limit","snapshot-depth-limit","snapshot-byte-limit","trace-syncing","trace-ranges-truncated","trace-facts-capped","trace-facts-truncated","trace-output-refs-truncated","trace-child-refs-truncated","review-disclosure-incomplete","retention-expired"]},"description":"Why the catalog may be missing resources. Empty when it is complete."}},"required":["complete","reasons"],"additionalProperties":false,"description":"Whether the catalog is complete."}},"required":["schemaVersion","runId","items","nextCursor","catalogVersion","completeness"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"operationId":"getApiWorkspacesByWorkspaceIdAutomation-runsByRunIdResources","security":[{"apiKey":["automation:read"]}],"x-lainstack-auth":{"label":"API key","description":"Accepts an organization API key with the `automation:read` scope, or the web app's browser session."}}},"/api/workspaces/{workspaceId}/automation-runs/{runId}/resources/{resourceId}":{"get":{"tags":["Runs"],"summary":"Get an automation run resource","description":"**Authentication: API key.** Accepts an organization API key with the `automation:read` scope, or the web app's browser session.\n\nReturns the descriptor of one run resource: its kind, size, source in the run, and the ways it can be read. Use its resourceVersion when reading the resource's content, preview or rows. Requires the `automation:read` permission.","parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The workspace's id.","example":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e"},{"name":"runId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The run's id, as returned by Run workspace automation or List automation runs.","example":"0195f3c8-6e7f-7a8b-9c0d-1e2f3a4b5c6d"},{"name":"resourceId","in":"path","required":true,"schema":{"type":"string","pattern":"^rr1_[A-Za-z0-9_-]{43}$"},"description":"The resource's id, as returned by List automation run resources or List a review issue's resources.","example":"rr1_eaeGU9Af8ObwCOu3juQxbCU0aPUlSq1t6Cl90KyP2fm"}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"schemaVersion":{"type":"number","const":1,"description":"Version of the resource descriptor format."},"resourceId":{"type":"string","pattern":"^rr1_[A-Za-z0-9_-]{43}$","description":"Unique id of the resource."},"runId":{"type":"string","minLength":1,"description":"Unique id of the run the resource belongs to."},"executionOccurrenceId":{"description":"Unique id of the step execution that produced the resource. Absent when no step did.","type":"string","pattern":"^roc_[A-Za-z0-9_-]{43}$"},"resourceVersion":{"type":"string","pattern":"^rv1_[A-Za-z0-9_-]{43}$","description":"Version of the resource. Pass it when reading the resource's content, preview or rows."},"kind":{"type":"string","enum":["json","text","file","image","pdf","email","email-body","email-attachment","table","run-trace","error","provenance","unknown"],"description":"What kind of content the resource holds."},"label":{"type":"string","minLength":1,"description":"Name shown for the resource."},"description":{"description":"Short description of the resource. Absent when none was set.","type":"string","minLength":1},"roles":{"type":"array","items":{"type":"string","minLength":1},"description":"The roles the resource plays in the run, sorted, for example `attachment`."},"source":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"run.output","description":"Always `run.output`: the value is part of the run's output."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"trigger.payload","description":"Always `trigger.payload`: the value is part of the trigger input."},"triggerBlockId":{"type":"string","minLength":1,"description":"Id of the trigger block that received the input."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","triggerBlockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block.input","description":"Always `block.input`: the value is part of a step's input."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block.output","description":"Always `block.output`: the value is part of a step's output."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"inspection.field","description":"Always `inspection.field`: the value is a field of a step inspection."},"activityId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Id of the activity the field belongs to. Null when it belongs to no activity."},"occurrenceId":{"type":"string","pattern":"^roc_[A-Za-z0-9_-]{43}$","description":"Unique id of the step execution."},"attempt":{"type":"integer","exclusiveMinimum":0,"description":"Attempt number of the step execution, counting from 1."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"phase":{"type":"string","enum":["input","output"],"description":"Whether the field is part of the step's input or its output."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","activityId","occurrenceId","attempt","blockId","phase","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fanout.item","description":"Always `fanout.item`: the value is an item a step fanned out."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"itemIndex":{"type":"integer","minimum":0,"description":"Zero-based index of the item."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","itemIndex","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fanout.result","description":"Always `fanout.result`: the value is the result for a fanned-out item."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"resultIndex":{"type":"integer","minimum":0,"description":"Zero-based index of the result."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","resultIndex","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"artifact","description":"Always `artifact`: the value is an artifact of the run."},"artifactId":{"type":"string","minLength":1,"description":"Unique id of the artifact."},"occurrenceId":{"description":"Unique id of the step execution that produced the artifact. Absent when none did.","type":"string","minLength":1},"blockId":{"description":"Id of the block that produced the artifact. Absent when no block did.","type":"string","minLength":1},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","artifactId","path"],"additionalProperties":false}]},{"type":"object","properties":{"kind":{"type":"string","const":"file","description":"Always `file`: the resource is a file."},"origin":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"run.output","description":"Always `run.output`: the value is part of the run's output."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"trigger.payload","description":"Always `trigger.payload`: the value is part of the trigger input."},"triggerBlockId":{"type":"string","minLength":1,"description":"Id of the trigger block that received the input."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","triggerBlockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block.input","description":"Always `block.input`: the value is part of a step's input."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block.output","description":"Always `block.output`: the value is part of a step's output."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"inspection.field","description":"Always `inspection.field`: the value is a field of a step inspection."},"activityId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Id of the activity the field belongs to. Null when it belongs to no activity."},"occurrenceId":{"type":"string","pattern":"^roc_[A-Za-z0-9_-]{43}$","description":"Unique id of the step execution."},"attempt":{"type":"integer","exclusiveMinimum":0,"description":"Attempt number of the step execution, counting from 1."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"phase":{"type":"string","enum":["input","output"],"description":"Whether the field is part of the step's input or its output."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","activityId","occurrenceId","attempt","blockId","phase","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fanout.item","description":"Always `fanout.item`: the value is an item a step fanned out."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"itemIndex":{"type":"integer","minimum":0,"description":"Zero-based index of the item."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","itemIndex","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fanout.result","description":"Always `fanout.result`: the value is the result for a fanned-out item."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"resultIndex":{"type":"integer","minimum":0,"description":"Zero-based index of the result."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","resultIndex","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"artifact","description":"Always `artifact`: the value is an artifact of the run."},"artifactId":{"type":"string","minLength":1,"description":"Unique id of the artifact."},"occurrenceId":{"description":"Unique id of the step execution that produced the artifact. Absent when none did.","type":"string","minLength":1},"blockId":{"description":"Id of the block that produced the artifact. Absent when no block did.","type":"string","minLength":1},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","artifactId","path"],"additionalProperties":false}],"description":"Where in the run the file reference was found."}},"required":["kind","origin"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"collection","description":"Always `collection`: the resource is a collection of rows."},"origin":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"run.output","description":"Always `run.output`: the value is part of the run's output."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"trigger.payload","description":"Always `trigger.payload`: the value is part of the trigger input."},"triggerBlockId":{"type":"string","minLength":1,"description":"Id of the trigger block that received the input."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","triggerBlockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block.input","description":"Always `block.input`: the value is part of a step's input."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block.output","description":"Always `block.output`: the value is part of a step's output."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"inspection.field","description":"Always `inspection.field`: the value is a field of a step inspection."},"activityId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Id of the activity the field belongs to. Null when it belongs to no activity."},"occurrenceId":{"type":"string","pattern":"^roc_[A-Za-z0-9_-]{43}$","description":"Unique id of the step execution."},"attempt":{"type":"integer","exclusiveMinimum":0,"description":"Attempt number of the step execution, counting from 1."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"phase":{"type":"string","enum":["input","output"],"description":"Whether the field is part of the step's input or its output."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","activityId","occurrenceId","attempt","blockId","phase","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fanout.item","description":"Always `fanout.item`: the value is an item a step fanned out."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"itemIndex":{"type":"integer","minimum":0,"description":"Zero-based index of the item."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","itemIndex","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fanout.result","description":"Always `fanout.result`: the value is the result for a fanned-out item."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"resultIndex":{"type":"integer","minimum":0,"description":"Zero-based index of the result."},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","occurrenceId","blockId","resultIndex","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"artifact","description":"Always `artifact`: the value is an artifact of the run."},"artifactId":{"type":"string","minLength":1,"description":"Unique id of the artifact."},"occurrenceId":{"description":"Unique id of the step execution that produced the artifact. Absent when none did.","type":"string","minLength":1},"blockId":{"description":"Id of the block that produced the artifact. Absent when no block did.","type":"string","minLength":1},"path":{"type":"string","pattern":"^rp1_[A-Za-z0-9_-]{43}$","description":"Opaque path to the value inside the run's data."}},"required":["kind","artifactId","path"],"additionalProperties":false}],"description":"Where in the run the collection reference was found."}},"required":["kind","origin"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"run.trace","description":"Always `run.trace`: the resource is the run's trace."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"loop.item.trace","description":"Always `loop.item.trace`: the resource is the trace of one loop item."},"loopBlockId":{"type":"string","minLength":1,"description":"Id of the loop block."},"jobId":{"type":"string","minLength":1,"description":"Unique id of the job that ran the item."},"itemIndex":{"type":"integer","minimum":0,"description":"Zero-based index of the loop item."},"lineageDigests":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"description":"Digests that identify the item's place in nested loops."}},"required":["kind","loopBlockId","jobId","itemIndex","lineageDigests"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"step.error","description":"Always `step.error`: the resource is a step's error."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."}},"required":["kind","occurrenceId","blockId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"step.trace","description":"Always `step.trace`: the resource is a step's trace."},"occurrenceId":{"type":"string","minLength":1,"description":"Unique id of the step execution."},"blockId":{"type":"string","minLength":1,"description":"Id of the block the step ran."},"ordinal":{"type":"integer","minimum":0,"description":"Position of the step in the run."}},"required":["kind","occurrenceId","blockId","ordinal"],"additionalProperties":false}],"description":"Where in the run the resource came from."},"contentType":{"description":"Media type of the content. Absent when unknown.","type":"string","minLength":1},"filename":{"description":"File name of the content. Absent when it has none.","type":"string","minLength":1},"extension":{"description":"File extension of the content. Absent when unknown.","type":"string","minLength":1},"byteSize":{"description":"Size of the content in bytes. Absent when unknown.","type":"integer","minimum":0},"checksumAvailable":{"type":"boolean","description":"Whether a checksum of the content is recorded."},"truncated":{"type":"boolean","description":"Whether the stored content was cut short."},"preferredViewers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":160,"pattern":"^@[a-z0-9][a-z0-9-]*(?:\\/[a-z0-9][a-z0-9-]*){2,}$"},"description":"Ids of the viewers best suited to show the resource, in order of preference."},"capabilities":{"type":"array","items":{"type":"string","enum":["preview","download","range","paginate","metadata"]},"description":"What can be done with the resource: `metadata`, `preview`, `paginate`, `range` or `download`."},"preview":{"description":"How the resource can be previewed. Absent when it cannot.","type":"object","properties":{"available":{"type":"boolean","description":"Whether the resource can be previewed."},"contentType":{"description":"Media type of the preview.","type":"string","minLength":1},"maxBytes":{"description":"Largest preview the server returns, in bytes.","type":"integer","exclusiveMinimum":0},"modes":{"description":"The preview modes the resource supports.","type":"array","items":{"type":"string","enum":["metadata","inline","content","download"]}}},"required":["available"],"additionalProperties":false},"range":{"description":"Whether byte ranges can be requested. Absent when they cannot.","type":"object","properties":{"supported":{"type":"boolean","description":"Whether byte ranges of the content can be requested."},"unit":{"description":"Unit of ranges. Always `bytes` when present.","type":"string","const":"bytes"}},"required":["supported"],"additionalProperties":false},"pagination":{"description":"How the resource can be read page by page. Absent when it cannot.","type":"object","properties":{"supported":{"type":"boolean","description":"Whether the content can be read page by page."},"defaultPageSize":{"description":"Number of rows in a page when no limit is given.","type":"integer","exclusiveMinimum":0},"maxPageSize":{"description":"Largest number of rows a page can hold.","type":"integer","exclusiveMinimum":0}},"required":["supported"],"additionalProperties":false}},"required":["schemaVersion","resourceId","runId","resourceVersion","kind","label","roles","source","checksumAvailable","truncated","preferredViewers","capabilities"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"operationId":"getApiWorkspacesByWorkspaceIdAutomation-runsByRunIdResourcesByResourceId","security":[{"apiKey":["automation:read"]}],"x-lainstack-auth":{"label":"API key","description":"Accepts an organization API key with the `automation:read` scope, or the web app's browser session."}}},"/api/workspaces/{workspaceId}/automation-runs/{runId}/resources/{resourceId}/content":{"get":{"tags":["Runs"],"summary":"Get automation run resource content","description":"**Authentication: API key.** Accepts an organization API key with the `automation:read` scope, or the web app's browser session.\n\nStreams the bytes of a run resource. Pass the resource's current resourceVersion; set disposition to `attachment` to download it instead of showing it inline. A Range header returns part of the content. Responses are not cached. Requires the `automation:read` permission.","responses":{"200":{"description":"Resource bytes","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"413":{"description":"Payload Too Large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"415":{"description":"Unsupported Media Type","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"416":{"description":"Range Not Satisfiable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The workspace's id.","example":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e"},{"name":"runId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The run's id, as returned by Run workspace automation or List automation runs.","example":"0195f3c8-6e7f-7a8b-9c0d-1e2f3a4b5c6d"},{"name":"resourceId","in":"path","required":true,"schema":{"type":"string","pattern":"^rr1_[A-Za-z0-9_-]{43}$"},"description":"The resource's id, as returned by List automation run resources or List a review issue's resources.","example":"rr1_eaeGU9Af8ObwCOu3juQxbCU0aPUlSq1t6Cl90KyP2fm"},{"name":"resourceVersion","in":"query","required":true,"schema":{"type":"string","pattern":"^rv1_[A-Za-z0-9_-]{43}$"},"description":"Version of the resource to read, as listed in its resourceVersion field.","example":"rv1_wYiMBtSpK0wATzwKyibjDUV3kpMZWohyRPr2A5URIqt"},{"name":"disposition","in":"query","required":false,"schema":{"type":"string","enum":["inline","attachment"]},"description":"Whether the content is meant to be shown `inline` or saved as an `attachment`."}],"operationId":"getApiWorkspacesByWorkspaceIdAutomation-runsByRunIdResourcesByResourceIdContent","security":[{"apiKey":["automation:read"]}],"x-lainstack-auth":{"label":"API key","description":"Accepts an organization API key with the `automation:read` scope, or the web app's browser session."}}},"/api/workspaces/{workspaceId}/automation-runs/{runId}/resources/{resourceId}/rows":{"get":{"tags":["Runs"],"summary":"List automation run collection rows","description":"**Authentication: API key.** Accepts an organization API key with the `automation:read` scope, or the web app's browser session.\n\nReturns the rows of a collection resource, 20 per page by default (up to 50). Pass the resource's current resourceVersion, and nextCursor from the response as cursor to read the next page. Responses are not cached. Requires the `automation:read` permission.","parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The workspace's id.","example":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e"},{"name":"runId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The run's id, as returned by Run workspace automation or List automation runs.","example":"0195f3c8-6e7f-7a8b-9c0d-1e2f3a4b5c6d"},{"name":"resourceId","in":"path","required":true,"schema":{"type":"string","pattern":"^rr1_[A-Za-z0-9_-]{43}$"},"description":"The resource's id, as returned by List automation run resources or List a review issue's resources.","example":"rr1_eaeGU9Af8ObwCOu3juQxbCU0aPUlSq1t6Cl90KyP2fm"},{"name":"resourceVersion","in":"query","required":true,"schema":{"type":"string","pattern":"^rv1_[A-Za-z0-9_-]{43}$"},"description":"Version of the resource to read, as listed in its resourceVersion field.","example":"rv1_wYiMBtSpK0wATzwKyibjDUV3kpMZWohyRPr2A5URIqt"},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":50},"description":"How many rows to return, from 1 to 50. Defaults to 20."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":4096},"description":"Cursor from the previous page's nextCursor. Omit it to read the first page."}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"rowIndex":{"type":"integer","minimum":0,"description":"Zero-based position of the row in the collection."},"value":{"description":"The row's value."},"iterationId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Id of the loop iteration that produced the row. Null when no iteration did."},"truncated":{"type":"boolean","description":"Whether the row's value was cut short."},"invalid":{"type":"boolean","description":"Whether the row's value could not be read."}},"required":["rowIndex","value","iterationId","truncated","invalid"],"additionalProperties":false},"description":"The rows on this page."},"nextCursor":{"description":"Cursor for the next page. Null on the last page.","type":["string","null"]},"complete":{"type":"boolean","description":"False when the job stopped before every item ran, so the rows are a partial list."}},"required":["items","nextCursor","complete"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"413":{"description":"Payload Too Large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"415":{"description":"Unsupported Media Type","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"416":{"description":"Range Not Satisfiable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"operationId":"getApiWorkspacesByWorkspaceIdAutomation-runsByRunIdResourcesByResourceIdRows","security":[{"apiKey":["automation:read"]}],"x-lainstack-auth":{"label":"API key","description":"Accepts an organization API key with the `automation:read` scope, or the web app's browser session."}}},"/api/workspaces/{workspaceId}/automations/{automationId}/run":{"post":{"tags":["Runs"],"summary":"Run workspace automation","operationId":"runAutomation","description":"**Authentication: API key.** Accepts an organization API key with the `automation:run` scope, or the web app's browser session.\n\nStarts a run, the same as submitting the automation's operation form. The payload holds the form values, keyed by field key, and is checked against the form's fields. The run starts in the background: the response carries the submission id and, once known, the run id. Poll Get a run's evidence for its status. Requires the `automation:run` permission.","parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The workspace's id.","example":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e"},{"name":"automationId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The automation's id.","example":"0195f3b4-1a2b-7c3d-8e4f-5a6b7c8d9e0f"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"payload":{"description":"The form values, keyed by the field keys listed by List available workspace operations. Omit it to run with no form values.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false},"example":{"payload":{"requestId":"REQ-1042","summary":"Replace the badge reader at door 3."}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"payload":{"description":"The form values, keyed by the field keys listed by List available workspace operations. Omit it to run with no form values.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"payload":{"description":"The form values, keyed by the field keys listed by List available workspace operations. Omit it to run with no form values.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["accepted","deduped"],"description":"`accepted` means a run was queued; `deduped` means an identical request was already queued, so no new run was started."},"workflowId":{"type":"string","minLength":1,"description":"Id of the queued run's workflow."},"runId":{"description":"Unique id of the run. Absent when it is not known yet.","type":"string","minLength":1},"submissionId":{"description":"Unique id of the form submission the run was started from. Absent for runs not started from a form.","type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}]}},"required":["status","workflowId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"status":"accepted","workflowId":"automation-trigger:v2:global:aggregate:3f9c2a7d41b8e6c05d92f1a4b7e3c8d6a0f5b2e9","runId":"0195f3c8-6e7f-7a8b-9c0d-1e2f3a4b5c6d","submissionId":"0195f3c7-5d6e-7f7a-8b9c-0d1e2f3a4b5c"}}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"402":{"description":"Payment Required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"security":[{"apiKey":["automation:run"]}],"x-lainstack-auth":{"label":"API key","description":"Accepts an organization API key with the `automation:run` scope, or the web app's browser session."},"x-codeSamples":[{"lang":"json","label":"JSON Schema","source":"{\n  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"payload\": {\n      \"description\": \"The form values, keyed by the field keys listed by List available workspace operations. Omit it to run with no form values.\",\n      \"type\": \"object\",\n      \"propertyNames\": {\n        \"type\": \"string\"\n      },\n      \"additionalProperties\": {}\n    }\n  },\n  \"additionalProperties\": false\n}"}]}},"/api/workspaces/{workspaceId}/operations/available":{"get":{"tags":["Runs"],"summary":"List available workspace operations","description":"**Authentication: API key.** Accepts an organization API key with the `automation:read` scope, or the web app's browser session.\n\nLists the operations that can be started by hand: one for each active automation with a manual operation form, sorted by automation name. Each entry carries the form's fields and any file upload fields, which are the keys to use in Run workspace automation and in the form upload steps. Requires access to the workspace.","parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The workspace's id.","example":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e"}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Unique id of the operation."},"automationId":{"type":"string","minLength":1,"description":"Unique id of the automation the operation runs."},"automationName":{"type":"string","minLength":1,"description":"Name of the automation."},"automationDescription":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"What the automation does, in the author's words. Null when not set."},"triggerBlockId":{"type":"string","minLength":1,"description":"Id of the trigger block that starts the operation."},"uploadInvocationMode":{"description":"How uploads may start the operation. Absent when not set.","type":"string","enum":["targeted_only","targeted_plus_system"]},"manualForm":{"description":"The form that starts the operation. Absent when the operation has none.","type":"object","properties":{"formTitle":{"description":"Title of the form. Absent when none is set.","type":"string","minLength":1},"formDescription":{"description":"What the form is for. Absent when none is set.","type":"string","minLength":1},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Key of the field. Use it as the key in the run payload."},"label":{"type":"string","minLength":1,"description":"Name shown for the field."},"type":{"type":"string","enum":["text","textarea","number","boolean","date","select"],"description":"Kind of value the field takes."},"required":{"type":"boolean","description":"Whether a value is required."},"placeholder":{"description":"Example text shown in the empty field. Absent when none is set.","type":"string","minLength":1},"helpText":{"description":"Guidance shown with the field. Absent when none is set.","type":"string","minLength":1},"options":{"description":"The values a `select` field accepts. Absent for other field types.","type":"array","items":{"type":"string","minLength":1}},"defaultValue":{"description":"Value used when none is given. Absent when the field has no default.","type":["string","number","boolean","null"]}},"required":["key","label","type","required"],"additionalProperties":false},"description":"The form's fields."}},"required":["fields"],"additionalProperties":false},"uploadFields":{"description":"The file upload fields of the form. Absent when the form takes no files.","type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120,"description":"Key of the upload field. Use it as the key of the uploads object."},"label":{"type":"string","minLength":1,"maxLength":120,"description":"Name shown for the upload field."},"minFiles":{"description":"Fewest files required. Absent when the field is optional.","type":"integer","minimum":0,"maximum":50},"maxFiles":{"description":"Most files accepted. Absent when the limit is 50.","type":"integer","minimum":1,"maximum":50},"instructions":{"description":"Guidance shown with the upload field. Absent when none is set.","type":"string","minLength":1,"maxLength":400}},"required":["key","label"],"additionalProperties":false}}},"required":["id","automationId","automationName","automationDescription","triggerBlockId"],"additionalProperties":false},"description":"The operations, sorted by automation name."}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"operationId":"getApiWorkspacesByWorkspaceIdOperationsAvailable","security":[{"apiKey":["automation:read"]}],"x-lainstack-auth":{"label":"API key","description":"Accepts an organization API key with the `automation:read` scope, or the web app's browser session."}}},"/api/automation/invoke/{endpointKey}":{"post":{"tags":["Triggers and webhooks"],"summary":"Invoke an automation webhook","requestBody":{"required":false,"content":{"application/json":{"schema":{"description":"Any JSON value. The API trigger's input schema decides its shape."}},"application/xml":{"schema":{"type":"string","description":"An XML document, checked against the trigger's XSD."}},"multipart/form-data":{"schema":{"type":"object","description":"Form fields and files, up to 32 MiB."}}}},"description":"**Authentication: Endpoint key.** The endpoint key in the URL selects the API trigger. Send the trigger's secret or signature if the trigger requires one. Organization API keys and browser sessions are not used.\n\nStarts a run of the automation that owns the endpoint key, with the request body as the trigger payload. It returns 202 once the run is queued, or 200 if the same event was already accepted. Send JSON, XML or other raw bodies up to 1 MiB, or multipart/form-data up to 32 MiB when you need to attach files. There is no session: authenticate as the endpoint is configured, with its secret in the `x-automation-api-key` header or as a bearer token, or with an `x-automation-signature` HMAC-SHA256 signature and `x-automation-timestamp` header (within 5 minutes). Endpoints can also restrict the caller's IP address.","responses":{"200":{"description":"The automation's response, passed through","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"413":{"description":"Payload Too Large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"parameters":[{"name":"endpointKey","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"The endpoint key from the automation's webhook URL."}],"operationId":"postApiAutomationInvokeByEndpointKey","security":[{"endpointSecret":[]},{"endpointSignature":[]},{}],"x-lainstack-auth":{"label":"Endpoint key","description":"The endpoint key in the URL selects the API trigger. Send the trigger's secret or signature if the trigger requires one. Organization API keys and browser sessions are not used."},"x-codeSamples":[{"lang":"json","label":"JSON Schema","source":"{\n  \"description\": \"Any JSON value. The API trigger's input schema decides its shape.\"\n}"}]}},"/webhooks/inbound/{callbackToken}":{"post":{"tags":["Triggers and webhooks"],"summary":"Deliver a webhook callback to an automation","x-lainstack-auth":{"label":"Secret URL","description":"No credential header. The secret token in the URL authenticates the call, so keep the URL private."},"description":"**Authentication: Secret URL.** No credential header. The secret token in the URL authenticates the call, so keep the URL private.\n\nDelivers a webhook from an external system to the trigger block that owns the callback URL, which starts a run. There is no session: the secret token in the URL authenticates the call, and rotating the callback invalidates the old URL. Bodies can be up to 256 KiB. It returns 204 with no content once the delivery is accepted, and the same body delivered again is not run twice. Calls are rate limited.","responses":{"204":{"description":"Delivery accepted"},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"413":{"description":"Payload Too Large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"415":{"description":"Unsupported Media Type","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"parameters":[{"name":"callbackToken","in":"path","required":true,"schema":{"type":"string"},"description":"The callback token from the trigger's callback URL."}],"operationId":"postWebhooksInboundByCallbackToken"}},"/api/workspaces/{workspaceId}/review-issues":{"get":{"tags":["Escalations"],"summary":"List review issues","description":"**Authentication: API key.** Accepts an organization API key with the `escalation:read` scope, or the web app's browser session.\n\nReturns the workspace's review issues, the pauses where an automation run waits for a person to decide or fix something. Filter by status, severity, assignee, automation, minimum wait or a search term. Results are paged with `take` (1 to 100) and `cursor`, and the response also tells which review actions the caller may perform. Requires the `escalation:read` permission.","parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The workspace's id.","example":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e"},{"name":"take","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"How many issues to return per page, 1 to 100."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^rii1_[A-Za-z0-9_-]{43}$"},"description":"Cursor from the previous page's `nextCursor`. Omit for the first page."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","resolved","expired","canceled"]},"description":"Only return issues in this status."},{"name":"severity","in":"query","required":false,"schema":{"type":"string","enum":["low","medium","high"]},"description":"Only return issues with this severity."},{"name":"groupId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64},"description":"Only return issues of this group, from Get a review issue."},{"name":"assignedUserId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64},"description":"Only return issues assigned to or claimed by this user."},{"name":"assignedTeamId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":64},"description":"Only return issues assigned to this team."},{"name":"automationId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":128,"format":"uuid"},"description":"Only return issues raised by runs of this automation.","example":"0195f3b4-1a2b-7c3d-8e4f-5a6b7c8d9e0f"},{"name":"minWaitMinutes","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5256000},"description":"Only return issues that have waited at least this many minutes."},{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Search term matched against the issues, up to 200 characters."}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"items":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"issueInstanceId":{"type":"string","pattern":"^rii1_[A-Za-z0-9_-]{43}$","description":"Unique id of the review issue."},"issueSnapshotId":{"type":"string","pattern":"^ris1_[A-Za-z0-9_-]{43}$","description":"Id of the current snapshot of the issue. Quote it when acting on the issue."},"issueSnapshotVersion":{"type":"integer","exclusiveMinimum":0,"description":"Version of the current snapshot. Quote it with the snapshot id when acting on the issue."},"issueTypeId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^@[a-z0-9][a-z0-9-]*(?:\\/[a-z0-9][a-z0-9-]*){2,}$","description":"Id of the kind of review issue, such as manual approval."},"requestKind":{"default":"approval","description":"`approval` asks for a decision; `correction` asks for a fix to a failed step.","type":"string","enum":["approval","correction"]},"hasReportBinding":{"default":false,"description":"Whether the issue is tied to a report produced by the run.","type":"boolean"},"reviewLayout":{"description":"How the review is laid out: `data` edits a whole record beside its source documents, `document` fixes a document. Absent for other reviews.","type":"string","enum":["data","document"]},"resolutionOutcome":{"description":"How the issue was resolved. Absent while the issue is not resolved.","type":"string","enum":["approved","rejected","corrected"]},"correctionRound":{"description":"Which correction attempt this is. Present only on correction issues.","type":"integer","minimum":1,"maximum":10},"executionOccurrenceId":{"type":"string","pattern":"^roc_[A-Za-z0-9_-]{43}$","description":"Id of the visit of the run to the paused step that raised the issue."},"status":{"type":"string","enum":["open","resolved","expired","canceled"],"description":"Where the issue is: `open` is waiting for a person, `resolved` was decided, `expired` ran out of time and `canceled` was withdrawn."},"severity":{"type":"string","enum":["low","medium","high"],"description":"How urgent the issue is."},"title":{"type":"string","minLength":1,"maxLength":240,"description":"Short title of the issue."},"subject":{"description":"Which document the issue is about. Present only on document reviews.","type":"string","minLength":1,"maxLength":120},"runDisplayName":{"type":"string","minLength":1,"maxLength":240,"description":"Display name of the paused run."},"automationId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the automation whose run is paused."},"runId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the paused run."},"stepId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the step of the run that is waiting."},"assignmentSummary":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"unassigned","description":"`unassigned` means nobody holds the issue."}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"assigned","description":"`assigned` means the issue was handed to a user, team or persona."},"assigneeId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the user, team or persona it is assigned to."},"assigneeType":{"description":"Whether the assignee is a user, team or persona. Absent when it is not recorded.","type":"string","enum":["user","team","persona"]},"assigneeLabel":{"description":"Display name of the assignee. Absent when it is not known.","type":"string","minLength":1,"maxLength":160},"editableFieldKeys":{"description":"Keys of the correction fields the assignee may change. Present only on correction issues.","minItems":1,"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":240}},"assignedAt":{"type":"string","format":"date-time","description":"When the issue was assigned, as an ISO 8601 timestamp."}},"required":["state","assigneeId","assignedAt"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"claimed","description":"`claimed` means a user took the issue for themselves."},"assigneeId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the user who claimed the issue."},"assigneeLabel":{"description":"Display name of the user who claimed the issue. Absent when it is not known.","type":"string","minLength":1,"maxLength":160},"editableFieldKeys":{"description":"Keys of the correction fields the claimer may change. Present only on correction issues.","minItems":1,"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":240}},"assignedAt":{"type":"string","format":"date-time","description":"When the issue was claimed, as an ISO 8601 timestamp."}},"required":["state","assigneeId","assignedAt"],"additionalProperties":false}],"description":"Who holds the issue: nobody, an assignee, or the user who claimed it."},"createdAt":{"type":"string","format":"date-time","description":"When the issue was raised, as an ISO 8601 timestamp."},"updatedAt":{"type":"string","format":"date-time","description":"When the issue last changed, such as by a claim or an assignment, as an ISO 8601 timestamp."}},"required":["issueInstanceId","issueSnapshotId","issueSnapshotVersion","issueTypeId","requestKind","hasReportBinding","executionOccurrenceId","status","severity","title","runDisplayName","automationId","runId","stepId","assignmentSummary","createdAt","updatedAt"],"additionalProperties":false},"description":"The issues on this page, at most 100."},"totalCount":{"type":"integer","minimum":0,"description":"How many issues match the filters in total."},"nextCursor":{"description":"Cursor for the next page. Absent on the last page.","type":"string","pattern":"^rii1_[A-Za-z0-9_-]{43}$"},"capabilities":{"description":"Which review actions the caller may perform in this workspace.","type":"object","properties":{"claim":{"type":"boolean","description":"Whether the caller may claim issues."},"decide":{"type":"boolean","description":"Whether the caller may decide issues with an action."},"reassign":{"type":"boolean","description":"Whether the caller may reassign issues."},"unassign":{"type":"boolean","description":"Whether the caller may unassign issues."}},"required":["claim","decide","reassign","unassign"],"additionalProperties":false}},"required":["items","totalCount"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"operationId":"getApiWorkspacesByWorkspaceIdReview-issues","security":[{"apiKey":["escalation:read"]}],"x-lainstack-auth":{"label":"API key","description":"Accepts an organization API key with the `escalation:read` scope, or the web app's browser session."}}},"/api/workspaces/{workspaceId}/review-issues/{issueInstanceId}":{"get":{"tags":["Escalations"],"summary":"Get a review issue","description":"**Authentication: API key.** Accepts an organization API key with the `escalation:read` scope, or the web app's browser session.\n\nReturns one review issue: what is being asked, who holds it, the actions currently available, and the snapshot id and version that every action on the issue must quote. A resolved issue also includes how it was resolved. Returns 422 when the stored issue can no longer be read. Requires the `escalation:read` permission.","parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The workspace's id.","example":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e"},{"name":"issueInstanceId","in":"path","required":true,"schema":{"type":"string","pattern":"^rii1_[A-Za-z0-9_-]{43}$"},"description":"The review issue's id, as returned by List review issues.","example":"rii1_o0fvBu93XVUf0VHa7BNWFZ5pd4Thfjt6YAd8HRske25"}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"issueInstanceId":{"type":"string","pattern":"^rii1_[A-Za-z0-9_-]{43}$","description":"Unique id of the review issue."},"issueSnapshotId":{"type":"string","pattern":"^ris1_[A-Za-z0-9_-]{43}$","description":"Id of the current snapshot of the issue. Quote it when acting on the issue."},"issueSnapshotVersion":{"type":"integer","exclusiveMinimum":0,"description":"Version of the current snapshot. Quote it with the snapshot id when acting on the issue."},"issueTypeId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^@[a-z0-9][a-z0-9-]*(?:\\/[a-z0-9][a-z0-9-]*){2,}$","description":"Id of the kind of review issue, such as manual approval."},"requestKind":{"default":"approval","description":"`approval` asks for a decision; `correction` asks for a fix to a failed step.","type":"string","enum":["approval","correction"]},"hasReportBinding":{"default":false,"description":"Whether the issue is tied to a report produced by the run.","type":"boolean"},"reviewLayout":{"description":"How the review is laid out: `data` edits a whole record beside its source documents, `document` fixes a document. Absent for other reviews.","type":"string","enum":["data","document"]},"resolutionOutcome":{"description":"How the issue was resolved. Absent while the issue is not resolved.","type":"string","enum":["approved","rejected","corrected"]},"correctionRound":{"description":"Which correction attempt this is. Present only on correction issues.","type":"integer","minimum":1,"maximum":10},"executionOccurrenceId":{"type":"string","pattern":"^roc_[A-Za-z0-9_-]{43}$","description":"Id of the visit of the run to the paused step that raised the issue."},"status":{"type":"string","enum":["open","resolved","expired","canceled"],"description":"Where the issue is: `open` is waiting for a person, `resolved` was decided, `expired` ran out of time and `canceled` was withdrawn."},"severity":{"type":"string","enum":["low","medium","high"],"description":"How urgent the issue is."},"title":{"type":"string","minLength":1,"maxLength":240,"description":"Short title of the issue."},"subject":{"description":"Which document the issue is about. Present only on document reviews.","type":"string","minLength":1,"maxLength":120},"runDisplayName":{"type":"string","minLength":1,"maxLength":240,"description":"Display name of the paused run."},"automationId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the automation whose run is paused."},"runId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the paused run."},"stepId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the step of the run that is waiting."},"assignmentSummary":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"unassigned","description":"`unassigned` means nobody holds the issue."}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"assigned","description":"`assigned` means the issue was handed to a user, team or persona."},"assigneeId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the user, team or persona it is assigned to."},"assigneeType":{"description":"Whether the assignee is a user, team or persona. Absent when it is not recorded.","type":"string","enum":["user","team","persona"]},"assigneeLabel":{"description":"Display name of the assignee. Absent when it is not known.","type":"string","minLength":1,"maxLength":160},"editableFieldKeys":{"description":"Keys of the correction fields the assignee may change. Present only on correction issues.","minItems":1,"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":240}},"assignedAt":{"type":"string","format":"date-time","description":"When the issue was assigned, as an ISO 8601 timestamp."}},"required":["state","assigneeId","assignedAt"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"claimed","description":"`claimed` means a user took the issue for themselves."},"assigneeId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the user who claimed the issue."},"assigneeLabel":{"description":"Display name of the user who claimed the issue. Absent when it is not known.","type":"string","minLength":1,"maxLength":160},"editableFieldKeys":{"description":"Keys of the correction fields the claimer may change. Present only on correction issues.","minItems":1,"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":240}},"assignedAt":{"type":"string","format":"date-time","description":"When the issue was claimed, as an ISO 8601 timestamp."}},"required":["state","assigneeId","assignedAt"],"additionalProperties":false}],"description":"Who holds the issue: nobody, an assignee, or the user who claimed it."},"createdAt":{"type":"string","format":"date-time","description":"When the issue was raised, as an ISO 8601 timestamp."},"updatedAt":{"type":"string","format":"date-time","description":"When the issue last changed, such as by a claim or an assignment, as an ISO 8601 timestamp."},"blockId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the block that raised the issue."},"assigneeOrder":{"description":"The order of assignees this issue copied when it opened. Null when its branch set none.","anyOf":[{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["user","team","persona"]},"id":{"type":"string","minLength":1,"maxLength":240},"timer":{"description":"When work moves on from this assignee. An empty `at` means it has no timer.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"after"},"ms":{"type":"integer"}},"required":["kind","ms"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"at"},"at":{"type":["string","null"]}},"required":["kind","at"],"additionalProperties":false}]}},"required":["type","id"],"additionalProperties":false}},{"type":"null"}]},"assigneePosition":{"description":"Where this issue stands in `assigneeOrder`, counting from 0.","type":"integer","minimum":0},"groupId":{"description":"The group this issue waits in: same automation, block, type and owner. Assigning it moves the whole group; deciding it does not.","type":"string","minLength":1,"maxLength":64},"diagnosis":{"description":"What an Agent found about the group. Absent when nothing is recorded.","type":"string"},"agentWork":{"description":"The Agent's latest work on this group. Absent when no Agent has looked at it.","type":"object","properties":{"personaPrincipalId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the Agent."},"threadId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the conversation the Agent works in."},"running":{"type":"boolean","description":"Whether the Agent is working on it now."}},"required":["personaPrincipalId","threadId","running"],"additionalProperties":false},"reportBinding":{"description":"The run output the review is based on. Absent when the issue has no bound report.","type":"object","properties":{"kind":{"type":"string","const":"block_output","description":"Always `block_output`: the report is a block's output."},"resourceId":{"type":"string","pattern":"^rr1_[A-Za-z0-9_-]{43}$","description":"Id of the resource that holds the report."},"resourceVersion":{"type":"string","pattern":"^rv1_[A-Za-z0-9_-]{43}$","description":"Version of the resource that holds the report."},"producer":{"type":"object","properties":{"runId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the run that produced the report."},"occurrenceId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the step execution that produced the report."},"blockId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the block that produced the report."}},"required":["runId","occurrenceId","blockId"],"additionalProperties":false,"description":"The run, step and block that produced the report."},"outputPath":{"maxItems":64,"type":"array","items":{"type":"string"},"description":"Path to the report within the block's output, as a list of keys."}},"required":["kind","resourceId","resourceVersion","producer","outputPath"],"additionalProperties":false},"editableReview":{"description":"The data or document the reviewer can edit, with its editable fields. Absent when the review is not editable.","anyOf":[{"type":"object","properties":{"schemaVersion":{"type":"number","const":1,"description":"Version of this review format. Always 1."},"layout":{"description":"`data` shows the reviewed data beside its source documents. Absent for checklist reviews.","type":"string","const":"data"},"documentResourceIds":{"description":"Ids of the source documents, in order. Present only on data reviews.","maxItems":32,"type":"array","items":{"type":"string","pattern":"^rr1_[A-Za-z0-9_-]{43}$"}},"reportBinding":{"type":"object","properties":{"kind":{"type":"string","const":"block_output","description":"Always `block_output`: the report is a block's output."},"resourceId":{"type":"string","pattern":"^rr1_[A-Za-z0-9_-]{43}$","description":"Id of the resource that holds the report."},"resourceVersion":{"type":"string","pattern":"^rv1_[A-Za-z0-9_-]{43}$","description":"Version of the resource that holds the report."},"producer":{"type":"object","properties":{"runId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the run that produced the report."},"occurrenceId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the step execution that produced the report."},"blockId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the block that produced the report."}},"required":["runId","occurrenceId","blockId"],"additionalProperties":false,"description":"The run, step and block that produced the report."},"outputPath":{"maxItems":64,"type":"array","items":{"type":"string"},"description":"Path to the report within the block's output, as a list of keys."}},"required":["kind","resourceId","resourceVersion","producer","outputPath"],"additionalProperties":false,"description":"The report the reviewed data comes from."},"inputSchema":{"$ref":"#/components/schemas/valueSchema","description":"The schema the reviewed data follows."},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/valueInputData"},"description":"The reviewed data, keyed by field name."},"editableInputPaths":{"default":[],"description":"Paths of the values the reviewer can change.","maxItems":100,"type":"array","items":{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"integer","minimum":0}]}}},"editableInputLabels":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"path":{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"integer","minimum":0}]},"description":"Path of the editable value."},"label":{"type":"string","minLength":1,"maxLength":240,"description":"Display name of the value."},"relatedItemIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":240},"description":"Ids of the checks that use this value."}},"required":["path","label","relatedItemIds"],"additionalProperties":false},"description":"Display names for the editable values."},"provenance":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"checkId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the check that uses this input."},"side":{"type":"string","enum":["observed","expected"],"description":"Which side of the check the input is on."},"inputPath":{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"integer","minimum":0}]},"description":"Path of the input in the reviewed data."},"sourceLabel":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"null"}],"description":"Name of where the input came from. Null when it has no source name."},"editable":{"type":"boolean","description":"Whether the reviewer can change this input."}},"required":["checkId","side","inputPath","sourceLabel","editable"],"additionalProperties":false},"description":"Where each input of a check comes from and whether it can be changed."}},"required":["schemaVersion","reportBinding","inputSchema","input","editableInputPaths","editableInputLabels","provenance"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","const":1,"description":"Version of this review format. Always 1."},"layout":{"type":"string","const":"document","description":"Always `document`: the review is about one document."},"reportBinding":{"type":"object","properties":{"kind":{"type":"string","const":"block_output","description":"Always `block_output`: the report is a block's output."},"resourceId":{"type":"string","pattern":"^rr1_[A-Za-z0-9_-]{43}$","description":"Id of the resource that holds the report."},"resourceVersion":{"type":"string","pattern":"^rv1_[A-Za-z0-9_-]{43}$","description":"Version of the resource that holds the report."},"producer":{"type":"object","properties":{"runId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the run that produced the report."},"occurrenceId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the step execution that produced the report."},"blockId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the block that produced the report."}},"required":["runId","occurrenceId","blockId"],"additionalProperties":false,"description":"The run, step and block that produced the report."},"outputPath":{"maxItems":64,"type":"array","items":{"type":"string"},"description":"Path to the report within the block's output, as a list of keys."}},"required":["kind","resourceId","resourceVersion","producer","outputPath"],"additionalProperties":false,"description":"The report the document review comes from."},"profile":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the document profile that describes the document's fields."},"version":{"type":"string","minLength":1,"maxLength":80,"description":"Version of the document profile."},"name":{"type":"string","minLength":1,"maxLength":120,"description":"Name of the kind of document, as the profile calls it, such as `purchase order`."}},"required":["id","version","name"],"additionalProperties":false,"description":"The profile that defines the document's fields."},"subject":{"description":"Identifies which document this is, such as its references. Absent when the document has no identifying text.","type":"string","minLength":1,"maxLength":120},"documentResourceId":{"type":"string","pattern":"^rr1_[A-Za-z0-9_-]{43}$","description":"Id of the run file that holds the document."},"recordResourceId":{"type":"string","pattern":"^rr1_[A-Za-z0-9_-]{43}$","description":"Id of the run file that holds the document's record."},"sourceDocumentResourceIds":{"maxItems":32,"type":"array","items":{"type":"string","pattern":"^rr1_[A-Za-z0-9_-]{43}$"},"description":"Ids of the run files the document was built from, in the order they are shown. At most 32. Empty when there are none."},"origin":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"checks","description":"The document failed the block's own checks before it was sent."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"rejected","description":"The receiving service rejected the document after it was sent."},"service":{"type":"string","minLength":1,"maxLength":120,"description":"Name of the service that rejected the document."}},"required":["kind","service"],"additionalProperties":false}],"description":"Where the problem was found: in the block's own checks or in the receiving service."},"round":{"type":"integer","minimum":1,"maximum":10,"description":"Which attempt this is, starting at 1 for the first failure and rising by one for each correction sent. At most 10."},"issues":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"fieldPath":{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"integer","minimum":0,"maximum":9998}]},"description":"Path to the document field the issue is about, as field names and 0-based list positions, such as `[\"Items\", 2, \"Description\"]`."},"message":{"type":"string","minLength":1,"maxLength":1000,"description":"Explanation of the issue."},"code":{"description":"The receiving system's own code for the issue. Absent when it gave none.","type":"string","minLength":1,"maxLength":160},"severity":{"type":"string","enum":["error","warning"],"description":"Whether the issue is an `error` or a `warning`."},"relatedFieldPaths":{"description":"Paths to other document fields the issue is about. They are marked without a message. Absent when the issue involves no other field.","minItems":1,"maxItems":16,"type":"array","items":{"minItems":1,"maxItems":64,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"integer","minimum":0,"maximum":9998}]}}}},"required":["fieldPath","message","severity"],"additionalProperties":false},"description":"The problems found in the document, at most 1,000. Empty when the cause names no field."},"editableFields":{"maxItems":4000,"type":"array","items":{"type":"object","properties":{"path":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"string","minLength":1,"maxLength":240},"description":"Path to the field by name only, so it applies to every entry of a repeated group."},"schema":{"$ref":"#/components/schemas/valueSchema","description":"The kind of value the field takes."}},"required":["path","schema"],"additionalProperties":false},"description":"The fields the reviewer may change by entering a value, at most 4,000. Fixed, computed and sensitive fields are not listed."},"submitLabel":{"type":"string","minLength":1,"maxLength":60,"description":"Text for the action that sends the document again with the changes."}},"required":["schemaVersion","layout","reportBinding","profile","documentResourceId","recordResourceId","sourceDocumentResourceIds","origin","round","issues","editableFields","submitLabel"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","const":1,"description":"Version of this review format. Always 1."},"layout":{"type":"string","const":"rows","description":"Always `rows`: the review goes through list rows."},"reportBinding":{"type":"object","properties":{"kind":{"type":"string","const":"block_output","description":"Always `block_output`: the report is a block's output."},"resourceId":{"type":"string","pattern":"^rr1_[A-Za-z0-9_-]{43}$","description":"Id of the resource that holds the report."},"resourceVersion":{"type":"string","pattern":"^rv1_[A-Za-z0-9_-]{43}$","description":"Version of the resource that holds the report."},"producer":{"type":"object","properties":{"runId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the run that produced the report."},"occurrenceId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the step execution that produced the report."},"blockId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the block that produced the report."}},"required":["runId","occurrenceId","blockId"],"additionalProperties":false,"description":"The run, step and block that produced the report."},"outputPath":{"maxItems":64,"type":"array","items":{"type":"string"},"description":"Path to the report within the block's output, as a list of keys."}},"required":["kind","resourceId","resourceVersion","producer","outputPath"],"additionalProperties":false,"description":"The checklist report whose list checks the review covers."},"lists":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"checkId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the list check."},"label":{"type":"string","minLength":1,"maxLength":240,"description":"Name of the list check."},"lists":{"type":"object","properties":{"observed":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120,"description":"Name of the list."},"rowCount":{"type":"integer","minimum":0,"maximum":20000,"description":"Number of rows the check has in this list."}},"required":["label","rowCount"],"additionalProperties":false,"description":"The list of values that were found."},"expected":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120,"description":"Name of the list."},"rowCount":{"type":"integer","minimum":0,"maximum":20000,"description":"Number of rows the check has in this list."}},"required":["label","rowCount"],"additionalProperties":false,"description":"The list of values the check compares against."}},"required":["observed","expected"],"additionalProperties":false,"description":"The two lists the check compares."},"columns":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"side":{"type":"string","enum":["observed","expected"],"description":"Which list the column belongs to."},"path":{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"integer","minimum":0}]},"description":"Path to the column within each row."},"schema":{"$ref":"#/components/schemas/valueSchema","description":"The kind of value the column holds."},"label":{"type":"string","minLength":1,"maxLength":240,"description":"Name of the column."},"columnIds":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":240},"description":"Ids of the column comparisons that read this column. Empty when it is only a key column."}},"required":["side","path","schema","label","columnIds"],"additionalProperties":false},"description":"The columns the reviewer may correct: the key columns and the columns the comparisons read."},"findingRowCount":{"type":"integer","minimum":0,"description":"Number of rows of the check with a finding that no reviewer has resolved."}},"required":["checkId","label","lists","columns","findingRowCount"],"additionalProperties":false},"description":"The list checks that have findings no reviewer has resolved."},"values":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"checkId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the value check."},"label":{"type":"string","minLength":1,"maxLength":240,"description":"Name of the value check."}},"required":["checkId","label"],"additionalProperties":false},"description":"The value checks that have findings. The reviewer can accept them but not correct them."}},"required":["schemaVersion","layout","reportBinding","lists","values"],"additionalProperties":false}]},"prompt":{"type":"string","minLength":1,"maxLength":4096,"description":"The question or instructions shown to the reviewer."},"reviewDataMode":{"type":"string","enum":["none","suggested","all"],"description":"How much of the run's data the issue exposes: `none`, only the `suggested` resources, or `all`."},"suggestedResourceIds":{"maxItems":128,"type":"array","items":{"type":"string","minLength":1,"maxLength":240},"description":"Ids of the resources the issue recommends looking at, at most 128."},"availableActions":{"anyOf":[{"type":"array","prefixItems":[{"type":"object","properties":{"id":{"type":"string","const":"@lainstack/action/approve","description":"Id of the approve action."},"kind":{"type":"string","const":"approve","description":"Kind of the action."},"label":{"type":"string","const":"Approve","description":"Display name of the action."},"reasonRequired":{"type":"boolean","const":false,"description":"Whether the action needs a reason. Approve does not."},"submitTarget":{"type":"string","const":"automation-review-action","description":"Which operation submits the action: Resolve a review issue with an action."}},"required":["id","kind","label","reasonRequired","submitTarget"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","const":"@lainstack/action/reject","description":"Id of the reject action."},"kind":{"type":"string","const":"reject","description":"Kind of the action."},"label":{"type":"string","const":"Reject","description":"Display name of the action."},"reasonRequired":{"type":"boolean","const":true,"description":"Whether the action needs a reason. Reject does."},"submitTarget":{"type":"string","const":"automation-review-action","description":"Which operation submits the action: Resolve a review issue with an action."}},"required":["id","kind","label","reasonRequired","submitTarget"],"additionalProperties":false}],"items":false,"minItems":2,"maxItems":2},{"type":"array","prefixItems":[{"type":"object","properties":{"id":{"type":"string","const":"@lainstack/action/approve","description":"Id of the approve action."},"kind":{"type":"string","const":"approve","description":"Kind of the action."},"label":{"type":"string","const":"Approve","description":"Display name of the action."},"reasonRequired":{"type":"boolean","const":false,"description":"Whether the action needs a reason. Approve does not."},"submitTarget":{"type":"string","const":"automation-review-action","description":"Which operation submits the action: Resolve a review issue with an action."}},"required":["id","kind","label","reasonRequired","submitTarget"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","const":"@lainstack/action/reject","description":"Id of the reject action."},"kind":{"type":"string","const":"reject","description":"Kind of the action."},"label":{"type":"string","const":"Reject","description":"Display name of the action."},"reasonRequired":{"type":"boolean","const":true,"description":"Whether the action needs a reason. Reject does."},"submitTarget":{"type":"string","const":"automation-review-action","description":"Which operation submits the action: Resolve a review issue with an action."}},"required":["id","kind","label","reasonRequired","submitTarget"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","const":"@lainstack/action/submit-correction","description":"Id of the correction action."},"kind":{"type":"string","const":"submit_correction","description":"Kind of the action."},"label":{"type":"string","const":"Apply correction and continue","description":"Display name of the action."},"reasonRequired":{"type":"boolean","const":false,"description":"Whether the action needs a reason. A correction does not."},"submitTarget":{"type":"string","const":"automation-review-correction","description":"Which operation submits the action: Submit a correction for a review issue for correction issues, Resolve a review issue with an action for corrected data."}},"required":["id","kind","label","reasonRequired","submitTarget"],"additionalProperties":false}],"items":false,"minItems":3,"maxItems":3},{"type":"array","prefixItems":[{"type":"object","properties":{"id":{"type":"string","const":"@lainstack/action/reject","description":"Id of the reject action."},"kind":{"type":"string","const":"reject","description":"Kind of the action."},"label":{"type":"string","const":"Reject","description":"Display name of the action."},"reasonRequired":{"type":"boolean","const":true,"description":"Whether the action needs a reason. Reject does."},"submitTarget":{"type":"string","const":"automation-review-action","description":"Which operation submits the action: Resolve a review issue with an action."}},"required":["id","kind","label","reasonRequired","submitTarget"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","const":"@lainstack/action/submit-correction","description":"Id of the correction action."},"kind":{"type":"string","const":"submit_correction","description":"Kind of the action."},"label":{"type":"string","const":"Apply correction and continue","description":"Display name of the action."},"reasonRequired":{"type":"boolean","const":false,"description":"Whether the action needs a reason. A correction does not."},"submitTarget":{"type":"string","const":"automation-review-correction","description":"Which operation submits the action: Submit a correction for a review issue for correction issues, Resolve a review issue with an action for corrected data."}},"required":["id","kind","label","reasonRequired","submitTarget"],"additionalProperties":false}],"items":false,"minItems":2,"maxItems":2},{"type":"array","prefixItems":[{"type":"object","properties":{"id":{"type":"string","const":"@lainstack/action/submit-correction","description":"Id of the correction action."},"kind":{"type":"string","const":"submit_correction","description":"Kind of the action."},"label":{"type":"string","const":"Apply correction and continue","description":"Display name of the action."},"reasonRequired":{"type":"boolean","const":false,"description":"Whether the action needs a reason. A correction does not."},"submitTarget":{"type":"string","const":"automation-review-correction","description":"Which operation submits the action: Submit a correction for a review issue for correction issues, Resolve a review issue with an action for corrected data."}},"required":["id","kind","label","reasonRequired","submitTarget"],"additionalProperties":false}],"items":false,"minItems":1,"maxItems":1}],"description":"The actions that can resolve the issue: approve, reject and submit a correction, depending on the review."},"actionAvailability":{"oneOf":[{"type":"object","properties":{"enabled":{"type":"boolean","const":true,"description":"True when the caller can take the issue's actions now."}},"required":["enabled"],"additionalProperties":false},{"type":"object","properties":{"enabled":{"type":"boolean","const":false,"description":"False when the caller cannot take the issue's actions now."},"reason":{"type":"string","enum":["issue_not_open","permission_denied","assigned_to_another_reviewer","action_unavailable","run_not_waiting","action_submission_not_implemented"],"description":"Why the actions are unavailable: the issue is no longer open, the caller lacks permission, another reviewer holds the issue, the issue offers no usable action, or the run is not waiting."}},"required":["enabled","reason"],"additionalProperties":false}],"description":"Whether the caller can take those actions now, and why not if they cannot."},"continuation":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"approval","description":"`approval` means the run waits for a decision."},"state":{"type":"string","const":"awaiting-decision","description":"The run is waiting for an approve or reject."}},"required":["kind","state"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"correction","description":"`correction` means the run waits for a fix."},"state":{"type":"string","const":"awaiting-correction","description":"The run is waiting for a correction."},"correctionRound":{"type":"integer","minimum":1,"maximum":10,"description":"Which correction attempt the run is waiting for."}},"required":["kind","state","correctionRound"],"additionalProperties":false}],"description":"What the paused run is waiting for."},"correction":{"description":"The correction form. Present only on correction issues.","type":"object","properties":{"correctionRound":{"type":"integer","minimum":1,"maximum":10,"description":"Which correction attempt this is for the paused step."},"title":{"type":"string","minLength":1,"maxLength":240,"description":"Short title of the problem to fix."},"description":{"type":"string","minLength":1,"maxLength":1024,"description":"What went wrong and what to change."},"fields":{"minItems":1,"maxItems":12,"type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":240,"description":"Key to use for this field in the correction values."},"label":{"type":"string","minLength":1,"maxLength":120,"description":"Display name of the field."},"description":{"description":"Help text for the field. Absent when there is none.","type":"string","minLength":1,"maxLength":500},"state":{"type":"string","enum":["editable","read_only"],"description":"`editable` fields can be changed; `read_only` fields are shown for context."},"assignmentState":{"type":"string","enum":["required","enabled","disabled","context"],"description":"How the assignment treats the field: `required` must be changed, `enabled` may be changed, `disabled` could be changed but this assignment does not allow it, and `context` is shown for reference only."},"mustChange":{"type":"boolean","description":"Whether the correction has to change this field."},"kind":{"type":"string","const":"text","description":"`text` is a free text field."},"currentValue":{"description":"The field's current value. Missing when an optional field has none.","type":"string"},"minLength":{"description":"Minimum length in characters. Absent when there is no minimum.","type":"integer","minimum":0},"maxLength":{"type":"integer","exclusiveMinimum":0,"maximum":4096,"description":"Maximum length in characters."}},"required":["key","label","state","assignmentState","mustChange","kind","maxLength"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":240,"description":"Key to use for this field in the correction values."},"label":{"type":"string","minLength":1,"maxLength":120,"description":"Display name of the field."},"description":{"description":"Help text for the field. Absent when there is none.","type":"string","minLength":1,"maxLength":500},"state":{"type":"string","enum":["editable","read_only"],"description":"`editable` fields can be changed; `read_only` fields are shown for context."},"assignmentState":{"type":"string","enum":["required","enabled","disabled","context"],"description":"How the assignment treats the field: `required` must be changed, `enabled` may be changed, `disabled` could be changed but this assignment does not allow it, and `context` is shown for reference only."},"mustChange":{"type":"boolean","description":"Whether the correction has to change this field."},"kind":{"type":"string","const":"number","description":"`number` is a numeric field."},"currentValue":{"description":"The field's current value. Missing when an optional field has none.","type":"number"},"minimum":{"description":"Smallest allowed value, inclusive. Absent when an exclusive minimum is used.","type":"number"},"maximum":{"description":"Largest allowed value, inclusive. Absent when an exclusive maximum is used.","type":"number"},"exclusiveMinimum":{"description":"The value must be greater than this. Absent when a minimum is used.","type":"number"},"exclusiveMaximum":{"description":"The value must be less than this. Absent when a maximum is used.","type":"number"},"multipleOf":{"description":"The value must be a multiple of this. Absent when there is no step.","type":"number","exclusiveMinimum":0},"integer":{"type":"boolean","description":"Whether the value must be a whole number."}},"required":["key","label","state","assignmentState","mustChange","kind","integer"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":240,"description":"Key to use for this field in the correction values."},"label":{"type":"string","minLength":1,"maxLength":120,"description":"Display name of the field."},"description":{"description":"Help text for the field. Absent when there is none.","type":"string","minLength":1,"maxLength":500},"state":{"type":"string","enum":["editable","read_only"],"description":"`editable` fields can be changed; `read_only` fields are shown for context."},"assignmentState":{"type":"string","enum":["required","enabled","disabled","context"],"description":"How the assignment treats the field: `required` must be changed, `enabled` may be changed, `disabled` could be changed but this assignment does not allow it, and `context` is shown for reference only."},"mustChange":{"type":"boolean","description":"Whether the correction has to change this field."},"kind":{"type":"string","const":"boolean","description":"`boolean` is a true or false field."},"currentValue":{"description":"The field's current value. Missing when an optional field has none.","type":"boolean"}},"required":["key","label","state","assignmentState","mustChange","kind"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":240,"description":"Key to use for this field in the correction values."},"label":{"type":"string","minLength":1,"maxLength":120,"description":"Display name of the field."},"description":{"description":"Help text for the field. Absent when there is none.","type":"string","minLength":1,"maxLength":500},"state":{"type":"string","enum":["editable","read_only"],"description":"`editable` fields can be changed; `read_only` fields are shown for context."},"assignmentState":{"type":"string","enum":["required","enabled","disabled","context"],"description":"How the assignment treats the field: `required` must be changed, `enabled` may be changed, `disabled` could be changed but this assignment does not allow it, and `context` is shown for reference only."},"mustChange":{"type":"boolean","description":"Whether the correction has to change this field."},"kind":{"type":"string","const":"select","description":"`select` is a choice from a fixed list."},"currentValue":{"description":"The `value` of the option currently selected. Missing when an optional field has none.","type":"string"},"options":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":160,"description":"Value to submit for this option."},"label":{"type":"string","minLength":1,"maxLength":120,"description":"Display name of the option."}},"required":["value","label"],"additionalProperties":false},"description":"The choices the field accepts."}},"required":["key","label","state","assignmentState","mustChange","kind","options"],"additionalProperties":false}]},"description":"The fields of the correction form, at most 12."},"canSubmit":{"type":"boolean","description":"Whether the caller can submit a correction now. False when the issue is not open, is held by another reviewer or its run is not waiting."}},"required":["correctionRound","title","description","fields","canSubmit"],"additionalProperties":false},"resourceAccess":{"type":"object","properties":{"requestedMode":{"type":"string","enum":["none","suggested","all"],"description":"How much of the run's data the issue asked to show: `none`, only the `suggested` resources, or `all`."},"effectiveMode":{"type":"string","enum":["none","suggested","all"],"description":"How much of the run's data the caller can actually see. It is `suggested` instead of `all` when the caller cannot read the run."},"reason":{"description":"Why the mode was reduced. Absent when the effective mode equals the requested one.","type":"string","const":"run_read_required"}},"required":["requestedMode","effectiveMode"],"additionalProperties":false,"description":"How much of the run's data the caller can see for this issue."},"successorIssueInstanceId":{"description":"Id of the open issue that this issue's correction led to. Absent when the correction raised no new issue.","type":"string","pattern":"^rii1_[A-Za-z0-9_-]{43}$"},"resolvedByActionSubmissionId":{"description":"Id of the submitted action that resolved the issue. Absent until it is resolved.","type":"string","minLength":1,"maxLength":240},"resolvedAt":{"description":"When the issue was resolved, as an ISO 8601 timestamp. Absent until it is resolved.","type":"string","format":"date-time"},"resolution":{"description":"How the issue was resolved. Absent until it is resolved.","type":"object","properties":{"actionSubmissionId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the submitted action that resolved the issue."},"action":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^@[a-z0-9][a-z0-9-]*(?:\\/[a-z0-9][a-z0-9-]*){2,}$","description":"Id of the action."},"kind":{"type":"string","enum":["approve","reject","submit_correction"],"description":"Kind of the action: approve, reject or submit a correction."},"label":{"type":"string","minLength":1,"description":"Display name of the action."},"description":{"description":"What the action does. Absent when there is no extra explanation.","type":"string","minLength":1},"reasonRequired":{"type":"boolean","description":"Whether the action needs a reason."},"destructive":{"description":"True when the action cannot be undone. Absent when it is not flagged.","type":"boolean"},"submitTarget":{"type":"string","enum":["automation-review-action","automation-review-correction"],"description":"Which kind of submission carries the action: a decision or a correction."},"metadata":{"description":"Extra key-value details about the action. Absent when there are none.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","kind","label","reasonRequired","submitTarget"],"additionalProperties":false,"description":"The action that was taken."},"occurredAt":{"type":"string","format":"date-time","description":"When the action was submitted, as an ISO 8601 timestamp."},"actor":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the user who took the action."},"displayName":{"description":"Display name of the user who took the action. Absent when it is not known.","type":"string","minLength":1,"maxLength":240}},"required":["id"],"additionalProperties":false,"description":"Who took the action."},"correction":{"description":"What the correction changed. Present only when the action was a correction.","oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"available","description":"`available` means the summary lists the changed fields."},"fields":{"minItems":1,"maxItems":500,"type":"array","items":{"oneOf":[{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":240,"description":"Display name of the changed field."},"targets":{"description":"The places in the reviewed data this change applies to. Absent when not tracked.","maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"checklist_operand","description":"Marks a target that is a checklist operand."},"checkId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the check the operand belongs to."},"side":{"type":"string","enum":["observed","expected"],"description":"Which side of the check the operand is on."}},"required":["kind","checkId","side"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"correction_field","description":"Marks a target that is a correction field."},"fieldKey":{"type":"string","minLength":1,"maxLength":240,"description":"Key of the correction field."}},"required":["kind","fieldKey"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"input_path","description":"Marks a target that is a path in the reviewed data."},"path":{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"integer","minimum":0}]},"description":"Path of the changed value in the reviewed data."}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"checklist_cell","description":"Marks a target that is a checklist cell."},"checkId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the check the cell belongs to."},"side":{"type":"string","enum":["observed","expected"],"description":"Which list of the check the cell is in."},"rowNumber":{"type":"integer","exclusiveMinimum":0,"description":"1-based row number of the cell."},"path":{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"integer","minimum":0}]},"description":"Path of the cell within its row."}},"required":["kind","checkId","side","rowNumber","path"],"additionalProperties":false}]}},"kind":{"type":"string","const":"set","description":"`set` means the field was given a new value."},"value":{"$ref":"#/components/schemas/valueInputData","description":"The value the field was set to."},"displayValue":{"description":"The value as shown to reviewers. Absent when the value is shown as is.","type":"string","minLength":1,"maxLength":240}},"required":["label","kind","value"],"additionalProperties":false},{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":240,"description":"Display name of the changed field."},"targets":{"description":"The places in the reviewed data this change applies to. Absent when not tracked.","maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"checklist_operand","description":"Marks a target that is a checklist operand."},"checkId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the check the operand belongs to."},"side":{"type":"string","enum":["observed","expected"],"description":"Which side of the check the operand is on."}},"required":["kind","checkId","side"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"correction_field","description":"Marks a target that is a correction field."},"fieldKey":{"type":"string","minLength":1,"maxLength":240,"description":"Key of the correction field."}},"required":["kind","fieldKey"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"input_path","description":"Marks a target that is a path in the reviewed data."},"path":{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"integer","minimum":0}]},"description":"Path of the changed value in the reviewed data."}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"checklist_cell","description":"Marks a target that is a checklist cell."},"checkId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the check the cell belongs to."},"side":{"type":"string","enum":["observed","expected"],"description":"Which list of the check the cell is in."},"rowNumber":{"type":"integer","exclusiveMinimum":0,"description":"1-based row number of the cell."},"path":{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"integer","minimum":0}]},"description":"Path of the cell within its row."}},"required":["kind","checkId","side","rowNumber","path"],"additionalProperties":false}]}},"kind":{"type":"string","const":"delete","description":"`delete` means the field was removed."}},"required":["label","kind"],"additionalProperties":false}]},"description":"The fields the correction changed."}},"required":["status","fields"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"unavailable","description":"`unavailable` means the changed fields can no longer be listed."}},"required":["status"],"additionalProperties":false}]},"note":{"description":"The reason or note the reviewer gave. Absent when none was given.","type":"string","minLength":1,"maxLength":4096}},"required":["actionSubmissionId","action","occurredAt","actor"],"additionalProperties":false}},"required":["issueInstanceId","issueSnapshotId","issueSnapshotVersion","issueTypeId","requestKind","hasReportBinding","executionOccurrenceId","status","severity","title","runDisplayName","automationId","runId","stepId","assignmentSummary","createdAt","updatedAt","blockId","prompt","reviewDataMode","suggestedResourceIds","availableActions","actionAvailability","continuation","resourceAccess"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Unprocessable Entity","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"operationId":"getApiWorkspacesByWorkspaceIdReview-issuesByIssueInstanceId","security":[{"apiKey":["escalation:read"]}],"x-lainstack-auth":{"label":"API key","description":"Accepts an organization API key with the `escalation:read` scope, or the web app's browser session."}}},"/api/workspaces/{workspaceId}/review-issues/{issueInstanceId}/actions":{"post":{"tags":["Escalations"],"summary":"Resolve a review issue with an action","operationId":"decideReviewIssue","description":"**Authentication: API key.** Accepts an organization API key with the `escalation:write` scope, or the web app's browser session.\n\nDecides a review issue by approving it, rejecting it with a reason, or submitting a correction of the reviewed data. The issue is resolved and the paused run is queued to continue with the decision; the response reports the continuation status. Sending the same idempotency key again returns the original result with `replayed` set. Fails with a conflict when the quoted snapshot is out of date, the issue is held by another reviewer or the run is no longer waiting. Requires the `escalation:write` permission.","parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The workspace's id.","example":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e"},{"name":"issueInstanceId","in":"path","required":true,"schema":{"type":"string","pattern":"^rii1_[A-Za-z0-9_-]{43}$"},"description":"The review issue's id, as returned by List review issues.","example":"rii1_o0fvBu93XVUf0VHa7BNWFZ5pd4Thfjt6YAd8HRske25"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"actionId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^@[a-z0-9][a-z0-9-]*(?:\\/[a-z0-9][a-z0-9-]*){2,}$","description":"Id of the action to take: `@lainstack/action/approve` or `@lainstack/action/reject`."},"issueSnapshotId":{"type":"string","pattern":"^ris1_[A-Za-z0-9_-]{43}$","description":"Id of the issue snapshot the caller is acting on, from Get a review issue."},"issueSnapshotVersion":{"type":"integer","exclusiveMinimum":0,"description":"Version of the issue snapshot the caller is acting on. The call fails with a conflict if the issue has moved on."},"idempotencyKey":{"type":"string","minLength":22,"maxLength":256,"description":"Unique key, 22 to 256 characters, that makes the call safe to retry. Sending the same key again returns the original result."},"reason":{"description":"Why the reviewer decided this way. Required for reject, optional for approve.","type":"string","minLength":1,"maxLength":4096},"acceptances":{"description":"Checklist findings the reviewer accepts as they are, each with an optional note. Allowed only on approve.","minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"accept","description":"`accept` keeps the finding as it is."},"checkId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the check the finding belongs to."},"side":{"description":"Which list the row is in. Required with `rowNumber`, absent for a value check.","type":"string","enum":["observed","expected"]},"rowNumber":{"description":"1-based row number in that list. Required with `side`, absent for a value check.","type":"integer","exclusiveMinimum":0,"maximum":20000},"note":{"description":"A note explaining why the finding is accepted. Absent when none is given.","type":"string","minLength":1,"maxLength":1000}},"required":["kind","checkId"],"additionalProperties":false}}},"required":["actionId","issueSnapshotId","issueSnapshotVersion","idempotencyKey"],"additionalProperties":false},{"type":"object","properties":{"actionId":{"type":"string","const":"@lainstack/action/submit-correction","description":"Id of the action to take. Always `@lainstack/action/submit-correction`."},"issueSnapshotId":{"type":"string","pattern":"^ris1_[A-Za-z0-9_-]{43}$","description":"Id of the issue snapshot the caller is acting on, from Get a review issue."},"issueSnapshotVersion":{"type":"integer","exclusiveMinimum":0,"description":"Version of the issue snapshot the caller is acting on. The call fails with a conflict if the issue has moved on."},"idempotencyKey":{"type":"string","minLength":22,"maxLength":256,"description":"Unique key, 22 to 256 characters, that makes the call safe to retry. Sending the same key again returns the original result."},"patch":{"minItems":1,"maxItems":500,"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"set","description":"`set` replaces the value at the path."},"path":{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"integer","minimum":0}]},"description":"Path of the value to change in the reviewed data."},"value":{"$ref":"#/components/schemas/valueInputData","description":"The new value."}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"delete","description":"`delete` removes the value at the path."},"path":{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"integer","minimum":0}]},"description":"Path of the value to remove from the reviewed data."}},"required":["kind","path"],"additionalProperties":false}]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"cell","description":"`cell` changes one cell of a checklist row."},"checkId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the check the row belongs to."},"side":{"type":"string","enum":["observed","expected"],"description":"Which list of the check the row is in."},"rowNumber":{"type":"integer","exclusiveMinimum":0,"maximum":20000,"description":"1-based row number in that list."},"path":{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"integer","minimum":0}]},"description":"Path of the cell within its row."},"value":{"$ref":"#/components/schemas/valueInputData","description":"The new value of the cell."}},"required":["kind","checkId","side","rowNumber","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"accept","description":"`accept` keeps the finding as it is."},"checkId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the check the finding belongs to."},"side":{"description":"Which list the row is in. Required with `rowNumber`, absent for a value check.","type":"string","enum":["observed","expected"]},"rowNumber":{"description":"1-based row number in that list. Required with `side`, absent for a value check.","type":"integer","exclusiveMinimum":0,"maximum":20000},"note":{"description":"A note explaining why the finding is accepted. Absent when none is given.","type":"string","minLength":1,"maxLength":1000}},"required":["kind","checkId"],"additionalProperties":false}]}]},"description":"The changes to the reviewed data: values to set or delete, checklist cells to change and findings to accept. Each place may appear once; at most 500 entries."},"reason":{"description":"Why the reviewer made the correction. Absent when none is given.","type":"string","minLength":1,"maxLength":4096},"submittedByDisplayName":{"description":"Ignored if sent. Lainstack sets it to the signed-in reviewer's display name.","type":"string","minLength":1,"maxLength":240}},"required":["actionId","issueSnapshotId","issueSnapshotVersion","idempotencyKey","patch"],"additionalProperties":false}]},"example":{"actionId":"@lainstack/action/approve","issueSnapshotId":"ris1_ObY4RgBG7WmzqDpzzzdPdnKRuMNajSHOoUEwpLE6Ooh","issueSnapshotVersion":3,"idempotencyKey":"approve-REQ-1042-2026-10-29","reason":"Matches the purchase order."}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"actionId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^@[a-z0-9][a-z0-9-]*(?:\\/[a-z0-9][a-z0-9-]*){2,}$","description":"Id of the action to take: `@lainstack/action/approve` or `@lainstack/action/reject`."},"issueSnapshotId":{"type":"string","pattern":"^ris1_[A-Za-z0-9_-]{43}$","description":"Id of the issue snapshot the caller is acting on, from Get a review issue."},"issueSnapshotVersion":{"type":"integer","exclusiveMinimum":0,"description":"Version of the issue snapshot the caller is acting on. The call fails with a conflict if the issue has moved on."},"idempotencyKey":{"type":"string","minLength":22,"maxLength":256,"description":"Unique key, 22 to 256 characters, that makes the call safe to retry. Sending the same key again returns the original result."},"reason":{"description":"Why the reviewer decided this way. Required for reject, optional for approve.","type":"string","minLength":1,"maxLength":4096},"acceptances":{"description":"Checklist findings the reviewer accepts as they are, each with an optional note. Allowed only on approve.","minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"accept","description":"`accept` keeps the finding as it is."},"checkId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the check the finding belongs to."},"side":{"description":"Which list the row is in. Required with `rowNumber`, absent for a value check.","type":"string","enum":["observed","expected"]},"rowNumber":{"description":"1-based row number in that list. Required with `side`, absent for a value check.","type":"integer","exclusiveMinimum":0,"maximum":20000},"note":{"description":"A note explaining why the finding is accepted. Absent when none is given.","type":"string","minLength":1,"maxLength":1000}},"required":["kind","checkId"],"additionalProperties":false}}},"required":["actionId","issueSnapshotId","issueSnapshotVersion","idempotencyKey"],"additionalProperties":false},{"type":"object","properties":{"actionId":{"type":"string","const":"@lainstack/action/submit-correction","description":"Id of the action to take. Always `@lainstack/action/submit-correction`."},"issueSnapshotId":{"type":"string","pattern":"^ris1_[A-Za-z0-9_-]{43}$","description":"Id of the issue snapshot the caller is acting on, from Get a review issue."},"issueSnapshotVersion":{"type":"integer","exclusiveMinimum":0,"description":"Version of the issue snapshot the caller is acting on. The call fails with a conflict if the issue has moved on."},"idempotencyKey":{"type":"string","minLength":22,"maxLength":256,"description":"Unique key, 22 to 256 characters, that makes the call safe to retry. Sending the same key again returns the original result."},"patch":{"minItems":1,"maxItems":500,"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"set","description":"`set` replaces the value at the path."},"path":{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"integer","minimum":0}]},"description":"Path of the value to change in the reviewed data."},"value":{"$ref":"#/components/schemas/valueInputData","description":"The new value."}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"delete","description":"`delete` removes the value at the path."},"path":{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"integer","minimum":0}]},"description":"Path of the value to remove from the reviewed data."}},"required":["kind","path"],"additionalProperties":false}]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"cell","description":"`cell` changes one cell of a checklist row."},"checkId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the check the row belongs to."},"side":{"type":"string","enum":["observed","expected"],"description":"Which list of the check the row is in."},"rowNumber":{"type":"integer","exclusiveMinimum":0,"maximum":20000,"description":"1-based row number in that list."},"path":{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"integer","minimum":0}]},"description":"Path of the cell within its row."},"value":{"$ref":"#/components/schemas/valueInputData","description":"The new value of the cell."}},"required":["kind","checkId","side","rowNumber","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"accept","description":"`accept` keeps the finding as it is."},"checkId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the check the finding belongs to."},"side":{"description":"Which list the row is in. Required with `rowNumber`, absent for a value check.","type":"string","enum":["observed","expected"]},"rowNumber":{"description":"1-based row number in that list. Required with `side`, absent for a value check.","type":"integer","exclusiveMinimum":0,"maximum":20000},"note":{"description":"A note explaining why the finding is accepted. Absent when none is given.","type":"string","minLength":1,"maxLength":1000}},"required":["kind","checkId"],"additionalProperties":false}]}]},"description":"The changes to the reviewed data: values to set or delete, checklist cells to change and findings to accept. Each place may appear once; at most 500 entries."},"reason":{"description":"Why the reviewer made the correction. Absent when none is given.","type":"string","minLength":1,"maxLength":4096},"submittedByDisplayName":{"description":"Ignored if sent. Lainstack sets it to the signed-in reviewer's display name.","type":"string","minLength":1,"maxLength":240}},"required":["actionId","issueSnapshotId","issueSnapshotVersion","idempotencyKey","patch"],"additionalProperties":false}]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"actionId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^@[a-z0-9][a-z0-9-]*(?:\\/[a-z0-9][a-z0-9-]*){2,}$","description":"Id of the action to take: `@lainstack/action/approve` or `@lainstack/action/reject`."},"issueSnapshotId":{"type":"string","pattern":"^ris1_[A-Za-z0-9_-]{43}$","description":"Id of the issue snapshot the caller is acting on, from Get a review issue."},"issueSnapshotVersion":{"type":"integer","exclusiveMinimum":0,"description":"Version of the issue snapshot the caller is acting on. The call fails with a conflict if the issue has moved on."},"idempotencyKey":{"type":"string","minLength":22,"maxLength":256,"description":"Unique key, 22 to 256 characters, that makes the call safe to retry. Sending the same key again returns the original result."},"reason":{"description":"Why the reviewer decided this way. Required for reject, optional for approve.","type":"string","minLength":1,"maxLength":4096},"acceptances":{"description":"Checklist findings the reviewer accepts as they are, each with an optional note. Allowed only on approve.","minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"accept","description":"`accept` keeps the finding as it is."},"checkId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the check the finding belongs to."},"side":{"description":"Which list the row is in. Required with `rowNumber`, absent for a value check.","type":"string","enum":["observed","expected"]},"rowNumber":{"description":"1-based row number in that list. Required with `side`, absent for a value check.","type":"integer","exclusiveMinimum":0,"maximum":20000},"note":{"description":"A note explaining why the finding is accepted. Absent when none is given.","type":"string","minLength":1,"maxLength":1000}},"required":["kind","checkId"],"additionalProperties":false}}},"required":["actionId","issueSnapshotId","issueSnapshotVersion","idempotencyKey"],"additionalProperties":false},{"type":"object","properties":{"actionId":{"type":"string","const":"@lainstack/action/submit-correction","description":"Id of the action to take. Always `@lainstack/action/submit-correction`."},"issueSnapshotId":{"type":"string","pattern":"^ris1_[A-Za-z0-9_-]{43}$","description":"Id of the issue snapshot the caller is acting on, from Get a review issue."},"issueSnapshotVersion":{"type":"integer","exclusiveMinimum":0,"description":"Version of the issue snapshot the caller is acting on. The call fails with a conflict if the issue has moved on."},"idempotencyKey":{"type":"string","minLength":22,"maxLength":256,"description":"Unique key, 22 to 256 characters, that makes the call safe to retry. Sending the same key again returns the original result."},"patch":{"minItems":1,"maxItems":500,"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"set","description":"`set` replaces the value at the path."},"path":{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"integer","minimum":0}]},"description":"Path of the value to change in the reviewed data."},"value":{"$ref":"#/components/schemas/valueInputData","description":"The new value."}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"delete","description":"`delete` removes the value at the path."},"path":{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"integer","minimum":0}]},"description":"Path of the value to remove from the reviewed data."}},"required":["kind","path"],"additionalProperties":false}]},{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"cell","description":"`cell` changes one cell of a checklist row."},"checkId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the check the row belongs to."},"side":{"type":"string","enum":["observed","expected"],"description":"Which list of the check the row is in."},"rowNumber":{"type":"integer","exclusiveMinimum":0,"maximum":20000,"description":"1-based row number in that list."},"path":{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","minLength":1,"maxLength":240},{"type":"integer","minimum":0}]},"description":"Path of the cell within its row."},"value":{"$ref":"#/components/schemas/valueInputData","description":"The new value of the cell."}},"required":["kind","checkId","side","rowNumber","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"accept","description":"`accept` keeps the finding as it is."},"checkId":{"type":"string","minLength":1,"maxLength":240,"description":"Id of the check the finding belongs to."},"side":{"description":"Which list the row is in. Required with `rowNumber`, absent for a value check.","type":"string","enum":["observed","expected"]},"rowNumber":{"description":"1-based row number in that list. Required with `side`, absent for a value check.","type":"integer","exclusiveMinimum":0,"maximum":20000},"note":{"description":"A note explaining why the finding is accepted. Absent when none is given.","type":"string","minLength":1,"maxLength":1000}},"required":["kind","checkId"],"additionalProperties":false}]}]},"description":"The changes to the reviewed data: values to set or delete, checklist cells to change and findings to accept. Each place may appear once; at most 500 entries."},"reason":{"description":"Why the reviewer made the correction. Absent when none is given.","type":"string","minLength":1,"maxLength":4096},"submittedByDisplayName":{"description":"Ignored if sent. Lainstack sets it to the signed-in reviewer's display name.","type":"string","minLength":1,"maxLength":240}},"required":["actionId","issueSnapshotId","issueSnapshotVersion","idempotencyKey","patch"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"actionSubmissionId":{"type":"string","minLength":1,"maxLength":240,"description":"Unique id of this submitted action."},"issueInstanceId":{"type":"string","minLength":1,"maxLength":240,"description":"Unique id of the review issue."},"issueSnapshotId":{"type":"string","pattern":"^ris1_[A-Za-z0-9_-]{43}$","description":"Id of the issue snapshot the action was applied to."},"issueSnapshotVersion":{"type":"integer","exclusiveMinimum":0,"description":"Version of the issue snapshot the action was applied to."},"issueStatus":{"type":"string","const":"resolved","description":"Status of the issue after the action. Always `resolved`."},"actionId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^@[a-z0-9][a-z0-9-]*(?:\\/[a-z0-9][a-z0-9-]*){2,}$","description":"Id of the action that was taken."},"continuationStatus":{"type":"string","enum":["queued","dispatching","retry_scheduled","dispatched","continued","failed_terminal","superseded"],"description":"Progress of passing the decision to the paused run. `continued` means the run resumed and `failed_terminal` means delivery failed for good; the other values are steps before either, or a submission that was replaced."},"auditEventIds":{"minItems":2,"type":"array","items":{"type":"string","minLength":1,"maxLength":240},"description":"Ids of the audit events recorded for the action."},"replayed":{"type":"boolean","description":"True when this idempotency key was already used and the original result is returned."}},"required":["actionSubmissionId","issueInstanceId","issueSnapshotId","issueSnapshotVersion","issueStatus","actionId","continuationStatus","auditEventIds","replayed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"actionSubmissionId":"0195f3c9-7f8a-7b9c-8d0e-1f2a3b4c5d6e","issueInstanceId":"rii1_o0fvBu93XVUf0VHa7BNWFZ5pd4Thfjt6YAd8HRske25","issueSnapshotId":"ris1_ObY4RgBG7WmzqDpzzzdPdnKRuMNajSHOoUEwpLE6Ooh","issueSnapshotVersion":3,"issueStatus":"resolved","actionId":"@lainstack/action/approve","continuationStatus":"queued","auditEventIds":["0195f3ca-8a9b-7c0d-9e1f-2a3b4c5d6e7f","0195f3cb-9b0c-7d1e-af2a-3b4c5d6e7f8a"],"replayed":false}}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"security":[{"apiKey":["escalation:write"]}],"x-lainstack-auth":{"label":"API key","description":"Accepts an organization API key with the `escalation:write` scope, or the web app's browser session."},"x-codeSamples":[{"lang":"json","label":"JSON Schema","source":"{\n  \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n  \"anyOf\": [\n    {\n      \"type\": \"object\",\n      \"properties\": {\n        \"actionId\": {\n          \"type\": \"string\",\n          \"minLength\": 1,\n          \"maxLength\": 160,\n          \"pattern\": \"^@[a-z0-9][a-z0-9-]*(?:\\\\/[a-z0-9][a-z0-9-]*){2,}$\",\n          \"description\": \"Id of the action to take: `@lainstack/action/approve` or `@lainstack/action/reject`.\"\n        },\n        \"issueSnapshotId\": {\n          \"type\": \"string\",\n          \"pattern\": \"^ris1_[A-Za-z0-9_-]{43}$\",\n          \"description\": \"Id of the issue snapshot the caller is acting on, from Get a review issue.\"\n        },\n        \"issueSnapshotVersion\": {\n          \"type\": \"integer\",\n          \"exclusiveMinimum\": 0,\n          \"description\": \"Version of the issue snapshot the caller is acting on. The call fails with a conflict if the issue has moved on.\"\n        },\n        \"idempotencyKey\": {\n          \"type\": \"string\",\n          \"minLength\": 22,\n          \"maxLength\": 256,\n          \"description\": \"Unique key, 22 to 256 characters, that makes the call safe to retry. Sending the same key again returns the original result.\"\n        },\n        \"reason\": {\n          \"description\": \"Why the reviewer decided this way. Required for reject, optional for approve.\",\n          \"type\": \"string\",\n          \"minLength\": 1,\n          \"maxLength\": 4096\n        },\n        \"acceptances\": {\n          \"description\": \"Checklist findings the reviewer accepts as they are, each with an optional note. Allowed only on approve.\",\n          \"minItems\": 1,\n          \"maxItems\": 500,\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"kind\": {\n                \"type\": \"string\",\n                \"const\": \"accept\",\n                \"description\": \"`accept` keeps the finding as it is.\"\n              },\n              \"checkId\": {\n                \"type\": \"string\",\n                \"minLength\": 1,\n                \"maxLength\": 240,\n                \"description\": \"Id of the check the finding belongs to.\"\n              },\n              \"side\": {\n                \"description\": \"Which list the row is in. Required with `rowNumber`, absent for a value check.\",\n                \"type\": \"string\",\n                \"enum\": [\n                  \"observed\",\n                  \"expected\"\n                ]\n              },\n              \"rowNumber\": {\n                \"description\": \"1-based row number in that list. Required with `side`, absent for a value check.\",\n                \"type\": \"integer\",\n                \"exclusiveMinimum\": 0,\n                \"maximum\": 20000\n              },\n              \"note\": {\n                \"description\": \"A note explaining why the finding is accepted. Absent when none is given.\",\n                \"type\": \"string\",\n                \"minLength\": 1,\n                \"maxLength\": 1000\n              }\n            },\n            \"required\": [\n              \"kind\",\n              \"checkId\"\n            ],\n            \"additionalProperties\": false\n          }\n        }\n      },\n      \"required\": [\n        \"actionId\",\n        \"issueSnapshotId\",\n        \"issueSnapshotVersion\",\n        \"idempotencyKey\"\n      ],\n      \"additionalProperties\": false\n    },\n    {\n      \"type\": \"object\",\n      \"properties\": {\n        \"actionId\": {\n          \"type\": \"string\",\n          \"const\": \"@lainstack/action/submit-correction\",\n          \"description\": \"Id of the action to take. Always `@lainstack/action/submit-correction`.\"\n        },\n        \"issueSnapshotId\": {\n          \"type\": \"string\",\n          \"pattern\": \"^ris1_[A-Za-z0-9_-]{43}$\",\n          \"description\": \"Id of the issue snapshot the caller is acting on, from Get a review issue.\"\n        },\n        \"issueSnapshotVersion\": {\n          \"type\": \"integer\",\n          \"exclusiveMinimum\": 0,\n          \"description\": \"Version of the issue snapshot the caller is acting on. The call fails with a conflict if the issue has moved on.\"\n        },\n        \"idempotencyKey\": {\n          \"type\": \"string\",\n          \"minLength\": 22,\n          \"maxLength\": 256,\n          \"description\": \"Unique key, 22 to 256 characters, that makes the call safe to retry. Sending the same key again returns the original result.\"\n        },\n        \"patch\": {\n          \"minItems\": 1,\n          \"maxItems\": 500,\n          \"type\": \"array\",\n          \"items\": {\n            \"anyOf\": [\n              {\n                \"oneOf\": [\n                  {\n                    \"type\": \"object\",\n                    \"properties\": {\n                      \"kind\": {\n                        \"type\": \"string\",\n                        \"const\": \"set\",\n                        \"description\": \"`set` replaces the value at the path.\"\n                      },\n                      \"path\": {\n                        \"minItems\": 1,\n                        \"maxItems\": 100,\n                        \"type\": \"array\",\n                        \"items\": {\n                          \"anyOf\": [\n                            {\n                              \"type\": \"string\",\n                              \"minLength\": 1,\n                              \"maxLength\": 240\n                            },\n                            {\n                              \"type\": \"integer\",\n                              \"minimum\": 0\n                            }\n                          ]\n                        },\n                        \"description\": \"Path of the value to change in the reviewed data.\"\n                      },\n                      \"value\": {\n                        \"anyOf\": [\n                          {\n                            \"type\": \"string\"\n                          },\n                          {\n                            \"type\": \"number\"\n                          },\n                          {\n                            \"type\": \"boolean\"\n                          },\n                          {\n                            \"type\": \"null\"\n                          },\n                          {\n                            \"type\": \"object\",\n                            \"maxProperties\": 100,\n                            \"propertyNames\": {\n                              \"type\": \"string\",\n                              \"minLength\": 1,\n                              \"maxLength\": 240\n                            },\n                            \"additionalProperties\": {\n                              \"$ref\": \"#/$defs/valueInputData\"\n                            },\n                            \"not\": {\n                              \"anyOf\": [\n                                {\n                                  \"required\": [\n                                    \"__resolution\"\n                                  ]\n                                },\n                                {\n                                  \"required\": [\n                                    \"__kind\"\n                                  ],\n                                  \"properties\": {\n                                    \"__kind\": {\n                                      \"enum\": [\n                                        \"file\",\n                                        \"collection\",\n                                        \"spill\"\n                                      ]\n                                    }\n                                  }\n                                }\n                              ]\n                            }\n                          },\n                          {\n                            \"type\": \"array\",\n                            \"maxItems\": 100,\n                            \"items\": {\n                              \"$ref\": \"#/$defs/valueInputData\"\n                            }\n                          }\n                        ],\n                        \"description\": \"The new value.\"\n                      }\n                    },\n                    \"required\": [\n                      \"kind\",\n                      \"path\",\n                      \"value\"\n                    ],\n                    \"additionalProperties\": false\n                  },\n                  {\n                    \"type\": \"object\",\n                    \"properties\": {\n                      \"kind\": {\n                        \"type\": \"string\",\n                        \"const\": \"delete\",\n                        \"description\": \"`delete` removes the value at the path.\"\n                      },\n                      \"path\": {\n                        \"minItems\": 1,\n                        \"maxItems\": 100,\n                        \"type\": \"array\",\n                        \"items\": {\n                          \"anyOf\": [\n                            {\n                              \"type\": \"string\",\n                              \"minLength\": 1,\n                              \"maxLength\": 240\n                            },\n                            {\n                              \"type\": \"integer\",\n                              \"minimum\": 0\n                            }\n                          ]\n                        },\n                        \"description\": \"Path of the value to remove from the reviewed data.\"\n                      }\n                    },\n                    \"required\": [\n                      \"kind\",\n                      \"path\"\n                    ],\n                    \"additionalProperties\": false\n                  }\n                ]\n              },\n              {\n                \"anyOf\": [\n                  {\n                    \"type\": \"object\",\n                    \"properties\": {\n                      \"kind\": {\n                        \"type\": \"string\",\n                        \"const\": \"cell\",\n                        \"description\": \"`cell` changes one cell of a checklist row.\"\n                      },\n                      \"checkId\": {\n                        \"type\": \"string\",\n                        \"minLength\": 1,\n                        \"maxLength\": 240,\n                        \"description\": \"Id of the check the row belongs to.\"\n                      },\n                      \"side\": {\n                        \"type\": \"string\",\n                        \"enum\": [\n                          \"observed\",\n                          \"expected\"\n                        ],\n                        \"description\": \"Which list of the check the row is in.\"\n                      },\n                      \"rowNumber\": {\n                        \"type\": \"integer\",\n                        \"exclusiveMinimum\": 0,\n                        \"maximum\": 20000,\n                        \"description\": \"1-based row number in that list.\"\n                      },\n                      \"path\": {\n                        \"minItems\": 1,\n                        \"maxItems\": 100,\n                        \"type\": \"array\",\n                        \"items\": {\n                          \"anyOf\": [\n                            {\n                              \"type\": \"string\",\n                              \"minLength\": 1,\n                              \"maxLength\": 240\n                            },\n                            {\n                              \"type\": \"integer\",\n                              \"minimum\": 0\n                            }\n                          ]\n                        },\n                        \"description\": \"Path of the cell within its row.\"\n                      },\n                      \"value\": {\n                        \"anyOf\": [\n                          {\n                            \"type\": \"string\"\n                          },\n                          {\n                            \"type\": \"number\"\n                          },\n                          {\n                            \"type\": \"boolean\"\n                          },\n                          {\n                            \"type\": \"null\"\n                          },\n                          {\n                            \"type\": \"object\",\n                            \"maxProperties\": 100,\n                            \"propertyNames\": {\n                              \"type\": \"string\",\n                              \"minLength\": 1,\n                              \"maxLength\": 240\n                            },\n                            \"additionalProperties\": {\n                              \"$ref\": \"#/$defs/valueInputData\"\n                            },\n                            \"not\": {\n                              \"anyOf\": [\n                                {\n                                  \"required\": [\n                                    \"__resolution\"\n                                  ]\n                                },\n                                {\n                                  \"required\": [\n                                    \"__kind\"\n                                  ],\n                                  \"properties\": {\n                                    \"__kind\": {\n                                      \"enum\": [\n                                        \"file\",\n                                        \"collection\",\n                                        \"spill\"\n                                      ]\n                                    }\n                                  }\n                                }\n                              ]\n                            }\n                          },\n                          {\n                            \"type\": \"array\",\n                            \"maxItems\": 100,\n                            \"items\": {\n                              \"$ref\": \"#/$defs/valueInputData\"\n                            }\n                          }\n                        ],\n                        \"description\": \"The new value of the cell.\"\n                      }\n                    },\n                    \"required\": [\n                      \"kind\",\n                      \"checkId\",\n                      \"side\",\n                      \"rowNumber\",\n                      \"path\",\n                      \"value\"\n                    ],\n                    \"additionalProperties\": false\n                  },\n                  {\n                    \"type\": \"object\",\n                    \"properties\": {\n                      \"kind\": {\n                        \"type\": \"string\",\n                        \"const\": \"accept\",\n                        \"description\": \"`accept` keeps the finding as it is.\"\n                      },\n                      \"checkId\": {\n                        \"type\": \"string\",\n                        \"minLength\": 1,\n                        \"maxLength\": 240,\n                        \"description\": \"Id of the check the finding belongs to.\"\n                      },\n                      \"side\": {\n                        \"description\": \"Which list the row is in. Required with `rowNumber`, absent for a value check.\",\n                        \"type\": \"string\",\n                        \"enum\": [\n                          \"observed\",\n                          \"expected\"\n                        ]\n                      },\n                      \"rowNumber\": {\n                        \"description\": \"1-based row number in that list. Required with `side`, absent for a value check.\",\n                        \"type\": \"integer\",\n                        \"exclusiveMinimum\": 0,\n                        \"maximum\": 20000\n                      },\n                      \"note\": {\n                        \"description\": \"A note explaining why the finding is accepted. Absent when none is given.\",\n                        \"type\": \"string\",\n                        \"minLength\": 1,\n                        \"maxLength\": 1000\n                      }\n                    },\n                    \"required\": [\n                      \"kind\",\n                      \"checkId\"\n                    ],\n                    \"additionalProperties\": false\n                  }\n                ]\n              }\n            ]\n          },\n          \"description\": \"The changes to the reviewed data: values to set or delete, checklist cells to change and findings to accept. Each place may appear once; at most 500 entries.\"\n        },\n        \"reason\": {\n          \"description\": \"Why the reviewer made the correction. Absent when none is given.\",\n          \"type\": \"string\",\n          \"minLength\": 1,\n          \"maxLength\": 4096\n        },\n        \"submittedByDisplayName\": {\n          \"description\": \"Ignored if sent. Lainstack sets it to the signed-in reviewer's display name.\",\n          \"type\": \"string\",\n          \"minLength\": 1,\n          \"maxLength\": 240\n        }\n      },\n      \"required\": [\n        \"actionId\",\n        \"issueSnapshotId\",\n        \"issueSnapshotVersion\",\n        \"idempotencyKey\",\n        \"patch\"\n      ],\n      \"additionalProperties\": false\n    }\n  ],\n  \"$defs\": {\n    \"valueInputData\": {\n      \"anyOf\": [\n        {\n          \"type\": \"string\"\n        },\n        {\n          \"type\": \"number\"\n        },\n        {\n          \"type\": \"boolean\"\n        },\n        {\n          \"type\": \"null\"\n        },\n        {\n          \"type\": \"object\",\n          \"maxProperties\": 100,\n          \"propertyNames\": {\n            \"type\": \"string\",\n            \"minLength\": 1,\n            \"maxLength\": 240\n          },\n          \"additionalProperties\": {\n            \"$ref\": \"#/$defs/valueInputData\"\n          },\n          \"not\": {\n            \"anyOf\": [\n              {\n                \"required\": [\n                  \"__resolution\"\n                ]\n              },\n              {\n                \"required\": [\n                  \"__kind\"\n                ],\n                \"properties\": {\n                  \"__kind\": {\n                    \"enum\": [\n                      \"file\",\n                      \"collection\",\n                      \"spill\"\n                    ]\n                  }\n                }\n              }\n            ]\n          }\n        },\n        {\n          \"type\": \"array\",\n          \"maxItems\": 100,\n          \"items\": {\n            \"$ref\": \"#/$defs/valueInputData\"\n          }\n        }\n      ]\n    }\n  }\n}"}]}},"/api/workspaces/{workspaceId}/review-issues/{issueInstanceId}/resources":{"get":{"tags":["Escalations"],"summary":"List a review issue's resources","description":"**Authentication: API key.** Accepts an organization API key with the `escalation:read` scope, or the web app's browser session.\n\nReturns the files and data from the paused run that the issue exposes for review. The snapshot id and version must match the issue's current snapshot, otherwise the call fails with a conflict. Results are paged with `take` (1 to 100, default 50) and `cursor`. Requires the `escalation:read` permission.","parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The workspace's id.","example":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e"},{"name":"issueInstanceId","in":"path","required":true,"schema":{"type":"string","pattern":"^rii1_[A-Za-z0-9_-]{43}$"},"description":"The review issue's id, as returned by List review issues.","example":"rii1_o0fvBu93XVUf0VHa7BNWFZ5pd4Thfjt6YAd8HRske25"},{"name":"issueSnapshotId","in":"query","required":true,"schema":{"type":"string","pattern":"^ris1_[A-Za-z0-9_-]{43}$"},"description":"Id of the issue snapshot the caller is reading, from Get a review issue.","example":"ris1_ObY4RgBG7WmzqDpzzzdPdnKRuMNajSHOoUEwpLE6Ooh"},{"name":"issueSnapshotVersion","in":"query","required":true,"schema":{"type":"integer","exclusiveMinimum":0},"description":"Version of the issue snapshot the caller is reading. The call fails with a conflict if the issue has moved on.","example":3},{"name":"take","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100},"description":"How many resources to return per page, 1 to 100."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":240},"description":"Cursor from the previous page's `nextCursor`. Omit for the first page."}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"issueInstanceId":{"type":"string","pattern":"^rii1_[A-Za-z0-9_-]{43}$","description":"Unique id of the review issue."},"issueSnapshotId":{"type":"string","pattern":"^ris1_[A-Za-z0-9_-]{43}$","description":"Id of the issue snapshot the list was read from."},"issueSnapshotVersion":{"type":"integer","exclusiveMinimum":0,"description":"Version of the issue snapshot the list was read from."},"access":{"type":"object","properties":{"requestedMode":{"type":"string","enum":["none","suggested","all"],"description":"How much of the run's data the issue asked to show: `none`, only the `suggested` resources, or `all`."},"effectiveMode":{"type":"string","enum":["none","suggested","all"],"description":"How much of the run's data the caller can actually see. It is `suggested` instead of `all` when the caller cannot read the run."},"reason":{"description":"Why the mode was reduced. Absent when the effective mode equals the requested one.","type":"string","const":"run_read_required"}},"required":["requestedMode","effectiveMode"],"additionalProperties":false,"description":"How much of the run's data the caller can see for this issue."},"items":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":240,"description":"Unique id of the resource."},"resourceVersion":{"type":"string","minLength":1,"maxLength":240,"description":"Version of the resource."},"kind":{"type":"string","enum":["json","text","file","image","pdf","email","email-body","email-attachment","table","run-trace","error","provenance","unknown"],"description":"What kind of content the resource holds."},"label":{"type":"string","minLength":1,"description":"Name shown for the resource."},"description":{"description":"Short description of the resource. Absent when none was set.","type":"string","minLength":1},"contentType":{"description":"Media type of the content. Absent when unknown.","type":"string","minLength":1},"filename":{"description":"File name of the content. Absent when it has none.","type":"string","minLength":1},"extension":{"description":"File extension of the content. Absent when unknown.","type":"string","minLength":1},"byteSize":{"description":"Size of the content in bytes. Absent when unknown.","type":"integer","minimum":0},"roles":{"description":"The roles the resource plays.","type":"array","items":{"type":"string","minLength":1}},"source":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"description":"Kind of source the resource came from."},"runId":{"description":"Unique id of the run the resource came from.","type":"string","minLength":1},"occurrenceId":{"description":"Unique id of the step execution the resource came from.","type":"string","minLength":1},"blockId":{"description":"Id of the block the resource came from.","type":"string","minLength":1},"label":{"description":"Label of the source.","type":"string","minLength":1},"snapshotId":{"description":"Id of the snapshot the resource came from.","type":"string","minLength":1},"metadata":{"description":"Extra details about the source.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false,"description":"Where the resource came from."},"preferredViewers":{"description":"Ids of the viewers best suited to show the resource, in order of preference.","type":"array","items":{"type":"string","minLength":1,"maxLength":160,"pattern":"^@[a-z0-9][a-z0-9-]*(?:\\/[a-z0-9][a-z0-9-]*){2,}$"}},"preferredEditors":{"description":"Ids of the editors best suited to edit the resource, in order of preference.","type":"array","items":{"type":"string","minLength":1,"maxLength":160,"pattern":"^@[a-z0-9][a-z0-9-]*(?:\\/[a-z0-9][a-z0-9-]*){2,}$"}},"capabilities":{"description":"What can be done with the resource: `metadata`, `preview`, `paginate`, `range` or `download`.","type":"array","items":{"type":"string","enum":["preview","download","range","paginate","metadata"]}},"preview":{"description":"How the resource can be previewed. Absent when it cannot.","type":"object","properties":{"available":{"type":"boolean","description":"Whether the resource can be previewed."},"contentType":{"description":"Media type of the preview.","type":"string","minLength":1},"maxBytes":{"description":"Largest preview the server returns, in bytes.","type":"integer","exclusiveMinimum":0},"modes":{"description":"The preview modes the resource supports.","type":"array","items":{"type":"string","enum":["metadata","inline","content","download"]}}},"required":["available"],"additionalProperties":false},"range":{"description":"Whether byte ranges can be requested. Absent when they cannot.","type":"object","properties":{"supported":{"type":"boolean","description":"Whether byte ranges of the content can be requested."},"unit":{"description":"Unit of ranges. Always `bytes` when present.","type":"string","const":"bytes"}},"required":["supported"],"additionalProperties":false},"pagination":{"description":"How the resource can be read page by page. Absent when it cannot.","type":"object","properties":{"supported":{"type":"boolean","description":"Whether the content can be read page by page."},"defaultPageSize":{"description":"Number of rows in a page when no limit is given.","type":"integer","exclusiveMinimum":0},"maxPageSize":{"description":"Largest number of rows a page can hold.","type":"integer","exclusiveMinimum":0}},"required":["supported"],"additionalProperties":false},"metadata":{"description":"Extra details about the resource.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"occurrences":{"description":"Every place the same resource appears. Absent when it appears once.","minItems":2,"maxItems":50000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":240,"description":"Unique id of the resource at this occurrence."},"resourceVersion":{"type":"string","minLength":1,"maxLength":240,"description":"Version of the resource at this occurrence."},"source":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"description":"Kind of source the resource came from."},"runId":{"description":"Unique id of the run the resource came from.","type":"string","minLength":1},"occurrenceId":{"description":"Unique id of the step execution the resource came from.","type":"string","minLength":1},"blockId":{"description":"Id of the block the resource came from.","type":"string","minLength":1},"label":{"description":"Label of the source.","type":"string","minLength":1},"snapshotId":{"description":"Id of the snapshot the resource came from.","type":"string","minLength":1},"metadata":{"description":"Extra details about the source.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false,"description":"Where this occurrence came from."},"roles":{"type":"array","items":{"type":"string","minLength":1},"description":"The roles this occurrence plays."},"relationship":{"type":"string","enum":["suggested","related","primary"],"description":"How this occurrence relates to the main resource: `primary`, `related` or `suggested`."}},"required":["id","resourceVersion","source","roles","relationship"],"additionalProperties":false}}},"required":["id","resourceVersion","kind","label","source"],"additionalProperties":false},"description":"The resources on this page, at most 100."},"totalCount":{"type":"integer","minimum":0,"description":"How many resources the issue exposes in total."},"nextCursor":{"description":"Cursor for the next page. Absent on the last page.","type":"string","minLength":1,"maxLength":240}},"required":["issueInstanceId","issueSnapshotId","issueSnapshotVersion","access","items","totalCount"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"operationId":"getApiWorkspacesByWorkspaceIdReview-issuesByIssueInstanceIdResources","security":[{"apiKey":["escalation:read"]}],"x-lainstack-auth":{"label":"API key","description":"Accepts an organization API key with the `escalation:read` scope, or the web app's browser session."}}},"/api/workspaces/{workspaceId}/review-issues/{issueInstanceId}/resources/{resourceId}":{"get":{"tags":["Escalations"],"summary":"Get a review issue resource","description":"**Authentication: API key.** Accepts an organization API key with the `escalation:read` scope, or the web app's browser session.\n\nReturns the descriptor of one resource of a review issue: its type, size, source and how it can be viewed. The snapshot id, snapshot version and resource version must match the issue, otherwise the call fails with a conflict. Requires the `escalation:read` permission.","parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The workspace's id.","example":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e"},{"name":"issueInstanceId","in":"path","required":true,"schema":{"type":"string","pattern":"^rii1_[A-Za-z0-9_-]{43}$"},"description":"The review issue's id, as returned by List review issues.","example":"rii1_o0fvBu93XVUf0VHa7BNWFZ5pd4Thfjt6YAd8HRske25"},{"name":"resourceId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":240},"description":"The resource's id, as returned by List automation run resources or List a review issue's resources.","example":"rr1_eaeGU9Af8ObwCOu3juQxbCU0aPUlSq1t6Cl90KyP2fm"},{"name":"issueSnapshotId","in":"query","required":true,"schema":{"type":"string","pattern":"^ris1_[A-Za-z0-9_-]{43}$"},"description":"Id of the issue snapshot the caller is reading, from Get a review issue.","example":"ris1_ObY4RgBG7WmzqDpzzzdPdnKRuMNajSHOoUEwpLE6Ooh"},{"name":"issueSnapshotVersion","in":"query","required":true,"schema":{"type":"integer","exclusiveMinimum":0},"description":"Version of the issue snapshot the caller is reading. The call fails with a conflict if the issue has moved on.","example":3},{"name":"resourceVersion","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":240},"description":"Version of the resource to read, from the resource's descriptor.","example":"rv1_wYiMBtSpK0wATzwKyibjDUV3kpMZWohyRPr2A5URIqt"}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"issueInstanceId":{"type":"string","pattern":"^rii1_[A-Za-z0-9_-]{43}$","description":"Unique id of the review issue."},"issueSnapshotId":{"type":"string","pattern":"^ris1_[A-Za-z0-9_-]{43}$","description":"Id of the issue snapshot the resource was read from."},"issueSnapshotVersion":{"type":"integer","exclusiveMinimum":0,"description":"Version of the issue snapshot the resource was read from."},"access":{"type":"object","properties":{"requestedMode":{"type":"string","enum":["none","suggested","all"],"description":"How much of the run's data the issue asked to show: `none`, only the `suggested` resources, or `all`."},"effectiveMode":{"type":"string","enum":["none","suggested","all"],"description":"How much of the run's data the caller can actually see. It is `suggested` instead of `all` when the caller cannot read the run."},"reason":{"description":"Why the mode was reduced. Absent when the effective mode equals the requested one.","type":"string","const":"run_read_required"}},"required":["requestedMode","effectiveMode"],"additionalProperties":false,"description":"How much of the run's data the caller can see for this issue."},"resource":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":240,"description":"Unique id of the resource."},"resourceVersion":{"type":"string","minLength":1,"maxLength":240,"description":"Version of the resource."},"kind":{"type":"string","enum":["json","text","file","image","pdf","email","email-body","email-attachment","table","run-trace","error","provenance","unknown"],"description":"What kind of content the resource holds."},"label":{"type":"string","minLength":1,"description":"Name shown for the resource."},"description":{"description":"Short description of the resource. Absent when none was set.","type":"string","minLength":1},"contentType":{"description":"Media type of the content. Absent when unknown.","type":"string","minLength":1},"filename":{"description":"File name of the content. Absent when it has none.","type":"string","minLength":1},"extension":{"description":"File extension of the content. Absent when unknown.","type":"string","minLength":1},"byteSize":{"description":"Size of the content in bytes. Absent when unknown.","type":"integer","minimum":0},"roles":{"description":"The roles the resource plays.","type":"array","items":{"type":"string","minLength":1}},"source":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"description":"Kind of source the resource came from."},"runId":{"description":"Unique id of the run the resource came from.","type":"string","minLength":1},"occurrenceId":{"description":"Unique id of the step execution the resource came from.","type":"string","minLength":1},"blockId":{"description":"Id of the block the resource came from.","type":"string","minLength":1},"label":{"description":"Label of the source.","type":"string","minLength":1},"snapshotId":{"description":"Id of the snapshot the resource came from.","type":"string","minLength":1},"metadata":{"description":"Extra details about the source.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false,"description":"Where the resource came from."},"preferredViewers":{"description":"Ids of the viewers best suited to show the resource, in order of preference.","type":"array","items":{"type":"string","minLength":1,"maxLength":160,"pattern":"^@[a-z0-9][a-z0-9-]*(?:\\/[a-z0-9][a-z0-9-]*){2,}$"}},"preferredEditors":{"description":"Ids of the editors best suited to edit the resource, in order of preference.","type":"array","items":{"type":"string","minLength":1,"maxLength":160,"pattern":"^@[a-z0-9][a-z0-9-]*(?:\\/[a-z0-9][a-z0-9-]*){2,}$"}},"capabilities":{"description":"What can be done with the resource: `metadata`, `preview`, `paginate`, `range` or `download`.","type":"array","items":{"type":"string","enum":["preview","download","range","paginate","metadata"]}},"preview":{"description":"How the resource can be previewed. Absent when it cannot.","type":"object","properties":{"available":{"type":"boolean","description":"Whether the resource can be previewed."},"contentType":{"description":"Media type of the preview.","type":"string","minLength":1},"maxBytes":{"description":"Largest preview the server returns, in bytes.","type":"integer","exclusiveMinimum":0},"modes":{"description":"The preview modes the resource supports.","type":"array","items":{"type":"string","enum":["metadata","inline","content","download"]}}},"required":["available"],"additionalProperties":false},"range":{"description":"Whether byte ranges can be requested. Absent when they cannot.","type":"object","properties":{"supported":{"type":"boolean","description":"Whether byte ranges of the content can be requested."},"unit":{"description":"Unit of ranges. Always `bytes` when present.","type":"string","const":"bytes"}},"required":["supported"],"additionalProperties":false},"pagination":{"description":"How the resource can be read page by page. Absent when it cannot.","type":"object","properties":{"supported":{"type":"boolean","description":"Whether the content can be read page by page."},"defaultPageSize":{"description":"Number of rows in a page when no limit is given.","type":"integer","exclusiveMinimum":0},"maxPageSize":{"description":"Largest number of rows a page can hold.","type":"integer","exclusiveMinimum":0}},"required":["supported"],"additionalProperties":false},"metadata":{"description":"Extra details about the resource.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"occurrences":{"description":"Every place the same resource appears. Absent when it appears once.","minItems":2,"maxItems":50000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":240,"description":"Unique id of the resource at this occurrence."},"resourceVersion":{"type":"string","minLength":1,"maxLength":240,"description":"Version of the resource at this occurrence."},"source":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"description":"Kind of source the resource came from."},"runId":{"description":"Unique id of the run the resource came from.","type":"string","minLength":1},"occurrenceId":{"description":"Unique id of the step execution the resource came from.","type":"string","minLength":1},"blockId":{"description":"Id of the block the resource came from.","type":"string","minLength":1},"label":{"description":"Label of the source.","type":"string","minLength":1},"snapshotId":{"description":"Id of the snapshot the resource came from.","type":"string","minLength":1},"metadata":{"description":"Extra details about the source.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false,"description":"Where this occurrence came from."},"roles":{"type":"array","items":{"type":"string","minLength":1},"description":"The roles this occurrence plays."},"relationship":{"type":"string","enum":["suggested","related","primary"],"description":"How this occurrence relates to the main resource: `primary`, `related` or `suggested`."}},"required":["id","resourceVersion","source","roles","relationship"],"additionalProperties":false}}},"required":["id","resourceVersion","kind","label","source"],"additionalProperties":false,"description":"The requested resource."}},"required":["issueInstanceId","issueSnapshotId","issueSnapshotVersion","access","resource"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"operationId":"getApiWorkspacesByWorkspaceIdReview-issuesByIssueInstanceIdResourcesByResourceId","security":[{"apiKey":["escalation:read"]}],"x-lainstack-auth":{"label":"API key","description":"Accepts an organization API key with the `escalation:read` scope, or the web app's browser session."}}},"/api/workspaces/{workspaceId}/review-issues/{issueInstanceId}/resources/{resourceId}/content":{"get":{"tags":["Escalations"],"summary":"Get review issue resource content","description":"**Authentication: API key.** Accepts an organization API key with the `escalation:read` scope, or the web app's browser session.\n\nStreams the bytes of one resource of a review issue. Supports a `Range` header for partial content, and `disposition` chooses inline display or a download. The snapshot id, snapshot version and resource version must match the issue, otherwise the call fails with a conflict. The response is not cached. Requires the `escalation:read` permission.","responses":{"200":{"description":"Resource bytes","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"206":{"description":"Partial Content"},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"413":{"description":"Payload Too Large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"415":{"description":"Unsupported Media Type","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"416":{"description":"Range Not Satisfiable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"parameters":[{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string","minLength":1,"format":"uuid"},"description":"The workspace's id.","example":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e"},{"name":"issueInstanceId","in":"path","required":true,"schema":{"type":"string","pattern":"^rii1_[A-Za-z0-9_-]{43}$"},"description":"The review issue's id, as returned by List review issues.","example":"rii1_o0fvBu93XVUf0VHa7BNWFZ5pd4Thfjt6YAd8HRske25"},{"name":"resourceId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":240},"description":"The resource's id, as returned by List automation run resources or List a review issue's resources.","example":"rr1_eaeGU9Af8ObwCOu3juQxbCU0aPUlSq1t6Cl90KyP2fm"},{"name":"issueSnapshotId","in":"query","required":true,"schema":{"type":"string","pattern":"^ris1_[A-Za-z0-9_-]{43}$"},"description":"Id of the issue snapshot the caller is reading, from Get a review issue.","example":"ris1_ObY4RgBG7WmzqDpzzzdPdnKRuMNajSHOoUEwpLE6Ooh"},{"name":"issueSnapshotVersion","in":"query","required":true,"schema":{"type":"integer","exclusiveMinimum":0},"description":"Version of the issue snapshot the caller is reading. The call fails with a conflict if the issue has moved on.","example":3},{"name":"resourceVersion","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":240},"description":"Version of the resource to read, from the resource's descriptor.","example":"rv1_wYiMBtSpK0wATzwKyibjDUV3kpMZWohyRPr2A5URIqt"},{"name":"disposition","in":"query","required":false,"schema":{"type":"string","enum":["inline","attachment"]},"description":"Whether the content is shown in the browser (`inline`) or downloaded (`attachment`)."}],"operationId":"getApiWorkspacesByWorkspaceIdReview-issuesByIssueInstanceIdResourcesByResourceIdContent","security":[{"apiKey":["escalation:read"]}],"x-lainstack-auth":{"label":"API key","description":"Accepts an organization API key with the `escalation:read` scope, or the web app's browser session."}}},"/api/data-lake/reference-tables":{"get":{"tags":["Reference tables"],"summary":"List reference tables","operationId":"listReferenceTables","description":"**Authentication: API key.** Accepts an organization API key with the `data_lake:read` scope, or the web app's browser session.\n\nLists the workspace's active reference tables, with each table's columns and settings. Returns every table in one response, without pagination. Archived tables are listed by List archived reference tables. Requires the `data_lake:read` permission.","parameters":[{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","format":"uuid"},"description":"The id of the workspace the reference tables belong to.","example":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e"}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}],"description":"Unique id of the reference table."},"workspaceId":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}],"description":"Id of the workspace the table belongs to."},"organizationId":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}],"description":"Id of the organization that owns the table."},"regionId":{"type":"string","minLength":1,"description":"Id of the region where the table's data is stored."},"superOrganizationId":{"description":"Id of the super organization that manages the table. Absent unless the table is vendor-managed.","type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}]},"name":{"type":"string","minLength":1,"maxLength":200,"description":"The table's name, from 1 to 200 characters."},"description":{"description":"What the table holds, in up to 2,000 characters. Absent when not set.","type":"string","maxLength":2000},"status":{"default":"active","type":"string","enum":["active","archived"],"description":"Whether the table is in the active list or the archive."},"access":{"default":"workspace","description":"Who can use the table: `private` limits the table to its creator, `workspace` to its workspace, and `organization` opens it to every workspace in the organization.","type":"string","enum":["private","workspace","organization"]},"refreshMode":{"type":"string","enum":["append_dedupe","upsert_pk","replace"],"description":"How loads change the table. `append_dedupe` adds new rows and skips duplicates, `upsert_pk` updates the row with the same primary key and inserts the others, and `replace` replaces all rows."},"primaryKeyColumnId":{"description":"Id of the column that uniquely identifies a row. Present only when the refresh mode is `upsert_pk`.","type":"string","minLength":1,"maxLength":160},"schema":{"type":"object","properties":{"shape":{"const":"table"},"fingerprint":{"type":"string","maxLength":256,"pattern":"^sha256:[0-9a-f]{64}$"},"columns":{"type":"array","minItems":1,"maxItems":32,"items":{"$ref":"#/components/schemas/valueSchemaTableColumn"}}},"required":["shape","fingerprint","columns"],"additionalProperties":false,"description":"The table's columns, in display order, with a fingerprint that changes when the columns change."},"storageFormat":{"description":"How the table's rows are stored. `generation_v1` is the current format; `legacy` tables are older. Absent when not recorded.","type":"string","enum":["legacy","generation_v1"]},"activeRevisionId":{"description":"Id of the revision that holds the table's current rows. Null or absent when no load has completed yet.","anyOf":[{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}]},{"type":"null"}]},"activeShapeChangeJobId":{"description":"Id of the change job that is currently changing the table's columns. Absent when no change is in progress. Follow it with Get a reference table shape change.","type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}]},"schemaChangeState":{"default":"stable","type":"string","enum":["stable","value_inspection_pending","value_inspection_running","shape_change_pending","shape_change_running","failed","cancelled"],"description":"Where a column change on the table stands. `stable` means no change is in progress; the `pending` and `running` states mean a change job is waiting or working; `failed` and `cancelled` mean the last change job ended without applying."},"retention":{"default":{"revisionRetentionDays":30,"stagedWriteTtlSeconds":86400},"description":"How long the table keeps old revisions and unfinished loads.","type":"object","properties":{"revisionRetentionDays":{"default":30,"description":"How many days the table keeps superseded revisions before they are removed, from 1 to 3,650. The default is 30.","type":"integer","minimum":1,"maximum":3650},"stagedWriteTtlSeconds":{"default":86400,"description":"How many seconds an unfinished load may stay open before it expires, up to 604,800 (7 days). The default is 86,400 (1 day).","type":"integer","minimum":60,"maximum":604800}},"required":["revisionRetentionDays","stagedWriteTtlSeconds"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time","description":"When the table was created, as an ISO 8601 timestamp."},"updatedAt":{"type":"string","format":"date-time","description":"When the table was last changed, as an ISO 8601 timestamp."},"archivedAt":{"description":"When the table was archived, as an ISO 8601 timestamp. Absent for active tables.","type":"string","format":"date-time"},"ownershipClass":{"description":"Who manages the table when it was installed from a data pack: `vendor-managed` or `tenant-template`. Absent for tables created directly.","type":"string","minLength":1},"sourcePackId":{"description":"Id of the data pack that created the table. Absent for tables created directly.","type":"string","minLength":1},"sourcePackTableKey":{"description":"Key of the table within its data pack. Absent for tables created directly.","type":"string","minLength":1}},"required":["id","workspaceId","organizationId","regionId","name","status","access","refreshMode","schema","schemaChangeState","retention","createdAt","updatedAt"],"additionalProperties":false},"description":"The reference tables, each with its columns and settings."}},"required":["items"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"items":[{"id":"0195f3d2-4a5b-7c6d-8e7f-9a0b1c2d3e4f","workspaceId":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e","organizationId":"0195f3a1-2b3c-7d4e-8f5a-6b7c8d9e0f1a","regionId":"eu","name":"Requests","description":"Each submitted request with the time it arrived.","status":"active","access":"workspace","refreshMode":"upsert_pk","primaryKeyColumnId":"request_id","schema":{"shape":"table","fingerprint":"sha256:f4fcef2fd280e3ab57bf9c81b2e7d66fbdc95562fb05258dc89e5fe23950a4f5","columns":[{"columnId":"request_id","name":"Request ID","valueSchema":{"kind":"text"}},{"columnId":"summary","name":"Summary","valueSchema":{"kind":"text","nullable":true}},{"columnId":"received_at","name":"Received at","valueSchema":{"kind":"text","format":"datetime"}}]},"activeRevisionId":"0195f3d3-5b6c-7d7e-9f8a-0b1c2d3e4f5a","schemaChangeState":"stable","retention":{"revisionRetentionDays":30,"stagedWriteTtlSeconds":86400},"createdAt":"2026-09-02T08:00:00.000Z","updatedAt":"2026-10-28T17:45:12.000Z"}]}}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"security":[{"apiKey":["data_lake:read"]}],"x-lainstack-auth":{"label":"API key","description":"Accepts an organization API key with the `data_lake:read` scope, or the web app's browser session."}}},"/api/data-lake/reference-tables/{referenceTableId}":{"get":{"tags":["Reference tables"],"summary":"Get a reference table","operationId":"getReferenceTable","description":"**Authentication: API key.** Accepts an organization API key with the `data_lake:read` scope, or the web app's browser session.\n\nReturns one active reference table with its columns, refresh mode, access and retention settings. Archived tables are read with Get an archived reference table. Requires the `data_lake:read` permission.","parameters":[{"name":"referenceTableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The reference table's id.","example":"0195f3d2-4a5b-7c6d-8e7f-9a0b1c2d3e4f"},{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","format":"uuid"},"description":"The id of the workspace the reference tables belong to.","example":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e"}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}],"description":"Unique id of the reference table."},"workspaceId":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}],"description":"Id of the workspace the table belongs to."},"organizationId":{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}],"description":"Id of the organization that owns the table."},"regionId":{"type":"string","minLength":1,"description":"Id of the region where the table's data is stored."},"superOrganizationId":{"description":"Id of the super organization that manages the table. Absent unless the table is vendor-managed.","type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}]},"name":{"type":"string","minLength":1,"maxLength":200,"description":"The table's name, from 1 to 200 characters."},"description":{"description":"What the table holds, in up to 2,000 characters. Absent when not set.","type":"string","maxLength":2000},"status":{"default":"active","type":"string","enum":["active","archived"],"description":"Whether the table is in the active list or the archive."},"access":{"default":"workspace","description":"Who can use the table: `private` limits the table to its creator, `workspace` to its workspace, and `organization` opens it to every workspace in the organization.","type":"string","enum":["private","workspace","organization"]},"refreshMode":{"type":"string","enum":["append_dedupe","upsert_pk","replace"],"description":"How loads change the table. `append_dedupe` adds new rows and skips duplicates, `upsert_pk` updates the row with the same primary key and inserts the others, and `replace` replaces all rows."},"primaryKeyColumnId":{"description":"Id of the column that uniquely identifies a row. Present only when the refresh mode is `upsert_pk`.","type":"string","minLength":1,"maxLength":160},"schema":{"type":"object","properties":{"shape":{"const":"table"},"fingerprint":{"type":"string","maxLength":256,"pattern":"^sha256:[0-9a-f]{64}$"},"columns":{"type":"array","minItems":1,"maxItems":32,"items":{"$ref":"#/components/schemas/valueSchemaTableColumn"}}},"required":["shape","fingerprint","columns"],"additionalProperties":false,"description":"The table's columns, in display order, with a fingerprint that changes when the columns change."},"storageFormat":{"description":"How the table's rows are stored. `generation_v1` is the current format; `legacy` tables are older. Absent when not recorded.","type":"string","enum":["legacy","generation_v1"]},"activeRevisionId":{"description":"Id of the revision that holds the table's current rows. Null or absent when no load has completed yet.","anyOf":[{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}]},{"type":"null"}]},"activeShapeChangeJobId":{"description":"Id of the change job that is currently changing the table's columns. Absent when no change is in progress. Follow it with Get a reference table shape change.","type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}]},"schemaChangeState":{"default":"stable","type":"string","enum":["stable","value_inspection_pending","value_inspection_running","shape_change_pending","shape_change_running","failed","cancelled"],"description":"Where a column change on the table stands. `stable` means no change is in progress; the `pending` and `running` states mean a change job is waiting or working; `failed` and `cancelled` mean the last change job ended without applying."},"retention":{"default":{"revisionRetentionDays":30,"stagedWriteTtlSeconds":86400},"description":"How long the table keeps old revisions and unfinished loads.","type":"object","properties":{"revisionRetentionDays":{"default":30,"description":"How many days the table keeps superseded revisions before they are removed, from 1 to 3,650. The default is 30.","type":"integer","minimum":1,"maximum":3650},"stagedWriteTtlSeconds":{"default":86400,"description":"How many seconds an unfinished load may stay open before it expires, up to 604,800 (7 days). The default is 86,400 (1 day).","type":"integer","minimum":60,"maximum":604800}},"required":["revisionRetentionDays","stagedWriteTtlSeconds"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time","description":"When the table was created, as an ISO 8601 timestamp."},"updatedAt":{"type":"string","format":"date-time","description":"When the table was last changed, as an ISO 8601 timestamp."},"archivedAt":{"description":"When the table was archived, as an ISO 8601 timestamp. Absent for active tables.","type":"string","format":"date-time"},"ownershipClass":{"description":"Who manages the table when it was installed from a data pack: `vendor-managed` or `tenant-template`. Absent for tables created directly.","type":"string","minLength":1},"sourcePackId":{"description":"Id of the data pack that created the table. Absent for tables created directly.","type":"string","minLength":1},"sourcePackTableKey":{"description":"Key of the table within its data pack. Absent for tables created directly.","type":"string","minLength":1}},"required":["id","workspaceId","organizationId","regionId","name","status","access","refreshMode","schema","schemaChangeState","retention","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"id":"0195f3d2-4a5b-7c6d-8e7f-9a0b1c2d3e4f","workspaceId":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e","organizationId":"0195f3a1-2b3c-7d4e-8f5a-6b7c8d9e0f1a","regionId":"eu","name":"Requests","description":"Each submitted request with the time it arrived.","status":"active","access":"workspace","refreshMode":"upsert_pk","primaryKeyColumnId":"request_id","schema":{"shape":"table","fingerprint":"sha256:f4fcef2fd280e3ab57bf9c81b2e7d66fbdc95562fb05258dc89e5fe23950a4f5","columns":[{"columnId":"request_id","name":"Request ID","valueSchema":{"kind":"text"}},{"columnId":"summary","name":"Summary","valueSchema":{"kind":"text","nullable":true}},{"columnId":"received_at","name":"Received at","valueSchema":{"kind":"text","format":"datetime"}}]},"activeRevisionId":"0195f3d3-5b6c-7d7e-9f8a-0b1c2d3e4f5a","schemaChangeState":"stable","retention":{"revisionRetentionDays":30,"stagedWriteTtlSeconds":86400},"createdAt":"2026-09-02T08:00:00.000Z","updatedAt":"2026-10-28T17:45:12.000Z"}}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"security":[{"apiKey":["data_lake:read"]}],"x-lainstack-auth":{"label":"API key","description":"Accepts an organization API key with the `data_lake:read` scope, or the web app's browser session."}}},"/api/data-lake/reference-tables/{referenceTableId}/rows":{"get":{"tags":["Reference tables"],"summary":"List rows for a reference table","operationId":"listReferenceTableRows","description":"**Authentication: API key.** Accepts an organization API key with the `data_lake:read` scope, or the web app's browser session.\n\nReturns rows from the table's active revision, keyed by column id, with the table's schema and the revision id. Page with `limit` (1 to 100 rows) and `offset`. Document cells are returned as a summary with file name, content type and size; fetch the file itself with Open a document in a reference table revision. Requires the `data_lake:read` permission.","parameters":[{"name":"referenceTableId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The reference table's id.","example":"0195f3d2-4a5b-7c6d-8e7f-9a0b1c2d3e4f"},{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","format":"uuid"},"description":"The id of the workspace the reference tables belong to.","example":"0195f3a2-7c1e-7b4a-9d2e-3f6a8b1c4d5e"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"Maximum number of rows to return, from 1 to 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0},"description":"Number of rows to skip before the first returned row. Defaults to 0."}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"rows":{"maxItems":100,"type":"array","items":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":160},"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/valueInputData"},{"type":"object","properties":{"__kind":{"type":"string","const":"document","description":"Always `document`: the cell holds a file. Open it with Open a document in a reference table revision."},"filename":{"description":"The file's name. Null when not recorded.","type":["string","null"]},"contentType":{"description":"The file's media type. Null when not recorded.","type":["string","null"]},"size":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"The file's size in bytes. Null when not recorded."}},"required":["__kind","filename","contentType","size"],"additionalProperties":false,"description":"Summary of a document stored in a cell. The file itself is not included."}]}},"description":"The returned page of rows. Each row maps column ids to cell values, with one entry for every column."},"revisionId":{"anyOf":[{"type":"string","allOf":[{"pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},{"pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}]},{"type":"null"}],"description":"Id of the revision the rows were read from. Null when the table has no active revision yet, in which case rows is empty."},"schema":{"type":"object","properties":{"shape":{"const":"table"},"fingerprint":{"type":"string","maxLength":256,"pattern":"^sha256:[0-9a-f]{64}$"},"columns":{"type":"array","minItems":1,"maxItems":32,"items":{"$ref":"#/components/schemas/valueSchemaTableColumn"}}},"required":["shape","fingerprint","columns"],"additionalProperties":false,"description":"The columns the rows follow, in display order."}},"required":["rows","revisionId","schema"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"rows":[{"request_id":"REQ-1042","summary":"Replace the badge reader at door 3.","received_at":"2026-10-29T09:14:05.482Z"},{"request_id":"REQ-1041","summary":null,"received_at":"2026-10-29T08:52:40.913Z"}],"revisionId":"0195f3d3-5b6c-7d7e-9f8a-0b1c2d3e4f5a","schema":{"shape":"table","fingerprint":"sha256:f4fcef2fd280e3ab57bf9c81b2e7d66fbdc95562fb05258dc89e5fe23950a4f5","columns":[{"columnId":"request_id","name":"Request ID","valueSchema":{"kind":"text"}},{"columnId":"summary","name":"Summary","valueSchema":{"kind":"text","nullable":true}},{"columnId":"received_at","name":"Received at","valueSchema":{"kind":"text","format":"datetime"}}]}}}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Unprocessable Entity","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"502":{"description":"Bad Gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"security":[{"apiKey":["data_lake:read"]}],"x-lainstack-auth":{"label":"API key","description":"Accepts an organization API key with the `data_lake:read` scope, or the web app's browser session."}}},"/api/health":{"get":{"tags":["Health"],"summary":"Health check","description":"**Authentication: None.** Needs no credentials.\n\nReports whether the API process is up. It needs no sign-in and does not check dependencies. Returns `ok: true` whenever the API can answer.","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ok":{"type":"boolean","description":"Always true when the API answers."}},"required":["ok"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}},"operationId":"getApiHealth","x-lainstack-auth":{"label":"None","description":"Needs no credentials."}}}}}