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

# ListTasks

`POST /gitpod.v1.EnvironmentAutomationService/ListTasks`

Lists automation tasks with optional filtering.

 Use this method to:
 - View all tasks in an environment
 - Filter tasks by reference
 - Monitor task status

 ### Examples

 - List environment tasks:

   Shows all tasks for an environment.

   ```yaml
   filter:
     environmentIds: ["07e03a28-65a5-4d98-b532-8ea67b188048"]
   pagination:
     pageSize: 20
   ```

 - Filter by reference:

   Lists tasks matching specific references.

   ```yaml
   filter:
     references: ["build", "test"]
   pagination:
     pageSize: 20
   ```

## Query parameters

- `pageSize` integer
- `token` string

## Request body

- GitpodV1ListTasksRequest
  - `filter` GitpodV1ListTasksRequestFilter
    - `environmentIds` string[] — environment_ids filters the response to only tasks of these environments
    - `references` string[] — references filters the response to only services with these references
    - `taskIds` string[] — task_ids filters the response to only tasks with these IDs
  - `pagination` GitpodV1PaginationRequest
    - `pageSize` integer — Page size is the maximum number of results to retrieve per page. Defaults to 25. Maximum 100.
    - `token` string — Token for the next set of results that was returned as next_token of a PaginationResponse

## Response `200`

Success

- GitpodV1ListTasksResponse
  - `pagination` GitpodV1PaginationResponse
    - `nextToken` string — Token passed for retrieving the next set of results. Empty if there are no more results
  - `tasks` GitpodV1Task[]
    - `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 `tasks/items/metadata/creator/principal` response property for the response status `200`
- **2025-02-21** `3655d5ad0ac3` — 5 breaking, 2 warning, 17 info
  - the `filter` request property type/format changed from ``/`` to `object`/``
  - the `pagination` request property type/format changed from ``/`` to `object`/``
  - the `pagination` response's property type/format changed from ``/`` to `object`/`` for status `200`
  - the `tasks/items/metadata` response's property type/format changed from ``/`` to `object`/`` for status `200`
  - …20 more
- **2025-02-18** `cd6a05ae99d2` — 1 warning
  - removed the optional property `detail` from the response with the `default` status
- **2025-02-18** `f6598ab5d682` — 1 info
  - the response property `tasks/items/id` became required for the status `200`

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