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

> Gets a summary of adoption and usage metrics.

`Unary` · [`Usage`](/docs/api-reference/generated/usage/overview)

Gets a summary of adoption and usage metrics.

Returns all scalar values, trends, and a sparkline for the Adoption & Usage
insight category. For full-resolution time series, use the individual time
series RPCs.

Use this method to:

* Build adoption and usage insight cards
* Filter adoption metrics by project, user, or team
* Compare the requested date range against the previous period

### Example

```yaml theme={null}
dateRange:
  startTime: "2024-01-01T00:00:00Z"
  endTime: "2024-02-01T00:00:00Z"
projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
```

## Endpoint

```text theme={null}
POST /api/gitpod.v1.UsageService/GetAdoptionUsageSummary
```

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.UsageService/GetAdoptionUsageSummary" \
    --header "Authorization: Bearer $ONA_API_KEY" \
    --header "Content-Type: application/json" \
    --data '{
    "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 google.protobuf.timestamp_pb2 as timestamp_pb2
  from ona_sdk import create_client_from_env

  ona = create_client_from_env()
  request = usage_pb2.GetAdoptionUsageSummaryRequest(
      date_range=usage_pb2.DateRange(
          start_time=timestamp_pb2.Timestamp(seconds=1767225600),
          end_time=timestamp_pb2.Timestamp(seconds=1767225600),
      ),
  )
  response = ona.services.usage.get_adoption_usage_summary(request)
  print(response)
  ```

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

  async function main() {
    const ona = createClientFromEnv();
    const request = create(GetAdoptionUsageSummaryRequestSchema, {
      dateRange: {
        startTime: timestampFromDate(new Date("2026-01-01T00:00:00Z")),
        endTime: timestampFromDate(new Date("2026-01-01T00:00:00Z")),
      },
    });
    const response = await ona.services.usage.getAdoptionUsageSummary(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.GetAdoptionUsageSummaryRequest{
  		DateRange: &gitpodpb.DateRange{
  			StartTime: &timestamppb.Timestamp{Seconds: 1767225600},
  			EndTime: &timestamppb.Timestamp{Seconds: 1767225600},
  		},
  	})
  	response, err := ona.Services.Usage.GetAdoptionUsageSummary(context.Background(), request)
  	if err != nil {
  		log.Fatal(err)
  	}
  	fmt.Println(response.Msg)
  }
  ```

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

## Request

`gitpod.v1.GetAdoptionUsageSummaryRequest`

| Field       | Type                                    | Required | Description                                                                      |
| ----------- | --------------------------------------- | -------- | -------------------------------------------------------------------------------- |
| `dateRange` | [DateRange](#type-gitpod-v1-date-range) | Yes      | Date range to query metrics within. Constraints: `required=true`.                |
| `projectId` | string                                  | No       | Optional project ID to filter metrics by.                                        |
| `userId`    | string                                  | No       | Optional user ID to filter metrics for a specific user (personal insights view). |
| `teamId`    | string                                  | No       | Optional team ID to scope results to members of a specific team.                 |

## Response

`gitpod.v1.GetAdoptionUsageSummaryResponse`

| Field                        | Type                                                          | Required | Description                                                                                                            |
| ---------------------------- | ------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------- |
| `envRuntimePerUserSeconds`   | number                                                        | No       | Average environment runtime in seconds per active user.                                                                |
| `envRuntimePerUserTrend`     | number                                                        | No       | Fractional change in env\_runtime\_per\_user\_seconds vs previous period. Computed as (current - previous) / previous. |
| `activeUsersCount`           | 64-bit integer string                                         | No       | Count of active users in the date range.                                                                               |
| `activeUsersTrend`           | number                                                        | No       | Fractional change in active\_users\_count vs previous period. Computed as (current - previous) / previous.             |
| `powerUsersCount`            | 64-bit integer string                                         | No       | Count of power users in the date range.                                                                                |
| `powerUsersTrend`            | number                                                        | No       | Fractional change in power\_users\_count vs previous period. Computed as (current - previous) / previous.              |
| `powerUsersThresholdSeconds` | 64-bit integer string                                         | No       | Threshold in seconds used to determine power users. Displayed to users so they understand the definition.              |
| `sessionsCount`              | 64-bit integer string                                         | No       | Count of environment sessions (total starts) in the date range.                                                        |
| `sessionsTrend`              | number                                                        | No       | Fractional change in sessions\_count vs previous period. Computed as (current - previous) / previous.                  |
| `sparkline`                  | array of [TimeSeriesPoint](#type-gitpod-v1-time-series-point) | No       | Sparkline data for the card's trend line (typically \~4 weekly points).                                                |

## 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-time-series-point" />

<Accordion title="TimeSeriesPoint">
  `gitpod.v1.TimeSeriesPoint`

  | Field   | Type               | Required | Description                              |
  | ------- | ------------------ | -------- | ---------------------------------------- |
  | `time`  | RFC 3339 timestamp | No       | Timestamp for this data point.           |
  | `value` | integer            | No       | The numerical value for this data point. |
</Accordion>
