You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I don't get how to work properly with the Java API of Confluence Data Center.
There are Manager interfaces like in Jira, for instance the PageManager. But all of the getPage() methods has been deprecated with a reference to the PageManagerInternal interface which do not provide simple getPage() methods, for example for just throwing in a known page ID.
So my question is: How to work with the Confluence Java API directly? We use ScriptRunner and do not (nor want to) write dedicated/custom plugins.
I am not very familiar with ScriptRunner. For my custom plugin I use:
For ScriptRunner it should work using:
They work similar to the REST API, here's an example using ContentService (page) and expanding the space.
ContentService.SingleContentFetcher contentFinder = contentService
Similar approaches is for the other services. If you need more specific example, let me know.
More about the ContentService can be found in ContentService (Atlassian Confluence 8.5.0 API)