---
title: "List the GitHub App installations the caller can use and their repositories."
method: GET
path: "/o/{org}/github"
tags: ["GitHub"]
---

# List the GitHub App installations the caller can use and their repositories.

`GET /o/{org}/github`

## Request

- Base URL: `https://api.prix.dev`
- URL: `https://api.prix.dev/o/{org}/github`
- Auth: HTTP bearer

Without `state`: the installations the caller owns plus those GitHub grants them, each
with the repositories a `resources` URL can name (`GithubInstallationsForKey` for an API
key, `GithubInstallations` for the console). With `state`: the status of the caller's own
pending connect (`GithubConnectStatus`).

## Query parameters

- `state` string

## Response `200`

Installations (no `state`) or connect status (with `state`).

- union
  - GithubInstallationsForKey: The installations an API key's creator can use, and the repositories each covers.
    - `installations` object[], required
      - `id` integer, required
      - `account` string, required: The GitHub user or organization the App is installed on.
      - `account_type` 'User' | 'Organization', required
      - `suspended` true: Present only when the installation is suspended; a suspended installation runs nothing.
      - `repositories` object[]: Absent when the installation covers none.
        - `full_name` string, required: `owner/name`; `https://github.com/{full_name}` is its `resources` URL.
        - `private` boolean, required
  - GithubInstallations
    - `installations` GithubInstallation[], required
      - `id` integer, required: GitHub installation id.
      - `account_login` string, required
      - `account_type` string, required: GitHub account type, e.g. `User` or `Organization`.
      - `repositories` GithubRepository[], required: Owned installations list every mirrored repository; granted ones only those the caller can push to.
        - `id` integer, required
        - `name` string, required
        - `full_name` string, required
        - `private` boolean, required
      - `suspended` boolean, required
      - `created_at` string, date-time, required
      - `settings_url` string, uri, required: The installation's settings page on github.com.
      - `owned` boolean, required: The caller installed it. False means reachable through their GitHub access; only the installer can disconnect it for everyone.
    - `github_authorization` 'authorized' | 'required' | 'unavailable', required: `required`: the caller has no usable GitHub authorization. `unavailable`: GitHub was not reached, so only owned installations are listed.
    - `github_logins` string[], required: The caller's own connected GitHub logins.
    - `pending_requests` object[], required: The caller's outstanding requests to install the App on accounts not yet installed. Empty when GitHub does not answer.
      - `account_login` string, required
      - `account_type` string, required
      - `requested_by` string, required
      - `requested_at` string, date-time, required
    - `installable_orgs` object[]: The caller's GitHub organizations with no installation or pending request. Absent (not empty) when GitHub did not answer.
      - `login` string, required
      - `install_url` string, uri, required
    - `refresh` object: Present only on `POST /o/{org}/github/sync`.
      - `complete` boolean, required: Every owned installation re-read and GitHub reachable.
  - union
    - object
      - `pending` true, required
    - object
      - `pending` false, required
      - `installation_id` integer, nullable, required
      - `setup_action` string, required: Defaults to `install`.

## Other responses

- `400`: `state` is not 43 base64url characters.
- `401`: No bearer, an unknown, revoked or expired one, or an API key on a route keys cannot call.
- `404`: Org not found, or `state` is not one of the caller's pending connects.

---

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