Page Tree Creator Documentation
Space shortcuts
Space Tools
Page Tree Creator Documentation PPTCDOC
Skip to end of metadata
Go to start of metadata

Documentation for Page Tree Creator 5.1.5

Documentation for earlier versions of Page Tree Creator is available too. 

ContentDelete orphaned templates via REST API
Details

Content

Overview

This guideline will show a way to get rid of orphaned templates, which appeared because of a database inconsistency.


1. Load all Templates via REST API

GET example.com/rest/ptc/2.0/templates

No parameters needed

Example
curl -u admin:admin -X GET http://localhost:1990/confluence/rest/ptc/2.0/templates

2. Extract the templateId

Use the response to find the templateId of the orphaned template. If the orphaned template is called "Penguin", the templateId would be 70

Example Response
[
	{
		"templateId":70,
		"name":"Penguin",
		"description":"Orphaned Template to delete",
		"sourcePageId":3145755,
		"styleClass":"ptc-icon-logo",
	},
	{
		"templateId":132,
		"name":"Meetings",
		"description":"create meeting notes",
		"sourcePageId":4784131,
		"styleClass":"ptc-icon-logo",
	}
]

3. Delete the orphaned template via REST API

DELETE example.com/rest/ptc/2.0/templates/{templateId}

insert the templateId from the response, e.g. the templateId 70

Example
curl -v -S -u admin:admin -X DELETE http://localhost:1990/confluence/rest/ptc/2.0/templates/70

REST API

Please use a valid licence for Open API (Swagger) Integration for Confluence
  • No labels

 



Page Tree Creator Documentation PPTCDOC