Skip to content
Ona Docs

Automations

CancelWorkflowExecution
automations.cancel_execution(AutomationCancelExecutionParams**kwargs) -> object
POST/gitpod.v1.WorkflowService/CancelWorkflowExecution
CancelWorkflowExecutionAction
automations.cancel_execution_action(AutomationCancelExecutionActionParams**kwargs) -> object
POST/gitpod.v1.WorkflowService/CancelWorkflowExecutionAction
CreateWorkflow
automations.create(AutomationCreateParams**kwargs) -> AutomationCreateResponse
POST/gitpod.v1.WorkflowService/CreateWorkflow
DeleteWorkflow
automations.delete(AutomationDeleteParams**kwargs) -> object
POST/gitpod.v1.WorkflowService/DeleteWorkflow
ListWorkflows
automations.list(AutomationListParams**kwargs) -> SyncWorkflowsPage[Workflow]
POST/gitpod.v1.WorkflowService/ListWorkflows
ListWorkflowExecutionActions
automations.list_execution_actions(AutomationListExecutionActionsParams**kwargs) -> SyncWorkflowExecutionActionsPage[WorkflowExecutionAction]
POST/gitpod.v1.WorkflowService/ListWorkflowExecutionActions
ListWorkflowExecutionOutputs
automations.list_execution_outputs(AutomationListExecutionOutputsParams**kwargs) -> SyncOutputsPage[AutomationListExecutionOutputsResponse]
POST/gitpod.v1.WorkflowService/ListWorkflowExecutionOutputs
ListWorkflowExecutions
automations.list_executions(AutomationListExecutionsParams**kwargs) -> SyncWorkflowExecutionsPage[WorkflowExecution]
POST/gitpod.v1.WorkflowService/ListWorkflowExecutions
GetWorkflow
automations.retrieve(AutomationRetrieveParams**kwargs) -> AutomationRetrieveResponse
POST/gitpod.v1.WorkflowService/GetWorkflow
GetWorkflowExecution
automations.retrieve_execution(AutomationRetrieveExecutionParams**kwargs) -> AutomationRetrieveExecutionResponse
POST/gitpod.v1.WorkflowService/GetWorkflowExecution
GetWorkflowExecutionAction
automations.retrieve_execution_action(AutomationRetrieveExecutionActionParams**kwargs) -> AutomationRetrieveExecutionActionResponse
POST/gitpod.v1.WorkflowService/GetWorkflowExecutionAction
StartWorkflow
automations.start_execution(AutomationStartExecutionParams**kwargs) -> AutomationStartExecutionResponse
POST/gitpod.v1.WorkflowService/StartWorkflow
UpdateWorkflow
automations.update(AutomationUpdateParams**kwargs) -> AutomationUpdateResponse
POST/gitpod.v1.WorkflowService/UpdateWorkflow
ModelsExpand Collapse
class Workflow:

Workflow represents a workflow configuration.

id: Optional[str]
formatuuid
metadata: Optional[Metadata]

WorkflowMetadata contains workflow metadata.

created_at: Optional[datetime]

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
creator: Optional[Subject]
id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
description: Optional[str]
maxLength500
executor: Optional[Subject]
id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
name: Optional[str]
maxLength80
minLength1
updated_at: Optional[datetime]

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
spec: Optional[Spec]
action: Optional[WorkflowAction]

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
max_parallel: Optional[int]

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
max_total: Optional[int]

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
per_execution: Optional[LimitsPerExecution]

PerExecution defines limits per execution action.

max_time: Optional[str]

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

formatregex
steps: Optional[List[WorkflowStep]]

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent: Optional[Agent]

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt: Optional[str]

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pull_request: Optional[PullRequest]

WorkflowPullRequestStep represents a pull request creation step.

branch: Optional[str]

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description: Optional[str]

Description must be at most 20,000 characters:

size(this) <= 20000
draft: Optional[bool]
title: Optional[str]

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task: Optional[Task]

WorkflowTaskStep represents a task step that executes a command.

command: Optional[str]

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
report: Optional[WorkflowAction]

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
max_parallel: Optional[int]

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
max_total: Optional[int]

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
per_execution: Optional[LimitsPerExecution]

PerExecution defines limits per execution action.

max_time: Optional[str]

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

formatregex
steps: Optional[List[WorkflowStep]]

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent: Optional[Agent]

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt: Optional[str]

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pull_request: Optional[PullRequest]

WorkflowPullRequestStep represents a pull request creation step.

branch: Optional[str]

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description: Optional[str]

Description must be at most 20,000 characters:

size(this) <= 20000
draft: Optional[bool]
title: Optional[str]

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task: Optional[Task]

WorkflowTaskStep represents a task step that executes a command.

command: Optional[str]

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
triggers: Optional[List[WorkflowTrigger]]

WorkflowTriggerContext defines the context in which a workflow should run.

Context determines where and how the workflow executes:

  • Projects: Execute in specific project environments
  • Repositories: Execute in environments created from repository URLs
  • Agent: Execute in agent-managed environments with custom prompts
  • FromTrigger: Use context derived from the trigger event (PR-specific)

Context Usage by Trigger Type:

  • Manual: Can use any context type
  • Time: Typically uses Projects or Repositories context
  • PullRequest: Can use any context, FromTrigger uses PR repository context
agent: Optional[Agent]

Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.

prompt: Optional[str]

Agent prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
from_trigger: Optional[object]

Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.

projects: Optional[Projects]

Execute workflow in specific project environments. Creates environments for each specified project.

project_ids: Optional[List[str]]
repositories: Optional[Repositories]

Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.

environment_class_id: Optional[str]
formatuuid
repo_selector: Optional[RepositoriesRepoSelector]

RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.

repo_search_string: Optional[str]

Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.

minLength1
scm_host: Optional[str]

SCM host where the search should be performed (e.g., “github.com”, “gitlab.com”)

minLength1
repository_urls: Optional[RepositoriesRepositoryURLs]

RepositoryURLs contains a list of explicit repository URLs. Creates one action per repository URL.

repo_urls: Optional[List[str]]
manual: Optional[object]

Manual trigger - executed when StartWorkflow RPC is called. No additional configuration needed.

pull_request: Optional[PullRequest]

Pull request trigger - executed when specified PR events occur. Only triggers for PRs in repositories matching the trigger context.

events: Optional[List[Literal["PULL_REQUEST_EVENT_UNSPECIFIED", "PULL_REQUEST_EVENT_OPENED", "PULL_REQUEST_EVENT_UPDATED", 4 more]]]
One of the following:
"PULL_REQUEST_EVENT_UNSPECIFIED"
"PULL_REQUEST_EVENT_OPENED"
"PULL_REQUEST_EVENT_UPDATED"
"PULL_REQUEST_EVENT_APPROVED"
"PULL_REQUEST_EVENT_MERGED"
"PULL_REQUEST_EVENT_CLOSED"
"PULL_REQUEST_EVENT_READY_FOR_REVIEW"
integration_id: Optional[str]

integration_id is the optional ID of an integration that acts as the source of webhook events. When set, the trigger will be activated when the webhook receives events.

formatuuid
webhook_id: Optional[str]

webhook_id is the optional ID of a webhook that this trigger is bound to. When set, the trigger will be activated when the webhook receives events. This allows multiple workflows to share a single webhook endpoint.

formatuuid
time: Optional[Time]

Time-based trigger - executed automatically based on cron schedule. Uses standard cron expression format (minute hour day month weekday).

