List the branches of a repository.
POST/api/v1/github-repositories/discover-branchesconnectors:read
注記
このページの操作の説明は、API の OpenAPI 文書のとおり英語で記載しています。
Lists one page of a repository's branches, by repository (github_repository_id) or by installation with the owner and name. Nothing is saved.
| スコープ | connectors:read (機密性の高いスコープ) |
| 非同期 | いいえ |
| MCP ツール | discover_github_repository_branches |
| Portal の権限 | view_github_repositories |
パラメーター
| 名前 | 場所 | 型 | 必須 | 説明 |
|---|---|---|---|---|
Docwize-Version | header | string (date) | 任意 |
リクエスト本文
| Content-Type | 型 |
|---|---|
application/json | GitHubDiscoverBranchesRequestInput |
応答
| ステータス | 説明 | 本文 |
|---|---|---|
200 | Success. | application/json GitHubDiscoveredBranches |
400 | invalid_version, malformed_json | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
404 | not_found | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
413 | payload_too_large | application/problem+json Problem |
415 | unsupported_media_type | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
エラー
この操作が返す可能性のある problem のコードです。各コードからそのページに移動できます。
スキーマ
GitHubDiscoverBranchesRequestInput
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
github_installation_id | string または null | 任意 | |
github_repository_id | string または null | 任意 | |
page | integer または null | 任意 | |
repo_name | string または null | 任意 | |
repo_owner | string または null | 任意 |
GitHubDiscoveredBranch
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
commit_sha | string | 必須 | |
name | string | 必須 |
GitHubDiscoveredBranches
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
branches | GitHubDiscoveredBranch の配列 | 必須 | |
default_branch | string | 必須 | |
next_page | integer | 必須 | The next page; 0 at the last page. ≥ -2147483648; ≤ 2147483647 |
page | integer | 必須 | ≥ -2147483648; ≤ 2147483647 |
repo_name | string | 必須 | |
repo_owner | string | 必須 |