Skip to content
Ona Docs

Tasks

CreateTask
POST/gitpod.v1.EnvironmentAutomationService/CreateTask
DeleteTask
POST/gitpod.v1.EnvironmentAutomationService/DeleteTask
ListTasks
POST/gitpod.v1.EnvironmentAutomationService/ListTasks
GetTask
POST/gitpod.v1.EnvironmentAutomationService/GetTask
StartTask
POST/gitpod.v1.EnvironmentAutomationService/StartTask
UpdateTask
POST/gitpod.v1.EnvironmentAutomationService/UpdateTask
ModelsExpand Collapse
TaskCreateResponse object { task }
task: Task { id, dependsOn, environmentId, 2 more }
id: string
formatuuid
dependsOn: optional array of string

dependencies specifies the IDs of the automations this task depends on.

environmentId: optional string
formatuuid
metadata: optional TaskMetadata { createdAt, creator, description, 3 more }
createdAt: optional string

created_at is the time the task was created.

formatdate-time
creator: optional Subject { id, principal }

creator describes the principal who created the task.

id: optional string

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 string

description is a user-facing description for the task. It can be used to provide context and documentation for the task.

name: optional string

name is a user-facing name for the task. Unlike the reference, this field is not unique, and not referenced by the system. This is a short descriptive name for the task.

minLength1
reference: optional string

reference is a user-facing identifier for the task which must be unique on the environment. It is used to express dependencies between tasks, and to identify the task in user interactions (e.g. the CLI).

triggeredBy: optional array of AutomationTrigger { beforeSnapshot, manual, postDevcontainerStart, 3 more }

triggered_by is a list of trigger that start the task.

beforeSnapshot: optional boolean
manual: optional boolean
postDevcontainerStart: optional boolean
postEnvironmentStart: optional boolean
postMachineStart: optional boolean
prebuild: optional boolean
spec: optional TaskSpec { command, env, runsOn }
command: optional string

command contains the command the task should execute

env: optional array of EnvironmentVariableItem { name, value, valueFrom }

env specifies environment variables for the task.

name: optional string

name is the environment variable name.

minLength1
value: optional string

value is a literal string value.

valueFrom: optional EnvironmentVariableSource { secretRef }

value_from specifies a source for the value.

secretRef: SecretRef { id }

secret_ref references a secret by ID.

id: optional string

id is the UUID of the secret to reference.

formatuuid
runsOn: optional RunsOn { docker, machine }

runs_on specifies the environment the task should run on.

docker: optional object { environment, image }
environment: optional array of string
image: optional string
minLength1
machine: optional unknown

Machine runs the service/task directly on the VM/machine level.

TaskDeleteResponse = unknown
TaskRetrieveResponse object { task }
task: Task { id, dependsOn, environmentId, 2 more }
id: string
formatuuid
dependsOn: optional array of string

dependencies specifies the IDs of the automations this task depends on.

environmentId: optional string
formatuuid
metadata: optional TaskMetadata { createdAt, creator, description, 3 more }
createdAt: optional string

created_at is the time the task was created.

formatdate-time
creator: optional Subject { id, principal }

creator describes the principal who created the task.

id: optional string

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 string

description is a user-facing description for the task. It can be used to provide context and documentation for the task.

name: optional string

name is a user-facing name for the task. Unlike the reference, this field is not unique, and not referenced by the system. This is a short descriptive name for the task.

minLength1
reference: optional string

reference is a user-facing identifier for the task which must be unique on the environment. It is used to express dependencies between tasks, and to identify the task in user interactions (e.g. the CLI).

triggeredBy: optional array of AutomationTrigger { beforeSnapshot, manual, postDevcontainerStart, 3 more }

triggered_by is a list of trigger that start the task.

beforeSnapshot: optional boolean
manual: optional boolean
postDevcontainerStart: optional boolean
postEnvironmentStart: optional boolean
postMachineStart: optional boolean
prebuild: optional boolean
spec: optional TaskSpec { command, env, runsOn }
command: optional string

command contains the command the task should execute

env: optional array of EnvironmentVariableItem { name, value, valueFrom }

env specifies environment variables for the task.

name: optional string

name is the environment variable name.

minLength1
value: optional string

value is a literal string value.

valueFrom: optional EnvironmentVariableSource { secretRef }

value_from specifies a source for the value.

secretRef: SecretRef { id }

secret_ref references a secret by ID.

id: optional string

id is the UUID of the secret to reference.

formatuuid
runsOn: optional RunsOn { docker, machine }

runs_on specifies the environment the task should run on.

docker: optional object { environment, image }
environment: optional array of string
image: optional string
minLength1
machine: optional unknown

Machine runs the service/task directly on the VM/machine level.

