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

# ListTasks

`POST /gitpod.v1.EnvironmentAutomationService/ListTasks`

## 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 retreiving 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
    - `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

---

[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/27f7bd641de1/schema)
