---
title: "Get the GitHub repositories for a PlatformHub GitHub app connection"
method: GET
path: "/platformhub/github/connections/{connectionId}/repositories"
tags: ["PlatformHub"]
---

# Get the GitHub repositories for a PlatformHub GitHub app connection

`GET /platformhub/github/connections/{connectionId}/repositories`

## Request

- Base URL: `https://demo.octopus.app/api`
- URL: `https://demo.octopus.app/api/platformhub/github/connections/{connectionId}/repositories`
- Auth: one of:
  - API key in header `X-Octopus-ApiKey`
  - API key in query parameter `ApiKey`
  - API key in header `X-NuGet-ApiKey`

## Path parameters

- `connectionId` string, required

## Response `200`

GitHub repositories available for the PlatformHub connection

- GetPlatformHubGitHubRepositoriesForConnectionResponse
  - `Repositories` GitHubRepositoryResponse[], required
    - `DefaultBranch` string
    - `GitUrl` string
    - `IsAdmin` boolean
    - `IsPrivate` boolean
    - `Language` string
    - `RepositoryId` string
    - `RepositoryName` string
    - `Visibility` string

## Other responses

- `400`: Bad request. Either the payload was not structurally valid or business rules did not permit the operation.
- `404`: Not found. One or more of the entities involved in the operation was not found.

## Changes

- **2026-08-31** `e174aeef632e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/octopus/apis/octopus-server-api/changes/platformhub/github/connections/:connectionId/repositories/get.md)

---

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