Get environment usage
How long each environment of the token’s organization was active in the period [since, until), from its creation to its deletion. Usage is counted in hourly UTC windows: both bounds are truncated to the hour, and a period spans at most 93 days. Only hours before closed_through are counted, and an hour closes about five minutes after it ends. Environments that were not active in the period are left out. Requires organization_update on the organization. The billable minutes are the ones the subscription is billed for.
/usage/environmentsAuthorizationBearer token (JWT) · headerrequiredJWT token passed in the Authorization header using the Bearer <token> format.
sincestring<date-time>requiredStart of the period, truncated to the hour.
untilstring<date-time>requiredEnd of the period (exclusive), truncated to the hour.
The usage of the period.
sincestring<date-time>requireduntilstring<date-time>requiredclosed_throughstring<date-time>requiredEnd of the last closed hour; later hours are not counted yet.
environmentsenvironment_usage[]requiredShow propertiesHide properties
environment_usageenvironment_idstring<uuid>requiredproject_idstring<uuid>requiredactive_secondsnumber<double>requiredActive time in the period, in seconds, to the millisecond.
billable_minutesinteger<int64>requiredMinutes billed for the period. In each UTC hour, the environment counts the minutes it started, so ten seconds bill one minute.
daysenvironment_usage_day[]requiredBillable minutes per UTC day, for the days of the period with usage, in order. They add up to the environments' billable minutes.
Show propertiesHide properties
environment_usage_daydaystring<date-time>requiredStart of the UTC day.
billable_minutesinteger<int64>requiredMinutes billed for the day, over every environment of the organization.
Error
codeinteger<int32>requiredmessagestringrequiredreasonstringOptional stable machine-readable reason for programmatic error handling