Audit
Content
Content - attachments
Content body
Content - children and descendants
Content - macro body
Content comments
Content labels
Content permissions
Content properties
Content restrictions
Content versions
Content watches
Dynamic modules
Experimental
Group
Inline tasks
Label info
Long-running task
Relation
Search
Settings
Space
Space permissions
Space properties
Space settings
Template
Themes
Users

Rate this page:

Space

Get spaces

GET /wiki/rest/api/space

Returns all spaces. The returned spaces are ordered alphabetically in ascending order by space key.

Permissions required: Permission to access the Confluence site ('Can use' global permission). Note, the returned list will only contain spaces that the current user has permission to view.

Connect app scope requiredREAD

OAuth scopes required
read:confluence-space.summary

Request

Query parameters
spaceKey

Array<string>

The key of the space to be returned. To return multiple spaces, specify this parameter multiple times with different values.

Style: form
spaceId

Array<integer>

The id of the space to be returned. To return multiple spaces, specify this parameter multiple times with different values.

Style: form
type

string

Filter the results to spaces based on their type.

Valid values: global, personal

status

string

Filter the results to spaces based on their status.

Valid values: current, archived

label

Array<string>

Filter the results to spaces based on their label.

Style: form
favourite

boolean

Filter the results to the favourite spaces of the user specified by favouriteUserKey. Note, 'favourite' spaces are also known as 'saved for later' spaces.

favouriteUserKey

string

expand

Array<string>

A multi-value parameter indicating which properties of the spaces to expand, where:

Style: form

Valid values: settings, metadata, metadata.labels, operations, lookAndFeel, permissions, icon, description, description.plain, description.view ...(Show more)

start

integer

The starting index of the returned spaces.

Default: 0, Minimum: 0, Format: int32
limit

integer

The maximum number of spaces to return per page. Note, this may be restricted by fixed system limits.

Default: 25, Minimum: 0, Format: int32

Example

1
2
3
4
curl --request GET \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/space' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Accept: application/json'

Responses

Returned if the requested spaces are returned.

Content typeValue
application/json

SpaceArray

Create space

POST /wiki/rest/api/space

Creates a new space. Note, currently you cannot set space labels when creating a space.

Permissions required: 'Create Space(s)' global permission.

Connect app scope requiredWRITE

OAuth scopes required
write:confluence-space

Request

Body parameters

This is the request object used when creating a new space.

key Required

string

name Required

string

The name of the new space.

Max length: 200
description

SpaceDescriptionCreate

The description of the new/updated space. Note, only the 'plain' representation can be used for the description when creating or updating a space.

Nullable: true
permissions

Array<SpacePermissionCreate>

Nullable: true
Additional Properties

anything

Extra properties of any type may be provided to this object.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
curl --request POST \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/space' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "<string>",
  "name": "<string>",
  "description": {
    "plain": {
      "value": "<string>",
      "representation": "<string>"
    }
  },
  "permissions": [
    {
      "subjects": {
        "user": {
          "results": [
            {
              "type": "known",
              "username": "<string>",
              "userKey": "<string>",
              "accountId": "<string>",
              "accountType": "atlassian",
              "email": "<string>",
              "publicName": "<string>",
              "profilePicture": {
                "path": "<string>",
                "width": 2154,
                "height": 2154,
                "isDefault": true
              },
              "displayName": "<string>",
              "isExternalCollaborator": true,
              "externalCollaborator": true,
              "operations": [
                {
                  "operation": "administer",
                  "targetType": "<string>"
                }
              ],
              "details": {},
              "personalSpace": {
                "key": "<string>",
                "name": "<string>",
                "type": "<string>",
                "status": "<string>",
                "_expandable": {},
                "_links": {}
              },
              "_expandable": {
                "operations": "<string>",
                "details": "<string>",
                "personalSpace": "<string>"
              },
              "_links": {}
            }
          ],
          "size": 2154
        },
        "group": {
          "results": [
            {
              "type": "group",
              "name": "<string>"
            }
          ],
          "size": 2154
        }
      },
      "operation": {
        "operation": "administer",
        "targetType": "<string>"
      },
      "anonymousAccess": true,
      "unlicensedAccess": true
    }
  ]
}'

Responses

Returned if the space is created.

Content typeValue
application/json

Space

Create private space

POST /wiki/rest/api/space/_private

Creates a new space that is only visible to the creator. This method is the same as the Create space method with permissions set to the current user only. Note, currently you cannot set space labels when creating a space.

Permissions required: 'Create Space(s)' global permission.

Connect app scope requiredWRITE

OAuth scopes required
write:confluence-space

Request

Body parameters

This is the request object used when creating a new space.

key Required

string

name Required

string

The name of the new space.

Max length: 200
description

SpaceDescriptionCreate

The description of the new/updated space. Note, only the 'plain' representation can be used for the description when creating or updating a space.

Nullable: true
permissions

Array<SpacePermissionCreate>

Nullable: true
Additional Properties

anything

Extra properties of any type may be provided to this object.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
curl --request POST \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/space/_private' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "<string>",
  "name": "<string>",
  "description": {
    "plain": {
      "value": "<string>",
      "representation": "<string>"
    }
  },
  "permissions": [
    {
      "subjects": {
        "user": {
          "results": [
            {
              "type": "known",
              "username": "<string>",
              "userKey": "<string>",
              "accountId": "<string>",
              "accountType": "atlassian",
              "email": "<string>",
              "publicName": "<string>",
              "profilePicture": {
                "path": "<string>",
                "width": 2154,
                "height": 2154,
                "isDefault": true
              },
              "displayName": "<string>",
              "isExternalCollaborator": true,
              "externalCollaborator": true,
              "operations": [
                {
                  "operation": "administer",
                  "targetType": "<string>"
                }
              ],
              "details": {},
              "personalSpace": {
                "key": "<string>",
                "name": "<string>",
                "type": "<string>",
                "status": "<string>",
                "_expandable": {},
                "_links": {}
              },
              "_expandable": {
                "operations": "<string>",
                "details": "<string>",
                "personalSpace": "<string>"
              },
              "_links": {}
            }
          ],
          "size": 2154
        },
        "group": {
          "results": [
            {
              "type": "group",
              "name": "<string>"
            }
          ],
          "size": 2154
        }
      },
      "operation": {
        "operation": "administer",
        "targetType": "<string>"
      },
      "anonymousAccess": true,
      "unlicensedAccess": true
    }
  ]
}'