cron_expression: Optional[str]

Cron expression must be between 1 and 100 characters:

size(this) >= 1 && size(this) <= 100
webhook_url: Optional[str]

Webhook URL for triggering this workflow via HTTP POST Format: {base_url}/workflows/{workflow_id}/webhooks

class WorkflowAction:

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
max_parallel: Optional[int]

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
max_total: Optional[int]

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
per_execution: Optional[LimitsPerExecution]

PerExecution defines limits per execution action.

max_time: Optional[str]

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

formatregex
steps: Optional[List[WorkflowStep]]

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent: Optional[Agent]

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt: Optional[str]

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pull_request: Optional[PullRequest]

WorkflowPullRequestStep represents a pull request creation step.

branch: Optional[str]

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description: Optional[str]

Description must be at most 20,000 characters:

size(this) <= 20000
draft: Optional[bool]
title: Optional[str]

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task: Optional[Task]

WorkflowTaskStep represents a task step that executes a command.

command: Optional[str]

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
class WorkflowExecution:

WorkflowExecution represents a workflow execution instance.

id: Optional[str]
formatuuid
metadata: Optional[Metadata]

WorkflowExecutionMetadata contains workflow execution metadata.

creator: Optional[Subject]
id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
executor: Optional[Subject]
id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
finished_at: Optional[datetime]

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
started_at: Optional[datetime]

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
workflow_id: Optional[str]
formatuuid
spec: Optional[Spec]

WorkflowExecutionSpec contains the specification used for this execution.

action: Optional[WorkflowAction]

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
max_parallel: Optional[int]

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
max_total: Optional[int]

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
per_execution: Optional[LimitsPerExecution]

PerExecution defines limits per execution action.

max_time: Optional[str]

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

formatregex
steps: Optional[List[WorkflowStep]]

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent: Optional[Agent]

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt: Optional[str]

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pull_request: Optional[PullRequest]

WorkflowPullRequestStep represents a pull request creation step.

branch: Optional[str]

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description: Optional[str]

Description must be at most 20,000 characters:

size(this) <= 20000
draft: Optional[bool]
title: Optional[str]

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task: Optional[Task]

WorkflowTaskStep represents a task step that executes a command.

command: Optional[str]

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
report: Optional[WorkflowAction]

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
max_parallel: Optional[int]

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
max_total: Optional[int]

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
per_execution: Optional[LimitsPerExecution]

PerExecution defines limits per execution action.

max_time: Optional[str]

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

formatregex
steps: Optional[List[WorkflowStep]]

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent: Optional[Agent]

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt: Optional[str]

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pull_request: Optional[PullRequest]

WorkflowPullRequestStep represents a pull request creation step.

branch: Optional[str]

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description: Optional[str]

Description must be at most 20,000 characters:

size(this) <= 20000
draft: Optional[bool]
title: Optional[str]

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task: Optional[Task]

WorkflowTaskStep represents a task step that executes a command.

command: Optional[str]

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
trigger: Optional[SpecTrigger]

WorkflowExecutionTrigger represents a workflow execution trigger instance.

Context from the workflow trigger - copied at execution time for immutability. This allows the reconciler to create actions without fetching the workflow definition.

agent: Optional[Agent]

Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.

prompt: Optional[str]

Agent prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
from_trigger: Optional[object]

Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.

projects: Optional[Projects]

Execute workflow in specific project environments. Creates environments for each specified project.

project_ids: Optional[List[str]]
repositories: Optional[Repositories]

Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.

environment_class_id: Optional[str]
formatuuid
repo_selector: Optional[RepositoriesRepoSelector]

RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.

repo_search_string: Optional[str]

Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.

minLength1
scm_host: Optional[str]

SCM host where the search should be performed (e.g., “github.com”, “gitlab.com”)

minLength1
repository_urls: Optional[RepositoriesRepositoryURLs]

RepositoryURLs contains a list of explicit repository URLs. Creates one action per repository URL.

repo_urls: Optional[List[str]]
manual: Optional[object]

Manual trigger - empty message since no additional data needed

pull_request: Optional[SpecTriggerPullRequest]

PullRequest represents pull request metadata from source control systems. This message is used across workflow triggers, executions, and agent contexts to maintain consistent PR information throughout the system.

id: Optional[str]

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

author: Optional[str]

Author name as provided by the SCM system

draft: Optional[bool]

Whether this is a draft pull request

from_branch: Optional[str]

Source branch name (the branch being merged from)

repository: Optional[SpecTriggerPullRequestRepository]

Repository information

clone_url: Optional[str]
host: Optional[str]
name: Optional[str]
owner: Optional[str]
state: Optional[State]

Current state of the pull request

One of the following:
"STATE_UNSPECIFIED"
"STATE_OPEN"
"STATE_CLOSED"
"STATE_MERGED"
title: Optional[str]

Pull request title

to_branch: Optional[str]

Target branch name (the branch being merged into)

url: Optional[str]

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

time: Optional[SpecTriggerTime]

Time trigger - just the timestamp when it was triggered

triggered_at: Optional[datetime]

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
status: Optional[Status]

WorkflowExecutionStatus contains the current status of a workflow execution.

done_action_count: Optional[int]
formatint32
failed_action_count: Optional[int]
formatint32
failures: Optional[List[StatusFailure]]

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

code: Optional[Literal["WORKFLOW_ERROR_CODE_UNSPECIFIED", "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR", "WORKFLOW_ERROR_CODE_AGENT_ERROR"]]

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message: Optional[str]

Human-readable error message.

meta: Optional[Dict[str, str]]

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: Optional[str]

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

retry: Optional[StatusFailureRetry]

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

retriable: Optional[bool]

Whether the error is retriable.

retry_after: Optional[str]

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

formatregex
pending_action_count: Optional[int]
formatint32
phase: Optional[Literal["WORKFLOW_EXECUTION_PHASE_UNSPECIFIED", "WORKFLOW_EXECUTION_PHASE_PENDING", "WORKFLOW_EXECUTION_PHASE_RUNNING", 5 more]]
One of the following:
"WORKFLOW_EXECUTION_PHASE_UNSPECIFIED"
"WORKFLOW_EXECUTION_PHASE_PENDING"
"WORKFLOW_EXECUTION_PHASE_RUNNING"
"WORKFLOW_EXECUTION_PHASE_STOPPING"
"WORKFLOW_EXECUTION_PHASE_STOPPED"
"WORKFLOW_EXECUTION_PHASE_DELETING"
"WORKFLOW_EXECUTION_PHASE_DELETED"
"WORKFLOW_EXECUTION_PHASE_COMPLETED"
running_action_count: Optional[int]
formatint32
stopped_action_count: Optional[int]
formatint32
warnings: Optional[List[StatusWarning]]

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

code: Optional[Literal["WORKFLOW_ERROR_CODE_UNSPECIFIED", "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR", "WORKFLOW_ERROR_CODE_AGENT_ERROR"]]

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message: Optional[str]

Human-readable error message.

meta: Optional[Dict[str, str]]

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: Optional[str]

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

retry: Optional[StatusWarningRetry]

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

retriable: Optional[bool]

Whether the error is retriable.

retry_after: Optional[str]

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

formatregex
class WorkflowExecutionAction:

WorkflowExecutionAction represents a workflow execution action instance.

id: Optional[str]
formatuuid
metadata: Optional[Metadata]

