API Reference/Git
Get a branch reference
Get a reference to a branch in the Git repository. Returns the ref name and SHA of the branch.
GET
/git/v1/repo/{repo}/git/refs/heads/{*branch}
Path Parameters
repo
RequiredstringThe repository id
Format:
"uuid"
branch
RequiredstringThe branch's name
Response Body
200
Branch reference object
name
RequiredstringThe name of the ref (e.g., "refs/heads/main" or "refs/tags/v1.0.0")
sha
RequiredstringThe SHA-1 hash of the Git object this reference points to
403
Forbidden
message
Requiredstring500
Internal server error
message
RequiredstringBranch reference object