Get spaces
The Confluence Get spaces action retrieves a paginated list of Confluence spaces. Use this read-only action to discover available spaces and capture a space ID for follow-up actions like creating or updating content.
This action is commonly the first step in Confluence workflows—fetch the target space, then pass its ID into write actions such as Create page or Update page.
Limitations
- Pagination is required for large result sets.
Prerequisites
-
Glean action must be enabled for your instance and the Confluence action pack must be available.
-
A connected Confluence account must exist for the user with permission to view spaces.
Supported parameters
| Parameter | Type | Description |
|---|---|---|
| Expand | Array | List of entities or fields to expand in the response payload, for example, body.storage. |
| Label | Array | List of labels to filter results by; only items with at least one of these labels are returned. |
| Maximum limit | Integer | Maximum number of results to return per page. Defaults to 25. |
| Space key | Array | List of space keys to filter results to specific spaces. |
| Start | Integer | Index of the first item to return (pagination offset). |
| Status | String | Status to filter results by (for example, current, draft, or trashed). |
| Type | String | Type of content to filter by (for example, page or blogpost). |
Usage example
You want to find the Engineering space ID so you can create a new API documentation page in that space.
Instruction to an agent:
"Find the Engineering space in Confluence and show me its space ID. I need it to create a new documentation page."
Resulting behavior:
-
Calls the Get spaces action to retrieve the list of available spaces.
-
Searches through the returned spaces to find one matching "Engineering" by name or key.
-
Returns the space ID for the Engineering space.
-
The agent displays the space ID, which can then be used with actions like Create page or Update page.
-
Workflow tip: Once you have the space ID, you can use it with Get pages to find specific pages within that space, or with Create page to add new content.