---
title: "List repositories for a specific connection"
method: GET
path: "/git-connections/{connection_id}/repositories"
tags: ["Git Providers"]
---

# List repositories for a specific connection

`GET /git-connections/{connection_id}/repositories`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/git-connections/{connection_id}/repositories`
- Auth: HTTP bearer

Fetches repositories from the connected git provider with support for pagination, search, and filtering.
This endpoint calls the provider's API directly to get the most up-to-date repository list.

## Path parameters

- `connection_id` integer, required

## Query parameters

- `page` integer
- `per_page` integer
- `sort` string
- `direction` string
- `search` string
- `owner` string
- `language` string
- `private` boolean
- `preset` string
- `updated_after` string

## Response `200`

List of repositories

- RepositoryListResponse
  - `repositories` RepositoryResponse[], required
    - `clone_url` string, nullable: HTTPS clone URL (e.g., https://github.com/owner/repo.git)
    - `created_at` string, date-time, required
    - `default_branch` string, required
    - `description` string, nullable
    - `full_name` string, required
    - `git_provider_connection_id` integer, required: ID of the git provider connection this repository was synced from.
    - `id` integer, required
    - `language` string, nullable
    - `name` string, required
    - `owner` string, required
    - `preset` ProjectPresetResponse[], nullable
      - `composeFiles` string[], nullable: Compose file paths found in the repository (only for docker-compose preset)
      - `dockerfilePath` string, nullable: Repository-root-relative path to the Dockerfile, when it does not live directly under `{path}/Dockerfile` (e.g. `docker/Dockerfile` rolled up to a `path` of `"./"`). `None` for a Dockerfile located directly at `{path}/Dockerfile` and for every non-Dockerfile preset.
      - `exposedPort` integer, nullable: Default exposed port for this preset (e.g., 3000 for Next.js, 8000 for FastAPI)
      - `iconUrl` string, nullable: Icon URL for the preset
      - `path` string, required
      - `preset` string, required
      - `presetLabel` string, required
      - `projectType` string, required: Project type category (e.g., "frontend", "backend", "fullstack")
    - `private` boolean, required
    - `pushed_at` string, date-time, required
    - `ssh_url` string, nullable: SSH clone URL (e.g., git@github.com:owner/repo.git)
    - `updated_at` string, date-time, required
  - `total_count` integer, required

## Other responses

- `401`: Unauthorized
- `404`: Connection not found
- `500`: Internal server error

## Changes

- **2026-10-05** `4b228ebed583`: 2 info
  - added the new optional `query` request parameter `preset`
  - added the new optional `query` request parameter `updated_after`
- **2026-10-05** `63a80791dc58`: 2 warning
  - deleted the `query` request parameter `preset`
  - deleted the `query` request parameter `updated_after`
- **2026-10-03** `de8387218c0b`: 2 info
  - added the new optional `query` request parameter `preset`
  - added the new optional `query` request parameter `updated_after`
- **2026-09-07** `c2a1f69745e7`: 1 info
  - added the optional property `repositories/items/preset/items/dockerfilePath` to the response with the `200` status
- **2026-09-07** `7a3103561bd0`: 1 warning
  - removed the optional property `repositories/items/preset/items/dockerfilePath` from the response with the `200` status

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/git-connections/:connection_id/repositories/get.md)

---

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