Skip to content
Ona Docs

ListWorkflowExecutionActions

client.Automations.ListExecutionActions(ctx, params) (*WorkflowExecutionActionsPage[WorkflowExecutionAction], error)
POST/gitpod.v1.WorkflowService/ListWorkflowExecutionActions

Lists workflow execution actions with optional filtering.

Use this method to:

  • Monitor individual action execution status
  • Debug action failures
  • Track resource usage per action

Examples

  • List execution actions for workflow execution:

    Shows all execution actions for a specific workflow execution.

    filter:
      workflowExecutionIds: ["d2c94c27-3b76-4a42-b88c-95a85e392c68"]
    pagination:
      pageSize: 20
ParametersExpand Collapse
params AutomationListExecutionActionsParams
Token param.Field[string]Optional

Query param

PageSize param.Field[int64]Optional

Query param

maximum100
minimum0
Filter param.Field[AutomationListExecutionActionsParamsFilter]Optional

Body param

Phases []AutomationListExecutionActionsParamsFilterPhaseOptional
One of the following:
const AutomationListExecutionActionsParamsFilterPhaseWorkflowExecutionActionPhaseUnspecified AutomationListExecutionActionsParamsFilterPhase = "WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED"
const AutomationListExecutionActionsParamsFilterPhaseWorkflowExecutionActionPhasePending AutomationListExecutionActionsParamsFilterPhase = "WORKFLOW_EXECUTION_ACTION_PHASE_PENDING"
const AutomationListExecutionActionsParamsFilterPhaseWorkflowExecutionActionPhaseRunning AutomationListExecutionActionsParamsFilterPhase = "WORKFLOW_EXECUTION_ACTION_PHASE_RUNNING"
const AutomationListExecutionActionsParamsFilterPhaseWorkflowExecutionActionPhaseStopping AutomationListExecutionActionsParamsFilterPhase = "WORKFLOW_EXECUTION_ACTION_PHASE_STOPPING"
const AutomationListExecutionActionsParamsFilterPhaseWorkflowExecutionActionPhaseStopped AutomationListExecutionActionsParamsFilterPhase = "WORKFLOW_EXECUTION_ACTION_PHASE_STOPPED"
const AutomationListExecutionActionsParamsFilterPhaseWorkflowExecutionActionPhaseDeleting AutomationListExecutionActionsParamsFilterPhase = "WORKFLOW_EXECUTION_ACTION_PHASE_DELETING"
const AutomationListExecutionActionsParamsFilterPhaseWorkflowExecutionActionPhaseDeleted AutomationListExecutionActionsParamsFilterPhase = "WORKFLOW_EXECUTION_ACTION_PHASE_DELETED"
const AutomationListExecutionActionsParamsFilterPhaseWorkflowExecutionActionPhaseDone AutomationListExecutionActionsParamsFilterPhase = "WORKFLOW_EXECUTION_ACTION_PHASE_DONE"
WorkflowExecutionActionIDs []stringOptional
WorkflowExecutionIDs []stringOptional
WorkflowIDs []stringOptional
ReturnsExpand Collapse
type WorkflowExecutionAction struct{…}

WorkflowExecutionAction represents a workflow execution action instance.

ID stringOptional
formatuuid
Metadata WorkflowExecutionActionMetadataOptional

WorkflowExecutionActionMetadata contains workflow execution action metadata.

ActionName stringOptional

Human-readable name for this action based on its context. Examples: “gitpod-io/gitpod-next” for repository context, “My Project” for project context. Will be empty string for actions created before this field was added.

FinishedAt TimeOptional

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.

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 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 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() method. In Python, a standard datetime.datetime object can be converted to this format using 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() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
StartedAt TimeOptional

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.

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 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 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() method. In Python, a standard datetime.datetime object can be converted to this format using 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() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
WorkflowExecutionID stringOptional
formatuuid
WorkflowID stringOptional
formatuuid
Spec WorkflowExecutionActionSpecOptional

WorkflowExecutionActionSpec contains the specification for this execution action.

Context AgentCodeContextOptional

Context for the execution action - specifies where and how the action executes. This is resolved from the workflow trigger context and contains the specific project, repository, or agent context for this execution instance.

ContextURL AgentCodeContextContextURLOptional
EnvironmentClassID stringOptional
formatuuid
URL stringOptional
formaturi
EnvironmentID stringOptional
formatuuid
ProjectID stringOptional
formatuuid
PullRequest AgentCodeContextPullRequestOptional

