---
title: "Get Team Git Scope"
method: GET
path: "/api/v1/git/config/teams/{team_id}/scope"
tags: ["Git Configuration"]
---

# Get Team Git Scope

`GET /api/v1/git/config/teams/{team_id}/scope`

## Request

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

Reads the repositories and services assigned to the team itself. Scope assigned to descendant teams is not included; a group is addressed by its own team id

## Path parameters

- `team_id` integer, required: The team id

## Response `200`

Successful Response

- TeamGitScopeResponseModel: A team's own Git scope: the repositories and services assigned to the team itself. Scope assigned to descendant teams is not included; a group returns only what was assigned to the group. Only monitored repositories are listed.
  - `team_id` integer, required: The team id
  - `team_name` string, nullable: The team name
  - `repositories` TeamGitScopeRepositoryModel[]: The repositories in the team's Git scope
    - `id` integer, required: The repository id, as `GET /api/v1/git/repositories` returns it
    - `name` string, nullable: The repository name
    - `url` string, nullable: The repository URL
  - `services` TeamGitScopeServiceModel[]: The services in the team's Git scope
    - `id` integer, required: The service id, as `GET /api/v1/services` returns it
    - `name` string, nullable: The service name

## Other responses

- `400`: Bad Request, or an id was refused - repositories not found or not monitored, services not found. A refused write changes nothing
- `401`: Unauthorized
- `403`: Forbidden
- `404`: The team 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)
