Skip to content
Ona Docs

GetAdoptionUsageSummary

POST/gitpod.v1.UsageService/GetAdoptionUsageSummary

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

dateRange:
  startTime: "2024-01-01T00:00:00Z"
  endTime: "2024-02-01T00:00:00Z"
projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
Body ParametersJSONExpand Collapse
dateRange: DateRange { endTime, startTime }

Date range to query metrics within.

endTime: string

End time of the date range (exclusive).

formatdate-time
startTime: string

Start time of the date range (inclusive).

formatdate-time
projectId: optional string

Optional project ID to filter metrics by.

teamId: optional string

Optional team ID to scope results to members of a specific team.

userId: optional string

Optional user ID to filter metrics for a specific user (personal insights view).

ReturnsExpand Collapse
activeUsersCount: optional string

Count of active users in the date range.

activeUsersTrend: optional number

Fractional change in active_users_count vs previous period. Computed as (current - previous) / previous.

formatdouble
envRuntimePerUserSeconds: optional number

Average environment runtime in seconds per active user.

formatdouble
envRuntimePerUserTrend: optional number

Fractional change in env_runtime_per_user_seconds vs previous period. Computed as (current - previous) / previous.

formatdouble
powerUsersCount: optional string

Count of power users in the date range.

powerUsersThresholdSeconds: optional string

Threshold in seconds used to determine power users. Displayed to users so they understand the definition.

powerUsersTrend: optional number

Fractional change in power_users_count vs previous period. Computed as (current - previous) / previous.

formatdouble
sessionsCount: optional string

Count of environment sessions (total starts) in the date range.

sessionsTrend: optional number

Fractional change in sessions_count vs previous period. Computed as (current - previous) / previous.

formatdouble
sparkline: optional array of TimeSeriesPoint { time, value }

Sparkline data for the card’s trend line (typically ~4 weekly points).

time: optional string

Timestamp for this data point.

formatdate-time
value: optional number

The numerical value for this data point.

formatint32

GetAdoptionUsageSummary

curl https://app.gitpod.io/api/gitpod.v1.UsageService/GetAdoptionUsageSummary \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $GITPOD_API_KEY" \
    -d '{
          "dateRange": {
            "endTime": "2024-02-01T00:00:00Z",
            "startTime": "2024-01-01T00:00:00Z"
          }
        }'
{
  "activeUsersCount": "activeUsersCount",
  "activeUsersTrend": 0,
  "envRuntimePerUserSeconds": 0,
  "envRuntimePerUserTrend": 0,
  "powerUsersCount": "powerUsersCount",
  "powerUsersThresholdSeconds": "powerUsersThresholdSeconds",
  "powerUsersTrend": 0,
  "sessionsCount": "sessionsCount",
  "sessionsTrend": 0,
  "sparkline": [
    {
      "time": "2019-12-27T18:11:19.117Z",
      "value": 0
    }
  ]
}
Returns Examples
{
  "activeUsersCount": "activeUsersCount",
  "activeUsersTrend": 0,
  "envRuntimePerUserSeconds": 0,
  "envRuntimePerUserTrend": 0,
  "powerUsersCount": "powerUsersCount",
  "powerUsersThresholdSeconds": "powerUsersThresholdSeconds",
  "powerUsersTrend": 0,
  "sessionsCount": "sessionsCount",
  "sessionsTrend": 0,
  "sparkline": [
    {
      "time": "2019-12-27T18:11:19.117Z",
      "value": 0
    }
  ]
}