WorkflowExecutionActionMetadata contains workflow execution action metadata.

action_name: Optional[str]

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.

finished_at: Optional[datetime]

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
started_at: Optional[datetime]

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
workflow_execution_id: Optional[str]
formatuuid
workflow_id: Optional[str]
formatuuid
spec: Optional[Spec]

WorkflowExecutionActionSpec contains the specification for this execution action.

context: Optional[AgentCodeContext]

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.

context_url: Optional[ContextURL]
environment_class_id: Optional[str]
formatuuid
url: Optional[str]
formaturi
environment_id: Optional[str]
formatuuid
project_id: Optional[str]
formatuuid
pull_request: Optional[PullRequest]

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: Optional[str]

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

author: Optional[str]

Author name as provided by the SCM system

draft: Optional[bool]

Whether this is a draft pull request

from_branch: Optional[str]

Source branch name (the branch being merged from)

repository: Optional[PullRequestRepository]

Repository information

clone_url: Optional[str]
host: Optional[str]
name: Optional[str]
owner: Optional[str]
state: Optional[State]

Current state of the pull request

One of the following:
"STATE_UNSPECIFIED"
"STATE_OPEN"
"STATE_CLOSED"
"STATE_MERGED"
title: Optional[str]

Pull request title

to_branch: Optional[str]

Target branch name (the branch being merged into)

url: Optional[str]

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

limits: Optional[SpecLimits]

PerExecution defines limits per execution action.

max_time: Optional[str]

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

formatregex
status: Optional[Status]

WorkflowExecutionActionStatus contains the current status of a workflow execution action.

agent_execution_id: Optional[str]
environment_id: Optional[str]
formatuuid
failures: Optional[List[StatusFailure]]

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

code: Optional[Literal["WORKFLOW_ERROR_CODE_UNSPECIFIED", "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR", "WORKFLOW_ERROR_CODE_AGENT_ERROR"]]

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message: Optional[str]

Human-readable error message.

meta: Optional[Dict[str, str]]

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: Optional[str]

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

retry: Optional[StatusFailureRetry]

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

retriable: Optional[bool]

Whether the error is retriable.

retry_after: Optional[str]

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

formatregex
phase: Optional[Literal["WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED", "WORKFLOW_EXECUTION_ACTION_PHASE_PENDING", "WORKFLOW_EXECUTION_ACTION_PHASE_RUNNING", 5 more]]

WorkflowExecutionActionPhase defines the phases of workflow execution action.

One of the following:
"WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED"
"WORKFLOW_EXECUTION_ACTION_PHASE_PENDING"
"WORKFLOW_EXECUTION_ACTION_PHASE_RUNNING"
"WORKFLOW_EXECUTION_ACTION_PHASE_STOPPING"
"WORKFLOW_EXECUTION_ACTION_PHASE_STOPPED"
"WORKFLOW_EXECUTION_ACTION_PHASE_DELETING"
"WORKFLOW_EXECUTION_ACTION_PHASE_DELETED"
"WORKFLOW_EXECUTION_ACTION_PHASE_DONE"
step_statuses: Optional[List[StatusStepStatus]]

Step-level progress tracking

error: Optional[StatusStepStatusError]

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

code: Optional[Literal["WORKFLOW_ERROR_CODE_UNSPECIFIED", "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR", "WORKFLOW_ERROR_CODE_AGENT_ERROR"]]

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message: Optional[str]

Human-readable error message.

meta: Optional[Dict[str, str]]

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: Optional[str]

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

retry: Optional[StatusStepStatusErrorRetry]

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

retriable: Optional[bool]

Whether the error is retriable.

retry_after: Optional[str]

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

formatregex
finished_at: Optional[datetime]

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: Optional[Literal["STEP_PHASE_UNSPECIFIED", "STEP_PHASE_PENDING", "STEP_PHASE_RUNNING", 3 more]]
One of the following:
"STEP_PHASE_UNSPECIFIED"
"STEP_PHASE_PENDING"
"STEP_PHASE_RUNNING"
"STEP_PHASE_DONE"
"STEP_PHASE_FAILED"
"STEP_PHASE_CANCELLED"
started_at: Optional[datetime]

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: Optional[WorkflowStep]

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

agent: Optional[Agent]

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt: Optional[str]

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pull_request: Optional[PullRequest]

WorkflowPullRequestStep represents a pull request creation step.

branch: Optional[str]

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description: Optional[str]

Description must be at most 20,000 characters:

size(this) <= 20000
draft: Optional[bool]
title: Optional[str]

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task: Optional[Task]

WorkflowTaskStep represents a task step that executes a command.

command: Optional[str]

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
step_index: Optional[int]

Index of the step in the workflow action steps array

formatint32
warnings: Optional[List[StatusWarning]]

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

code: Optional[Literal["WORKFLOW_ERROR_CODE_UNSPECIFIED", "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR", "WORKFLOW_ERROR_CODE_AGENT_ERROR"]]

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message: Optional[str]

Human-readable error message.

meta: Optional[Dict[str, str]]

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: Optional[str]

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

retry: Optional[StatusWarningRetry]

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

retriable: Optional[bool]

Whether the error is retriable.

retry_after: Optional[str]

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

formatregex
class WorkflowStep:

WorkflowStep defines a single step in a workflow action.

agent: Optional[Agent]

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt: Optional[str]

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pull_request: Optional[PullRequest]

WorkflowPullRequestStep represents a pull request creation step.

branch: Optional[str]

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description: Optional[str]

Description must be at most 20,000 characters:

size(this) <= 20000
draft: Optional[bool]
title: Optional[str]

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task: Optional[Task]

WorkflowTaskStep represents a task step that executes a command.

command: Optional[str]

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
class WorkflowTrigger:

WorkflowTrigger defines when a workflow should be executed.

Each trigger type defines a specific condition that will cause the workflow to execute:

  • Manual: Triggered explicitly by user action via StartWorkflow RPC
  • Time: Triggered automatically based on cron schedule
  • PullRequest: Triggered automatically when specified PR events occur

Trigger Semantics:

  • Each trigger instance can create multiple workflow executions
  • Multiple triggers of the same workflow can fire simultaneously
  • Each trigger execution is independent and tracked separately
  • Triggers are evaluated in the context specified by WorkflowTriggerContext

WorkflowTriggerContext defines the context in which a workflow should run.

Context determines where and how the workflow executes:

  • Projects: Execute in specific project environments
  • Repositories: Execute in environments created from repository URLs
  • Agent: Execute in agent-managed environments with custom prompts
  • FromTrigger: Use context derived from the trigger event (PR-specific)

Context Usage by Trigger Type:

  • Manual: Can use any context type
  • Time: Typically uses Projects or Repositories context
  • PullRequest: Can use any context, FromTrigger uses PR repository context
agent: Optional[Agent]

Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.

prompt: Optional[str]

Agent prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
from_trigger: Optional[object]

Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.

projects: Optional[Projects]

Execute workflow in specific project environments. Creates environments for each specified project.

project_ids: Optional[List[str]]
repositories: Optional[Repositories]

Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.

environment_class_id: Optional[str]
formatuuid
repo_selector: Optional[RepositoriesRepoSelector]

RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.

repo_search_string: Optional[str]

Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.

minLength1
scm_host: Optional[str]

SCM host where the search should be performed (e.g., “github.com”, “gitlab.com”)

minLength1
repository_urls: Optional[RepositoriesRepositoryURLs]