Responses

Returned if the space is created.

Content typeValue
application/json

Space

Get space

GET /wiki/rest/api/space/{spaceKey}

Returns a space. This includes information like the name, description, and permissions, but not the content in the space.

Permissions required: 'View' permission for the space.

Connect app scope requiredREAD

OAuth scopes required
read:confluence-space.summary

Request

Path parameters
spaceKey Required

string

The key of the space to be returned.

Query parameters
expand

Array<string>

A multi-value parameter indicating which properties of the spaces to expand, where:

Style: form

Valid values: settings, metadata, metadata.labels, operations, lookAndFeel, permissions, icon, description, description.plain, description.view ...(Show more)

Example

1
2
3
4
curl --request GET \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Accept: application/json'

Responses

Returned if the requested space is returned.

Content typeValue
application/json

Space

Update space

PUT /wiki/rest/api/space/{spaceKey}

Updates the name, description, or homepage of a space.

  • For security reasons, permissions cannot be updated via the API and must be changed via the user interface instead.
  • Currently you cannot set space labels when updating a space.

Permissions required: 'Admin' permission for the space.

Connect app scope requiredWRITE

OAuth scopes required
write:confluence-space

Request

Path parameters
spaceKey Required

string

The key of the space to update.

Body parameters

The properties of a space that can be updated.

name

string

The updated name of the space.

Nullable: true, Max length: 200
description

SpaceDescriptionCreate

The description of the new/updated space. Note, only the 'plain' representation can be used for the description when creating or updating a space.

Nullable: true
homepage

object

The updated homepage for this space

Nullable: true
type

string

The updated type for this space.

status

string

The updated status for this space.

Nullable: true
Additional Properties

anything

Extra properties of any type may be provided to this object.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
curl --request PUT \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "description": {
    "plain": {
      "value": "<string>",
      "representation": "<string>"
    }
  },
  "homepage": {},
  "type": "<string>",
  "status": "<string>"
}'

Responses

Returned if the space is updated.

Content typeValue
application/json

Space

Delete space

DELETE /wiki/rest/api/space/{spaceKey}

Deletes a space. Note, the space will be deleted in a long running task. Therefore, the space may not be deleted yet when this method has returned. Clients should poll the status link that is returned in the response until the task completes.

Permissions required: 'Admin' permission for the space.

Connect app scope requiredDELETE

OAuth scopes required
write:confluence-space

Request

Path parameters
spaceKey Required

string

The key of the space to delete.

Example

1
2
3
curl --request DELETE \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}' \
  --header 'Authorization: Bearer <access_token>'

Responses

Returns a pointer to the status of the space deletion task.

A schema has not been defined for this response code.

Get content for space

GET /wiki/rest/api/space/{spaceKey}/content

Returns all content in a space. The returned content is grouped by type (pages then blogposts), then ordered by content ID in ascending order.

Permissions required: 'View' permission for the space. Note, the returned list will only contain content that the current user has permission to view.

Connect app scope requiredREAD

OAuth scopes required
read:confluence-content.summary

Request

Path parameters
spaceKey Required

string

The key of the space to be queried for its content.

Query parameters
depth

string

Filter the results to content at the root level of the space or all content.

Default: all

Valid values: all, root

expand

Array<string>

A multi-value parameter indicating which properties of the content to expand.

In addition, the following comment-specific expansions can be used:

  • extensions.inlineProperties returns inline comment-specific properties.
  • extensions.resolution returns the resolution status of each comment.
Style: form
start

integer

The starting index of the returned content.

Default: 0, Minimum: 0, Format: int32
limit

integer

The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits.

Default: 25, Minimum: 0, Format: int32

Example

1
2
3
4
curl --request GET \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}/content' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Accept: application/json'

Responses

Returned if the requested content is returned.

Content typeValue
application/json

object

Get content by type for space

GET /wiki/rest/api/space/{spaceKey}/content/{type}

Returns all content of a given type, in a space. The returned content is ordered by content ID in ascending order.

Permissions required: 'View' permission for the space. Note, the returned list will only contain content that the current user has permission to view.

Connect app scope requiredREAD

OAuth scopes required
read:confluence-content.summary

Request

Path parameters
spaceKey Required

string

The key of the space to be queried for its content.

type Required

string

The type of content to return. page, blogpost, <some_customContentType>.

Query parameters
depth

string

Filter the results to content at the root level of the space or all content.

Default: all

Valid values: all, root

expand

Array<string>

A multi-value parameter indicating which properties of the content to expand.

In addition, the following comment-specific expansions can be used:

  • extensions.inlineProperties returns inline comment-specific properties.
  • extensions.resolution returns the resolution status of each comment.
Style: form
start

integer

The starting index of the returned content.

Default: 0, Minimum: 0, Format: int32
limit

integer

The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits.

Default: 25, Minimum: 0, Format: int32

Example

1
2
3
4
curl --request GET \
  --url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}/content/{type}' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Accept: application/json'

Responses

Returned if the requested content is returned.

Content typeValue
application/json

ContentArray

Rate this page: