Skip to navigation

Merge agent branch

Merge a branch into a target branch. If both branches changed the same field, the merge returns 409 unless conflict_resolutions settles every conflict the merge preview reports, or force is set.

Path parameters

agent_idstringRequired
The id of an agent. This is returned on agent creation.
source_branch_idstringRequired
Unique identifier for the source branch to merge from.

Headers

xi-api-keystringOptional

Query parameters

target_branch_idstringRequired
The ID of the target branch to merge into.

Request

This endpoint expects an object.
archive_source_branchbooleanOptionalDefaults to true
Whether to archive the source branch after merging
forcebooleanOptionalDefaults to false

Keep the source branch’s value for every conflict instead of sending conflict_resolutions

conflict_resolutionslist of objectsOptional

Side to keep, or custom text where the conflict accepts it, for each conflict the preview reported. A merge or rebase with conflicts is rejected unless there is one for every conflict, sent with both tip ids. On a merge it can’t be combined with force, which lets the source win every conflict instead.

source_tip_idstringOptional

Source branch tip version the conflicts were resolved against (source_tip_version_id of the preview). The request fails with 409 if the branch moved since.

target_tip_idstringOptional

Target branch tip version the conflicts were resolved against (target_tip_version_id of the preview). The request fails with 409 if the branch moved since.

Response

Successful Response

Errors

422
Branches Merge Request Unprocessable Entity Error