30. 06. 2026 Valentina Da Rold Atlassian, Development

Build a Readable List of Confluence Spaces with the REST API and an Auto-Generated Page

Confluence Cloud does not provide a simple native view that lists all spaces with direct links in a format business users can easily consume. The REST API gives you the data, but you still need to filter, paginate, and present it. A practical workaround is to collect all spaces through the v2 Spaces endpoint, keep only active global spaces, and publish the result as a Confluence page with a simple table.

You often need a clean inventory of Confluence spaces. Customers ask for it during onboarding, audits, ownership reviews, or content cleanup projects. They want a page they can open and use immediately.

Native Confluence features are not enough here. You can browse spaces in the UI, but there is no straightforward built-in function that produces a complete, user-friendly list of all spaces and their direct links in one place. The API exposes the space data, but the raw response is not suitable for non-technical readers. You also need to handle pagination and filter out spaces that should not appear in the final report, such as personal and archived spaces.

Our use case

A customer runs Confluence Cloud for several hundred teams and each team autonomously mange its own space. The Atlassian admin needs a current list of spaces for a governance review.

In this case, we searched for an automated job that fetches all spaces, removes personal and archived ones, and creates a Confluence page under a known parent page. The result is a two-column table with the space title and a clickable link. That page becomes the shared reference during reviews.

How I implemented the solution

The pattern is simple. First, the script calls will use the Confluence Get Spaces endpoint to get the complete list of all existing spaces on the instance.

Next, the script filters the results. We defined as valid only spaces with status equal to current and type equal to global. This removes archived and personal spaces from the published list.

Then, the script builds a small HTML table in Confluence storage format. Each row contains the space name and the direct browser link from the _links.webui value returned by the API. Finally, the script creates a new Confluence page (using the Create Page endpoint) under a fixed parent page, with a date-based title such as Space list at 2026-06-30. The customer gets a page they can read without touching the API.

  1. Authenticate with a service account that has site access and view rights to the target spaces.
  2. Call GET /wiki/api/v2/spaces and iterate over it until you collect all pages of results.
  3. Filter spaces using your validity rule.
    A short filter function can look like this:
    def is_a_valid_space(space: dict) -> bool:
        return space.get("status") == "current" and space.get("type") == "global"
    
  4. Build a minimal HTML table with title and link.
    A short row builder can look like this:
    for space in spaces:
        if is_a_valid_space(space):
            webui = space.get("_links", {}).get("webui")
            url = f"https://your-domain.atlassian.net{webui}"
            html_space_row += f"<tr><td>{space['name']}</td><td><a href='{url}'>{url}</a></td></tr>"
    A minimal page payload outline is enough for most cases:
    {
      "spaceId": "123456",
      "status": "current",
      "title": "Space list at 2026-06-30",
      "parentId": "789012",
      "body": {
        "representation": "storage",
        "value": "<table><tbody>...</tbody></table>"
      }
    }
    If you need safer output, escape HTML-sensitive characters in space names before inserting them into the table.
  5. Call POST /wiki/api/v2/pages to create the report page in a known space
  6. Run the job on a schedule, for example once per week or once per month.

Conclusion and recommended next steps

If you need a complete and readable list of Confluence Cloud spaces, the API plus page-generation pattern works well. It fills a real gap between raw platform data and what customers can actually use.

Start with a small scheduled script. Add pagination, filtering, and safe HTML generation first. Then publish the page in a shared documentation area and make it part of your regular Confluence governance workflow.

Valentina Da Rold

Valentina Da Rold

Hi, I'm Valentina and I'm a Frontend Developer at Wuerth IT Italy. I started out my career applying my Cryptography skills to coding, but really quickly fell in love with the web. I have been making websites and applications since 2012 and I still can't get enough of it. Along the way I found a passion for front-end development, and I use this passion to create interfaces that solve problems. When I'm not creating beautiful solutions, I enjoy cooking or doing sport, while listening to beautiful music.

Author

Valentina Da Rold

Hi, I'm Valentina and I'm a Frontend Developer at Wuerth IT Italy. I started out my career applying my Cryptography skills to coding, but really quickly fell in love with the web. I have been making websites and applications since 2012 and I still can't get enough of it. Along the way I found a passion for front-end development, and I use this passion to create interfaces that solve problems. When I'm not creating beautiful solutions, I enjoy cooking or doing sport, while listening to beautiful music.

Leave a Reply

Your email address will not be published. Required fields are marked *

Archive