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

# UpdateTask

`POST /gitpod.v1.EnvironmentAutomationService/UpdateTask`

Updates an automation task configuration.

 Use this method to:
 - Modify task commands
 - Update task triggers
 - Change dependencies
 - Adjust execution settings

 ### Examples

 - Update command:

   Changes the task's command.

   ```yaml
   id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
   spec:
     command: "npm run test:coverage"
   ```

 - Update triggers:

   Modifies when the task runs.

   ```yaml
   id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
   metadata:
     triggeredBy:
       trigger:
         - postEnvironmentStart: true
   ```

## Request body

- GitpodV1UpdateTaskRequest
  - `dependsOn` string[] — dependencies specifies the IDs of the automations this task depends on.
  - `id` string, uuid
  - `metadata` GitpodV1UpdateTaskRequestTaskMetadata
    - `description` string, nullable
    - `name` string, nullable
    - `triggeredBy` GitpodV1UpdateTaskRequestAutomationTriggerUpdate — unresolved $ref
  - `spec` GitpodV1UpdateTaskRequestTaskSpec — unresolved $ref

## Response `200`

Success

- GitpodV1UpdateTaskResponse

## Other responses

- `default` — Error

## Changes

- **2026-07-30** `44d50c2ac284` — 1 breaking, 1 warning, 2 info
  - removed `subschema #1, subschema #2, subschema #3` from the `spec/runsOn` request property `oneOf` list
  - removed the request property `spec/runsOn/terminal`
  - added the new optional request property `spec/prebuildRequiresSuccess`
  - added `subschema #1, subschema #2` to the `spec/runsOn` request property `oneOf` list
- **2026-04-02** `dabc0ff98cd7` — 1 breaking, 2 info
  - removed `subschema #1, subschema #2` from the `spec/runsOn` request property `oneOf` list
  - added the new optional request property `spec/runsOn/terminal`
  - added `subschema #1, subschema #2, subschema #3` to the `spec/runsOn` request property `oneOf` list
- **2026-01-21** `2423c089f280` — 1 breaking, 2 info
  - removed `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5` from the `metadata/triggeredBy/trigger/items/` request property `oneOf` list
  - added the new optional request property `metadata/triggeredBy/trigger/items/beforeSnapshot`
  - added `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5, subschema #6` to the `metadata/triggeredBy/trigger/items/` request property `oneOf` list
- …earlier changes not shown

[Full history](https://skmtc.dev/gitpod-io/apis/gitpod-v1/changes/gitpod.v1.EnvironmentAutomationService/UpdateTask/post.md)

---

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