본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

리포지토리 연결 API

원문 보기 위키 갱신

리포지토리 연결 API (Repository connections)

리포지토리 연결 API는 조직 관리자가 연결된 소스 제어 통합을 나열하고 검사할 수 있게 해줘요. 리포지토리 연결은 GitHub, GitHub Enterprise Server, Bitbucket Server, GitLab Self-Managed, Origin 연결 유형에 걸쳐 일관된 표현을 제공해요.

이 엔드포인트들은 읽기 전용이며 자격 증명이나 기타 비밀 값을 반환하지 않아요. read_organization_repository_connections OAuth 범위와 조직 관리자 접근 권한이 필요해요.

출처: 문서

본문

리포지토리 연결 데이터 모델

목록 응답에는 다음 필드가 포함돼요.

id 리포지토리 연결의 안정적인 UUID
type 연결 유형: github_app, github_code_access_app, github_enterprise_app, github_restricted_app, github_enterprise, bitbucket_server, gitlab_self_managed, 또는 cursor_origin_app
display_name 연결의 사람이 읽을 수 있는 이름
url 리포지토리 연결의 정식 API URL

조회(Get) 응답에는 다음 필드도 포함돼요.

service_account 연결된 서비스 계정과 그 login, 호스트 전용 연결이면 null
host 소스 제어 호스트 세부 정보, 사용할 수 없으면 null. type과 url을 포함해요. 프로바이더에 따라 호스트에 webhook_allowed_addresses, verify_server_cert, authentication_strategy, 또는 proxy_auth_strategy도 포함될 수 있어요.
rate_limit 캐시된 프로바이더 속도 제한 세부 정보, 사용할 수 없거나 적용되지 않으면 null. 존재하면 limit, used, remaining, reset_at을 포함해요.

여러 URL이 구성된 Bitbucket Server 연결은 host.url에 쉼표로 구분된 값을 반환해요.

리포지토리 연결 목록 조회

조직의 페이지네이션되지 않은 리포지토리 연결 목록을 반환해요.

curl -H "Authorization: Bearer ***" \
  -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"
  }
]

필수 범위: read_organization_repository_connections

필수 권한: 조직 관리자 접근 권한

성공 응답: 200 OK

리포지토리 연결 조회

ID로 리포지토리 연결을 반환해요.

curl -H "Authorization: Bearer ***" \
  -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"
  }
}

필수 범위: read_organization_repository_connections

필수 권한: 조직 관리자 접근 권한

성공 응답: 200 OK

오류 응답:

400 Bad Request 연결 ID가 유효한 UUID가 아닌 경우
403 Forbidden 토큰에 필요한 범위가 없거나 사용자에게 조직 관리자 접근 권한이 없는 경우
404 Not Found 리포지토리 연결이 존재하지 않거나 다른 조직에 속한 경우

더 알아보기 (Learn more)