Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
Minor
-
Description
Issue Summary
With the Confluence cloud v1 REST API it is possible to find out if a page was created from a page template and which template that was. This can be achieved by a request like this:
/rest/api/content/<page-id>?expand=metadata.sourceTemplateEntityId
The response will then contain the following information
{ "metadata": \{ "sourceTemplateEntityId": "<page-template-id>" }}
The <page-template-id> will be the ID of the page template which was used for creating the page. If no template was used the value will be an empty string.
However, the v2 REST API endpoints for pages do not return this information
Steps to Reproduce
- Create page from a template
- Call /api/v2/pages/<page-id> with page id of the created page
Expected Results
Metadata sourceTemplateEntityId is present
Actual Results
Metadata sourceTemplateEntityId is not present
Workaround
Using v1 endpoint with metadata expand for template Id, i.e.
/rest/api/content/<page-id>?expand=metadata.sourceTemplateEntityId. However this endpoint will be deprecated soon.