Skip to content

Update External Advanced Task

Required scope: advanced_task:update

Set completed to true to finish an external task or false to reopen it. evidence must be a JSON object and externalOperationId is required.

Operation IDs are durable and workspace-scoped. Retrying the same operation ID with the same instance, desired state, and evidence returns the task’s current state without publishing another event. Reusing it with a different instance, state, or evidence returns ALREADY_EXISTS (HTTP 409).

Only instances whose snapshotted type is external can be updated.

Generated Reference
POST /public-api/publicapi.v1.AdvancedTaskService/UpdateAdvancedTaskInstance

Completes or reopens an external advanced-task instance.

Request UpdateAdvancedTaskInstanceRequest
Response UpdateAdvancedTaskInstanceResponse

UpdateAdvancedTaskInstanceRequest

Field Type Description
instance_id string
completed bool
evidence google.protobuf.Struct
external_operation_id string Durable workspace-scoped operation identifier. Reuse is only valid with the same instance, desired state, and evidence.

UpdateAdvancedTaskInstanceResponse

Field Type
instance AdvancedTaskInstance
{
"instanceId": "663f561f-3810-4d28-8bd9-e6024ebfee32",
"completed": true,
"evidence": {
"reportUrl": "https://example.test/reports/inspection-42.pdf",
"sourceRecordId": "inspection-42"
},
"externalOperationId": "inspection-42-complete-v1"
}
{
"instanceId": "663f561f-3810-4d28-8bd9-e6024ebfee32",
"completed": false,
"evidence": {
"reason": "replacement report requested"
},
"externalOperationId": "inspection-42-reopen-v1"
}

The response contains the updated instance in the same shape returned by the list endpoint.