---
title: "Get security trend time series"
method: GET
path: "/statistics/trends"
tags: ["Statistics"]
---

# Get security trend time series

`GET /statistics/trends`

## Request

- Base URL: `https://public.escape.tech/v3`
- URL: `https://public.escape.tech/v3/statistics/trends`
- Auth: API key in header `X-ESCAPE-API-KEY`

Get time-bucketed security trends for the organization over the half-open window [start, end): open vs resolved issue counts, and average API health scores. Both series share the same ordered bucket grid, so index i refers to the same bucket x. Filter by project IDs.

## Query parameters

- `start` string, required: Start date (ISO 8601)
- `end` string, required: End date (ISO 8601)
- `interval` string: Time bucket interval (e.g. "1 day", "1 week", "2 weeks")
- `projectIds` union: Filter by project IDs
  - string
  - string[]

## Response `200`

OK

- object
  - `openResolved` object[], required: Time series of open vs resolved issue counts
    - `x` string, required: Time bucket start date (ISO 8601). The bucket covers [x, x + interval), except the final bucket, which ends at `end`.
    - `open` integer, required: Issues first seen at or before the bucket start that were still open at the bucket end
    - `resolved` integer, required: Cumulative count of issues first seen at or before the bucket start that were already resolved as of the bucket end. Once an issue is resolved it is counted in every later bucket, so this value repeats; difference consecutive buckets to get resolutions per bucket.
  - `averageApiHealth` object[], required: Time series of average API health scores
    - `x` string, required: Time bucket start date (ISO 8601). The bucket covers [x, x + interval), except the final bucket, which ends at `end`.
    - `y` number, nullable, required: Average API health score for the bucket, weighting each application equally. Each application contributes its last known finished-scan score, which is carried forward for buckets after its most recent scan, so a value can repeat across buckets; null when no application has scan data for the bucket.

---

[API](https://skmtc.dev/escape/apis/escape-public-api.md) - [All operations](https://skmtc.dev/escape/apis/escape-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/escape/apis/escape-public-api/revisions/2eab35df40c7?raw)
