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

# GetTask

`POST /gitpod.v1.EnvironmentAutomationService/GetTask`

Gets details about a specific automation task.

 Use this method to:
 - Check task configuration
 - View task dependencies
 - Monitor task status

 ### Examples

 - Get task details:

   Retrieves information about a specific task.

   ```yaml
   id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
   ```

## Request body

- GitpodV1GetTaskRequest
  - `id` string, uuid

## Response `200`

Success

- GitpodV1GetTaskResponse
  - `task` GitpodV1Task, required
    - `dependsOn` string[] — dependencies specifies the IDs of the automations this task depends on.
    - `environmentId` string, uuid
    - `id` string, uuid, required
    - `metadata` GitpodV1TaskMetadata — unresolved $ref
    - `spec` GitpodV1TaskSpec
      - `command` string — command contains the command the task should execute
      - `runsOn` GitpodV1RunsOn
        - `docker` GitpodV1RunsOnDocker, required
          - `environment` string[]
          - `image` string

## Other responses

- `default` — Error

## Changes

- **2025-06-10** `ca9a49ac7fbb` — 1 warning
  - added the new `PRINCIPAL_RUNNER_MANAGER` enum value to the `task/metadata/creator/principal` response property for the response status `200`
- **2025-02-21** `3655d5ad0ac3` — 1 breaking, 6 info
  - the `task` response's property type/format changed from ``/`` to `object`/`` for status `200`
  - added the optional property `task/dependsOn` to the response with the `200` status
  - added the optional property `task/environmentId` to the response with the `200` status
  - added the optional property `task/metadata` to the response with the `200` status
  - …3 more
- **2025-02-18** `cd6a05ae99d2` — 1 warning
  - removed the optional property `detail` from the response with the `default` status
- **2025-02-18** `bef0e79f204c` — 1 info
  - the response property `task` became required for the status `200`
- **2025-02-18** `f6598ab5d682` — 1 info
  - the response property `task/allOf[subschema #1: Task]/id` became required for the status `200`

[Change history](https://skmtc.dev/gitpod-io/apis/gitpod-v1/changes/gitpod.v1.EnvironmentAutomationService/GetTask/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/ca9a49ac7fbb/schema)
