---
title: "Query project carbon emissions metrics for an entire organization"
method: GET
path: "/organizations/{organization_id}/metrics/carbon"
---

# Query project carbon emissions metrics for an entire organization

`GET /organizations/{organization_id}/metrics/carbon`

## Request

- Base URL: `https://api.upsun.com`
- URL: `https://api.upsun.com/organizations/{organization_id}/metrics/carbon`
- Auth: OAuth 2
  - Authorization code: `https://auth.api.platform.sh/oauth2/authorize`
  - Token URL: `https://auth.api.platform.sh/oauth2/token`
- TypeScript: <https://skmtc.dev/upsun/apis/upsun-com-rest-api/docs/organizations/:organization_id/metrics/carbon/get.ts> (a function with typed inputs; its response is checked against the schema)

Queries the carbon emission data for all projects owned by the specified organiation.

## Path parameters

- `organization_id` string, ulid, required

## Query parameters

- `from` DateTimeFilter
  - `eq` string: Equal
  - `ne` string: Not equal
  - `between` string: Between (comma-separated list)
  - `gt` string: Greater than
  - `gte` string: Greater than or equal
  - `lt` string: Less than
  - `lte` string: Less than or equal
- `to` DateTimeFilter
  - `eq` string: Equal
  - `ne` string: Not equal
  - `between` string: Between (comma-separated list)
  - `gt` string: Greater than
  - `gte` string: Greater than or equal
  - `lt` string: Less than
  - `lte` string: Less than or equal
- `interval` 'day' | 'month' | 'year'

## Response `200`

OK

- OrganizationCarbon
  - `organization_id` string: The ID of the organization.
  - `meta` MetricsMetadata
    - `from` unknown
    - `to` unknown
    - `interval` unknown
    - `units` unknown
  - `projects` OrganizationProjectCarbon[]
    - `project_id` string: The ID of the project.
    - `project_title` string: The title of the project.
    - `values` MetricsValue[]
      - `value` unknown
      - `start_time` unknown
    - `total` number: The calculated total of the metric for the given interval.
  - `total` number: The calculated total of the metric for the given interval.

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found

---

[API](https://skmtc.dev/upsun/apis/upsun-com-rest-api.md) - [All operations](https://skmtc.dev/upsun/apis/upsun-com-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/upsun/apis/upsun-com-rest-api/revisions/6cc88fde6435?raw)
