Please note, that the following REST endpoints are not officially supported and may change in upcoming releases without notice. Please test your tools heavily on a test system before using those in Production environment.

You can have a look at the collection private APIs with REST API browser for Confluence

We have an open improvement request to provide a stable REST API for Scroll Versions which is tracked in our JIRA system: VSN-1811 - Getting issue details... STATUS

Get the page details of a versioned page

You can get the Confluence page ID, page title, change type, and additional information of a versioned page using the following POST request:

POST [confluence_base_url]/rest/scroll-versions/1.0/page/<spaceKey>
CODE

You have to set the following parameters:

Path parametersDescriptionExample
confluence_base_urlThe base URL of your Confluence systemconfluence.k15t.com
spaceKeyThe space key of your versioned spaceVSN

As this is a POST request, make sure to authorize and set the following body arguments and their values depending on what you're looking for:

Body argumentBody valueDescription
queryArg
scrollPageTitle
-
value
<title>

The <title> of the page you want to get further details for.

Example: To get a list of a versioned page called scrollpage in space VSN on confluence.k15t.com:

POST confluence.k15t.com/rest/scroll-versions/1.0/page/VSN

with this raw body: [{"queryArg": "scrollPageTitle", "value": "scrollpage"}]

This will result in a list of the page for all its versions in the following format:

  {
    "targetVersion": {
      "versionId": "C0A812CE0160D685FEF2582F7A13FAE6",
      "id": "C0A812CE0160D685FEF2582F7A13FAE6",
      "name": "1",
      "i18nName": "version 1"
    },
    "scrollPageTitle": "scrollpage",
    "plainConfluenceTitle": "scrollpage",
    "confluencePageTitle": ".scrollpage v1",
    "scrollPageId": "C0A8127401622E4524D61AE85B97F931",
    "pageType": "change",
    "changeType": "Modify",
    "confluencePageId": 4227112,
    "spaceKey": "VSN",
    "available": false,
    "converted": false,
    "isDirty": false,
    "includedScrollPageIds": "",
    "cached": false,
    "lastModificationDate": 1521194706062,
    "lastModifier": "admin"
  }
CODE

Search for versioned or unversioned pages

You can search for versioned or unversioned pages in a specific space using the following POST request:

POST [confluence_base_url]/rest/scroll-versions/1.0/page/<spaceKey>
CODE

You have to set the following parameters:

Path parameters

DescriptionExample
confluence_base_urlThe base URL of your Confluence systemconfluence.k15t.com
spaceKey

The space key of your versioned space

VSN

As this is a POST request, make sure to authorize and set the following body arguments and their values depending on what you're looking for:

Body argumentBody valueDescription
queryArg
pageType

-

value
change

Shows all versions pages

queryArg
isUnversioned

-

value
true

Shows all unversioned pages

queryArg
pageType

-

value
masterPage

Shows all master pages

Example: To get a list of all versioned pages in space VSN on confluence.k15t.com:

POST confluence.k15t.com/rest/scroll-versions/1.0/page/VSN

with this raw body: [{"queryArg": "pageType", "value": "change"}]

This will result in a list of all versioned pages in the following format:

  {
    "targetVersion": {
      "versionId": "C0A812CE0160D685FEF2582F7A13FAE6",
      "id": "C0A812CE0160D685FEF2582F7A13FAE6",
      "name": "1",
      "i18nName": "version 1"
    },
    "scrollPageTitle": "VSN Home1gggdfsdfsef",
    "plainConfluenceTitle": "VSN Home1gggdfsdfsef",
    "confluencePageTitle": ".VSN Home1gggdfsdfsef v1",
    "scrollPageId": "C0A812CE0160D685FF000899402A9F76",
    "pageType": "change",
    "changeType": "Modify",
    "confluencePageId": 66355,
    "scrollPageKey": "test5",
    "spaceKey": "VSN",
    "available": false,
    "converted": false,
    "isDirty": false,
    "includedScrollPageIds": "",
    "cached": false,
    "lastModificationDate": 1517229013049,
    "lastModifier": "admin"
  }
...
CODE

Manage workflows states

To get the workflow state

You can get additional information about the workflow state of a specific page by using the following GET request:

GET [confluence_base_url]/rest/scroll-versions/1.0/workflow/{confluencePageId}
CODE

You have to set the following parameters:

Path parameters

DescriptionExample
confluence_base_urlThe base URL of your Confluence systemconfluence.k15t.com
confluencePageId

The Confluence page ID should be the one from the versioned page you want to get the workflow from.

66355

Example: To get the workflow state of the page with page ID 66355 on confluence.k15t.com:

GET confluence.k15t.com/rest/scroll-versions/1.0/workflow/66355

This will result in workflow details for the specific page in the following format:

