---
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 — unresolved $ref

## Other responses

- `default` — Error

## Changes

> 18 revisions in range; 1 could not be searched.

- **2026-04-02** `dabc0ff98cd7` — 1 breaking, 3 info
  - added `subschema #1, subschema #2, subschema #3` to the `tasks/items/spec/runsOn` response property `oneOf` list for the response status `200`
  - added the optional property `tasks/items/spec/runsOn/terminal` to the response with the `200` status
  - removed the `PRINCIPAL_AGENT_EXECUTION` enum value from the `tasks/items/metadata/creator/principal` response property for the response status `200`
  - removed `subschema #1, subschema #2` from the `tasks/items/spec/runsOn` response property `oneOf` list for the response status `200`
- **2026-01-21** `2423c089f280` — 1 breaking, 2 info
  - added `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5, subschema #6` to the `tasks/items/metadata/triggeredBy/items/` response property `oneOf` list for the response status `200`
  - added the optional property `tasks/items/metadata/triggeredBy/items/beforeSnapshot` to the response with the `200` status
  - removed `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5` from the `tasks/items/metadata/triggeredBy/items/` response property `oneOf` list for the response status `200`
- …earlier changes not shown

[Full 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/44d50c2ac284/schema)