Pull request context - optional metadata about the PR being worked on This is populated when the agent execution is triggered by a PR workflow or when explicitly provided through the browser extension

ID stringOptional

Unique identifier from the source system (e.g., “123” for GitHub PR #123)

Author stringOptional

Author name as provided by the SCM system

Draft boolOptional

Whether this is a draft pull request

FromBranch stringOptional

Source branch name (the branch being merged from)

Repository AgentCodeContextPullRequestRepositoryOptional

Repository information

CloneURL stringOptional
Host stringOptional
Name stringOptional
Owner stringOptional
State StateOptional

Current state of the pull request

One of the following:
const StateUnspecified State = "STATE_UNSPECIFIED"
const StateOpen State = "STATE_OPEN"
const StateClosed State = "STATE_CLOSED"
const StateMerged State = "STATE_MERGED"
Title stringOptional

Pull request title

ToBranch stringOptional

Target branch name (the branch being merged into)

URL stringOptional

Pull request URL (e.g., “https://github.com/owner/repo/pull/123”)

Limits WorkflowExecutionActionSpecLimitsOptional

PerExecution defines limits per execution action.

MaxTime stringOptional

Maximum time allowed for a single execution action. Use standard duration format (e.g., “30m” for 30 minutes, “2h” for 2 hours).

formatregex
Status WorkflowExecutionActionStatusOptional

WorkflowExecutionActionStatus contains the current status of a workflow execution action.

AgentExecutionID stringOptional
EnvironmentID stringOptional
formatuuid
Failures []WorkflowExecutionActionStatusFailureOptional

Structured failures that caused the workflow execution action to fail. Provides detailed error codes, messages, and retry information.

Code WorkflowExecutionActionStatusFailuresCodeOptional

Error code identifying the type of error.

One of the following:
const WorkflowExecutionActionStatusFailuresCodeWorkflowErrorCodeUnspecified WorkflowExecutionActionStatusFailuresCode = "WORKFLOW_ERROR_CODE_UNSPECIFIED"
const WorkflowExecutionActionStatusFailuresCodeWorkflowErrorCodeEnvironmentError WorkflowExecutionActionStatusFailuresCode = "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
const WorkflowExecutionActionStatusFailuresCodeWorkflowErrorCodeAgentError WorkflowExecutionActionStatusFailuresCode = "WORKFLOW_ERROR_CODE_AGENT_ERROR"
Message stringOptional

Human-readable error message.

Meta map[string, string]Optional

Additional metadata about the error. Common keys include:

  • environment_id: ID of the environment
  • task_id: ID of the task
  • service_id: ID of the service
  • workflow_id: ID of the workflow
  • workflow_execution_id: ID of the workflow execution
Reason stringOptional

Reason explaining why the error occurred. Examples: “not_found”, “stopped”, “deleted”, “creation_failed”, “start_failed”

Retry WorkflowExecutionActionStatusFailuresRetryOptional

Retry configuration. If not set, the error is considered non-retriable.

Retriable boolOptional

Whether the error is retriable.

RetryAfter stringOptional

Suggested duration to wait before retrying. Only meaningful when retriable is true.

formatregex
Phase WorkflowExecutionActionStatusPhaseOptional

WorkflowExecutionActionPhase defines the phases of workflow execution action.

One of the following:
const WorkflowExecutionActionStatusPhaseWorkflowExecutionActionPhaseUnspecified WorkflowExecutionActionStatusPhase = "WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED"
const WorkflowExecutionActionStatusPhaseWorkflowExecutionActionPhasePending WorkflowExecutionActionStatusPhase = "WORKFLOW_EXECUTION_ACTION_PHASE_PENDING"
const WorkflowExecutionActionStatusPhaseWorkflowExecutionActionPhaseRunning WorkflowExecutionActionStatusPhase = "WORKFLOW_EXECUTION_ACTION_PHASE_RUNNING"
const WorkflowExecutionActionStatusPhaseWorkflowExecutionActionPhaseStopping WorkflowExecutionActionStatusPhase = "WORKFLOW_EXECUTION_ACTION_PHASE_STOPPING"
const WorkflowExecutionActionStatusPhaseWorkflowExecutionActionPhaseStopped WorkflowExecutionActionStatusPhase = "WORKFLOW_EXECUTION_ACTION_PHASE_STOPPED"
const WorkflowExecutionActionStatusPhaseWorkflowExecutionActionPhaseDeleting WorkflowExecutionActionStatusPhase = "WORKFLOW_EXECUTION_ACTION_PHASE_DELETING"
const WorkflowExecutionActionStatusPhaseWorkflowExecutionActionPhaseDeleted WorkflowExecutionActionStatusPhase = "WORKFLOW_EXECUTION_ACTION_PHASE_DELETED"
const WorkflowExecutionActionStatusPhaseWorkflowExecutionActionPhaseDone WorkflowExecutionActionStatusPhase = "WORKFLOW_EXECUTION_ACTION_PHASE_DONE"
StepStatuses []WorkflowExecutionActionStatusStepStatusOptional

Step-level progress tracking

Error WorkflowExecutionActionStatusStepStatusesErrorOptional

Structured error that caused the step to fail. Provides detailed error code, message, and retry information.

Code WorkflowExecutionActionStatusStepStatusesErrorCodeOptional

Error code identifying the type of error.

One of the following:
const WorkflowExecutionActionStatusStepStatusesErrorCodeWorkflowErrorCodeUnspecified WorkflowExecutionActionStatusStepStatusesErrorCode = "WORKFLOW_ERROR_CODE_UNSPECIFIED"
const WorkflowExecutionActionStatusStepStatusesErrorCodeWorkflowErrorCodeEnvironmentError WorkflowExecutionActionStatusStepStatusesErrorCode = "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
const WorkflowExecutionActionStatusStepStatusesErrorCodeWorkflowErrorCodeAgentError WorkflowExecutionActionStatusStepStatusesErrorCode = "WORKFLOW_ERROR_CODE_AGENT_ERROR"
Message stringOptional

Human-readable error message.

Meta map[string, string]Optional

Additional metadata about the error. Common keys include:

  • environment_id: ID of the environment
  • task_id: ID of the task
  • service_id: ID of the service
  • workflow_id: ID of the workflow
  • workflow_execution_id: ID of the workflow execution
Reason stringOptional

Reason explaining why the error occurred. Examples: “not_found”, “stopped”, “deleted”, “creation_failed”, “start_failed”

Retry WorkflowExecutionActionStatusStepStatusesErrorRetryOptional

Retry configuration. If not set, the error is considered non-retriable.

Retriable boolOptional

Whether the error is retriable.

RetryAfter stringOptional

Suggested duration to wait before retrying. Only meaningful when retriable is true.

formatregex
FinishedAt TimeOptional

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.

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 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 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() method. In Python, a standard datetime.datetime object can be converted to this format using 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() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
Phase WorkflowExecutionActionStatusStepStatusesPhaseOptional
One of the following:
const WorkflowExecutionActionStatusStepStatusesPhaseStepPhaseUnspecified WorkflowExecutionActionStatusStepStatusesPhase = "STEP_PHASE_UNSPECIFIED"
const WorkflowExecutionActionStatusStepStatusesPhaseStepPhasePending WorkflowExecutionActionStatusStepStatusesPhase = "STEP_PHASE_PENDING"
const WorkflowExecutionActionStatusStepStatusesPhaseStepPhaseRunning WorkflowExecutionActionStatusStepStatusesPhase = "STEP_PHASE_RUNNING"
const WorkflowExecutionActionStatusStepStatusesPhaseStepPhaseDone WorkflowExecutionActionStatusStepStatusesPhase = "STEP_PHASE_DONE"
const WorkflowExecutionActionStatusStepStatusesPhaseStepPhaseFailed WorkflowExecutionActionStatusStepStatusesPhase = "STEP_PHASE_FAILED"
const WorkflowExecutionActionStatusStepStatusesPhaseStepPhaseCancelled WorkflowExecutionActionStatusStepStatusesPhase = "STEP_PHASE_CANCELLED"
StartedAt TimeOptional

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.

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 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 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() method. In Python, a standard datetime.datetime object can be converted to this format using 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() to obtain a formatter capable of generating timestamps in this format.

formatdate-time
Step WorkflowStepOptional

The step definition captured at execution time for immutability. This ensures the UI shows the correct step even if the workflow definition changes.

Agent WorkflowStepAgentOptional

WorkflowAgentStep represents an agent step that executes with a prompt.

Prompt stringOptional

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
PullRequest WorkflowStepPullRequestOptional

WorkflowPullRequestStep represents a pull request creation step.

Branch stringOptional

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
Description stringOptional

Description must be at most 20,000 characters:

size(this) <= 20000
Draft boolOptional
Title stringOptional

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
Task WorkflowStepTaskOptional

WorkflowTaskStep represents a task step that executes a command.

Command stringOptional

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
StepIndex int64Optional

Index of the step in the workflow action steps array

formatint32
Warnings []WorkflowExecutionActionStatusWarningOptional

Structured warnings about the workflow execution action. Provides detailed warning codes and messages.

Code WorkflowExecutionActionStatusWarningsCodeOptional

Error code identifying the type of error.

One of the following:
const WorkflowExecutionActionStatusWarningsCodeWorkflowErrorCodeUnspecified WorkflowExecutionActionStatusWarningsCode = "WORKFLOW_ERROR_CODE_UNSPECIFIED"
const WorkflowExecutionActionStatusWarningsCodeWorkflowErrorCodeEnvironmentError WorkflowExecutionActionStatusWarningsCode = "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
const WorkflowExecutionActionStatusWarningsCodeWorkflowErrorCodeAgentError WorkflowExecutionActionStatusWarningsCode = "WORKFLOW_ERROR_CODE_AGENT_ERROR"
Message stringOptional

Human-readable error message.

Meta map[string, string]Optional

Additional metadata about the error. Common keys include:

  • environment_id: ID of the environment
  • task_id: ID of the task
  • service_id: ID of the service
  • workflow_id: ID of the workflow
  • workflow_execution_id: ID of the workflow execution
Reason stringOptional

Reason explaining why the error occurred. Examples: “not_found”, “stopped”, “deleted”, “creation_failed”, “start_failed”

Retry WorkflowExecutionActionStatusWarningsRetryOptional

Retry configuration. If not set, the error is considered non-retriable.

Retriable boolOptional

Whether the error is retriable.

RetryAfter stringOptional

Suggested duration to wait before retrying. Only meaningful when retriable is true.

formatregex

ListWorkflowExecutionActions

package main

import (
  "context"
  "fmt"

  "github.com/gitpod-io/gitpod-sdk-go"
  "github.com/gitpod-io/gitpod-sdk-go/option"
)

func main() {
  client := gitpod.NewClient(
    option.WithBearerToken("My Bearer Token"),
  )
  page, err := client.Automations.ListExecutionActions(context.TODO(), gitpod.AutomationListExecutionActionsParams{
    Filter: gitpod.F(gitpod.AutomationListExecutionActionsParamsFilter{
      WorkflowExecutionIDs: gitpod.F([]string{"d2c94c27-3b76-4a42-b88c-95a85e392c68"}),
    }),
    Pagination: gitpod.F(gitpod.AutomationListExecutionActionsParamsPagination{
      PageSize: gitpod.F(int64(20)),
    }),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "pagination": {
    "nextToken": "nextToken"
  },
  "workflowExecutionActions": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "metadata": {
        "actionName": "actionName",
        "finishedAt": "2019-12-27T18:11:19.117Z",
        "startedAt": "2019-12-27T18:11:19.117Z",
        "workflowExecutionId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "workflowId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
      },
      "spec": {
        "context": {
          "contextUrl": {
            "environmentClassId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            "url": "https://example.com"
          },
          "environmentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
          "projectId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
          "pullRequest": {
            "id": "id",
            "author": "author",
            "draft": true,
            "fromBranch": "fromBranch",
            "repository": {
              "cloneUrl": "cloneUrl",
              "host": "host",
              "name": "name",
              "owner": "owner"
            },
            "state": "STATE_UNSPECIFIED",
            "title": "title",
            "toBranch": "toBranch",
            "url": "url"
          }
        },
        "desiredPhase": "WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED",
        "limits": {
          "maxTime": "+9125115.360s"
        },
        "session": "session"
      },
      "status": {
        "agentExecutionId": "agentExecutionId",
        "environmentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "failureMessage": "failureMessage",
        "failures": [
          {
            "code": "WORKFLOW_ERROR_CODE_UNSPECIFIED",
            "message": "message",
            "meta": {
              "foo": "string"
            },
            "reason": "reason",
            "retry": {
              "retriable": true,
              "retryAfter": "+9125115.360s"
            }
          }
        ],
        "phase": "WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED",
        "session": "session",
        "stepStatuses": [
          {
            "error": {
              "code": "WORKFLOW_ERROR_CODE_UNSPECIFIED",
              "message": "message",
              "meta": {
                "foo": "string"
              },
              "reason": "reason",
              "retry": {
                "retriable": true,
                "retryAfter": "+9125115.360s"
              }
            },
            "failureMessage": "failureMessage",
            "finishedAt": "2019-12-27T18:11:19.117Z",
            "phase": "STEP_PHASE_UNSPECIFIED",
            "startedAt": "2019-12-27T18:11:19.117Z",
            "step": {
              "agent": {
                "prompt": "prompt"
              },
              "pullRequest": {
                "branch": "branch",
                "description": "description",
                "draft": true,
                "title": "title"
              },
              "report": {
                "outputs": [
                  {
                    "acceptanceCriteria": "acceptanceCriteria",
                    "boolean": {},
                    "command": "command",
                    "float": {
                      "max": 0,
                      "min": 0
                    },
                    "integer": {
                      "max": 0,
                      "min": 0
                    },
                    "key": "key",
                    "prompt": "prompt",
                    "string": {
                      "pattern": "pattern"
                    },
                    "title": "title"
                  }
                ]
              },
              "task": {
                "command": "command"
              }
            },
            "stepIndex": 0
          }
        ],
        "warningMessage": "warningMessage",
        "warnings": [
          {
            "code": "WORKFLOW_ERROR_CODE_UNSPECIFIED",
            "message": "message",
            "meta": {
              "foo": "string"
            },
            "reason": "reason",
            "retry": {
              "retriable": true,
              "retryAfter": "+9125115.360s"
            }
          }
        ]
      }
    }
  ]
}
Returns Examples
{
  "pagination": {
    "nextToken": "nextToken"
  },
  "workflowExecutionActions": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "metadata": {
        "actionName": "actionName",
        "finishedAt": "2019-12-27T18:11:19.117Z",
        "startedAt": "2019-12-27T18:11:19.117Z",
        "workflowExecutionId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "workflowId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
      },
      "spec": {
        "context": {
          "contextUrl": {
            "environmentClassId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            "url": "https://example.com"
          },
          "environmentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
          "projectId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
          "pullRequest": {
            "id": "id",
            "author": "author",
            "draft": true,
            "fromBranch": "fromBranch",
            "repository": {
              "cloneUrl": "cloneUrl",
              "host": "host",
              "name": "name",
              "owner": "owner"
            },
            "state": "STATE_UNSPECIFIED",
            "title": "title",
            "toBranch": "toBranch",
            "url": "url"
          }
        },
        "desiredPhase": "WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED",
        "limits": {
          "maxTime": "+9125115.360s"
        },
        "session": "session"
      },
      "status": {
        "agentExecutionId": "agentExecutionId",
        "environmentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "failureMessage": "failureMessage",
        "failures": [
          {
            "code": "WORKFLOW_ERROR_CODE_UNSPECIFIED",
            "message": "message",
            "meta": {
              "foo": "string"
            },
            "reason": "reason",
            "retry": {
              "retriable": true,
              "retryAfter": "+9125115.360s"
            }
          }
        ],
        "phase": "WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED",
        "session": "session",
        "stepStatuses": [
          {
            "error": {
              "code": "WORKFLOW_ERROR_CODE_UNSPECIFIED",
              "message": "message",
              "meta": {
                "foo": "string"
              },
              "reason": "reason",
              "retry": {
                "retriable": true,
                "retryAfter": "+9125115.360s"
              }
            },
            "failureMessage": "failureMessage",
            "finishedAt": "2019-12-27T18:11:19.117Z",
            "phase": "STEP_PHASE_UNSPECIFIED",
            "startedAt": "2019-12-27T18:11:19.117Z",
            "step": {
              "agent": {
                "prompt": "prompt"
              },
              "pullRequest": {
                "branch": "branch",
                "description": "description",
                "draft": true,
                "title": "title"
              },
              "report": {
                "outputs": [
                  {
                    "acceptanceCriteria": "acceptanceCriteria",
                    "boolean": {},
                    "command": "command",
                    "float": {
                      "max": 0,
                      "min": 0
                    },
                    "integer": {
                      "max": 0,
                      "min": 0
                    },
                    "key": "key",
                    "prompt": "prompt",
                    "string": {
                      "pattern": "pattern"
                    },
                    "title": "title"
                  }
                ]
              },
              "task": {
                "command": "command"
              }
            },
            "stepIndex": 0
          }
        ],
        "warningMessage": "warningMessage",
        "warnings": [
          {
            "code": "WORKFLOW_ERROR_CODE_UNSPECIFIED",
            "message": "message",
            "meta": {
              "foo": "string"
            },
            "reason": "reason",
            "retry": {
              "retriable": true,
              "retryAfter": "+9125115.360s"
            }
          }
        ]
      }
    }
  ]
}