---
title: "Get Repository Configuration"
method: GET
path: "/api/v1/git/repositories/{repo_id}/config"
tags: ["Git Repositories"]
---

# Get Repository Configuration

`GET /api/v1/git/repositories/{repo_id}/config`

## Request

- Base URL: `https://public-api.linearb.io`
- URL: `https://public-api.linearb.io/api/v1/git/repositories/{repo_id}/config`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/linearb/apis/linearb-api/docs/api/v1/git/repositories/:repo_id/config/get.ts> (a function with typed inputs; its response is checked against the schema)

Reads a repository's settings. Each section is `source: repository` when the repository overrides it, with the organization default in `global_default`, or `source: global` when it follows the organization default. The organization-wide only sections (bot-authored pull request attribution, included file extensions, active branches duration, issue start time) are not listed; read them with `GET /api/v1/git/config`

## Path parameters

- `repo_id` integer, required: The repository id, as `GET /api/v1/git/repositories` returns it

## Response `200`

Successful Response

- RepositoryConfigResponseModel: A repository's settings, each section marked as inherited (`global`) or overridden (`repository`).
  - `repository_id` integer, required
  - `repository_name` string, nullable
  - `settings` object, required

## Other responses

- `400`: Bad Request - an unknown section, an invalid value or regular expression
- `401`: Unauthorized
- `403`: Forbidden
- `404`: The repository was not found
- `405`: Method Not Allowed
- `409`: Conflict
- `422`: Validation Error
- `500`: Internal Server Error
- `504`: Gateway Timeout

---

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