Skip to main content

installations

Creates, updates, deletes, gets or lists an installations resource.

Overview

Nameinstallations
TypeResource
Idgithub.apps.installations

Fields

The following fields are returned by SELECT queries:

You can find the permissions for the installation under the permissions key.

NameDatatypeDescription
idintegerThe ID of the installation.
app_idinteger
client_idstring (example: Iv1.ab1112223334445c)
target_idintegerThe ID of the user or organization this token is being scoped to.
single_file_namestring (example: config.yaml)
access_tokens_urlstring (uri) (example: https://api.github.com/app/installations/1/access_tokens)
accountobjectA GitHub user. (title: Simple User)
app_slugstring (example: github-actions)
contact_emailstring (example: "test_13f1e99741e3e004@d7e1eb0bc0a1ba12.com")
created_atstring (date-time)
eventsarray
has_multiple_single_filesboolean
html_urlstring (uri) (example: https://github.com/organizations/github/settings/installations/1)
permissionsobjectThe permissions granted to the user access token. (title: App Permissions)
repositories_urlstring (uri) (example: https://api.github.com/installation/repositories)
repository_selectionstringDescribe whether all repositories have been selected or there's a selection involved (all, selected)
single_file_pathsarray
suspended_atstring (date-time)
suspended_byobjectA GitHub user. (title: Simple User)
target_typestring (example: Organization)
updated_atstring (date-time)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_installations_for_authenticated_userselectper_page, pageLists installations of your GitHub App that the authenticated user has explicit permission (:read, :write, or :admin) to access.

The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.

You can find the permissions for the installation under the permissions key.
revoke_installation_access_tokendeleteRevokes the installation token you're using to authenticate as an installation and access this endpoint.

Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "Create an installation access token for an app" endpoint.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

SELECT examples

Lists installations of your GitHub App that the authenticated user has explicit permission (:read, :write, or :admin) to access.

The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.

You can find the permissions for the installation under the permissions key.

SELECT
id,
app_id,
client_id,
target_id,
single_file_name,
access_tokens_url,
account,
app_slug,
contact_email,
created_at,
events,
has_multiple_single_files,
html_url,
permissions,
repositories_url,
repository_selection,
single_file_paths,
suspended_at,
suspended_by,
target_type,
updated_at
FROM github.apps.installations
WHERE per_page = '{{ per_page }}'
AND page = '{{ page }}'
;

DELETE examples

Revokes the installation token you're using to authenticate as an installation and access this endpoint.

Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "Create an installation access token for an app" endpoint.

DELETE FROM github.apps.installations
;