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

# ListTaskExecutions

`POST /gitpod.v1.EnvironmentAutomationService/ListTaskExecutions`

Lists executions of automation tasks.

 Use this method to:
 - View task execution history
 - Monitor running tasks
 - Track task completion status

 ### Examples

 - List all executions:

   Shows execution history for all tasks.

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

 - Filter by phase:

   Lists executions in specific phases.

   ```yaml
   filter:
     phases: ["TASK_EXECUTION_PHASE_RUNNING", "TASK_EXECUTION_PHASE_FAILED"]
   pagination:
     pageSize: 20
   ```

## Query parameters

- `pageSize` integer
- `token` string

## Request body

- GitpodV1ListTaskExecutionsRequest
  - `filter` GitpodV1ListTaskExecutionsRequestFilter
    - `environmentIds` string[] — environment_ids filters the response to only task runs of these environments
    - `phases` GitpodV1TaskExecutionPhase[] — phases filters the response to only task runs in these phases
    - `taskIds` string[] — task_ids filters the response to only task runs of these tasks
    - `taskReferences` string[] — task_references filters the response to only task runs with this reference
  - `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

- GitpodV1ListTaskExecutionsResponse
  - `pagination` GitpodV1PaginationResponse
    - `nextToken` string — Token passed for retrieving the next set of results. Empty if there are no more results
  - `taskExecutions` GitpodV1TaskExecution[]
    - `id` string, uuid, required
    - `metadata` GitpodV1TaskExecutionMetadata
      - `completedAt` string, date-time — A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.
      - `createdAt` string, date-time — A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.
      - `creator` GitpodV1Subject
        - `id` string, uuid — id is the UUID of the subject
        - `principal` 'PRINCIPAL_UNSPECIFIED' | 'PRINCIPAL_ACCOUNT' | 'PRINCIPAL_USER' | 'PRINCIPAL_RUNNER' | 'PRINCIPAL_ENVIRONMENT' | 'PRINCIPAL_SERVICE_ACCOUNT' | 'PRINCIPAL_RUNNER_MANAGER'
      - `environmentId` string, uuid — environment_id is the ID of the environment in which the task run is executed.
      - `startedAt` string, date-time — A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.
      - `startedBy` string — started_by describes the trigger that started the task execution.
      - `taskId` string, uuid — task_id is the ID of the main task being executed.
    - `spec` GitpodV1TaskExecutionSpec
      - `desiredPhase` 'TASK_EXECUTION_PHASE_UNSPECIFIED' | 'TASK_EXECUTION_PHASE_PENDING' | 'TASK_EXECUTION_PHASE_RUNNING' | 'TASK_EXECUTION_PHASE_SUCCEEDED' | 'TASK_EXECUTION_PHASE_FAILED' | 'TASK_EXECUTION_PHASE_STOPPED'
      - `plan` GitpodV1TaskExecutionSpecGroup[] — plan is a list of groups of steps. The steps in a group are executed concurrently, while the groups are executed sequentially. The order of the groups is the order in which they are executed. — unresolved $ref
    - `status` GitpodV1TaskExecutionStatus
      - `failureMessage` string — failure_message summarises why the task execution failed to operate. If this is non-empty the task execution has failed to operate and will likely transition to a failed state.
      - `logUrl` string — log_url is the URL to the logs of the task's steps. If this is empty, the task either has no logs or has not yet started.
      - `phase` 'TASK_EXECUTION_PHASE_UNSPECIFIED' | 'TASK_EXECUTION_PHASE_PENDING' | 'TASK_EXECUTION_PHASE_RUNNING' | 'TASK_EXECUTION_PHASE_SUCCEEDED' | 'TASK_EXECUTION_PHASE_FAILED' | 'TASK_EXECUTION_PHASE_STOPPED'
      - `statusVersion` string — version of the status update. Task executions themselves are unversioned, but their status has different versions. The value of this field has no semantic meaning (e.g. don't interpret it as as a timestamp), but it can be used to impose a partial order. If a.status_version < b.status_version then a was the status before b.
      - `steps` GitpodV1TaskExecutionStatusStep[] — steps provides the status for each individual step of the task execution. If a step is missing it has not yet started.
        - `failureMessage` string — failure_message summarises why the step failed to operate. If this is non-empty the step has failed to operate and will likely transition to a failed state.
        - `id` string, uuid — ID is the ID of the execution step
        - `output` object — output contains the output of the task execution. setting an output field to empty string will unset it.
        - `phase` 'TASK_EXECUTION_PHASE_UNSPECIFIED' | 'TASK_EXECUTION_PHASE_PENDING' | 'TASK_EXECUTION_PHASE_RUNNING' | 'TASK_EXECUTION_PHASE_SUCCEEDED' | 'TASK_EXECUTION_PHASE_FAILED' | 'TASK_EXECUTION_PHASE_STOPPED'

## 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 `taskExecutions/items/spec/plan/items/steps/items/task/spec/runsOn` response property `oneOf` list for the response status `200`
  - added the optional property `taskExecutions/items/spec/plan/items/steps/items/task/spec/runsOn/terminal` to the response with the `200` status
  - removed the `PRINCIPAL_AGENT_EXECUTION` enum value from the `taskExecutions/items/metadata/creator/principal` response property for the response status `200`
  - removed `subschema #1, subschema #2` from the `taskExecutions/items/spec/plan/items/steps/items/task/spec/runsOn` response property `oneOf` list for the response status `200`
- **2025-12-15** `d62ef4b9187c` — 1 breaking, 1 warning, 3 info
  - added `subschema #1, subschema #2` to the `taskExecutions/items/spec/plan/items/steps/items/task/spec/runsOn` response property `oneOf` list for the response status `200`
  - added the new `PRINCIPAL_AGENT_EXECUTION` enum value to the `taskExecutions/items/metadata/creator/principal` response property for the response status `200`
  - added the optional property `taskExecutions/items/spec/plan/items/steps/items/task/spec/env` to the response with the `200` status
  - added the optional property `taskExecutions/items/spec/plan/items/steps/items/task/spec/runsOn/machine` to the response with the `200` status
  - …1 more
- …earlier changes not shown

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