---
search:
  tags:
    - Usage
    - GET
seo:
  description: >-
    How long each environment of the token's organization was active in the
    period… Reference for the GET /usage/environments endpoint in the Platform
    API.
sidebar:
  label: Get environment usage
  badge: GET
title: Get environment usage
type: openapi-operation
---
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.

`GET /usage/environments`

**Responses**

- `200` — The usage of the period.
- `default` — Error

Response example, 200:

```json
{
  "since": "2019-08-24T14:15:22Z",
  "until": "2019-08-24T14:15:22Z",
  "closed_through": "2019-08-24T14:15:22Z",
  "environments": [
    {
      "environment_id": "40ef0e48-a11f-4963-a229-e396c9f7e7c4",
      "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
      "active_seconds": 0.1,
      "billable_minutes": 0
    }
  ],
  "days": [
    {
      "day": "2019-08-24T14:15:22Z",
      "billable_minutes": 0
    }
  ]
}
```
