Stand with Ukraine 🇺🇦

Space Updates Overview — Confluence Cloud Macro

confluence-contentreporting

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.

Try for free

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>