Skip to main content

List the branches of a repository.

POST/api/v1/github-repositories/discover-branchesconnectors:read

Lists one page of a repository's branches, by repository (github_repository_id) or by installation with the owner and name. Nothing is saved.

Scopeconnectors:read (sensitive)
AsynchronousNo
MCP tooldiscover_github_repository_branches
Portal permissionsview_github_repositories

Parameters​

NameInTypeRequiredDescription
Docwize-Versionheaderstring (date)Optional

Request body​

Content typeType
application/jsonGitHubDiscoverBranchesRequestInput

Responses​

StatusDescriptionBody
200Success.application/json GitHubDiscoveredBranches
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

GitHubDiscoverBranchesRequestInput​

FieldTypeRequiredDescription
github_installation_idstring or nullOptional
github_repository_idstring or nullOptional
pageinteger or nullOptional
repo_namestring or nullOptional
repo_ownerstring or nullOptional

GitHubDiscoveredBranch​

FieldTypeRequiredDescription
commit_shastringRequired
namestringRequired

GitHubDiscoveredBranches​

FieldTypeRequiredDescription
branchesarray of GitHubDiscoveredBranchRequired
default_branchstringRequired
next_pageintegerRequiredThe next page; 0 at the last page. ≥ -2147483648; ≤ 2147483647
pageintegerRequired≥ -2147483648; ≤ 2147483647
repo_namestringRequired
repo_ownerstringRequired