Baselines for Confluence Data Center
Breadcrumbs

REST API


You can create baselines through REST API.

The format for a Baseline Create call is as follows:

REST Call

HTTP POST  

<confluence-server>/plugins/servlet/baselinecreateservlet?space-key=<space-key>&baseline-name=<baseline-name>&baseline-keyword=<baseline-keyword>&baseline-date=<baseline-date>&selectAllPages=<select-all-pages>&fullySelectedPages=<fully-selected-pages>&partiallySelectedPages=<partially-selected-pages>


Parameter

Description

Sample

confluence-server

The full URL for your Confluence Server

http://192.168.0.71:6110/confluence611

space-key

The key of the Confluence document space for which the baseline will be created

ABC

baseline-name

The name of the baseline that will be created

My New Baseline

baseline-keyword

(Optional) The keyword for the baseline. Any string works.

!!! Leave empty if you are not sure how to use this.


baseline-date

The date and exact time for the baseline

12.09.2018 11:08:12

select-all-pages

Whether all pages in the space will be included in the baseline

Possible values:

  • true

  • false

  • true

  • false

fully-selected-pages

Used if "select_all_pages" is false

A comma separated list of page ID's. The pages in this list will be included in the baseline WITH all their subpages.

  • 12345

  • 12345,13564

partially-selected-pages

Used if "select_all_pages" is false

A comma separated list of page ID's. The pages in this list will be included in the baseline WITHOUT their subpages.

  • 12345

  • 12345,13564


Sample Requests:

(HTTP POST) 

http://192.168.0.71:6110/confluence611/plugins/servlet/baselinecreateservlet?space-key=ds&baseline-name=My New Baseline 1&baseline-date=12.09.2018 11:08:12&selectAllPages=true

http://192.168.0.71:6110/confluence611/plugins/servlet/baselinecreateservlet?space-key=ds&baseline-name=My New Baseline 2&baseline-date=12.09.2018 11:08:12&selectAllPages=false&fullySelectedPages=65540,66534&partiallySelectedPages=63578,34527


Result

The REST call will return a JSON text either confirming the creation of the baselines or error messages about parameters.


{
    "message": "Baseline My New Baseline 1 created with 14 page(s) and 21 attachment(s)",
    "warnings": []
}