---
title: "UpdateTaskExecutionStatus"
method: POST
path: "/gitpod.v1.EnvironmentAutomationService/UpdateTaskExecutionStatus"
tags: ["gitpod.v1.EnvironmentAutomationService"]
---

# UpdateTaskExecutionStatus

`POST /gitpod.v1.EnvironmentAutomationService/UpdateTaskExecutionStatus`

Updates the status of a task execution.
 Only the environment executing a task execution is expected to call this function.

 Use this method to:
 - Report execution progress
 - Update step status
 - Set failure messages
 - Provide log URLs

 ### Examples

 - Update execution status:

   Updates status with step information.

   ```yaml
   id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
   steps:
     - id: "step-1"
       phase: TASK_EXECUTION_PHASE_SUCCEEDED
   logUrl: "https://logs.gitpod.io/task-123"
   ```

 - Report failure:

   Updates status with failure information.

   ```yaml
   id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
   failureMessage: "Build failed due to missing dependencies"
   steps:
     - id: "step-1"
       phase: TASK_EXECUTION_PHASE_FAILED
       failureMessage: "npm install failed"
   ```

## Request body

- GitpodV1UpdateTaskExecutionStatusRequest
  - `failureMessage` string, nullable — failure_message marks the task execution as failed and provides a message explaining the failure. If an individual step has failed, callers are NOT expected to set this message; only if the task execution as a whole has failed/cannot be started.
  - `id` string, uuid
  - `logUrl` string, nullable — log_url is the URL to the logs of the task's steps. If this is empty, the task either has no logs or has not yet started.
  - `steps` GitpodV1TaskExecutionStatusStep[]
    - `failureMessage` string — failure_message summarises why the step failed to operate. If this is non-empty the step has failed to operate and will likely transition to a failed state.
    - `id` string, uuid — ID is the ID of the execution step
    - `output` object — output contains the output of the task execution. setting an output field to empty string will unset it.
    - `phase` 'TASK_EXECUTION_PHASE_UNSPECIFIED' | 'TASK_EXECUTION_PHASE_PENDING' | 'TASK_EXECUTION_PHASE_RUNNING' | 'TASK_EXECUTION_PHASE_SUCCEEDED' | 'TASK_EXECUTION_PHASE_FAILED' | 'TASK_EXECUTION_PHASE_STOPPED'

## Response `200`

Success

- GitpodV1UpdateTaskExecutionStatusResponse

## Other responses

- `default` — Error

---

[API](https://skmtc.net/gitpod-io/apis/gitpod-v1.md) · [All operations](https://skmtc.net/gitpod-io/apis/gitpod-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitpod-io/gitpod-v1/versions/44d50c2ac284/schema)
