Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-78331

v2 pages API should fetch template ID

    XMLWordPrintable

Details

    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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              7010aaa9c17b Neha Kalekar
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: