The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi Team,
We use confluence data center LTS version 7.13.4 and have around 1800 client spaces to manage, we need to gather data for all the spaces like space name, space key and space admin details.
Kindly provide a way either by UI, API or SQL to fetch the above information.
Thanks
Hi @Jayesh Raghuvanshi ,
You can use HTML amcro and JS like:
let spaces = []
async function getSpaces() {
let spResp = await fetch('/rest/api/space');
let spacesJson = await spResp.json();
spaces.push(...spacesJson.results )
let nextLink = spacesJson._links_next;
while(nextLink !== undefined) {
let tempResp = await fetch(nextLink);
let tempSpacesJson = await tempResp .json();
spaces.push(...tempResp.results )
let nextLink = tempSpacesJson._links_next;
}
}
getSpaces()
...
With REST API it will be rather slow.
2) You can use JAVA SDK https://docs.atlassian.com/ConfluenceServer/javadoc/7.18.0/ and Groovy Runner / ScrptRunner to get necessar info (it wll be much faster)
def spaceManager = ComponentAccessor.getCOmponent(SpaceManager.class)
def spaces = spaceManager.getAllSpaces;
spaces.each {
out << it .name
out << it.key#
...
}
3) You can create macro with JAVA SDK https://docs.atlassian.com/ConfluenceServer/javadoc/7.18.0/
This month the spotlight is on AppLiger. We caught up with Pavel Pavlovsky, CEO and Product Manager, to learn how the company started and what fuels the team's creativity. Atlassian:...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.