GitHub v3 REST API

Get a repository installation for the authenticated app

Enables an authenticated GitHub App to find the repository’s installation information. The installation’s account type will be either an organization or a user account, depending which account the repository belongs to.

You must use a JWT to access this endpoint.

get
http://HOSTNAME/api/v3/repos/{owner}/{repo}/installation

Path Parameters

ownerstringrequired
repostringrequired

Response

application/json

Response

Installation

Installation

idintegerrequired

The ID of the installation.

Example:1

accountAny Of
required
Simple Userobject

Simple User

Show Child Parameters
repository_selectionstringrequired

Describe whether all repositories have been selected or there’s a selection involved

Allowed values:allselected

access_tokens_urlstring(uri)required

Example:https://api.github.com/installations/1/access_tokens

repositories_urlstring(uri)required

Example:https://api.github.com/installation/repositories

html_urlstring(uri)required

Example:https://github.com/organizations/github/settings/installations/1

app_idintegerrequired

Example:1

target_idintegerrequired

The ID of the user or organization this token is being scoped to.

target_typestringrequired

Example:Organization

permissionsobjectrequired

The permissions granted to the user-to-server access token.

Example:{"contents":"read","issues":"read","deployments":"write","single_file":"read"}

Show Child Parameters
eventsarray[string]required
created_atstring(date-time)required
updated_atstring(date-time)required
single_file_namestring | nullrequired

Example:config.yaml

has_multiple_single_filesboolean

Example:true

single_file_pathsarray[string]

Example:["config.yml",".github/issue_TEMPLATE.md"]

app_slugstringrequired

Example:github-actions

suspended_byobject | nullrequired

Simple User

Show Child Parameters
suspended_atstring | null(date-time)required
contact_emailstring | null

Example:"test_13f1e99741e3e004@d7e1eb0bc0a1ba12.com"

get/repos/{owner}/{repo}/installation
 
application/json

List app installations accessible to the user access token

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

You must use a user-to-server OAuth access token, created for a user who has authorized your GitHub App, to access this endpoint.

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.

get
http://HOSTNAME/api/v3/user/installations

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Response

application/json

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

total_countintegerrequired
installationsarray[object]required

Installation

Show Child Parameters
get/user/installations
 
application/json

List repositories accessible to the user access token

List repositories that the authenticated user has explicit permission (:read, :write, or :admin) to access for an installation.

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 must use a user-to-server OAuth access token, created for a user who has authorized your GitHub App, to access this endpoint.

The access the user has to each repository is included in the hash under the permissions key.

get
http://HOSTNAME/api/v3/user/installations/{installation_id}/repositories

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

installation_idintegerrequired

installation_id parameter

Response

application/json

The access the user has to each repository is included in the hash under the permissions key.

total_countintegerrequired
repository_selectionstring
repositoriesarray[object]required

A git repository

Show Child Parameters
get/user/installations/{installation_id}/repositories
 
application/json

Add a repository to an app installation

Add a single repository to an installation. The authenticated user must have admin access to the repository.

You must use a personal access token (which you can create via the command line or Basic Authentication) to access this endpoint.

put
http://HOSTNAME/api/v3/user/installations/{installation_id}/repositories/{repository_id}

Path Parameters

installation_idintegerrequired

installation_id parameter

repository_idintegerrequired

Response

Response

put/user/installations/{installation_id}/repositories/{repository_id}
 

Remove a repository from an app installation

Remove a single repository from an installation. The authenticated user must have admin access to the repository.

You must use a personal access token (which you can create via the command line or Basic Authentication) to access this endpoint.

delete
http://HOSTNAME/api/v3/user/installations/{installation_id}/repositories/{repository_id}

Path Parameters

installation_idintegerrequired

installation_id parameter

repository_idintegerrequired

Response

Response

delete/user/installations/{installation_id}/repositories/{repository_id}