RepositoryURLs contains a list of explicit repository URLs. Creates one action per repository URL.

repo_urls: Optional[List[str]]
manual: Optional[object]

Manual trigger - executed when StartWorkflow RPC is called. No additional configuration needed.

pull_request: Optional[PullRequest]

Pull request trigger - executed when specified PR events occur. Only triggers for PRs in repositories matching the trigger context.

events: Optional[List[Literal["PULL_REQUEST_EVENT_UNSPECIFIED", "PULL_REQUEST_EVENT_OPENED", "PULL_REQUEST_EVENT_UPDATED", 4 more]]]
One of the following:
"PULL_REQUEST_EVENT_UNSPECIFIED"
"PULL_REQUEST_EVENT_OPENED"
"PULL_REQUEST_EVENT_UPDATED"
"PULL_REQUEST_EVENT_APPROVED"
"PULL_REQUEST_EVENT_MERGED"
"PULL_REQUEST_EVENT_CLOSED"
"PULL_REQUEST_EVENT_READY_FOR_REVIEW"
integration_id: Optional[str]

integration_id is the optional ID of an integration that acts as the source of webhook events. When set, the trigger will be activated when the webhook receives events.

formatuuid
webhook_id: Optional[str]

webhook_id is the optional ID of a webhook that this trigger is bound to. When set, the trigger will be activated when the webhook receives events. This allows multiple workflows to share a single webhook endpoint.

formatuuid
time: Optional[Time]

Time-based trigger - executed automatically based on cron schedule. Uses standard cron expression format (minute hour day month weekday).

cron_expression: Optional[str]

Cron expression must be between 1 and 100 characters:

size(this) >= 1 && size(this) <= 100
class WorkflowTriggerContext:

WorkflowTriggerContext defines the context in which a workflow should run.

Context determines where and how the workflow executes:

  • Projects: Execute in specific project environments
  • Repositories: Execute in environments created from repository URLs
  • Agent: Execute in agent-managed environments with custom prompts
  • FromTrigger: Use context derived from the trigger event (PR-specific)

Context Usage by Trigger Type:

  • Manual: Can use any context type
  • Time: Typically uses Projects or Repositories context
  • PullRequest: Can use any context, FromTrigger uses PR repository context
agent: Optional[Agent]

Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.

prompt: Optional[str]

Agent prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
from_trigger: Optional[object]

Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.

projects: Optional[Projects]

Execute workflow in specific project environments. Creates environments for each specified project.

project_ids: Optional[List[str]]
repositories: Optional[Repositories]

Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.

environment_class_id: Optional[str]
formatuuid
repo_selector: Optional[RepositoriesRepoSelector]

RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.

repo_search_string: Optional[str]

Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.

minLength1
scm_host: Optional[str]

SCM host where the search should be performed (e.g., “github.com”, “gitlab.com”)

minLength1
repository_urls: Optional[RepositoriesRepositoryURLs]

RepositoryURLs contains a list of explicit repository URLs. Creates one action per repository URL.

repo_urls: Optional[List[str]]
class AutomationCreateResponse:
workflow: Optional[Workflow]

Workflow represents a workflow configuration.

id: Optional[str]
formatuuid
metadata: Optional[Metadata]

WorkflowMetadata contains workflow metadata.

created_at: Optional[datetime]

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
creator: Optional[Subject]
id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
description: Optional[str]
maxLength500
executor: Optional[Subject]
id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
name: Optional[str]
maxLength80
minLength1
updated_at: Optional[datetime]

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
spec: Optional[Spec]
action: Optional[WorkflowAction]

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
max_parallel: Optional[int]

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
max_total: Optional[int]

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
per_execution: Optional[LimitsPerExecution]

PerExecution defines limits per execution action.

max_time: Optional[str]

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

formatregex
steps: Optional[List[WorkflowStep]]

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent: Optional[Agent]

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt: Optional[str]

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pull_request: Optional[PullRequest]

WorkflowPullRequestStep represents a pull request creation step.

branch: Optional[str]

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description: Optional[str]

Description must be at most 20,000 characters:

size(this) <= 20000
draft: Optional[bool]
title: Optional[str]

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task: Optional[Task]

WorkflowTaskStep represents a task step that executes a command.

command: Optional[str]

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
report: Optional[WorkflowAction]

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
max_parallel: Optional[int]

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
max_total: Optional[int]

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
per_execution: Optional[LimitsPerExecution]

PerExecution defines limits per execution action.

max_time: Optional[str]

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

formatregex
steps: Optional[List[WorkflowStep]]

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent: Optional[Agent]

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt: Optional[str]

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pull_request: Optional[PullRequest]

WorkflowPullRequestStep represents a pull request creation step.

branch: Optional[str]

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description: Optional[str]

Description must be at most 20,000 characters:

size(this) <= 20000
draft: Optional[bool]
title: Optional[str]

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task: Optional[Task]

WorkflowTaskStep represents a task step that executes a command.

command: Optional[str]

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
triggers: Optional[List[WorkflowTrigger]]

WorkflowTriggerContext defines the context in which a workflow should run.

Context determines where and how the workflow executes:

  • Projects: Execute in specific project environments
  • Repositories: Execute in environments created from repository URLs
  • Agent: Execute in agent-managed environments with custom prompts
  • FromTrigger: Use context derived from the trigger event (PR-specific)

Context Usage by Trigger Type:

  • Manual: Can use any context type
  • Time: Typically uses Projects or Repositories context
  • PullRequest: Can use any context, FromTrigger uses PR repository context
agent: Optional[Agent]

Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.

prompt: Optional[str]

Agent prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
from_trigger: Optional[object]

Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.

projects: Optional[Projects]

Execute workflow in specific project environments. Creates environments for each specified project.

project_ids: Optional[List[str]]
repositories: Optional[Repositories]

Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.

environment_class_id: Optional[str]
formatuuid
repo_selector: Optional[RepositoriesRepoSelector]

RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.

repo_search_string: Optional[str]

Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.

minLength1
scm_host: Optional[str]

SCM host where the search should be performed (e.g., “github.com”, “gitlab.com”)

minLength1
repository_urls: Optional[RepositoriesRepositoryURLs]

RepositoryURLs contains a list of explicit repository URLs. Creates one action per repository URL.

repo_urls: Optional[List[str]]
manual: Optional[object]

Manual trigger - executed when StartWorkflow RPC is called. No additional configuration needed.

pull_request: Optional[PullRequest]

Pull request trigger - executed when specified PR events occur. Only triggers for PRs in repositories matching the trigger context.

events: Optional[List[Literal["PULL_REQUEST_EVENT_UNSPECIFIED", "PULL_REQUEST_EVENT_OPENED", "PULL_REQUEST_EVENT_UPDATED", 4 more]]]
One of the following:
"PULL_REQUEST_EVENT_UNSPECIFIED"
"PULL_REQUEST_EVENT_OPENED"
"PULL_REQUEST_EVENT_UPDATED"
"PULL_REQUEST_EVENT_APPROVED"
"PULL_REQUEST_EVENT_MERGED"
"PULL_REQUEST_EVENT_CLOSED"
"PULL_REQUEST_EVENT_READY_FOR_REVIEW"
integration_id: Optional[str]

integration_id is the optional ID of an integration that acts as the source of webhook events. When set, the trigger will be activated when the webhook receives events.

formatuuid
webhook_id: Optional[str]

