Repository connections API
The repository connections API lets organization administrators list and inspect connected source control integrations. Repository connections provide a consistent representation across GitHub, GitHub Enterprise Server, Bitbucket Server, and GitLab Self-Managed connection types.
These endpoints are read-only and do not return credentials or other secret values. The endpoints require the read_organization_repository_connections OAuth scope and organization administrator access.
Repository connection data model
List responses contain the following fields:
id |
Stable UUID for the repository connection |
|---|---|
type |
Connection type: github_app, github_code_access_app, github_enterprise_app, github_restricted_app, github_enterprise, bitbucket_server, or gitlab_self_managed
|
display_name |
Human-readable name for the connection |
url |
Canonical API URL for the repository connection |
Get responses also contain the following fields:
service_account |
Connected service account with its login, or null for host-only connections |
|---|---|
host |
Source control host details, or null when they are unavailable. Contains type and url. Depending on the provider, the host can also contain webhook_allowed_addresses, verify_server_cert, authentication_strategy, or proxy_auth_strategy
|
rate_limit |
Cached provider rate-limit details, or null when they are unavailable or do not apply. When present, contains limit, used, remaining, and reset_at
|
Bitbucket Server connections with multiple configured URLs return a comma-separated value in host.url.
List repository connections
Returns an unpaginated list of repository connections for an organization.
curl -H "Authorization: Bearer $TOKEN" \
-X GET "https://api.buildkite.com/v2/organizations/{org.slug}/repository_connections"
[
{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"type": "github_code_access_app",
"display_name": "GitHub (acme-inc)",
"url": "https://api.buildkite.com/v2/organizations/acme-inc/repository_connections/01234567-89ab-cdef-0123-456789abcdef"
},
{
"id": "12345678-9abc-def0-1234-56789abcdef0",
"type": "gitlab_self_managed",
"display_name": "GitLab Self-Managed",
"url": "https://api.buildkite.com/v2/organizations/acme-inc/repository_connections/12345678-9abc-def0-1234-56789abcdef0"
}
]
Required scope: read_organization_repository_connections
Required permission: organization administrator access
Success response: 200 OK
Get a repository connection
Returns a repository connection by its ID.
curl -H "Authorization: Bearer $TOKEN" \
-X GET "https://api.buildkite.com/v2/organizations/{org.slug}/repository_connections/{id}"
{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"type": "github_code_access_app",
"display_name": "GitHub (acme-inc)",
"url": "https://api.buildkite.com/v2/organizations/acme-inc/repository_connections/01234567-89ab-cdef-0123-456789abcdef",
"service_account": {
"login": "acme-inc"
},
"host": {
"type": "github",
"url": "https://github.com"
},
"rate_limit": {
"limit": 5000,
"used": 42,
"remaining": 4958,
"reset_at": "2026-07-16T06:00:00Z"
}
}
Required scope: read_organization_repository_connections
Required permission: organization administrator access
Success response: 200 OK
Error responses:
400 Bad Request |
The connection ID is not a valid UUID. |
|---|---|
403 Forbidden |
The token does not have the required scope or the user does not have organization administrator access. |
404 Not Found |
The repository connection does not exist or belongs to a different organization. |