All Spaces — Confluence Cloud Macro
This macro lists all spaces in a Confluence instance, including their name, author, and creation date. It retrieves space data via the Confluence API and formats it in a sortable table with columns for space name, author, and the creation date.
Template
#set($spaces = $ConfluenceManager.get("/wiki/api/v2/spaces?type=global&limit=250&include-icon=true"))
<table class="aui aui-table-sortable">
<thead>
<tr>
<th>Space name</th>
<th>Author name</th>
<th>Date created</th>
</tr>
</thead>
<tbody>
#foreach($space in $spaces.results)
#set($user = $ConfluenceManager.get("/wiki/rest/api/user?accountId=$space.authorId"))
#set($createdAt = $StringUtils.substringBefore($space.createdAt, "T"))
#set($icon = $StringUtils.remove($space.icon.path, "/wiki") )
<tr>
<td><img src="$baseUrl$icon" width="15" style="margin-right: 0.7rem;"><a href="$baseUrl$space._links.webui">$space.name</a></td>
<td><a href="$baseUrl/people/$user.accountId">@$user.displayName</a></td>
<td>$createdAt</td>
</tr>
#end
</tbody>
</table>You May Also Like
Space Information macro by space Id
Generate a list of labels from all spaces leading to corresponding content pages, organized in alphabetical order.
An overview of all pages within one space which contains the title, the version, and the last updated date
Based on CQL it shows a table with: Page title, Author, Updated, Status
Display page edit and view restrictions in Confluence to get essential permission details, including users, groups, and inherited access.
Display a list of Confluence pages with CSV download feature
This macro allows user to retrieve all pages from current space despite limitation of 250 pages per request
Displays a list of pages in specific space with certain title or label
Add a configurable floating panel to a Confluence page
Read and display the fixed version of Confluence pages by checking page or ancestor labels