# Get branch Endpoint: GET /code/api/v1/repos/{repo_identifier}/branches/{branch_name} Version: 1.0 Security: x-api-key ## Query parameters: - `accountIdentifier` (string, required) Account Identifier for the Entity. - `orgIdentifier` (string) Organization Identifier for the Entity. - `projectIdentifier` (string) Project Identifier for the Entity. - `include_checks` (boolean) If true, the summary of check for the branch commit SHA would be included in the response. - `include_rules` (boolean) If true, a list of rules that apply to this branch would be included in the response. - `include_pullreqs` (boolean) If true, a list of pull requests from the branch would be included in the response. - `max_divergence` (integer) If greater than zero, branch divergence from the default branch will be included in the response. The divergence would be calculated up the this many commits. ## Path parameters: - `repo_identifier` (string, required) - `branch_name` (string, required) ## Response 200 fields (application/json): - `check_summary` (object) - `check_summary.error` (integer) - `check_summary.failure` (integer) - `check_summary.pending` (integer) - `check_summary.running` (integer) - `check_summary.success` (integer) - `commit` (object) - `commit.author` (object) - `commit.author.identity` (object) - `commit.author.identity.email` (string) - `commit.author.identity.name` (string) - `commit.author.when` (string) - `commit.committer` (object) - `commit.message` (string) - `commit.parent_shas` (array) - `commit.sha` (string) Git object hash - `commit.signature` (object,null) - `commit.signature.created` (integer) - `commit.signature.key_fingerprint` (string) - `commit.signature.key_id` (string) - `commit.signature.key_scheme` (string) Enum: "pgp", "ssh" - `commit.signature.result` (string) Enum: "bad", "good", "invalid", "key_expired", "revoked", "unsupported", "unverified" - `commit.signature.updated` (integer) - `commit.stats` (object) - `commit.stats.files` (array) - `commit.stats.files.changes` (integer) - `commit.stats.files.deletions` (integer) - `commit.stats.files.insertions` (integer) - `commit.stats.files.old_path` (string) - `commit.stats.files.path` (string) - `commit.stats.files.status` (string) - `commit.stats.total` (object) - `commit.title` (string) - `commit_divergence` (object) - `commit_divergence.ahead` (integer) - `commit_divergence.behind` (integer) - `is_default` (boolean) - `pull_requests` (array) - `pull_requests.closed` (integer,null) - `pull_requests.description` (string) - `pull_requests.edited` (integer) - `pull_requests.is_draft` (boolean) - `pull_requests.labels` (array) - `pull_requests.labels.color` (string) Enum: "blue", "brown", "cyan", "green", "indigo", "lime", "mint", "orange", "pink", "purple", "red", "violet", "yellow" - `pull_requests.labels.id` (integer) - `pull_requests.labels.key` (string) - `pull_requests.labels.scope` (integer) - `pull_requests.labels.value` (string,null) - `pull_requests.labels.value_color` (string) Enum: "blue", "brown", "cyan", "green", "indigo", "lime", "mint", "orange", "pink", "purple", "red", "violet", "yellow" - `pull_requests.labels.value_count` (integer) - `pull_requests.labels.value_id` (integer,null) - `pull_requests.merge_base_sha` (string) - `pull_requests.merge_check_status` (string) - `pull_requests.merge_conflicts` (array) - `pull_requests.merge_method` (string) Enum: "fast-forward", "merge", "rebase", "squash" - `pull_requests.merge_target_sha` (string,null) - `pull_requests.merge_violations_bypassed` (boolean,null) - `pull_requests.merged` (integer,null) - `pull_requests.merger` (object,null) - `pull_requests.merger.display_name` (string) - `pull_requests.merger.type` (string) Enum: "service", "serviceaccount", "user" - `pull_requests.merger.uid` (string) - `pull_requests.number` (integer) - `pull_requests.rebase_check_status` (string) - `pull_requests.rebase_conflicts` (array) - `pull_requests.rules` (array) - `pull_requests.rules.identifier` (string) - `pull_requests.rules.repo_path` (string) - `pull_requests.rules.space_path` (string) - `pull_requests.rules.state` (string,null) Enum: "active", "disabled", "monitor" - `pull_requests.source_branch` (string) - `pull_requests.source_repo_id` (integer) - `pull_requests.source_sha` (string) - `pull_requests.target_branch` (string) - `pull_requests.target_repo_id` (integer) ## Response 401 fields (application/json): - `message` (string) - `values` (object) ## Response 403 fields (application/json): - `message` (string) - `values` (object) ## Response 404 fields (application/json): - `message` (string) - `values` (object) ## Response 500 fields (application/json): - `message` (string) - `values` (object)