My project uses Atlassian Confluence 6.8.3 and What I am looking for is to read a confluence page with the URL provided, I am trying to build desktop utility which will read confluence content and does the necessary changes in S3 storage. is it possible to read the confluence content with just URL of the page? Please do let me know your thoughts.
I am trying to achieve this using java.
Thanks in advance, I am looking forward to the best solution.
So you can split the URL its easy to split like
String url = "https://hostname/display/spacename/pagename"; String url1 = url.split("https://hostname/display/");
String url2 = url1.split("/"); String spKey = url2; //spacekey
String pName = url2 ; //pagename
and get the pagename and use rest below ( there is url class in java but use have to split it again). It will return a json, and you can get the page id in it . Then you can use it in
now we have page id and
Returned json will have the content of the page.
You will get lots of problems with this way, because of the spaces and other characters as will harder to work while spliting.
It's better to ask pageid from the user. When the page name changed pageid still same thus it will have a consistency. On the other hand if your user use ASCII char in the name, page URL turn to https://hostname/confluence/pages/viewpage.action?pageId=xxxxxxxx way.
Hello Community! Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events