Confluence UI and API show outdated page title

Yulia Rönsch
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 15, 2023

Hi,

I noticed that both Confluence UI (Page Information) and Confluence API provide the wrong, namely, outdated page title.

Both provide the original page title. After the page has been renamed, this change is not reflected in the page title that is seen on the Page Information in the Confluence UI. The title field of the API response also shows the original title instead of the new (=current) one. My other observation is that the original title corresponds to the permalink if the permalink has not been changed. When I adjust the permalink to match the current title, the title is updated in both the Page Information and the API.

This is a huge problem for us as we want to use Confluence Server API.

We have around 180 pages only in one space and a few of such spaces and cannot go through the permalinks manually. 

It also seems that no other field in the API response provides the correct information about the current page title. I accessed the page adding

status=current

to the call but it does not help.

Page ID and tiny links are not helpful in our case. We need an actual title. 

The complete API call I was using:

page = requests.get('https://<<confluence.our-company>>.com/rest/api/content/<<pageid>>?status=current&expand=body.view', auth=BearerAuth('<<myConfluencetoken>>'))

The response:

 

{'id': '12345678',

 'type': 'page',

 'status': 'current',

 'title': 'Administration_SysAdmin',

 'ancestors': [{'id': '87654321',

   'type': 'page',

   'status': 'current',

   'title': 'company Product Documentation',

   'extensions': {'position': 'none'},

   '_links': {'webui': '/display/<<spacekey>>/company+Product+Documentation',

    'edit': '/pages/resumedraft.action?draftId=87654321',

    'tinyui': '/x/<<tinylink>>',

    'self': 'https://<<confluence.our-company>>.com/rest/api/content/87654321'},

   '_expandable': {'container': '/rest/api/space/<<spacekey>>',

    'metadata': '',

    'operations': '',

    'children': '/rest/api/content/87654321/child',

    'restrictions': '/rest/api/content/87654321/restriction/byOperation',

    'history': '/rest/api/content/87654321/history',

    'ancestors': '',

    'body': '',

    'version': '',

    'descendants': '/rest/api/content/87654321/descendant',

    'space': '/rest/api/space/<<spacekey>>'}}],

 'body': {'view': {'value': '<p>Initial setup and core administration of censhare. Manage advanced functionalities and applications.<br/></p><p><span style="color: rgb(51,51,51);">The censhare system administration guide is an essential resource for censhare administrators who want to roll out censhare to their organizations. This guide introduces you to the tools and tasks needed for a personalized censhare experience.</span></p><p>As a censhare administrator, you set up and manage the system for your organization. You monitor that the applications run smoothly.</p><p>The censhare platform provides endless options for enhancement and customization to meet your organization\'s or customers\' needs for a personalized marketing solution.</p><p>You can create custom workspaces, workflows, widgets, and features.</p><p>For example:</p><ul class="default"><li><p>Provide a corporate dashboard for your organization with daily tasks and news.</p></li><li><p>Change an asset page.</p></li><li><p><span style="letter-spacing: 0.0px;">Ingest, and automatically enrich content into censhare that you receive from other applications.</span></p></li></ul><p><br/></p><p><br/></p>',

   'representation': 'storage',

   '_expandable': {'webresource': '',

    'content': '/rest/api/content/12345678'}},

  '_expandable': {'editor': '',

   'export_view': '',

   'styled_view': '',

   'storage': '',

   'anonymous_export_view': ''}},

 'extensions': {'position': 2},

 '_links': {'webui': '/display/<<spacekey>>/Administration_SysAdmin',

  'edit': '/pages/resumedraft.action?draftId=12345678',

  'tinyui': '/x/<<tinylink>>',

  'collection': '/rest/api/content',

  'base': 'https://<<confluence.our-company>>.com',

  'context': '',

  'self': 'https://<<confluence.our-company>>.com/rest/api/content/12345678'},

 '_expandable': {'container': '/rest/api/space/<<spacekey>>',

  'metadata': '',

  'operations': '',

  'children': '/rest/api/content/87654321/child',

  'restrictions': '/rest/api/content/87654321/restriction/byOperation',

  'history': '/rest/api/content/87654321/history',

  'version': '',

  'descendants': '/rest/api/content/87654321/descendant',

  'space': '/rest/api/space/<<spacekey>>'}}

As you can see, the body does not provide any hint to the current title either. 

If I overlooked something, please let me know. I only need to find a way of getting the current page title through the API call. 

Thank you.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events