---
title: "Get spaces"
method: GET
path: "/spaces"
tags: ["Space"]
---

# Get spaces

`GET /spaces`

Returns all spaces. The results will be sorted by id ascending. The number of results is limited by the `limit` parameter and
additional results (if available) will be available through the `next` URL present in the `Link` response header.

**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
Permission to access the Confluence site ('Can use' global permission).
Only spaces that the user has permission to view will be returned.

## Query parameters

- `ids` integer[]
- `keys` string[]
- `type` 'global' | 'collaboration' | 'knowledge_base' | 'personal' | 'system' | 'onboarding' | 'xflow_sample_space'
- `status` 'current' | 'archived'
- `labels` string[]
- `favorited-by` string
- `not-favorited-by` string
- `sort` 'id' | '-id' | 'key' | '-key' | 'name' | '-name' — The sort fields for spaces. The default sort direction is ascending. To sort in descending order, append a `-` character before the sort field. For example, `fieldName` or `-fieldName`.
- `description-format` 'plain' | 'view' — The formats a space description can be represented as. A subset of BodyRepresentation.
- `include-icon` boolean
- `cursor` string
- `limit` integer

## Response `200`

Returned if the requested spaces are returned.

- object
  - `results` SpaceBulk[]
    - `id` string — ID of the space.
    - `key` string — Key of the space.
    - `name` string — Name of the space.
    - `type` 'global' | 'collaboration' | 'knowledge_base' | 'personal' | 'system' | 'onboarding' | 'xflow_sample_space' — The type of space.
    - `status` 'current' | 'archived' — The status of the space.
    - `authorId` string — The account ID of the user who created this space originally.
    - `spaceOwnerId` string — The account ID of the user who owns this space.
    - `currentActiveAlias` string — Currently active alias for a Confluence space.
    - `createdAt` string, date-time — Date and time when the space was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ".
    - `homepageId` string — ID of the space's homepage.
    - `description` SpaceDescription — Contains fields for each representation type requested.
      - `plain` BodyType
        - `representation` string — Type of content representation used for the value field.
        - `value` string — Body of the content, in the format found in the representation field.
      - `view` BodyType
        - `representation` string — Type of content representation used for the value field.
        - `value` string — Body of the content, in the format found in the representation field.
    - `icon` SpaceIcon — The icon of the space
      - `path` string — The path (relative to base URL) at which the space's icon can be retrieved. The format should be like `/wiki/download/...` or `/wiki/aa-avatar/...`
      - `apiDownloadLink` string — The path (relative to base URL) that can be used to retrieve a link to download the space icon. 3LO apps should use this link instead of the value provided in the `path` property to retrieve the icon. Currently this field is only returned for `global` spaces and not `personal` spaces.
    - `_links` SpaceLinks
      - `webui` string — Web UI link of the space.
  - `_links` MultiEntityLinks
    - `next` string — Used for pagination. Contains the relative URL for the next set of results, using a cursor query parameter. This property will not be present if there is no additional data available.
    - `base` string — Base url of the Confluence site.

## Other responses

- `400` — Returned if an invalid request is provided.
- `401` — Returned if the authentication credentials are incorrect or missing from the request.

---

[API](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api-v2.md) · [All operations](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atlassian/the-confluence-cloud-rest-api-v2/revisions/c4bd1ed570f2/schema)
