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.
#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>Display space details such as type, status, creation date, and links to permissions and calendars
Display an overview of all pages in a space, including title, version, and last updated date
Generate an alphabetical list of labels from all spaces, linking each label to its corresponding content pages
Insert a page break in documents generated from a Confluence page
Based on CQL, show a table with the following columns: Page Title, Author, Updated, and Status
Allow users to retrieve all pages from the current space despite the 250-page limit per request
Display a list of Confluence pages with a CSV download feature
Displays a list of pages in a specific space with a specified title or label
Retrieve and display all page content properties in an AUI sortable table
Add a configurable floating panel to a Confluence page