---
ai:
  exclude: true
search:
  tags:
    - Space
    - GET
seo:
  description: >-
    Returns information about a number of spaces. Reference for the GET
    /rest/api/space endpoint in the Confluence Data Center API.
sidebar:
  label: Get spaces by key
  badge: GET
title: Get spaces by key
type: openapi-operation
---
Returns information about a number of spaces. 

Example request URI(s): 

`http://example.com/confluence/rest/api/space?spaceKey=TST&spaceKey=ds`

`GET /rest/api/space`

**Request body** (`application/json`)

Request body example:

```json
"string"
```

**Responses**

- `200` — Returns an array of full JSON representations of found space.

Response example, 200:

```json
{
  "id": 123456,
  "key": "TEST",
  "name": "Test Space",
  "status": "current",
  "icon": {
    "expanded": true,
    "idProperties": {}
  },
  "description": {},
  "homepage": {
    "expanded": true,
    "idProperties": {}
  },
  "links": {},
  "type": "global",
  "metadata": {
    "labels": [
      "label1",
      "label2"
    ]
  },
  "retentionPolicy": {
    "expanded": true,
    "idProperties": {}
  }
}
```
