You can create baselines through the public REST API.
The format for a Baseline Create call is as follows:
REST Call
Notes | ||
---|---|---|
HTTP Method | POST | |
URL | <confluence-server>/rest/baseline/1.0/baselineService/createBaseline | |
Header | Authorization: Basic <base64_encoded_username_password> | Use the username and password of the Confluence user used for this integration. https://mixedanalytics.com/tools/basic-authentication-generator/ |
Header | Content-Type: application/json | |
Body | Example { "baseline-name":"My Baseline", "space-key":"ABC", "selectAllPages":"false", "creation-type":"version-based", "baseline-keyword":"", "baseline-date":"2022-12-31 12:34:56", "fullySelectedPages":[ { "id":"3473425" } ], "partiallySelectedPages":[ { "id":"3473421", "version":"2" }, { "id":"3473423", "version":"latest" } ] } | The JSON body here is shown as an example for all the report parameter values. Not all of these parameters can be used together. Please see the parameter reference table further on this page. |
Parameter | Description | Required | Example |
---|---|---|---|
confluence-server | The full URL for your Confluence Server | Yes | http://192.668.0.71:6110/confluence611 |
space-key | The key of the Confluence document space for which the baseline will be created | Yes | ABC |
baseline-name | The name of the baseline that will be created | Yes | My New Baseline |
creation-type | How to pick page versions from each page's history. Two options:
| Yes |
|
baseline-keyword | (Optional) The keyword for the baseline. Any string works. !!! Leave it empty if you are not sure how to use this. | ||
baseline-date | The date and exact time for the baseline | only when creation-type = date-based | 2018-09-12 11:08:12 |
selectAllPages | Whether all pages in the space will be included in the baseline Possible values:
|
| |
partiallySelectedPages | Used if "selectAllPages" is false A list of page ID's that will be included in the baseline. The pages in this list will be included in the baseline WITHOUT their subpages.
| [ | |
fullySelectedPages | Used if "selectAllPages" is false A list of page ID's that will be included in the baseline. The pages in this list will be included in the baseline WITH all their subpages. (Subpages will be included with their latest versions unless another version is explicitly defined)
| [ |
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": [] }