TaskStartResponse object { taskExecution }
taskExecution: TaskExecution { id, metadata, spec, status }
id: string
formatuuid
metadata: optional TaskExecutionMetadata { completedAt, createdAt, creator, 4 more }
completedAt: optional string

completed_at is the time the task execution was done.

formatdate-time
createdAt: optional string

created_at is the time the task was created.

formatdate-time
creator: optional Subject { id, principal }

creator describes the principal who created/started the task run.

id: optional string

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"
environmentId: optional string

environment_id is the ID of the environment in which the task run is executed.

formatuuid
startedAt: optional string

started_at is the time the task execution actually started to run.

formatdate-time
startedBy: optional string

started_by describes the trigger that started the task execution.

taskId: optional string

task_id is the ID of the main task being executed.

formatuuid
spec: optional TaskExecutionSpec { desiredPhase, plan }
desiredPhase: optional TaskExecutionPhase

desired_phase is the phase the task execution should be in. Used to stop a running task execution early.

One of the following:
"TASK_EXECUTION_PHASE_UNSPECIFIED"
"TASK_EXECUTION_PHASE_PENDING"
"TASK_EXECUTION_PHASE_RUNNING"
"TASK_EXECUTION_PHASE_SUCCEEDED"
"TASK_EXECUTION_PHASE_FAILED"
"TASK_EXECUTION_PHASE_STOPPED"
plan: optional array of object { steps }

plan is a list of groups of steps. The steps in a group are executed concurrently, while the groups are executed sequentially. The order of the groups is the order in which they are executed.

steps: optional array of object { id, dependsOn, label, 2 more }
id: optional string

ID is the ID of the execution step

formatuuid
dependsOn: optional array of string
label: optional string
serviceId: optional string
formatuuid
task: optional object { id, spec }
id: optional string
formatuuid
spec: optional TaskSpec { command, env, runsOn }
command: optional string

command contains the command the task should execute

env: optional array of EnvironmentVariableItem { name, value, valueFrom }

env specifies environment variables for the task.

name: optional string

name is the environment variable name.

minLength1
value: optional string

value is a literal string value.

valueFrom: optional EnvironmentVariableSource { secretRef }

value_from specifies a source for the value.

secretRef: SecretRef { id }

secret_ref references a secret by ID.

id: optional string

id is the UUID of the secret to reference.

formatuuid
runsOn: optional RunsOn { docker, machine }

runs_on specifies the environment the task should run on.

docker: optional object { environment, image }
environment: optional array of string
image: optional string
minLength1
machine: optional unknown

Machine runs the service/task directly on the VM/machine level.

status: optional TaskExecutionStatus { failureMessage, logUrl, phase, 2 more }
failureMessage: optional string

failure_message summarises why the task execution failed to operate. If this is non-empty the task execution has failed to operate and will likely transition to a failed state.

logUrl: optional string

log_url is the URL to the logs of the task’s steps. If this is empty, the task either has no logs or has not yet started.

phase: optional TaskExecutionPhase

the phase of a task execution represents the aggregated phase of all steps.

One of the following:
"TASK_EXECUTION_PHASE_UNSPECIFIED"
"TASK_EXECUTION_PHASE_PENDING"
"TASK_EXECUTION_PHASE_RUNNING"
"TASK_EXECUTION_PHASE_SUCCEEDED"
"TASK_EXECUTION_PHASE_FAILED"
"TASK_EXECUTION_PHASE_STOPPED"
statusVersion: optional string

version of the status update. Task executions themselves are unversioned, but their status has different versions. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.status_version < b.status_version then a was the status before b.

steps: optional array of object { id, failureMessage, output, phase }

steps provides the status for each individual step of the task execution. If a step is missing it has not yet started.

id: optional string

ID is the ID of the execution step

formatuuid
failureMessage: optional string

failure_message summarises why the step failed to operate. If this is non-empty the step has failed to operate and will likely transition to a failed state.

output: optional map[string]

output contains the output of the task execution. setting an output field to empty string will unset it.

phase: optional TaskExecutionPhase

phase is the current phase of the execution step

One of the following:
"TASK_EXECUTION_PHASE_UNSPECIFIED"
"TASK_EXECUTION_PHASE_PENDING"
"TASK_EXECUTION_PHASE_RUNNING"
"TASK_EXECUTION_PHASE_SUCCEEDED"
"TASK_EXECUTION_PHASE_FAILED"
"TASK_EXECUTION_PHASE_STOPPED"
TaskUpdateResponse = unknown

TasksExecutions

