task-runs
tasks
tasks

Update task run

API for managing task runs. Each run represents an execution of a task.

patch/api/projects/{project_id}/tasks/{task_id}/runs/{id}/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/tasks/{task_id}/runs/{id}/
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Path parameters

idstring required
project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

task_idstring required

Request body

status'not_started' | 'queued' | 'in_progress' | 'completed' | 'failed' | 'cancelled'
  • not_started - not_started
  • queued - queued
  • in_progress - in_progress
  • completed - completed
  • failed - failed
  • cancelled - cancelled
branchstring nullable

Git branch name to associate with the task

stagestring nullable

Current stage of the run (e.g. research, plan, build)

outputunknown
stateobject

State of the run

state_remove_keysstring[]

State keys to remove atomically before applying any state updates.

state_appendobject

State keys whose value to append to the list stored at that key, atomically under the row lock. Use instead of sending the whole list back through state, which loses concurrent appends to a read-modify-write race.

error_messagestring nullable

Error message if execution failed

Response

Updated task run

idstring uuid required
taskstring uuid required

Parent task id this run belongs to.

stagestring nullable required
branchstring nullable required
statusstring required
environmentstring required
modelstring nullable

Configured LLM model identifier for this run.

log_urlstring uri nullable

Presigned S3 URL for log access (valid for 1 hour).

error_messagestring nullable required
outputobject nullable required
task_summarystring nullable required

Latest summary for this task, including a summary inherited from an earlier run.

task_tagsstring[] required

Latest slug tags for this task, including tags inherited from an earlier run.

stateobject required
created_atstring date-time nullable
updated_atstring date-time nullable
completed_atstring date-time nullable
scheduled_atstring date-time nullable

Earliest start time in UTC. Null for runs without a schedule.

preview_availableboolean

True when this run's sandbox serves a dev stack preview, so clients can offer the preview link. Open it through the run's preview/ endpoint, which mints a fresh access token on every request.

Changes

No recorded changes to this operation across all 1 revision of this API.