Terraform
- Terraform Enterprise
- 1.0.x (latest)
- v202507-1
- v202506-1
- v202505-1
- v202504-1
- v202503-1
- v202502-2
- v202502-1
- v202501-1
- v202411-2
- v202410-1
- v202409-3
- v202409-2
- v202409-1
- v202408-1
- No versions of this document exist before v202408-1. Click below to redirect to the version homepage.
- v202407-1
- v202406-1
- v202405-1
- v202404-2
- v202404-1
- v202402-2
- v202402-1
- v202401-2
- v202401-1
- v202312-1
- v202311-1
- v202310-1
- v202309-1
- v202308-1
- v202307-1
- v202306-1
- v202305-2
- v202305-1
- v202304-1
- v202303-1
- v202302-1
- v202301-2
- v202301-1
- v202212-2
- v202212-1
- v202211-1
- v202210-1
- v202209-2
- v202209-1
- v202208-3
- v202208-2
- v202208-1
- v202207-2
- v202207-1
- v202206-1
GitHub App Installations API
You can create a GitHub App installation using the HCP Terraform 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 HCP Terraform) |
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"
}
}
}