Use includeArchivedSpaces parameter in CQL


By default the archived Confluence space won’t be listed the search results in the Confluence UI. This also applies to CQL. If you want to include the archived space in your CQL query result, then you need to add includeArchivedSpaces=true in your CQL query.

For example, I want to find out all Confluence spaces (including archived ones) that are in the category Cloud. The CQL query is like this:

space.category=cloud and type=space

To run it via the Confluence REST API, remember to append the includeArchivedSpaces=trues to the URL.

https://confluence.mydomain.com/rest/api/search?cql=space.category=cloud%20and%20type=space&includeArchivedSpaces=true

Here is a nodejs sample:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s