{
  "id": "done",
  "i18nName": "Complete",
  "isCompleted": false,
  "isFinalState": true,
  "actions": [
    {
      "id": "restart",
      "i18nName": "Restart"
    }
  ]
}
CODE

To write the workflow state

You can set a workflow state to a specific page by using the following PUT request:

PUT [confluence_base_url]/rest/scroll-versions/1.0/workflow/changeStatus/{spaceKey}/{newStateId}/with
CODE

You have to set the following parameters:

Path parametersMandatoryDescriptionExample
confluence_base_url(tick)The base url of your Confluence systemconfluence.k15t.com
spaceKey(tick)The space key of your versioned spaceVSN
newStateId(tick)

The state of the workflow you want to set. Please note that it's currently only possible to change the page status of the default Scroll Versions workflow.

The IDs of the standard workflows are as follows:

StatusStateId
Draftdraft
Reviewapproval
Completedone
draft
includeStateId(error)

The state of the workflow you want to specifically include in the change. If this is not set, all states will be changed, if not explicitely excluded.

approval
excludeStateId(error)

The state of the workflow you want to specifically exclude from the change. Please note that exclusion takes precedence over inclusion. If a workflow state is set for both parameters, it will not be changed.

done
versionId(error)Only the pages with the specified version will be processed.7F0000010161DD48EAD95DA06BCB9A83
includePrecedingVersions(error)indicates if the pages of all preceding versions versionId should be changed. If versionId is not provided then it has no impact.true

Example: To change the workflow state of pages in state review in space with space key VSN in version with versionid C0A812CE0160D685FEF2582F7A13FAE6 and all preceding versions to state done on confluence.k15t.com:

PUT confluence.k15t.com/rest/scroll-versions/1.0/workflow/changeStatus/VSN/done/with?versionId=C0A812CE0160D685FEF2582F7A13FAE6&includePrecedingVersions=true

This will return something like the following:

{
  "id": "C0A8127401622E794192788978BCD82C",
  "clusterNo": -1,
  "started": false,
  "cancelled": false,
  "hasFailed": false,
  "finished": false,
  "failureMessage": null,
  "progress": 0,
  "message": "The task 'Change workflow status' is currently queued.",
  "resourceLocation": null
}
CODE

Change the Scroll Page Title

You can change the page title of a versioned page using the following PUT request:

PUT [confluence_base_url]/rest/scroll-versions/1.0/metadata/scroll-page-title/{confluencePageId}
CODE

You have to set the following parameters:

Path parameters

DescriptionExample
confluence_base_urlThe base URL of your Confluence systemconfluence.k15t.com
confluencePageId

The page ID of the versioned space you want to change the page title

107302

In this PUT request, make sure to authorize and set the following body argument and the values to set the new page title

Body argumentBody valueDescription
scrollPageTitle
Guide

The value will be used for the new page title

Example: To change the page title of the versioned page with page ID 1017302 on confluence.k15t.com to page title Guide:

PUT confluence.k15t.com/rest/scroll-versions/1.0/metadata/scroll-page-title/1017302

with this raw body: {"scrollPageTitle": "Guide"}

Manage variants with REST API

It can sometimes be quite tedious to manually apply attributes to a large amount of existing Scroll Version pages via the Scroll Versions User Interface. The Scroll Versions Variant Management UI uses a REST API list and applies attributes. That REST API can also be used in scripts to automate this process.

To automatically set attributes using REST:

  1. Get a list of all attributes and values for a given space

    GET [confluence_base_url]/rest/scroll-versions/1.0/attribute/<spaceKey>
    CODE

    You will get response the following:

    [{
    	"id": < attributeId > ,
    	"name": < attributeName > ,
    	"values": [
    	{
        	"id": < valueId > ,
        	"name": < valueName >
    	}]
    }]
    CODE


    For example:

    [{
        "id": "C0A81194013F85E4D708347C1B3CF8FF",
        "name": "Deployment Type",
        "values": [
        {
            "id": "C0A81194013F85E4D708AB280D8F63AA",
            "name": "AOD"
        },
        {
            "id": "C0A81194013F85E4D70856EF40D834DA",
            "name": "BTF"
        }]
    }]
    CODE
  2. Add attribute value(s) to a page:

    POST [confluence_base_url]/rest/scroll-versions/1.0/metadata/page/<confluencePageId>
    CODE
    Body argumentBody valueDescription

    attributeId

    attributeValueId:true


    For example:

    To add the 'AOD' value of the attribute 'Deployment Type' to the Confluence page with Confluence Page Id '533232', you would need to do POST request to http://localhost:1990/confluence/rest/scroll-versions/1.0/metadata/page/533232 with body {"C0A81194013F85E4D708347C1B3CF8FF":{"C0A81194013F85E4D708AB280D8F63AA":true}}

  3. Get a list of attribute value(s) for a page:

    GET [confluence_base_url]/rest/scroll-versions/1.0/metadata/page/<confluencePageId>
    CODE


    This request will respond with the following:

    Response

    {"attributeValues":{<attributeId>:{<valueId>:true}}} 
     
    For example:
    {"attributeValues":{"C0A81194013F85E4D708347C1B3CF8FF":{"C0A81194013F85E4D708AB280D8F63AA":true}}} 
    CODE

