REST API - Templates
General informations
REST API - Templates is available since v. 1.3.*
Available since v. 2.27.0
Get all global templates
Available for all Confluence Users
Method type - GET
URL: {CONFLUENCE_URL}/rest/extender/1.0/template/global
Response format: JSON
{
"templates": [
{
"name": "test global templates",
"description": null,
"title": "test global templates",
"content": "<at:declarations /><ac:layout><ac:layout-section ac:type=\"single\"><ac:layout-cell><p>global templates body</p></ac:layout-cell></ac:layout-section><ac:layout-section ac:type=\"single\"><ac:layout-cell><table><tbody><tr><th>Row 1</th><th>Row 2</th><th>Row 3</th></tr><tr><td>A</td><td>B</td><td>C</td></tr><tr><td>Q</td><td>W</td><td>E</td></tr></tbody></table></ac:layout-cell></ac:layout-section></ac:layout>"
}
]
}
Â
Get global template by name
Available for all Confluence Users
Method type -Â GET
URL: {CONFLUENCE_URL}/rest/extender/1.0/template/global/{TEMPLATE_NAME}
Response format: JSON
{
"template": {
"name": "test global templates",
"description": null,
"title": "test global templates",
"content": "<at:declarations /><ac:layout><ac:layout-section ac:type=\"single\"><ac:layout-cell><p>global templates body</p></ac:layout-cell></ac:layout-section><ac:layout-section ac:type=\"single\"><ac:layout-cell><table><tbody><tr><th>Row 1</th><th>Row 2</th><th>Row 3</th></tr><tr><td>A</td><td>B</td><td>C</td></tr><tr><td>Q</td><td>W</td><td>E</td></tr></tbody></table></ac:layout-cell></ac:layout-section></ac:layout>"
}
}
Â
Create global template
Method type:Â PUT
URL: {CONFLUENCE_URL}/rest/extender/1.0/template/global/create
Request format: JSON
{
"title": "Template title",
"description": "Template description",
"content": "<p>Template content</p>"
}
title
 - required - template titledescription
 - optional - template descriptioncontent
- optional - template content in Confluence Storage Format
Edit global template
Method type -Â PUT
URL: {CONFLUENCE_URL}/rest/extender/1.0/template/global/edit/{TEMPLATE_ID}
Request format: JSON
title
 - optional - template titledescription
 - optional - template descriptioncontent
- optional - template content in Confluence Storage Format
Â
Get space templates
Method type - GET
URL: {CONFLUENCE_URL}/rest/extender/1.0/template/space/{SPACE_ID_OR_KEY}
Response format: JSON
Â
Create space template
Method type:Â PUT
URL: {CONFLUENCE_URL}/rest/extender/1.0/template/space/{SPACE_ID_OR_KEY}/create
Request format: JSON
title
 - required - template titledescription
 - optional - template descriptioncontent
- optional - template content in Confluence Storage Format
Edit space template
Method type:Â PUT
URL: {CONFLUENCE_URL}/rest/extender/1.0/template/space/{SPACE_ID_OR_KEY}/edit/{TEMPLATE_ID}
Request format: JSON
title
 - optional - template titledescription
 - optional - template descriptioncontent
- optional - template content in Confluence Storage Format
Get template by ID
Method type -Â GET
URL: {CONFLUENCE_URL}/rest/extender/1.0/template/page/{TEMPLATE_ID}
Response format: JSON
Â
Delete template by ID
Method type -Â DELETE
URL: {CONFLUENCE_URL}/rest/extender/1.0/template/page/{TEMPLATE_ID}
Response format: JSON