ListEnvironmentUsageRecords
POST/gitpod.v1.UsageService/ListEnvironmentUsageRecords
Lists completed environment runtime records within a specified date range.
Returns a list of environment runtime records that were completed within the specified date range. Records of currently running environments are not included.
Use this method to:
- View environment runtime records
- Filter by project
- Create custom usage reports
Example
filter:
projectId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
dateRange:
startTime: "2024-01-01T00:00:00Z"
endTime: "2024-01-02T00:00:00Z"
pagination:
pageSize: 100ListEnvironmentUsageRecords
curl https://app.gitpod.io/api/gitpod.v1.UsageService/ListEnvironmentUsageRecords \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $GITPOD_API_KEY" \
-d '{}'{
"pagination": {
"nextToken": "nextToken"
},
"records": [
{
"id": "id",
"createdAt": "2019-12-27T18:11:19.117Z",
"environmentClassId": "environmentClassId",
"environmentId": "environmentId",
"projectId": "projectId",
"runnerId": "runnerId",
"stoppedAt": "2019-12-27T18:11:19.117Z",
"userId": "userId"
}
]
}Returns Examples
{
"pagination": {
"nextToken": "nextToken"
},
"records": [
{
"id": "id",
"createdAt": "2019-12-27T18:11:19.117Z",
"environmentClassId": "environmentClassId",
"environmentId": "environmentId",
"projectId": "projectId",
"runnerId": "runnerId",
"stoppedAt": "2019-12-27T18:11:19.117Z",
"userId": "userId"
}
]
}