Skip to content

List GitHub repositories

GET/v1/git-connections/github-app/repositories

Returns every repository the GitHub App can access across all of the workspace's GitHub connections. Repositories are grouped by connection, most recently connected first, and a repository reachable through several connections is listed once.

Results are cached for a few minutes. After you change which repositories the app can access on GitHub, send refresh=1 to bypass the cache.

Requires the secrets read permission (owner, admin or developer role).

Authentication

Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.

Query parameters

refreshstring

Send 1 or true to fetch fresh results from GitHub instead of the cache. Any other value is ignored.

One of1true

Headers

X-Workspace-SlugstringRequired

Slug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.

Response

200

The repositories the GitHub App can access.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataarray of objects
Show item attributes
idintegerRequired

GitHub's repository ID.

namestringRequired

Repository name.

full_namestringRequired

Repository in owner/name form. Use it as repo in other Git Connections endpoints.

ownerstringRequired

GitHub login of the repository owner.

privatebooleanRequired

Whether the repository is private.

default_branchstringRequired

The repository's default branch.

clone_urlstringRequired

HTTPS clone URL.

html_urlstringRequired

Repository page on GitHub.

updated_atstring (date-time)

When the repository was last updated on GitHub. Omitted if GitHub did not report it.

installation_idinteger

GitHub installation ID of the connection that gives access to the repository.

installation_accountstring

GitHub account of the connection that gives access to the repository.

Errors

StatusMeaning
401The API key is missing, invalid, expired or revoked.
403You cannot access the workspace, your role does not allow this action, or the account is suspended.
404No GitHub account is connected to this workspace.
500GitHub could not be reached or refused the request for one of the connections.

Errors use the standard error format.