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.
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>You May Also Like
Space Information macro by space Id
Display page edit and view restrictions in Confluence to get essential permission details, including users, groups, and inherited access.
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
This macro allows user to retrieve all pages from current space despite limitation of 250 pages per request
Based on CQL it shows a table with: Page title, Author, Updated, Status
Generate a list of labels from all spaces leading to corresponding content pages, organized in alphabetical order.
Display a custom list of recently updated content
Shows page creation date