ListTaskExecutions
POST/gitpod.v1.EnvironmentAutomationService/ListTaskExecutions
GetTaskExecution
POST/gitpod.v1.EnvironmentAutomationService/GetTaskExecution
StopTaskExecution
POST/gitpod.v1.EnvironmentAutomationService/StopTaskExecution
ModelsExpand Collapse
ExecutionRetrieveResponse object { taskExecution }
taskExecution: TaskExecution { id, metadata, spec, status }
id: string
formatuuid
metadata: optional TaskExecutionMetadata { completedAt, createdAt, creator, 4 more }
completedAt: optional string

completed_at is the time the task execution was done.

formatdate-time
createdAt: optional string

created_at is the time the task was created.

formatdate-time
creator: optional Subject { id, principal }

creator describes the principal who created/started the task run.

id: optional string

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"
environmentId: optional string

environment_id is the ID of the environment in which the task run is executed.

formatuuid
startedAt: optional string

started_at is the time the task execution actually started to run.

formatdate-time
startedBy: optional string

started_by describes the trigger that started the task execution.

taskId: optional string

task_id is the ID of the main task being executed.

formatuuid
spec: optional TaskExecutionSpec { desiredPhase, plan }
desiredPhase: optional TaskExecutionPhase

desired_phase is the phase the task execution should be in. Used to stop a running task execution early.

One of the following:
"TASK_EXECUTION_PHASE_UNSPECIFIED"
"TASK_EXECUTION_PHASE_PENDING"
"TASK_EXECUTION_PHASE_RUNNING"
"TASK_EXECUTION_PHASE_SUCCEEDED"
"TASK_EXECUTION_PHASE_FAILED"
"TASK_EXECUTION_PHASE_STOPPED"
plan: optional array of object { steps }

plan is a list of groups of steps. The steps in a group are executed concurrently, while the groups are executed sequentially. The order of the groups is the order in which they are executed.

steps: optional array of object { id, dependsOn, label, 2 more }
id: optional string

ID is the ID of the execution step

formatuuid
dependsOn: optional array of string
label: optional string
serviceId: optional string
formatuuid
task: optional object { id, spec }
id: optional string
formatuuid
spec: optional TaskSpec { command, env, runsOn }
command: optional string

command contains the command the task should execute

env: optional array of EnvironmentVariableItem { name, value, valueFrom }

env specifies environment variables for the task.

name: optional string

name is the environment variable name.

minLength1
value: optional string

value is a literal string value.

valueFrom: optional EnvironmentVariableSource { secretRef }

value_from specifies a source for the value.

secretRef: SecretRef { id }

secret_ref references a secret by ID.

id: optional string

id is the UUID of the secret to reference.

formatuuid
runsOn: optional RunsOn { docker, machine }

runs_on specifies the environment the task should run on.

docker: optional object { environment, image }
environment: optional array of string
image: optional string
minLength1
machine: optional unknown

Machine runs the service/task directly on the VM/machine level.

status: optional TaskExecutionStatus { failureMessage, logUrl, phase, 2 more }
failureMessage: optional string

failure_message summarises why the task execution failed to operate. If this is non-empty the task execution has failed to operate and will likely transition to a failed state.

logUrl: optional string

log_url is the URL to the logs of the task’s steps. If this is empty, the task either has no logs or has not yet started.

phase: optional TaskExecutionPhase

the phase of a task execution represents the aggregated phase of all steps.

One of the following:
"TASK_EXECUTION_PHASE_UNSPECIFIED"
"TASK_EXECUTION_PHASE_PENDING"
"TASK_EXECUTION_PHASE_RUNNING"
"TASK_EXECUTION_PHASE_SUCCEEDED"
"TASK_EXECUTION_PHASE_FAILED"
"TASK_EXECUTION_PHASE_STOPPED"
statusVersion: optional string

version of the status update. Task executions themselves are unversioned, but their status has different versions. The value of this field has no semantic meaning (e.g. don’t interpret it as as a timestamp), but it can be used to impose a partial order. If a.status_version < b.status_version then a was the status before b.

steps: optional array of object { id, failureMessage, output, phase }

steps provides the status for each individual step of the task execution. If a step is missing it has not yet started.

id: optional string

ID is the ID of the execution step

formatuuid
failureMessage: optional string

failure_message summarises why the step failed to operate. If this is non-empty the step has failed to operate and will likely transition to a failed state.

output: optional map[string]

output contains the output of the task execution. setting an output field to empty string will unset it.

phase: optional TaskExecutionPhase

phase is the current phase of the execution step

One of the following:
"TASK_EXECUTION_PHASE_UNSPECIFIED"
"TASK_EXECUTION_PHASE_PENDING"
"TASK_EXECUTION_PHASE_RUNNING"
"TASK_EXECUTION_PHASE_SUCCEEDED"
"TASK_EXECUTION_PHASE_FAILED"
"TASK_EXECUTION_PHASE_STOPPED"
ExecutionStopResponse = unknown