webhook_id is the optional ID of a webhook that this trigger is bound to. When set, the trigger will be activated when the webhook receives events. This allows multiple workflows to share a single webhook endpoint.

formatuuid
time: Optional[Time]

Time-based trigger - executed automatically based on cron schedule. Uses standard cron expression format (minute hour day month weekday).

cron_expression: Optional[str]

Cron expression must be between 1 and 100 characters:

size(this) >= 1 && size(this) <= 100
webhook_url: Optional[str]

Webhook URL for triggering this workflow via HTTP POST Format: {base_url}/workflows/{workflow_id}/webhooks

class AutomationListExecutionOutputsResponse:
action_id: Optional[str]
values: Optional[Dict[str, Values]]
bool_value: Optional[bool]
float_value: Optional[float]
formatdouble
int_value: Optional[str]
string_value: Optional[str]
maxLength4096
class AutomationRetrieveResponse:
workflow: Optional[Workflow]

Workflow represents a workflow configuration.

id: Optional[str]
formatuuid
metadata: Optional[Metadata]

WorkflowMetadata contains workflow metadata.

created_at: Optional[datetime]

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
creator: Optional[Subject]
id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
description: Optional[str]
maxLength500
executor: Optional[Subject]
id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
name: Optional[str]
maxLength80
minLength1
updated_at: Optional[datetime]

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
spec: Optional[Spec]
action: Optional[WorkflowAction]

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
max_parallel: Optional[int]

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
max_total: Optional[int]

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
per_execution: Optional[LimitsPerExecution]

PerExecution defines limits per execution action.

max_time: Optional[str]

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

formatregex
steps: Optional[List[WorkflowStep]]

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent: Optional[Agent]

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt: Optional[str]

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pull_request: Optional[PullRequest]

WorkflowPullRequestStep represents a pull request creation step.

branch: Optional[str]

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description: Optional[str]

Description must be at most 20,000 characters:

size(this) <= 20000
draft: Optional[bool]
title: Optional[str]

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task: Optional[Task]

WorkflowTaskStep represents a task step that executes a command.

command: Optional[str]

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
report: Optional[WorkflowAction]

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
max_parallel: Optional[int]

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
max_total: Optional[int]

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
per_execution: Optional[LimitsPerExecution]

PerExecution defines limits per execution action.

max_time: Optional[str]

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

formatregex
steps: Optional[List[WorkflowStep]]

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent: Optional[Agent]

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt: Optional[str]

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pull_request: Optional[PullRequest]

WorkflowPullRequestStep represents a pull request creation step.

branch: Optional[str]

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description: Optional[str]

Description must be at most 20,000 characters:

size(this) <= 20000
draft: Optional[bool]
title: Optional[str]

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task: Optional[Task]

WorkflowTaskStep represents a task step that executes a command.

command: Optional[str]

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
triggers: Optional[List[WorkflowTrigger]]

WorkflowTriggerContext defines the context in which a workflow should run.

Context determines where and how the workflow executes:

  • Projects: Execute in specific project environments
  • Repositories: Execute in environments created from repository URLs
  • Agent: Execute in agent-managed environments with custom prompts
  • FromTrigger: Use context derived from the trigger event (PR-specific)

Context Usage by Trigger Type:

  • Manual: Can use any context type
  • Time: Typically uses Projects or Repositories context
  • PullRequest: Can use any context, FromTrigger uses PR repository context
agent: Optional[Agent]

Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.

prompt: Optional[str]

Agent prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
from_trigger: Optional[object]

Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.

projects: Optional[Projects]

Execute workflow in specific project environments. Creates environments for each specified project.

project_ids: Optional[List[str]]
repositories: Optional[Repositories]

Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.

environment_class_id: Optional[str]
formatuuid
repo_selector: Optional[RepositoriesRepoSelector]

RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.

repo_search_string: Optional[str]

Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.

minLength1
scm_host: Optional[str]

SCM host where the search should be performed (e.g., “github.com”, “gitlab.com”)

minLength1
repository_urls: Optional[RepositoriesRepositoryURLs]

RepositoryURLs contains a list of explicit repository URLs. Creates one action per repository URL.

repo_urls: Optional[List[str]]
manual: Optional[object]

Manual trigger - executed when StartWorkflow RPC is called. No additional configuration needed.

pull_request: Optional[PullRequest]

Pull request trigger - executed when specified PR events occur. Only triggers for PRs in repositories matching the trigger context.

events: Optional[List[Literal["PULL_REQUEST_EVENT_UNSPECIFIED", "PULL_REQUEST_EVENT_OPENED", "PULL_REQUEST_EVENT_UPDATED", 4 more]]]
One of the following:
"PULL_REQUEST_EVENT_UNSPECIFIED"
"PULL_REQUEST_EVENT_OPENED"
"PULL_REQUEST_EVENT_UPDATED"
"PULL_REQUEST_EVENT_APPROVED"
"PULL_REQUEST_EVENT_MERGED"
"PULL_REQUEST_EVENT_CLOSED"
"PULL_REQUEST_EVENT_READY_FOR_REVIEW"
integration_id: Optional[str]

integration_id is the optional ID of an integration that acts as the source of webhook events. When set, the trigger will be activated when the webhook receives events.

formatuuid
webhook_id: Optional[str]

webhook_id is the optional ID of a webhook that this trigger is bound to. When set, the trigger will be activated when the webhook receives events. This allows multiple workflows to share a single webhook endpoint.

formatuuid
time: Optional[Time]

Time-based trigger - executed automatically based on cron schedule. Uses standard cron expression format (minute hour day month weekday).

cron_expression: Optional[str]

Cron expression must be between 1 and 100 characters:

size(this) >= 1 && size(this) <= 100
webhook_url: Optional[str]

Webhook URL for triggering this workflow via HTTP POST Format: {base_url}/workflows/{workflow_id}/webhooks

class AutomationRetrieveExecutionResponse:
workflow_execution: Optional[WorkflowExecution]

WorkflowExecution represents a workflow execution instance.

id: Optional[str]
formatuuid
metadata: Optional[Metadata]

WorkflowExecutionMetadata contains workflow execution metadata.

creator: Optional[Subject]
id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
executor: Optional[Subject]
id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
finished_at: Optional[datetime]

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
started_at: Optional[datetime]

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
workflow_id: Optional[str]
formatuuid
spec: Optional[Spec]

WorkflowExecutionSpec contains the specification used for this execution.

action: Optional[WorkflowAction]

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
max_parallel: Optional[int]

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
max_total: Optional[int]

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
per_execution: Optional[LimitsPerExecution]

PerExecution defines limits per execution action.

max_time: Optional[str]

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

formatregex
steps: Optional[List[WorkflowStep]]

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent: Optional[Agent]

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt: Optional[str]

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pull_request: Optional[PullRequest]

WorkflowPullRequestStep represents a pull request creation step.

branch: Optional[str]

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description: Optional[str]

Description must be at most 20,000 characters:

size(this) <= 20000
draft: Optional[bool]
title: Optional[str]

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task: Optional[Task]

WorkflowTaskStep represents a task step that executes a command.

command: Optional[str]

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
report: Optional[WorkflowAction]

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
max_parallel: Optional[int]

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
max_total: Optional[int]

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
per_execution: Optional[LimitsPerExecution]

PerExecution defines limits per execution action.

max_time: Optional[str]

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

formatregex
steps: Optional[List[WorkflowStep]]

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent: Optional[Agent]

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt: Optional[str]

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pull_request: Optional[PullRequest]

