> ## Documentation Index
> Fetch the complete documentation index at: https://ona.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Workflow Execution Action

> Gets details about a specific workflow execution action.

`Unary` · [`Workflows`](/docs/api-reference/generated/workflow/overview)

Gets details about a specific workflow execution action.

Use this method to:

* Check execution action status
* View execution action results
* Monitor execution action progress

### Examples

* Get execution action details:

  Retrieves information about a specific execution action.

  ```yaml theme={null}
  workflowExecutionActionId: "a1b2c3d4-5e6f-7890-abcd-ef1234567890"
  ```

## Endpoint

```text theme={null}
POST /api/gitpod.v1.WorkflowService/GetWorkflowExecutionAction
```

Send a Bearer token as described in [Authentication](/docs/api-reference#authenticate-requests). If your organization uses a custom management-plane domain, replace `https://app.ona.com` with that domain.

## Request example

<CodeGroup>
  ```bash cURL theme={null}
  export ONA_HOST=https://app.ona.com
  export ONA_API_KEY=<your-token>

  curl --request POST \
    --url "$ONA_HOST/api/gitpod.v1.WorkflowService/GetWorkflowExecutionAction" \
    --header "Authorization: Bearer $ONA_API_KEY" \
    --header "Content-Type: application/json" \
    --data '{
    "workflowExecutionActionId": "<workflow-execution-action-id>"
  }'
  ```

  ```python Python theme={null}
  import gitpod.v1.workflow_pb2 as workflow_pb2
  from ona_sdk import create_client_from_env

  ona = create_client_from_env()
  request = workflow_pb2.GetWorkflowExecutionActionRequest(
      workflow_execution_action_id="<workflow-execution-action-id>",
  )
  response = ona.services.workflow.get_workflow_execution_action(request)
  print(response)
  ```

  ```typescript TypeScript theme={null}
  import { create } from "@bufbuild/protobuf";
  import { createClientFromEnv } from "@gitpod/sdk";
  import { GetWorkflowExecutionActionRequestSchema } from "@gitpod/sdk/gitpod/v1/workflow_pb";

  async function main() {
    const ona = createClientFromEnv();
    const request = create(GetWorkflowExecutionActionRequestSchema, {
      workflowExecutionActionId: "<workflow-execution-action-id>",
    });
    const response = await ona.services.workflow.getWorkflowExecutionAction(request);
    console.log(response);
  }

  main().catch(console.error);
  ```

  ```go Go theme={null}
  package main

  import (
  	"context"
  	"fmt"
  	"log"

  	"connectrpc.com/connect"
  	"github.com/gitpod-io/gitpod-sdk-go/sdk"
  	gitpodpb "github.com/gitpod-io/gitpod-sdk-go/v1"
  )

  func main() {
  	ona, err := sdk.NewFromEnv()
  	if err != nil {
  		log.Fatal(err)
  	}

  	request := connect.NewRequest(&gitpodpb.GetWorkflowExecutionActionRequest{
  		WorkflowExecutionActionId: "<workflow-execution-action-id>",
  	})
  	response, err := ona.Services.Workflow.GetWorkflowExecutionAction(context.Background(), request)
  	if err != nil {
  		log.Fatal(err)
  	}
  	fmt.Println(response.Msg)
  }
  ```

  ```json Request body theme={null}
  {
    "workflowExecutionActionId": "<workflow-execution-action-id>"
  }
  ```
</CodeGroup>

## Request

`gitpod.v1.GetWorkflowExecutionActionRequest`

GetWorkflowExecutionActionRequest gets details about a specific workflow execution action.

| Field                       | Type   | Required | Description                      |
| --------------------------- | ------ | -------- | -------------------------------- |
| `workflowExecutionActionId` | string | No       | Constraints: `string.uuid=true`. |

## Response

`gitpod.v1.GetWorkflowExecutionActionResponse`

| Field                     | Type                                                                 | Required | Description |
| ------------------------- | -------------------------------------------------------------------- | -------- | ----------- |
| `workflowExecutionAction` | [WorkflowExecutionAction](#type-gitpod-v1-workflow-execution-action) | No       |             |

## Related types

<a id="type-gitpod-v1-workflow-execution-action" />

<Accordion title="WorkflowExecutionAction">
  WorkflowExecutionAction represents a workflow execution action instance.

  `gitpod.v1.WorkflowExecutionAction`

  | Field      | Type                                                           | Required | Description                      |
  | ---------- | -------------------------------------------------------------- | -------- | -------------------------------- |
  | `id`       | string                                                         | No       | Constraints: `string.uuid=true`. |
  | `metadata` | [Metadata](#type-gitpod-v1-workflow-execution-action-metadata) | No       |                                  |
  | `spec`     | [Spec](#type-gitpod-v1-workflow-execution-action-spec)         | No       |                                  |
  | `status`   | [Status](#type-gitpod-v1-workflow-execution-action-status)     | No       |                                  |
</Accordion>

<a id="type-gitpod-v1-workflow-execution-action-metadata" />

<Accordion title="Metadata">
  WorkflowExecutionActionMetadata contains workflow execution action metadata.

  `gitpod.v1.WorkflowExecutionAction.Metadata`

  | Field                 | Type               | Required | Description                                                                                                                                                                                                                 |
  | --------------------- | ------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `workflowExecutionId` | string             | No       | Constraints: `string.uuid=true`.                                                                                                                                                                                            |
  | `workflowId`          | string             | No       | Constraints: `string.uuid=true`.                                                                                                                                                                                            |
  | `startedAt`           | RFC 3339 timestamp | No       |                                                                                                                                                                                                                             |
  | `finishedAt`          | RFC 3339 timestamp | No       |                                                                                                                                                                                                                             |
  | `actionName`          | string             | No       | 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. |
</Accordion>

<a id="type-gitpod-v1-workflow-execution-action-spec" />

<Accordion title="Spec">
  WorkflowExecutionActionSpec contains the specification for this execution action.

  `gitpod.v1.WorkflowExecutionAction.Spec`

  | Field          | Type                                                                            | Required | Description                                                                                                                                                                                                                     |
  | -------------- | ------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `session`      | string                                                                          | No       |                                                                                                                                                                                                                                 |
  | `desiredPhase` | [WorkflowExecutionActionPhase](#enum-gitpod-v1-workflow-execution-action-phase) | No       |                                                                                                                                                                                                                                 |
  | `context`      | AgentCodeContext                                                                | No       | 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. |
  | `limits`       | PerExecution                                                                    | No       |                                                                                                                                                                                                                                 |
</Accordion>

<a id="type-gitpod-v1-workflow-execution-action-status" />

<Accordion title="Status">
  WorkflowExecutionActionStatus contains the current status of a workflow execution action.

  `gitpod.v1.WorkflowExecutionAction.Status`

  | Field              | Type                                                                            | Required | Description                                                                                                                                                                                                                                                                                              |
  | ------------------ | ------------------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `session`          | string                                                                          | No       |                                                                                                                                                                                                                                                                                                          |
  | `phase`            | [WorkflowExecutionActionPhase](#enum-gitpod-v1-workflow-execution-action-phase) | No       |                                                                                                                                                                                                                                                                                                          |
  | `stepStatuses`     | array of StepStatus                                                             | No       | Step-level progress tracking                                                                                                                                                                                                                                                                             |
  | `environmentId`    | string                                                                          | No       | Constraints: `ignore=1, string.uuid=true`.                                                                                                                                                                                                                                                               |
  | `agentExecutionId` | string                                                                          | No       |                                                                                                                                                                                                                                                                                                          |
  | `failureMessage`   | string                                                                          | No       | **Deprecated.** FailureMessage summarises why the workflow execution action failed to operate. If this is non-empty the workflow execution action has failed to operate and will likely transition to a stopped state. Deprecated: Use failures instead for structured error information.                |
  | `warningMessage`   | string                                                                          | No       | **Deprecated.** WarningMessage summarises why the workflow execution action is in a warning state. If this is non-empty the workflow execution action is in a warning state and likely does not match the users expectations. Deprecated: Use warnings field instead for structured warning information. |
  | `failures`         | array of WorkflowError                                                          | No       | Structured failures that caused the workflow execution action to fail. Provides detailed error codes, messages, and retry information.                                                                                                                                                                   |
  | `warnings`         | array of WorkflowError                                                          | No       | Structured warnings about the workflow execution action. Provides detailed warning codes and messages.                                                                                                                                                                                                   |
</Accordion>

<a id="enum-gitpod-v1-workflow-execution-action-phase" />

<Accordion title="WorkflowExecutionActionPhase">
  WorkflowExecutionActionPhase defines the phases of workflow execution action.

  | Value                                         | Number | Description |
  | --------------------------------------------- | -----: | ----------- |
  | `WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED` |      0 |             |
  | `WORKFLOW_EXECUTION_ACTION_PHASE_PENDING`     |      1 |             |
  | `WORKFLOW_EXECUTION_ACTION_PHASE_RUNNING`     |      2 |             |
  | `WORKFLOW_EXECUTION_ACTION_PHASE_STOPPING`    |      3 |             |
  | `WORKFLOW_EXECUTION_ACTION_PHASE_STOPPED`     |      4 |             |
  | `WORKFLOW_EXECUTION_ACTION_PHASE_DELETING`    |      5 |             |
  | `WORKFLOW_EXECUTION_ACTION_PHASE_DELETED`     |      6 |             |
  | `WORKFLOW_EXECUTION_ACTION_PHASE_DONE`        |      7 |             |
</Accordion>
