Enhance documentation
canvas.render.importSource
Import one source through the canonical editable-primitives compiler.
canvas.render.importSource
mutation write
Use when the requested change exactly matches canvas.render.importSource; read the current state first when a version or identifier may have changed.
Before calling
- Authenticate as the accountable Enhance person.
- Use only resource identifiers returned by an earlier capability result or supplied by the person.
- Reuse clientToken only when retrying this exact mutation input.
Input
Show complete JSON Schema
{"$schema":"https://json-schema.org/draft/2020-12/schema","allOf":[{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"screen"},"nodeId":{"type":"string","minLength":1}},"required":["kind","nodeId"]},{"type":"object","properties":{"kind":{"type":"string","const":"html"},"html":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"idPrefix":{"type":"string","minLength":1,"pattern":"^[\\w-]+$"}},"required":["kind","html","label"]}]},"destination":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"adjacent"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"insert-children"},"pageId":{"type":"string","minLength":1},"targetNodeId":{"type":"string","minLength":1}},"required":["kind","targetNodeId"]},{"type":"object","properties":{"kind":{"type":"string","const":"replace"},"targetNodeId":{"type":"string","minLength":1}},"required":["kind","targetNodeId"]}]},"revisionPolicy":{"type":"string","enum":["strict","rebase"]}},"required":["source","destination"]},{"type":"object","properties":{"canvasId":{"type":"string","format":"uuid","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)$"},"expectedVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"mutationId":{"type":"string","format":"uuid","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)$"},"writeScope":{"type":"object","properties":{"rootIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["rootIds"]},"scope":{"type":"object","properties":{"pageId":{"type":"string","minLength":1},"nodeIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["nodeIds"],"additionalProperties":false}},"required":["canvasId"]}]}
Example
Show example input
{
"canvasId": "00000000-0000-4000-8000-000000000010",
"source": {
"kind": "html",
"html": "<div></div>",
"label": "Example"
},
"destination": {
"kind": "insert-children",
"targetNodeId": "root"
}
}
Result
Returns a typed canvas.render.importSource result from the Enhance API without transport-specific prose.
job(required): Returned field job.alreadyExists(required): Returned field alreadyExists.
Show complete result JSON Schema
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"job":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","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)$"},"canvasId":{"type":"string","format":"uuid","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)$"},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"screen"},"nodeId":{"type":"string","minLength":1}},"required":["kind","nodeId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"html"},"label":{"type":"string","minLength":1}},"required":["kind","label"],"additionalProperties":false}]},"destination":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"adjacent"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"insert-children"},"pageId":{"type":"string","minLength":1},"targetNodeId":{"type":"string","minLength":1}},"required":["kind","targetNodeId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"replace"},"targetNodeId":{"type":"string","minLength":1}},"required":["kind","targetNodeId"],"additionalProperties":false}]},"phase":{"type":"string","enum":["queued","claimed","grant","navigate","document","sources","fonts","layout","target","capture","serialize","compile","commit","upload","complete"]},"requestedVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"attempt":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"state":{"type":"string","const":"queued"},"result":{"type":"null"},"failure":{"type":"null"}},"required":["id","canvasId","source","destination","phase","requestedVersion","attempt","createdAt","updatedAt","state","result","failure"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid","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)$"},"canvasId":{"type":"string","format":"uuid","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)$"},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"screen"},"nodeId":{"type":"string","minLength":1}},"required":["kind","nodeId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"html"},"label":{"type":"string","minLength":1}},"required":["kind","label"],"additionalProperties":false}]},"destination":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"adjacent"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"insert-children"},"pageId":{"type":"string","minLength":1},"targetNodeId":{"type":"string","minLength":1}},"required":["kind","targetNodeId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"replace"},"targetNodeId":{"type":"string","minLength":1}},"required":["kind","targetNodeId"],"additionalProperties":false}]},"phase":{"type":"string","enum":["queued","claimed","grant","navigate","document","sources","fonts","layout","target","capture","serialize","compile","commit","upload","complete"]},"requestedVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"attempt":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"state":{"type":"string","const":"running"},"result":{"type":"null"},"failure":{"type":"null"}},"required":["id","canvasId","source","destination","phase","requestedVersion","attempt","createdAt","updatedAt","state","result","failure"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid","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)$"},"canvasId":{"type":"string","format":"uuid","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)$"},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"screen"},"nodeId":{"type":"string","minLength":1}},"required":["kind","nodeId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"html"},"label":{"type":"string","minLength":1}},"required":["kind","label"],"additionalProperties":false}]},"destination":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"adjacent"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"insert-children"},"pageId":{"type":"string","minLength":1},"targetNodeId":{"type":"string","minLength":1}},"required":["kind","targetNodeId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"replace"},"targetNodeId":{"type":"string","minLength":1}},"required":["kind","targetNodeId"],"additionalProperties":false}]},"phase":{"type":"string","const":"complete"},"requestedVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"attempt":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"state":{"type":"string","const":"succeeded"},"result":{"type":"object","properties":{"canvasId":{"type":"string","format":"uuid","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)$"},"mutationId":{"type":"string","format":"uuid","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)$"},"previousVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"rootNodeId":{"type":"string","minLength":1},"idMap":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string","minLength":1}},"insertedNodeIds":{"type":"array","items":{"type":"string","minLength":1}},"removedNodeIds":{"type":"array","items":{"type":"string","minLength":1}},"boxes":{"type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number","minimum":0},"height":{"type":"number","minimum":0}},"required":["x","y","width","height"],"additionalProperties":false}},"affectedBounds":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number","minimum":0},"height":{"type":"number","minimum":0}},"required":["x","y","width","height"],"additionalProperties":false},"report":{"type":"object","properties":{"nodeCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unsupportedFeatures":{"type":"array","items":{"type":"object","properties":{"feature":{"type":"string","enum":["text-stroke-inside","text-stroke-outside-translucent","text-stroke-paints","text-inner-shadow","text-shadow-spread","text-shadow-blend","text-background-blur","progressive-layer-blur","progressive-background-blur","blend-plus-darker","blend-linear-burn","image-exposure","image-contrast","image-saturation","image-temperature","image-tint","image-highlights","image-shadows","effect-noise","effect-texture","effect-glass"]},"count":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["feature","count"],"additionalProperties":false}},"sourceNodeCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"collapsedNodeCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"collapsedWrapperNodeCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"collapsedNeutralWrapperNodeCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"collapsedTransferredWrapperNodeCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"layoutContainerCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"removedLeafNodeCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"retainedSemanticOwnerNodeCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"truncatedNodeCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"addedLayoutNodeCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["asset-unavailable","content-omitted","cross-origin-frame","nodes-truncated","responsive-behavior-not-editable","style-degraded","unsupported-surface"]},"message":{"type":"string","minLength":1},"temporaryId":{"type":"string","minLength":1}},"required":["code","message"],"additionalProperties":false}}},"required":["nodeCount","issues"],"additionalProperties":false}},"required":["canvasId","mutationId","previousVersion","version","rootNodeId","idMap","insertedNodeIds","removedNodeIds","boxes","affectedBounds","report"],"additionalProperties":false},"failure":{"type":"null"}},"required":["id","canvasId","source","destination","phase","requestedVersion","attempt","createdAt","updatedAt","state","result","failure"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid","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)$"},"canvasId":{"type":"string","format":"uuid","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)$"},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"screen"},"nodeId":{"type":"string","minLength":1}},"required":["kind","nodeId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"html"},"label":{"type":"string","minLength":1}},"required":["kind","label"],"additionalProperties":false}]},"destination":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"adjacent"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"insert-children"},"pageId":{"type":"string","minLength":1},"targetNodeId":{"type":"string","minLength":1}},"required":["kind","targetNodeId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"replace"},"targetNodeId":{"type":"string","minLength":1}},"required":["kind","targetNodeId"],"additionalProperties":false}]},"phase":{"type":"string","enum":["queued","claimed","grant","navigate","document","sources","fonts","layout","target","capture","serialize","compile","commit","upload","complete"]},"requestedVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"attempt":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"state":{"type":"string","const":"failed"},"result":{"type":"null"},"failure":{"type":"object","properties":{"reason":{"type":"string","enum":["VERSION_CHANGED","TARGET_NOT_FOUND","TARGET_INVALID","OUTPUT_TOO_LARGE","READINESS_TIMEOUT","SOURCE_FAILED","BROWSER_CRASH","CAPTURE_FAILED","CONVERSION_FAILED","PREPARATION_FAILED","UPLOAD_FAILED","WORKER_UNAVAILABLE","CANCELLED","EXPIRED","INTERNAL"]},"phase":{"type":"string","enum":["queued","claimed","grant","navigate","document","sources","fonts","layout","target","capture","serialize","compile","commit","upload","complete"]},"message":{"type":"string","minLength":1,"maxLength":500},"retryable":{"type":"boolean"},"sourceId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["reason","phase","message","retryable","sourceId"],"additionalProperties":false}},"required":["id","canvasId","source","destination","phase","requestedVersion","attempt","createdAt","updatedAt","state","result","failure"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid","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)$"},"canvasId":{"type":"string","format":"uuid","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)$"},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"screen"},"nodeId":{"type":"string","minLength":1}},"required":["kind","nodeId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"html"},"label":{"type":"string","minLength":1}},"required":["kind","label"],"additionalProperties":false}]},"destination":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"adjacent"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"insert-children"},"pageId":{"type":"string","minLength":1},"targetNodeId":{"type":"string","minLength":1}},"required":["kind","targetNodeId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"replace"},"targetNodeId":{"type":"string","minLength":1}},"required":["kind","targetNodeId"],"additionalProperties":false}]},"phase":{"type":"string","enum":["queued","claimed","grant","navigate","document","sources","fonts","layout","target","capture","serialize","compile","commit","upload","complete"]},"requestedVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"attempt":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"state":{"type":"string","const":"cancelled"},"result":{"type":"null"},"failure":{"type":"object","properties":{"reason":{"type":"string","const":"CANCELLED"},"phase":{"type":"string","enum":["queued","claimed","grant","navigate","document","sources","fonts","layout","target","capture","serialize","compile","commit","upload","complete"]},"message":{"type":"string","minLength":1,"maxLength":500},"retryable":{"type":"boolean"},"sourceId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["reason","phase","message","retryable","sourceId"],"additionalProperties":false}},"required":["id","canvasId","source","destination","phase","requestedVersion","attempt","createdAt","updatedAt","state","result","failure"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid","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)$"},"canvasId":{"type":"string","format":"uuid","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)$"},"source":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"screen"},"nodeId":{"type":"string","minLength":1}},"required":["kind","nodeId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"html"},"label":{"type":"string","minLength":1}},"required":["kind","label"],"additionalProperties":false}]},"destination":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"adjacent"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"insert-children"},"pageId":{"type":"string","minLength":1},"targetNodeId":{"type":"string","minLength":1}},"required":["kind","targetNodeId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"replace"},"targetNodeId":{"type":"string","minLength":1}},"required":["kind","targetNodeId"],"additionalProperties":false}]},"phase":{"type":"string","enum":["queued","claimed","grant","navigate","document","sources","fonts","layout","target","capture","serialize","compile","commit","upload","complete"]},"requestedVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"attempt":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"state":{"type":"string","const":"expired"},"result":{"type":"null"},"failure":{"type":"object","properties":{"reason":{"type":"string","const":"EXPIRED"},"phase":{"type":"string","enum":["queued","claimed","grant","navigate","document","sources","fonts","layout","target","capture","serialize","compile","commit","upload","complete"]},"message":{"type":"string","minLength":1,"maxLength":500},"retryable":{"type":"boolean"},"sourceId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["reason","phase","message","retryable","sourceId"],"additionalProperties":false}},"required":["id","canvasId","source","destination","phase","requestedVersion","attempt","createdAt","updatedAt","state","result","failure"],"additionalProperties":false}]},"alreadyExists":{"type":"boolean"}},"required":["job","alreadyExists"],"additionalProperties":false}
Example result
Show example result
{
"job": {
"id": "00000000-0000-4000-8000-000000000010",
"canvasId": "00000000-0000-4000-8000-000000000010",
"source": {
"kind": "screen",
"nodeId": "x"
},
"destination": {
"kind": "adjacent"
},
"phase": "queued",
"requestedVersion": 1,
"attempt": 0,
"createdAt": "2026-08-10T00:00:00.000Z",
"updatedAt": "2026-08-10T00:00:00.000Z",
"state": "queued",
"result": null,
"failure": null
},
"alreadyExists": false
}
Recovery
- BAD_REQUEST: correct the named fields and call again.
- UNAUTHORIZED: restore Enhance authentication, then retry once.
- FORBIDDEN or NOT_FOUND: check the supplied resource and selection; do not substitute unrelated content. Ask for corrected access or scope if needed.
- CONFLICT: read the current resource, merge the intended change, and retry with its version.
- INTERNAL: run Enhance diagnostics, report the failure, and stop repeating the call.
Continue with
- Read the affected canvas resource to confirm the result.
Versions
Compatibility: cf54ac48063fcd04d49ae3a0ef4e95cef5175b4e231127924ce1a906afe30d74.
Minimum tested versions: Enhance CLI and MCP runtime 0.1.40, plugin 1.0.38, Node.js 24. No older floor is published.