WorkflowPullRequestStep represents a pull request creation step.

branch: Optional[str]

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description: Optional[str]

Description must be at most 20,000 characters:

size(this) <= 20000
draft: Optional[bool]
title: Optional[str]

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task: Optional[Task]

WorkflowTaskStep represents a task step that executes a command.

command: Optional[str]

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
trigger: Optional[SpecTrigger]

WorkflowExecutionTrigger represents a workflow execution trigger instance.

Context from the workflow trigger - copied at execution time for immutability. This allows the reconciler to create actions without fetching the workflow definition.

agent: Optional[Agent]

Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.

prompt: Optional[str]

Agent prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
from_trigger: Optional[object]

Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.

projects: Optional[Projects]

Execute workflow in specific project environments. Creates environments for each specified project.

project_ids: Optional[List[str]]
repositories: Optional[Repositories]

Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.

environment_class_id: Optional[str]
formatuuid
repo_selector: Optional[RepositoriesRepoSelector]

RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.

repo_search_string: Optional[str]

Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.

minLength1
scm_host: Optional[str]

SCM host where the search should be performed (e.g., “github.com”, “gitlab.com”)

minLength1
repository_urls: Optional[RepositoriesRepositoryURLs]

RepositoryURLs contains a list of explicit repository URLs. Creates one action per repository URL.

repo_urls: Optional[List[str]]
manual: Optional[object]

Manual trigger - empty message since no additional data needed

pull_request: Optional[SpecTriggerPullRequest]

PullRequest represents pull request metadata from source control systems. This message is used across workflow triggers, executions, and agent contexts to maintain consistent PR information throughout the system.

id: Optional[str]

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

author: Optional[str]

Author name as provided by the SCM system

draft: Optional[bool]

Whether this is a draft pull request

from_branch: Optional[str]

Source branch name (the branch being merged from)

repository: Optional[SpecTriggerPullRequestRepository]

Repository information

clone_url: Optional[str]
host: Optional[str]
name: Optional[str]
owner: Optional[str]
state: Optional[State]

Current state of the pull request

One of the following:
"STATE_UNSPECIFIED"
"STATE_OPEN"
"STATE_CLOSED"
"STATE_MERGED"
title: Optional[str]

Pull request title

to_branch: Optional[str]

Target branch name (the branch being merged into)

url: Optional[str]

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

time: Optional[SpecTriggerTime]

Time trigger - just the timestamp when it was triggered

triggered_at: Optional[datetime]

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
status: Optional[Status]

WorkflowExecutionStatus contains the current status of a workflow execution.

done_action_count: Optional[int]
formatint32
failed_action_count: Optional[int]
formatint32
failures: Optional[List[StatusFailure]]

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

code: Optional[Literal["WORKFLOW_ERROR_CODE_UNSPECIFIED", "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR", "WORKFLOW_ERROR_CODE_AGENT_ERROR"]]

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message: Optional[str]

Human-readable error message.

meta: Optional[Dict[str, str]]

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: Optional[str]

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

retry: Optional[StatusFailureRetry]

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

retriable: Optional[bool]

Whether the error is retriable.

retry_after: Optional[str]

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

formatregex
pending_action_count: Optional[int]
formatint32
phase: Optional[Literal["WORKFLOW_EXECUTION_PHASE_UNSPECIFIED", "WORKFLOW_EXECUTION_PHASE_PENDING", "WORKFLOW_EXECUTION_PHASE_RUNNING", 5 more]]
One of the following:
"WORKFLOW_EXECUTION_PHASE_UNSPECIFIED"
"WORKFLOW_EXECUTION_PHASE_PENDING"
"WORKFLOW_EXECUTION_PHASE_RUNNING"
"WORKFLOW_EXECUTION_PHASE_STOPPING"
"WORKFLOW_EXECUTION_PHASE_STOPPED"
"WORKFLOW_EXECUTION_PHASE_DELETING"
"WORKFLOW_EXECUTION_PHASE_DELETED"
"WORKFLOW_EXECUTION_PHASE_COMPLETED"
running_action_count: Optional[int]
formatint32
stopped_action_count: Optional[int]
formatint32
warnings: Optional[List[StatusWarning]]

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

code: Optional[Literal["WORKFLOW_ERROR_CODE_UNSPECIFIED", "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR", "WORKFLOW_ERROR_CODE_AGENT_ERROR"]]

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message: Optional[str]

Human-readable error message.

meta: Optional[Dict[str, str]]

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: Optional[str]

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

retry: Optional[StatusWarningRetry]

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

retriable: Optional[bool]

Whether the error is retriable.

retry_after: Optional[str]

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

formatregex
class AutomationRetrieveExecutionActionResponse:
workflow_execution_action: Optional[WorkflowExecutionAction]

WorkflowExecutionAction represents a workflow execution action instance.

id: Optional[str]
formatuuid
metadata: Optional[Metadata]

WorkflowExecutionActionMetadata contains workflow execution action metadata.

action_name: Optional[str]

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.

finished_at: Optional[datetime]

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
started_at: Optional[datetime]

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
workflow_execution_id: Optional[str]
formatuuid
workflow_id: Optional[str]
formatuuid
spec: Optional[Spec]

WorkflowExecutionActionSpec contains the specification for this execution action.

context: Optional[AgentCodeContext]

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.

context_url: Optional[ContextURL]
environment_class_id: Optional[str]
formatuuid
url: Optional[str]
formaturi
environment_id: Optional[str]
formatuuid
project_id: Optional[str]
formatuuid
pull_request: Optional[PullRequest]

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: Optional[str]

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

author: Optional[str]

Author name as provided by the SCM system

draft: Optional[bool]

Whether this is a draft pull request

from_branch: Optional[str]

Source branch name (the branch being merged from)

repository: Optional[PullRequestRepository]

Repository information

clone_url: Optional[str]
host: Optional[str]
name: Optional[str]
owner: Optional[str]
state: Optional[State]

Current state of the pull request

One of the following:
"STATE_UNSPECIFIED"
"STATE_OPEN"
"STATE_CLOSED"
"STATE_MERGED"
title: Optional[str]

Pull request title

to_branch: Optional[str]

Target branch name (the branch being merged into)

url: Optional[str]

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

limits: Optional[SpecLimits]

PerExecution defines limits per execution action.

max_time: Optional[str]

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

formatregex
status: Optional[Status]

WorkflowExecutionActionStatus contains the current status of a workflow execution action.

agent_execution_id: Optional[str]
environment_id: Optional[str]
formatuuid
failures: Optional[List[StatusFailure]]

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

code: Optional[Literal["WORKFLOW_ERROR_CODE_UNSPECIFIED", "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR", "WORKFLOW_ERROR_CODE_AGENT_ERROR"]]

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message: Optional[str]

Human-readable error message.

meta: Optional[Dict[str, str]]

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: Optional[str]

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

retry: Optional[StatusFailureRetry]

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

retriable: Optional[bool]

Whether the error is retriable.

retry_after: Optional[str]

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

formatregex
phase: Optional[Literal["WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED", "WORKFLOW_EXECUTION_ACTION_PHASE_PENDING", "WORKFLOW_EXECUTION_ACTION_PHASE_RUNNING", 5 more]]

WorkflowExecutionActionPhase defines the phases of workflow execution action.

