---
title: "Codebase risk & compliance: one row per repository with merged files"
method: GET
path: "/analytics/v1/merge/repositories"
tags: ["analytics"]
---

# Codebase risk & compliance: one row per repository with merged files

`GET /analytics/v1/merge/repositories`

## Request

- Base URL: `https://api.qualityclouds.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.qualityclouds.ai/analytics/v1/merge/repositories`
- Auth: one of:
  - HTTP bearer
  - OpenID Connect (`https://account.qualityclouds.com//realms/ai-production/.well-known/openid-configuration`)

Files merged, checked before merge, issues that reached the branch and verified fixes per repository, with its last merge scan; issue figures are null for a repository with no completed merge scan. Ordered by checked before merge, low to high. Carries the coverage warning threshold. Organisation totals for the filters.

## Query parameters

- `weeks` integer: Length of the period in ISO weeks. One of [4, 8, 12, 26].
- `repository_id` string, nullable: Narrow to one repository.
- `user_id` string, nullable: Narrow to one developer: the commit author, by email.

## Response `200`

Successful Response

- MergeRepositoriesResponse: `GET /merge/repositories` — rows ordered by checked before merge, low to high.
  - `rows` MergeRepositoryRowResponse[], required
    - `repository_id` string, required
    - `name` string, required
    - `branch` string, nullable, required: The imported branch
    - `provider` string, nullable, required: github | bitbucket
    - `files_merged` integer, required
    - `checked_pct` integer, nullable, required: Checked before merge, %
    - `reached` integer, nullable, required: Issues reached the branch; null when the repository has no merge scan
    - `verified_fixed` integer, nullable, required: Verified fixed; null when the repository has no merge scan
    - `last_merge_scan_at` string, date-time, nullable, required: Latest completed push scan, unbounded by the period
    - `has_merge_scan` boolean, required: At least one completed push scan, ever
  - `threshold` integer, required: Coverage warning threshold, %: rows below it are flagged

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `422`: Validation Error

---

[API](https://skmtc.dev/qualityclouds/apis/qai-orchestrator-api.md) · [All operations](https://skmtc.dev/qualityclouds/apis/qai-orchestrator-api/llms.txt) · [OpenAPI document](https://skmtc.dev/qualityclouds/apis/qai-orchestrator-api/revisions/250c849925af?raw)
