Hi,
i want to catch previous versions page id with using the current version page id using the script console. is that possible?
Hello there Timor!
Could you clarify a few things about the script console:
- Are you referring to the Adaptavist ScriptRunner Macro?
- Are you facing any kind of issue when trying to fetch this information?
Nonetheless, we can achieve this by using Confluence REST API as well! We can do it like this:
- Go to your favorite browser
- Enter the following string in the address bar:
http://yourinstance.address/rest/experimental/content/<pageID>/version?expand=content
You should change the yourinstance.address to your actual instance address. Also, the <pageID> should be replaced by the page id of the current page page_id. This REST call should retrieve the necessary information for all page versions.
You can also send this with a cURL from your terminal, if using Linux or macOS. If you are on Windows, you will need some extra software:
Run cURL commands from Windows Console
Further, you will need to check the content tab that shows up when the query is ran in your browser. When you reach that, you can look at the webui line. The URL shown there should contain your page_id.
Looking forward to your reply!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.