Page tree
Skip to end of metadata
Go to start of metadata

On this page:

Creating Branches

Branches can be created from every page from within the actions menu if branching is not disabled by the space admin or restricted to specific users or groups (see restrictions).

Merging Branches

To merge a branch back into the original page either use the Merge link from within the actions menu or click on the original page name in the brach info text to open a dialog where you can click the Merge button.

Updating Branches

If the content of the original page has been modified, the branch can be updated to adopt these changes. Click on the original page name in the brach info text to open a dialog and click the Update button.

Restricting Viewing Or Editing Branches

To restrict branches from either viewing it entirely or editing it, use the Confluence restrictions dialog like on any other page.

Restricting Who Can Create Branches

To restrict which users or groups can create branches in a space, simply add view permissions to the Branches parent page. The parent page is created with the first branch in a space an can be found via the space shortcut or in the page tree directly under the home page.

Archiving Branches

Branches are moved to the trash by default when merging a branch. But a space administrator can enable branch archiving within the Add-ons → Page Branching page in the Space Administration and configure an archive space. After that, a branch will be moved to that archive space instead of the trash.

Disable Page Branching

A space administrator can disable page branching in that space within the Add-ons → Page Branching page in the Space Administration.

REST

Page Branching provides a REST interface in order to branch a specific page using a POST-Request. Further information about the Endpoints will follow below:

REST Endpoint
rest/pagebranching/1.0/

The following headers need to be present for each request:

  • Content-Type: application/json
  • Authorization: Basic Auth with Confluence User (Example: Basic YWRtaW46YWRtaW4=)

Branching

Branching Endpoint
rest/pagebranching/1.0/branchPage

The Endpoint requires the following parameters in JSON Format:

  • ID of the page that shall be branched
  • BranchName for the branched page
     
Sample Request Body Branching
{
	"pageId" : 549027858,
	"branchName" : "My Branch"
}


If the branching has been successful, the new page ID of the branched page is being returned. In case of failure, an error message will be displayed.
Branching via the REST interface still requires Page Branching to be enabled in the corresponding space as well as an authenticated user to have all required permissions.

Merging

PageBranching also provides a REST Endpoint to merge branches back into the original page:

Merging Endpoint
rest/pagebranching/1.0/mergePage

The Endpoint requires the following parameters in JSON Format:

  • ID of the page that shall be merged


Sample Request Body Merging
{
	"pageId" : 549027858
}

Merging is only possible if no merging conflicts occure. In case of successful merging, a HTTP Response 200 will be sent.


Please note that Page Branching for Confluence is incompatible with Scroll Versions for Confluence.

Download Page Branching
from the Atlassian Marketplace!


  • No labels