Skip to main content

Update a branch mapping (JSON Merge Patch).

PATCH/api/v1/github-repositories/{github_repository_id}/branch-mappings/{github_branch_mapping_id}connectors:write

Renames the branch, changes its number prefix or turns it on and off. A branch name another mapping of the repository uses is refused.

Scopeconnectors:write (sensitive)
AsynchronousNo
MCP toolupdate_github_repository_branch_mapping
Portal permissionsmanage_github_branch_mappings

Parameters​

NameInTypeRequiredDescription
github_repository_idpathstringRequired
github_branch_mapping_idpathstringRequired
Docwize-Versionheaderstring (date)Optional
If-MatchheaderstringOptional

Request body​

Content typeType
application/jsonGitHubBranchMappingPatchInput
application/merge-patch+jsonGitHubBranchMappingPatchInput

Responses​

StatusDescriptionBody
200Success.application/json GitHubBranchMapping or object
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
409conflictapplication/problem+json Problem
412precondition_failedapplication/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​

GitHubBranchMapping​

FieldTypeRequiredDescription
branch_namestringRequired
github_branch_mapping_idstringRequired
github_repository_idstringRequired
is_enabledbooleanRequired
last_synced_atstring (date-time) or nullRequired
last_synced_shastring or nullRequired
number_prefixstring or nullRequiredEmpty falls back to the repository's prefix.

GitHubBranchMappingPatchInput​

FieldTypeRequiredDescription
branch_namestring or nullOptional
github_branch_mapping_idstring or nullOptional
github_repository_idstring or nullOptional
is_enabledboolean or nullOptional
last_synced_atstring (date-time) or nullOptional
last_synced_shastring or nullOptional
number_prefixstring or nullOptional