> ## 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 Summary

> Returns aggregate counts of workflow executions within a time range.

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

Returns aggregate counts of workflow executions within a time range.

Use this method to:

* Get a summary of successful, failed, and total executions
* Build dashboard views of automation activity

### Examples

* Get execution summary for the last 7 days:

  ```yaml theme={null}
  filter:
    dateRange:
      startTime: "2026-03-05T00:00:00Z"
      endTime: "2026-03-12T00:00:00Z"
  ```

* Get execution summary for specific workflows:

  ```yaml theme={null}
  filter:
    dateRange:
      startTime: "2026-03-01T00:00:00Z"
      endTime: "2026-03-12T00:00:00Z"
    workflowIds: ["b0e12f6c-4c67-429d-a4a6-d9838b5da047"]
  ```

## Endpoint

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

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/GetWorkflowExecutionSummary" \
    --header "Authorization: Bearer $ONA_API_KEY" \
    --header "Content-Type: application/json" \
    --data '{
    "filter": {
      "dateRange": {
        "endTime": "2026-01-01T00:00:00Z",
        "startTime": "2026-01-01T00:00:00Z"
      }
    }
  }'
  ```

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

  ona = create_client_from_env()
  request = workflow_pb2.GetWorkflowExecutionSummaryRequest(
      filter=workflow_pb2.GetWorkflowExecutionSummaryRequest.Filter(
          date_range=usage_pb2.DateRange(
              start_time=timestamp_pb2.Timestamp(seconds=1767225600),
              end_time=timestamp_pb2.Timestamp(seconds=1767225600),
          ),
      ),
  )
  response = ona.services.workflow.get_workflow_execution_summary(request)
  print(response)
  ```

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

  async function main() {
    const ona = createClientFromEnv();
    const request = create(GetWorkflowExecutionSummaryRequestSchema, {
      filter: {
        dateRange: {
          startTime: timestampFromDate(new Date("2026-01-01T00:00:00Z")),
          endTime: timestampFromDate(new Date("2026-01-01T00:00:00Z")),
        },
      },
    });
    const response = await ona.services.workflow.getWorkflowExecutionSummary(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"
  	timestamppb "google.golang.org/protobuf/types/known/timestamppb"
  )

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

  	request := connect.NewRequest(&gitpodpb.GetWorkflowExecutionSummaryRequest{
  		Filter: &gitpodpb.GetWorkflowExecutionSummaryRequest_Filter{
  			DateRange: &gitpodpb.DateRange{
  				StartTime: &timestamppb.Timestamp{Seconds: 1767225600},
  				EndTime: &timestamppb.Timestamp{Seconds: 1767225600},
  			},
  		},
  	})
  	response, err := ona.Services.Workflow.GetWorkflowExecutionSummary(context.Background(), request)
  	if err != nil {
  		log.Fatal(err)
  	}
  	fmt.Println(response.Msg)
  }
  ```

  ```json Request body theme={null}
  {
    "filter": {
      "dateRange": {
        "endTime": "2026-01-01T00:00:00Z",
        "startTime": "2026-01-01T00:00:00Z"
      }
    }
  }
  ```
</CodeGroup>

## Request

`gitpod.v1.GetWorkflowExecutionSummaryRequest`

GetWorkflowExecutionSummaryRequest returns aggregate counts of workflow executions.

| Field    | Type                                                                    | Required | Description                   |
| -------- | ----------------------------------------------------------------------- | -------- | ----------------------------- |
| `filter` | [Filter](#type-gitpod-v1-get-workflow-execution-summary-request-filter) | Yes      | Constraints: `required=true`. |

## Response

`gitpod.v1.GetWorkflowExecutionSummaryResponse`

| Field                          | Type                  | Required | Description                                                                                                                                                                             |
| ------------------------------ | --------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `successfulCount`              | 64-bit integer string | No       | Number of executions in COMPLETED phase with no failed actions (failed\_action\_count == 0).                                                                                            |
| `failedCount`                  | 64-bit integer string | No       | Number of failed executions: COMPLETED with failed\_action\_count > 0, or STOPPED with failed\_action\_count > 0 or a non-empty failure\_message (matches dashboard "Failed" labeling). |
| `totalCount`                   | 64-bit integer string | No       | Total number of executions in the time range, regardless of phase.                                                                                                                      |
| `totalWorkflowsInOrganization` | 64-bit integer string | No       | Total number of workflows that exist in the organization. This count is independent of the date range filter.                                                                           |

## Related types

<a id="type-gitpod-v1-date-range" />

<Accordion title="DateRange">
  DateRange specifies a time period for queries.

  `gitpod.v1.DateRange`

  | Field       | Type               | Required | Description                                                             |
  | ----------- | ------------------ | -------- | ----------------------------------------------------------------------- |
  | `startTime` | RFC 3339 timestamp | Yes      | Start time of the date range (inclusive). Constraints: `required=true`. |
  | `endTime`   | RFC 3339 timestamp | Yes      | End time of the date range (exclusive). Constraints: `required=true`.   |
</Accordion>

<a id="type-gitpod-v1-get-workflow-execution-summary-request-filter" />

<Accordion title="Filter">
  `gitpod.v1.GetWorkflowExecutionSummaryRequest.Filter`

  | Field         | Type                                    | Required | Description                                                                                                                              |
  | ------------- | --------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
  | `dateRange`   | [DateRange](#type-gitpod-v1-date-range) | Yes      | Date range to query executions within. Constraints: `required=true`.                                                                     |
  | `workflowIds` | array of string                         | No       | Optional workflow IDs to scope the summary to specific workflows. Constraints: `repeated.items.string.uuid=true, repeated.max_items=25`. |
</Accordion>
