Space Updates Overview — Confluence Cloud Macro
This macro generates an overview of all pages in a Confluence space, displaying the title, version, and last updated date. It uses the Confluence API to fetch the pages and formats them in a sortable AUI table.
User Parameters
This macro comes without configurable user parameters.
Template
## get pages in the current space
#set($spaceId = $space.id )
#set($sort = "-modified-date") ## order by modified date DESC
#set($status = "current") ## skip archived, deleted, and drafted
#set($limit = 250) ## increase pages limit to maximum
#set($url = "/wiki/api/v2/spaces/${spaceId}/pages?sort=${sort}&status=${status}&limit=${limit}")
#set($response = $ConfluenceManager.get($url))
## Use of Atlassian UI (AUI) sortable table
<table class="aui aui-table-sortable">
<thead>
<tr>
<th>Title</th>
<th>Version</th>
<th>Last updated</th>
</tr>
</thead>
<tbody>
## iterate through results of pages
#foreach($page in $response.results)
<tr>
<td>${page.title}</td>
## "aui-badge" will put number in a grey circle
<td><span class="aui-badge">${page.version.number}</span></td>
## Convert datetime to date
## "2024-02-13T12:12:31.528Z" -> "2024-02-13"
#set($createdAt = $StringUtils.substringBefore($page.version.createdAt, "T"))
<td>${createdAt}</td>
</tr>
#end
</tbody>
</table>Recommended Macros
Show an expandable page tree for a selected parent page (defaults to the current page)
Read and display the fixed version of Confluence pages by checking page or ancestor labels
Macro for printing all the spaces
Generate a list of labels from all spaces leading to corresponding content pages, organized in alphabetical order.
Display the top comments from a selected Confluence page or the current page by default.
Display Jira issue comments in a table
Display a custom list of recently updated content
Add a configurable tile to a Confluence page