GitHub App Installations API
You can create a GitHub App installations using the Terraform Cloud UI. Learn how to create a GitHub App installation.
Note: To use this resource in Terraform Enterprise installations, you must configure the GitHub App in the site admin area.
Note: You can only use this API if you have already authorized the Terraform Cloud GitHub App. Manage your GitHub App token from Account Settings > Tokens.
List Installations
This endpoint lists GitHub App installations available to the current User.
GET /github-app/installations
Query Parameters
Queries only return GitHub App Installations that the current user has access to within GitHub.
Parameter | Description |
---|---|
filter[name] | Optional. If present, returns a list of available GitHub App installations that match the GitHub organization or login. |
filter[installation_id] | Optional. If present, returns a list of available GitHub App installations that match the installation id within GitHub. (Not Terraform Cloud) |
Sample Request
$ curl \ --header "Authorization: Bearer $TOKEN" \ --header "Content-Type: application/vnd.api+json" \ https://app.terraform.io/api/v2/github-app/installations
Sample Response
{ "data": [ { "id": "ghain-BYrbNeGQ8nAzKouu", "type": "github-app-installations", "attributes": { "name": "octouser", "installation-id": 54810170, "icon-url": "https://avatars.githubusercontent.com/u/29916665?v=4", "installation-type": "User", "installation-url": "https://github.com/settings/installations/54810170" } } ]}
Show Installation
GET /github-app/installation/:gh_app_installation_id
Parameter | Description |
---|---|
:gh_app_installation_id | The Github App Installation ID |
Sample Request
$ curl \ --header "Authorization: Bearer $TOKEN" \ --header "Content-Type: application/vnd.api+json" \ https://app.terraform.io/api/v2/github-app/installation/ghain-R4xmKTaxnhLFioUq
Sample Response
{ "data": { "id": "ghain-R4xmKTaxnhLFioUq", "type": "github-app-installations", "attributes": { "name": "octouser", "installation-id": 54810170, "icon-url": "https://avatars.githubusercontent.com/u/29916665?v=4", "installation-type": "User", "installation-url": "https://github.com/settings/installations/54810170" } }}