Publishing via REST API 

See Publishing via REST API

Re-schedule pages to a specific version via REST

With REST API tool of your choice you could automate the rescheduling process for a series of pages. Here is how to do it for a single page:

POST [confluence_base_url]/rest/scroll-versions/1.0/page/{spaceKey}/reschedule/{ScrollPageId}/{versionId}/{targetVersionId} 
CODE

You have to set the following parameters:

Path parameters

DescriptionExample
confluence_base_urlThe base URL of your Confluence systemconfluence.k15t.com
spaceKeyThe space key of the space you are going to reschedule a pageVSN
ScrollPageIdYou can get it by sending a  GET request to <baseUrl>/rest/scroll-versions/1.0/page/<spaceKey>/<ConfluencePageId>. See Get the page details of a versioned page via RESTC0A8127401622E4524D61AE85B97F931
versionIdYou can get the list of versions and their versionIds by sending a GET request to <baseUrl>/rest/scroll-versions/1.0/versions/<spaceKey>.C0A812CE0160D685FEF2582F7A13FAE6
targetVersionIdThe target versionId of the version you would like a page to be rescheduled to.7F00000101622AC94A76FE6A0C2D61A0

We also have a feature request to implement this functionality in UI: https://k15t.jira.com/browse/VSN-3487.

Manage versioned pages via REST

POST [confluence_base_url]/rest/scroll-versions/1.0/page/modify
CODE

Path parameters

DescriptionExample
confluence_base_urlThe base URL of your Confluence systemconfluence.k15t.com
masterPageIdThe Confluence page id of the masterpage. 

107302

pageTitleThe title for the page in this versionVersioned%20page
versionIdThe Id of the version to be added7F00000101622AC94A76FE6A0C2D61A0
changeTypeUse "Modify" if you want to add the page to a version. Use "Remove" to remove the page from this versionModify

For example, this request changes the title of the versioned page to "Changed title":

POST [confluence_base_url]/rest/scroll-versions/1.0/page/modify?masterPageId=17989634&pageTitle=Changed%20title&versionId=7F00000101622AC94A76FE6A0C2D61A0&changeType=Modify
CODE

To remove a page from version with versionId 7F00000101622AC94A76FE6A0C2D61A0:

POST [confluence_base_url]/rest/scroll-versions/1.0/page/modify?masterPageId=17989634&pageTitle=Created%20with%20REST%20APIaa&versionId=7F00000101622AC94A76FE6A0C2D61A0&changeType=Remove
CODE

To edit a versioned page in a newly created version, simply use the versionId of that version with Modify value of ChangeType parameter:

POST [confluence_base_url]/rest/scroll-versions/1.0/page/modify?masterPageId=17989634&pageTitle=Changed%20title&versionId=7F00000101622F08E55548715DF477BA&changeType=Modify
CODE

Create versioned page via REST

To create a new versioned page, use the following POST request:

POST [confluence_base_url]/rest/scroll-versions/1.0/page/new/<spaceKey>?parentConfluenceId=<parentConfluenceId>&pageTitle=<pageTitle>&versionId=<versionId>
CODE

You have to set the following parameters:

Path parameters

DescriptionExample
confluence_base_urlThe base URL of your Confluence systemconfluence.k15t.com
parentConfluenceIdThe Confluence page Id of the masterpage of the parent page (not the id of a dot-page!)107302
pageTitleThe title of the new versioned page. Use %20 for spaces.New%20Page
versionIdThe id of the version in which the page should be created initially.7F00000101622AC94A76FE6A0C2D61A0

The example request below creates a master page and a versioned page with title "Created with REST API" in the specified version. The call itself returns the page id of the new versioned page, which you can use to edit the page through Confluence REST API:

POST [confluence_base_url]/rest/scroll-versions/1.0/page/new/TT?parentConfluenceId=1671170&pageTitle=Created%20with%20REST%20API&versionId=7F000001016150D096C2761A2569920D
CODE

Edit versioned pages via REST

Once the page is created, you can edit the content over the normal Confluence REST API (the response contains the confluencePageId of the versioned page).


Health Check via REST 

To run the checks:

POST [confluence_base_url]/rest/scroll-versions/1.0/checks/health?mode=run&spaceKey={SPACEKEY}
CODE


To execute the repair:

POST [confluence_base_url]/rest/scroll-versions/1.0/checks/health?mode=fix&spaceKey={SPACEKEY}
CODE