GetAdoptionUsageSummary
usage.get_adoption_usage_summary(UsageGetAdoptionUsageSummaryParams**kwargs) -> UsageGetAdoptionUsageSummaryResponse
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"GetAdoptionUsageSummary
import os
from datetime import datetime
from gitpod import Gitpod
client = Gitpod(
bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted
)
response = client.usage.get_adoption_usage_summary(
date_range={
"end_time": datetime.fromisoformat("2024-02-01T00:00:00"),
"start_time": datetime.fromisoformat("2024-01-01T00:00:00"),
},
project_id="d2c94c27-3b76-4a42-b88c-95a85e392c68",
)
print(response.active_users_count){
"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
}
]
}