One of the following:
"WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED"
"WORKFLOW_EXECUTION_ACTION_PHASE_PENDING"
"WORKFLOW_EXECUTION_ACTION_PHASE_RUNNING"
"WORKFLOW_EXECUTION_ACTION_PHASE_STOPPING"
"WORKFLOW_EXECUTION_ACTION_PHASE_STOPPED"
"WORKFLOW_EXECUTION_ACTION_PHASE_DELETING"
"WORKFLOW_EXECUTION_ACTION_PHASE_DELETED"
"WORKFLOW_EXECUTION_ACTION_PHASE_DONE"
step_statuses: Optional[List[StatusStepStatus]]

Step-level progress tracking

error: Optional[StatusStepStatusError]

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

code: Optional[Literal["WORKFLOW_ERROR_CODE_UNSPECIFIED", "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR", "WORKFLOW_ERROR_CODE_AGENT_ERROR"]]

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message: Optional[str]

Human-readable error message.

meta: Optional[Dict[str, str]]

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: Optional[str]

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

retry: Optional[StatusStepStatusErrorRetry]

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

retriable: Optional[bool]

Whether the error is retriable.

retry_after: Optional[str]

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

formatregex
finished_at: Optional[datetime]

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: Optional[Literal["STEP_PHASE_UNSPECIFIED", "STEP_PHASE_PENDING", "STEP_PHASE_RUNNING", 3 more]]
One of the following:
"STEP_PHASE_UNSPECIFIED"
"STEP_PHASE_PENDING"
"STEP_PHASE_RUNNING"
"STEP_PHASE_DONE"
"STEP_PHASE_FAILED"
"STEP_PHASE_CANCELLED"
started_at: Optional[datetime]

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: Optional[WorkflowStep]

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

agent: Optional[Agent]

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt: Optional[str]

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pull_request: Optional[PullRequest]

WorkflowPullRequestStep represents a pull request creation step.

branch: Optional[str]

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description: Optional[str]

Description must be at most 20,000 characters:

size(this) <= 20000
draft: Optional[bool]
title: Optional[str]

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task: Optional[Task]

WorkflowTaskStep represents a task step that executes a command.

command: Optional[str]

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
step_index: Optional[int]

Index of the step in the workflow action steps array

formatint32
warnings: Optional[List[StatusWarning]]

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

code: Optional[Literal["WORKFLOW_ERROR_CODE_UNSPECIFIED", "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR", "WORKFLOW_ERROR_CODE_AGENT_ERROR"]]

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message: Optional[str]

Human-readable error message.

meta: Optional[Dict[str, str]]

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: Optional[str]

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

retry: Optional[StatusWarningRetry]

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

retriable: Optional[bool]

Whether the error is retriable.

retry_after: Optional[str]

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

formatregex
class AutomationStartExecutionResponse:
workflow_execution: Optional[WorkflowExecution]

WorkflowExecution represents a workflow execution instance.

id: Optional[str]
formatuuid
metadata: Optional[Metadata]

WorkflowExecutionMetadata contains workflow execution metadata.

creator: Optional[Subject]
id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
executor: Optional[Subject]
id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
finished_at: Optional[datetime]

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
started_at: Optional[datetime]

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
workflow_id: Optional[str]
formatuuid
spec: Optional[Spec]

WorkflowExecutionSpec contains the specification used for this execution.

action: Optional[WorkflowAction]

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
max_parallel: Optional[int]

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
max_total: Optional[int]

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
per_execution: Optional[LimitsPerExecution]

PerExecution defines limits per execution action.

max_time: Optional[str]

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

formatregex
steps: Optional[List[WorkflowStep]]

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent: Optional[Agent]

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt: Optional[str]

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pull_request: Optional[PullRequest]

WorkflowPullRequestStep represents a pull request creation step.

branch: Optional[str]

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description: Optional[str]

Description must be at most 20,000 characters:

size(this) <= 20000
draft: Optional[bool]
title: Optional[str]

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task: Optional[Task]

WorkflowTaskStep represents a task step that executes a command.

command: Optional[str]

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
report: Optional[WorkflowAction]

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
max_parallel: Optional[int]

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
max_total: Optional[int]

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
per_execution: Optional[LimitsPerExecution]

PerExecution defines limits per execution action.

max_time: Optional[str]

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

formatregex
steps: Optional[List[WorkflowStep]]

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent: Optional[Agent]

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt: Optional[str]

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pull_request: Optional[PullRequest]

WorkflowPullRequestStep represents a pull request creation step.

branch: Optional[str]

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description: Optional[str]

Description must be at most 20,000 characters:

size(this) <= 20000
draft: Optional[bool]
title: Optional[str]

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task: Optional[Task]

WorkflowTaskStep represents a task step that executes a command.

command: Optional[str]

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
trigger: Optional[SpecTrigger]

WorkflowExecutionTrigger represents a workflow execution trigger instance.

Context from the workflow trigger - copied at execution time for immutability. This allows the reconciler to create actions without fetching the workflow definition.

agent: Optional[Agent]

Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.

prompt: Optional[str]

Agent prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
from_trigger: Optional[object]

Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.

projects: Optional[Projects]

Execute workflow in specific project environments. Creates environments for each specified project.

project_ids: Optional[List[str]]
repositories: Optional[Repositories]

Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.

environment_class_id: Optional[str]
formatuuid
repo_selector: Optional[RepositoriesRepoSelector]

RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.

repo_search_string: Optional[str]

Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.

minLength1
scm_host: Optional[str]

SCM host where the search should be performed (e.g., “github.com”, “gitlab.com”)

minLength1
repository_urls: Optional[RepositoriesRepositoryURLs]

RepositoryURLs contains a list of explicit repository URLs. Creates one action per repository URL.

repo_urls: Optional[List[str]]
manual: Optional[object]

Manual trigger - empty message since no additional data needed

pull_request: Optional[SpecTriggerPullRequest]

PullRequest represents pull request metadata from source control systems. This message is used across workflow triggers, executions, and agent contexts to maintain consistent PR information throughout the system.

id: Optional[str]

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

author: Optional[str]

Author name as provided by the SCM system

draft: Optional[bool]

Whether this is a draft pull request

from_branch: Optional[str]

Source branch name (the branch being merged from)

repository: Optional[SpecTriggerPullRequestRepository]

Repository information

clone_url: Optional[str]
host: Optional[str]
name: Optional[str]
owner: Optional[str]
state: Optional[State]

Current state of the pull request

One of the following:
"STATE_UNSPECIFIED"
"STATE_OPEN"
"STATE_CLOSED"
"STATE_MERGED"
title: Optional[str]

Pull request title

to_branch: Optional[str]

Target branch name (the branch being merged into)

url: Optional[str]

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

time: Optional[SpecTriggerTime]

Time trigger - just the timestamp when it was triggered

triggered_at: Optional[datetime]

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
status: Optional[Status]

WorkflowExecutionStatus contains the current status of a workflow execution.

done_action_count: Optional[int]
formatint32
failed_action_count: Optional[int]
formatint32
failures: Optional[List[StatusFailure]]

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

code: Optional[Literal["WORKFLOW_ERROR_CODE_UNSPECIFIED", "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR", "WORKFLOW_ERROR_CODE_AGENT_ERROR"]]

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message: Optional[str]

Human-readable error message.

meta: Optional[Dict[str, str]]

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: Optional[str]

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

retry: Optional[StatusFailureRetry]

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

retriable: Optional[bool]

Whether the error is retriable.

