REST API
The REST API now consist of two versions:
Version | URL | Add-on version |
---|---|---|
1 (deprecated) | rest/originaltheme/1.0/ | 4.x - 5.0 |
2 | rest/refinedtheme/2.0/ | 5.1 |
The Refined REST API is not regarded a public API. It can be subjected to change without any notice.
Category
refinedtheme/2.0/category/move-children [PUT]
Allows you to move a space to a new category. The space can be uncategorised or previously located in a different category.
Example request URLs:
http://localhost:1990/confluence/rest/refinedtheme/2.0/category/move-children?oldKey=oldcategorykey&newKey=newcategorykey&newPosition=0
http://localhost:1990/confluence/rest/refinedtheme/2.0/category/move-children?oldKey=newcategorykey
parameter | value | description |
---|---|---|
newKey | string | The category key for the new target category. Can be empty, and if so the child will be uncategorised. |
oldKey | string | The category key for the previous owner of the child. If the child was previously not in a category this should be empty. |
newPosition | int | The new position in the list of children in the new category. If this isn't included, or if it's set to -1, the child will be sorted into the list, either alphabetically or places last, depending if the target category uses custom sorting or not. |
newSiteId | int | The site ID of the new target site. Can be empty if the item is moved within the same site. |
oldSiteId | int | The site ID of the previous site. Can be empty if the item is moved within the same site. |
Payload:
Takes an object with a single attribute children. A list containing all objects that are being moved. Often these represents spaces. The objects needs two parameters; key and type, both of type String. The key is the space key, or identifier for the child, this is case-sensitive! Type can be space or link.
{ "children":
 [
  { "key": "testspace2", "type": "space" }
 ]
}
Layoutboard
refinedtheme/2.0/layoutboard/space/template-board/{spaceKey} [PUT]
Allows you to save a Space Layout to a space, which will determine the macros and settings for that space layout.
Example request URLs:
http://localhost:1990/confluence/rest/refinedtheme/2.0/layoutboard/space/template-board/ds?template=documentation
http://localhost:1990/confluence/rest/refinedtheme/2.0/layoutboard/space/template-board/ds?template=public
parameter | value | description |
---|---|---|
spaceKey | string | Path parameter - The space key for the space to which this layout will be applied. |
template | string | The specified layout template to use. Supported:
|