---
title: "Get repositories for a project"
method: GET
path: "/projects/{projectId}/repositories"
tags: ["Git repositories"]
---

# Get repositories for a project

`GET /projects/{projectId}/repositories`

## Request

- Base URL: `https://app.ketryx.com/api/v1`
- URL: `https://app.ketryx.com/api/v1/projects/{projectId}/repositories`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/ketryx/apis/ketryx-api/docs/projects/:projectId/repositories/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `projectId` string, required: Ketryx ID of the project to query repositories for

## Query parameters

- `startAt` integer: Index to start at. Defaults to 0.
- `maxResults` integer: Maximum number of results to return

## Response `200`

Successful response

- object
  - `repositories` object[], required: List of repositories
    - `id` string, required: Ketryx ID of the repository
    - `createdAt` string, date-time, required: Repository creation date and time
    - `updatedAt` string, date-time, nullable, required: Repository last update date and time, or null if never updated
    - `url` string, required: URL of the repository
    - `mainBranch` string, nullable, required: Name of the main branch, or null if not set
    - `releaseRefPattern` string, nullable, required: Pattern for release references, or null if not set
    - `analyzedCommitSha` string, nullable, required: SHA of the last analyzed commit, or null if not analyzed
  - `startAt` integer, required: Index that the pagination started at
  - `maxResults` integer, required: Maximum number of repositories returned
  - `total` integer, required: Total number of repositories matching the query

## Other responses

- `400`: Invalid input data
- `401`: Authorization not provided
- `403`: Insufficient access
- `404`: Not found
- `500`: Internal server error

---

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