retry_after: Optional[str]

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

formatregex
pending_action_count: Optional[int]
formatint32
phase: Optional[Literal["WORKFLOW_EXECUTION_PHASE_UNSPECIFIED", "WORKFLOW_EXECUTION_PHASE_PENDING", "WORKFLOW_EXECUTION_PHASE_RUNNING", 5 more]]
One of the following:
"WORKFLOW_EXECUTION_PHASE_UNSPECIFIED"
"WORKFLOW_EXECUTION_PHASE_PENDING"
"WORKFLOW_EXECUTION_PHASE_RUNNING"
"WORKFLOW_EXECUTION_PHASE_STOPPING"
"WORKFLOW_EXECUTION_PHASE_STOPPED"
"WORKFLOW_EXECUTION_PHASE_DELETING"
"WORKFLOW_EXECUTION_PHASE_DELETED"
"WORKFLOW_EXECUTION_PHASE_COMPLETED"
running_action_count: Optional[int]
formatint32
stopped_action_count: Optional[int]
formatint32
warnings: Optional[List[StatusWarning]]

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

code: Optional[Literal["WORKFLOW_ERROR_CODE_UNSPECIFIED", "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR", "WORKFLOW_ERROR_CODE_AGENT_ERROR"]]

Error code identifying the type of error.

One of the following:
"WORKFLOW_ERROR_CODE_UNSPECIFIED"
"WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR"
"WORKFLOW_ERROR_CODE_AGENT_ERROR"
message: Optional[str]

Human-readable error message.

meta: Optional[Dict[str, str]]

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: Optional[str]

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

retry: Optional[StatusWarningRetry]

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

retriable: Optional[bool]

Whether the error is retriable.

retry_after: Optional[str]

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

formatregex
class AutomationUpdateResponse:
workflow: Optional[Workflow]

Workflow represents a workflow configuration.

id: Optional[str]
formatuuid
metadata: Optional[Metadata]

WorkflowMetadata contains workflow metadata.

created_at: Optional[datetime]

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
creator: Optional[Subject]
id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
description: Optional[str]
maxLength500
executor: Optional[Subject]
id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
name: Optional[str]
maxLength80
minLength1
updated_at: Optional[datetime]

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
spec: Optional[Spec]
action: Optional[WorkflowAction]

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
max_parallel: Optional[int]

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
max_total: Optional[int]

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
per_execution: Optional[LimitsPerExecution]

PerExecution defines limits per execution action.

max_time: Optional[str]

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

formatregex
steps: Optional[List[WorkflowStep]]

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent: Optional[Agent]

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt: Optional[str]

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pull_request: Optional[PullRequest]

WorkflowPullRequestStep represents a pull request creation step.

branch: Optional[str]

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description: Optional[str]

Description must be at most 20,000 characters:

size(this) <= 20000
draft: Optional[bool]
title: Optional[str]

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task: Optional[Task]

WorkflowTaskStep represents a task step that executes a command.

command: Optional[str]

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
report: Optional[WorkflowAction]

WorkflowAction defines the actions to be executed in a workflow.

limits: Limits

Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:

this.max_parallel <= this.max_total
max_parallel: Optional[int]

Maximum parallel actions must be between 1 and 25:

this >= 1 && this <= 25
formatint32
max_total: Optional[int]

Maximum total actions must be between 1 and 100:

this >= 1 && this <= 100
formatint32
per_execution: Optional[LimitsPerExecution]

PerExecution defines limits per execution action.

max_time: Optional[str]

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

formatregex
steps: Optional[List[WorkflowStep]]

Automation must have between 1 and 50 steps:

size(this) >= 1 && size(this) <= 50
agent: Optional[Agent]

WorkflowAgentStep represents an agent step that executes with a prompt.

prompt: Optional[str]

Prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
pull_request: Optional[PullRequest]

WorkflowPullRequestStep represents a pull request creation step.

branch: Optional[str]

Branch name must be between 1 and 255 characters:

size(this) >= 1 && size(this) <= 255
description: Optional[str]

Description must be at most 20,000 characters:

size(this) <= 20000
draft: Optional[bool]
title: Optional[str]

Title must be between 1 and 500 characters:

size(this) >= 1 && size(this) <= 500
task: Optional[Task]

WorkflowTaskStep represents a task step that executes a command.

command: Optional[str]

Command must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
triggers: Optional[List[WorkflowTrigger]]

WorkflowTriggerContext defines the context in which a workflow should run.

Context determines where and how the workflow executes:

  • Projects: Execute in specific project environments
  • Repositories: Execute in environments created from repository URLs
  • Agent: Execute in agent-managed environments with custom prompts
  • FromTrigger: Use context derived from the trigger event (PR-specific)

Context Usage by Trigger Type:

  • Manual: Can use any context type
  • Time: Typically uses Projects or Repositories context
  • PullRequest: Can use any context, FromTrigger uses PR repository context
agent: Optional[Agent]

Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.

prompt: Optional[str]

Agent prompt must be between 1 and 20,000 characters:

size(this) >= 1 && size(this) <= 20000
from_trigger: Optional[object]

Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.

projects: Optional[Projects]

Execute workflow in specific project environments. Creates environments for each specified project.

project_ids: Optional[List[str]]
repositories: Optional[Repositories]

Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.

environment_class_id: Optional[str]
formatuuid
repo_selector: Optional[RepositoriesRepoSelector]

RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.

repo_search_string: Optional[str]

Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.

minLength1
scm_host: Optional[str]

SCM host where the search should be performed (e.g., “github.com”, “gitlab.com”)

minLength1
repository_urls: Optional[RepositoriesRepositoryURLs]

RepositoryURLs contains a list of explicit repository URLs. Creates one action per repository URL.

repo_urls: Optional[List[str]]
manual: Optional[object]

Manual trigger - executed when StartWorkflow RPC is called. No additional configuration needed.

pull_request: Optional[PullRequest]

Pull request trigger - executed when specified PR events occur. Only triggers for PRs in repositories matching the trigger context.

events: Optional[List[Literal["PULL_REQUEST_EVENT_UNSPECIFIED", "PULL_REQUEST_EVENT_OPENED", "PULL_REQUEST_EVENT_UPDATED", 4 more]]]
One of the following:
"PULL_REQUEST_EVENT_UNSPECIFIED"
"PULL_REQUEST_EVENT_OPENED"
"PULL_REQUEST_EVENT_UPDATED"
"PULL_REQUEST_EVENT_APPROVED"
"PULL_REQUEST_EVENT_MERGED"
"PULL_REQUEST_EVENT_CLOSED"
"PULL_REQUEST_EVENT_READY_FOR_REVIEW"
integration_id: Optional[str]

integration_id is the optional ID of an integration that acts as the source of webhook events. When set, the trigger will be activated when the webhook receives events.

formatuuid
webhook_id: Optional[str]

webhook_id is the optional ID of a webhook that this trigger is bound to. When set, the trigger will be activated when the webhook receives events. This allows multiple workflows to share a single webhook endpoint.

formatuuid
time: Optional[Time]

Time-based trigger - executed automatically based on cron schedule. Uses standard cron expression format (minute hour day month weekday).

cron_expression: Optional[str]

Cron expression must be between 1 and 100 characters:

size(this) >= 1 && size(this) <= 100
webhook_url: Optional[str]

Webhook URL for triggering this workflow via HTTP POST Format: {base_url}/workflows/{workflow_id}/webhooks