---
title: "Test trends"
method: GET
path: "/v1/insights/trends"
tags: ["Insights"]
---

# Test trends

`GET /v1/insights/trends`

Time-bucketed success / failure / unknown counts for your tests, the same series that powers the Test Analytics chart in the dashboard. Use `group_by` to aggregate by day (default), by browser (coverage), or as a single status roll-up. Filter by date range, status, browser, build, group and team.

## Query parameters

- `start` string
- `end` string
- `time_range` string
- `status` 'all' | 'success' | 'failure' | 'unknown'
- `browser` integer[]
- `build` integer[]
- `group_ids` integer[]
- `team` integer[]
- `name` string
- `group_by` 'date' | 'browser' | 'status'

## Response `200`

Test trends

- TestingbotEntitiesInsightTrends — Testingbot_Entities_InsightTrends model
  - `data` TestingbotEntitiesInsightTrendBucket[], required — Series buckets, newest first.
    - `date` string, required — Bucket day (YYYY-MM-DD). Present when group_by=date.
    - `browser` string, required — Browser name. Present when group_by=browser.
    - `status` string, required — Status name (success/failure/unknown). Present when group_by=status.
    - `count` integer, required — Count for this status. Present when group_by=status.
    - `success` integer, required — Passed tests in this bucket.
    - `failure` integer, required — Failed tests in this bucket.
    - `unknown` integer, required — Tests with unknown status in this bucket.
    - `total` integer, required — Total tests in this bucket.
  - `meta` TestingbotEntitiesInsightTrendMeta, required
    - `group_by` string, required — Aggregation dimension used (date/browser/status).
    - `start` string, date-time, required — Period start (ISO-8601, UTC).
    - `end` string, date-time, required — Period end (ISO-8601, UTC).
    - `status` string, required — Status filter applied.
    - `total` integer, required — Total tests across all buckets.
    - `success` integer, required — Total passed tests.
    - `failure` integer, required — Total failed tests.
    - `unknown` integer, required — Total unknown-status tests.
    - `pass_rate` number, required — success / total, 0..1.

## Other responses

- `400` — Invalid parameters
- `401` — Authentication required
- `403` — Permission denied

---

[API](https://skmtc.net/testingbot/apis/testingbot-rest-api.md) · [All operations](https://skmtc.net/testingbot/apis/testingbot-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/testingbot/testingbot-rest-api/revisions/eff607a49246/schema)
