---
title: "Get metric aggregations for multiple projects"
method: GET
path: "/v2/metric-aggregations"
tags: ["Metrics"]
---

# Get metric aggregations for multiple projects

`GET /v2/metric-aggregations`

Use this endpoint to retrieve metric aggregations for multiple projects.

You can get all aggregations for all projects by omitting `project_ids` and `metric_ids` parameters. Fetching all projects or metrics you can omit the parameter or using parameter value `all`.

This endpoint supports partial success - if some of the requested project or metric IDs are not found, the endpoint will return data for the valid entities and include an `errors` array with details about the invalid ones.

## Query parameters

- `project_ids` string[], required
- `metric_ids` string[]

## Response `200`

OK

- object
  - `data` object[]
    - `project_name` string — Returns the project name used on the web application.
    - `project_id` string — Returns the project ID used on the web application.
    - `metric_id` string — Returns the chosen metric for the project(s).
    - `metric_aggregation_name` string — Returns the chosen metric metric aggregation for the project(s).
    - `value` string — Returns the value of the chosen metric aggregation.
  - `errors` object[] — Optional array of errors that occurred during request processing. Only present if some requested entities were not found. The endpoint returns data for valid entities even when errors are present, allowing partial success.
    - `code` 'NOT_FOUND', required — Error code indicating the entity was not found
    - `field` 'project_ids' | 'metric_ids' | 'chain_ids' | 'product_ids' | 'market_sector_ids', required — The request parameter field that contained the invalid value
    - `value` string, required — The invalid ID value that was not found

---

[API](https://skmtc.dev/tokenterminal/apis/token-terminal-api.md) · [All operations](https://skmtc.dev/tokenterminal/apis/token-terminal-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tokenterminal/token-terminal-api/revisions/02245ad77f39/schema)
