Try as I might, I can't find this in the docs. I have a series of pages that I would like to rename. There are hundreds, and what needs to be done (remove the last word in the title) is very simple, so I was hoping to automate it.
What is the secret?
Found it! I kept seeing the process for updating content and glossing it over because I wasn't thinking of the title as content...
can you share how you did it?
I'm stuck with the same problem now...
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I use atlassian-python-api to manipulate Confluence pages, here is my example for page moving to another parent with renaming, you can use my idea to understand how it works:
# Old page title
old_title = 'Beautiful Page Title'
# Title that you want to change to
new_title = f"Much More {old_title}"
# Title of parent page where you want to move page to
parent_title = 'New Home'
# Get ID for new parent page
parent_id = confluence.get_page_id(space=space, title=parent_title)
# Get old page contents
old_page_content = confluence.get_page_by_title(space=space, title=old_title, expand='body') # Old page contents
# Rename and move page, get updated content
new_page_content = confluence.update_page(old_page_content['id'], title=new_title, body=old_page_content['body'], parent_id=parent_id, type="page", representation="storage")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.