# List GitHub Installations

- **Method:** `GET`
- **Path:** `/api/v1/github/installations`
- **Operation ID:** `list_github_installations`
- **Tags:** credentials

The Saram GitHub App's installations linked to this tenant, by account: where the App writes for it.

## Effective servers

- `https://api.saram.sh`

  Saram

## Authentication

- **HTTPBearer**: HTTP bearer

  a Saram API key (`sk_saram_<env>_...`) or a person's AuthKit access token, as `Authorization: Bearer <credential>`. Both are told apart by shape and produce the same principal.

## Responses

### 200 Successful Response

**Content type:** `application/json`

schema: `GitHubInstallationList`, no additional properties

The Saram GitHub App's installations linked to this tenant.

- **`installations` (required)**: `array`

  By account. Empty until somebody links one: the App then writes for this tenant nowhere.

  **Items:**

  schema: `GitHubInstallationRecord`, no additional properties

  One installation of the Saram GitHub App linked to this tenant: the App writes there for this tenant only.
  - **`account` (required)**: `string`

    The GitHub user or organisation the App is installed on, lowercased: the owner half of a run spec's
    `connectors.github.repo` that this installation writes to.
  - **`installation_id` (required)**: `integer`

    GitHub's id for the installation.
  - **`linked_at` (required)**: `string`, format: `date-time`
  - **`linked_by` (required)**: `string`

    Who linked it: the person and the GitHub user who came back from installing it, or Saram's operator.

**Example:**

```json
{
  "installations": [
    {
      "installation_id": 1,
      "account": "",
      "linked_by": "",
      "linked_at": ""
    }
  ]
}
```

### 403 the API key lacks the required scope

## Schemas

- `GitHubInstallationList` — shown above.
- `GitHubInstallationRecord` — shown above.
