Merge Branch
API Name
API Name: Branch – Merge
Overview
This API merges the specified branch into the main (default/master) branch of the given project.
MBSE Core uses this API to:
Merge temporary or synchronization branches
Consolidate changes into the primary branch
Finalize branch-based operations
Connector responsibility:
Merge the branch identified by
branchIdinto the main/master branch.Ensure the merge operation is scoped to the given
projectId.Handle merge conflicts according to end system capabilities.
Return appropriate HTTP status codes based on merge outcome.
API URI
Path Parameters
branchId
True
String
ID of the branch to be merged into the main/master branch.
URI Parameters
projectId
True
String
ID of the project in which the branch exists.
Behavior Rules
The merge must occur within the context of the provided
projectId.The specified branch must be merged into the main/master branch.
Connector must:
Call the end system’s merge API.
Ensure merge consistency.
If merge is successful:
Return HTTP
204 No Content.
If branch does not exist:
Return HTTP
404 Not Found.
If merge conflicts occur and are not auto-resolved:
Return HTTP
409 Conflict.
Connector must not silently ignore merge failures.
Response
This API does not return a response body.
Successful Merge
HTTP Status: 204 No Content
Error Handling
400
Invalid request parameters.
404
Branch not found in the specified project.
409
Merge conflict or merge not allowed.
500
Internal server error during merge operation.
Example Use Case
Merge Branch into Main
Implementation Guidelines
Ensure the branch belongs to the specified project before attempting merge.
Validate that the branch is not already the main/master branch.
If the end system generates a new revision during merge:
Ensure revision history remains consistent.
If merge conflicts occur:
Either auto-resolve (if supported) or return
409 Conflict.
Do not return partial success responses.
Design Rationale
This API completes the branch lifecycle by enabling:
Controlled integration of branch changes
Revision history consolidation
Deterministic synchronization workflows
By clearly separating:
Branch creation
Branch deletion
Branch merge
The MBSE layer remains structured, predictable, and integration-safe.
Last updated

