The Confluence Cloud REST API

Audit

Get audit records

GET /wiki/rest/api/audit

Returns all records in the audit log, optionally for a certain date range.
This contains information about events like space exports, group membership
changes, app installations, etc. For more information, see
Audit log
in the Confluence administrator’s guide.

Permissions required:
‘Confluence Administrator’ global permission.

Apps cannot access this REST resource.

Request

Query parameters

startDate

string

Filters the results to the records on or after the startDate.
The startDate must be specified as a timestamp.

endDate

string

Filters the results to the records on or before the endDate.
The endDate must be specified as a timestamp.

searchString

string

Filters the results to records that have string property values
matching the searchString.

start

integer

The starting index of the returned records.

Default: 0, Minimum: 0, Format: int32

limit

integer

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

Default: 1000, Minimum: 0, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/audit’
–header ‘Accept: application/json’

Responses

Returned if the requested records are returned.

Create audit record

POST /wiki/rest/api/audit

Creates a record in the audit log.

Permissions required:
‘Confluence Administrator’ global permission.

Apps cannot access this REST resource.

Request

Body parameters

author

object

The user that actioned the event. If author is not specified, then all
author properties will be set to null/empty, except for type which
will be set to ‘user’.

remoteAddress Required

string

The IP address of the computer where the event was initiated from.

creationDate

integer

The creation date-time of the audit record, as a timestamp. This is converted
to a date-time display in the Confluence UI. If the creationDate is not
specified, then it will be set to the timestamp for the current date-time.

Format: int64

summary

string

The summary of the event, which is displayed in the ‘Change’ column on
the audit log in the Confluence UI.

description

string

A long description of the event, which is displayed in the ‘Description’
field on the audit log in the Confluence UI.

category

string

The category of the event, which is displayed in the ‘Event type’ column
on the audit log in the Confluence UI.

sysAdmin

boolean

Indicates whether the event was actioned by a system administrator.

Default: false

affectedObject

AffectedObject

changedValues

Array<ChangedValue>

The values that were changed in the event.

associatedObjects

Array<AffectedObject>

Objects that were associated with the event. For example, if the event
was a space permission change then the associated object would be the
space.

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
36curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/audit’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“author”: {
“type”: “user”,
“displayName”: “<string>”,
“operations”: {},
“username”: “<string>”,
“userKey”: “<string>”
},
“remoteAddress”: “<string>”,
“creationDate”: 226,
“summary”: “<string>”,
“description”: “<string>”,
“category”: “<string>”,
“sysAdmin”: true,
“affectedObject”: {
“name”: “<string>”,
“objectType”: “<string>”
},
“changedValues”: [
{
“name”: “<string>”,
“oldValue”: “<string>”,
“newValue”: “<string>”
}
],
“associatedObjects”: [
{
“name”: “<string>”,
“objectType”: “<string>”
}
]
}’

Responses

Returned if the record is created in the audit log.

Export audit records

GET /wiki/rest/api/audit/export

Exports audit records as a CSV file or ZIP file.

Permissions required:
‘Confluence Administrator’ global permission.

Apps cannot access this REST resource.

Request

Query parameters

startDate

string

Filters the exported results to the records on or after the startDate.
The startDate must be specified as a timestamp.

endDate

string

Filters the exported results to the records on or before the endDate.
The endDate must be specified as a timestamp.

searchString

string

Filters the exported results to records that have string property values
matching the searchString.

format

string

The format of the export file for the audit records.

Default: csv

Valid values: csv, zip

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/audit/export’
–header ‘Accept: application/zip’

Responses

Returned if the requested export of the audit records is returned.

Content type Value
application/zip

string

text/csv

string

Get retention period

GET /wiki/rest/api/audit/retention

Returns the retention period for records in the audit log. The retention
period is how long an audit record is kept for, from creation date until
it is deleted.

Permissions required:
‘Confluence Administrator’ global permission.

Apps cannot access this REST resource.

Request

There are no parameters for this request.

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/audit/retention’
–header ‘Accept: application/json’

Responses

Returned if the requested retention period is returned.

Set retention period

PUT /wiki/rest/api/audit/retention

Sets the retention period for records in the audit log. The retention period
can be set to a maximum of 20 years.

Permissions required:
‘Confluence Administrator’ global permission.

Apps cannot access this REST resource.

Request

Body parameters

number Required

integer

The number of units for the retention period.

Format: int32

units Required

string

The unit of time that the retention period is measured in.

Valid values: NANOS, MICROS, MILLIS, SECONDS, MINUTES, HOURS, HALF_DAYS, DAYS, WEEKS, MONTHS …(Show more)

Example

1
2
3
4
5
6
7
8curl –request PUT
–url ‘https://your-domain.atlassian.net/wiki/rest/api/audit/retention’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“number”: 45,
“units”: “NANOS”
}’

Responses

Returned if the retention period is updated.

Get audit records for time period

GET /wiki/rest/api/audit/since

Returns records from the audit log, for a time period back from the current
date. For example, you can use this method to get the last 3 months of records.

This contains information about events like space exports, group membership
changes, app installations, etc. For more information, see
Audit log
in the Confluence administrator’s guide.

Permissions required:
‘Confluence Administrator’ global permission.

Apps cannot access this REST resource.

Request

Query parameters

number

integer

The number of units for the time period.

Default: 3, Format: int64

units

string

The unit of time that the time period is measured in.

Default: MONTHS

Valid values: NANOS, MICROS, MILLIS, SECONDS, MINUTES, HOURS, HALF_DAYS, DAYS, WEEKS, MONTHS …(Show more)

searchString

string

Filters the results to records that have string property values
matching the searchString.

start

integer

The starting index of the returned records.

Default: 0, Minimum: 0, Format: int32

limit

integer

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

Default: 1000, Minimum: 0, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/audit/since’
–header ‘Accept: application/json’

Responses

Returned if the requested records are returned.

Content

Get content

GET /wiki/rest/api/content

Returns all content in a Confluence instance.

By default, the following objects are expanded: space, history, version.

Permissions required:
Permission to access the Confluence site (‘Can use’ global permission).
Only content that the user has permission to view will be returned.

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Query parameters

type

string

The type of content to return.

Default: page

Valid values: page, blogpost

spaceKey

string

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

title

string

The title of the page to be returned. Required for page type.

status

Array<string>

Filter the results to a set of content based on their status. If set to any,
content with any status is returned. Note, the historical status is currently
not supported.

Default: current

postingDay

string

The posting date of the blog post to be returned. Required for
blogpost type. Format: yyyy-mm-dd.

expand

Array<string>

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

  • childTypes.all returns whether the content has attachments, comments, or child pages.
    Use this if you only need to check whether the content has children of a particular type.
  • childTypes.attachment returns whether the content has attachments.
  • childTypes.comment returns whether the content has comments.
  • childTypes.page returns whether the content has child pages.
  • container returns the space that the content is in. This is the same as the information
    returned by Get space.
  • metadata.currentuser returns information about the current user in relation to the content,
    including when they last viewed it, modified it, contributed to it, or added it as a favourite.
  • metadata.properties returns content properties that have been set via the Confluence REST API.
  • metadata.labels returns the labels that have been added to the content.
  • metadata.frontend (this property is only used by Atlassian)
  • operations returns the operations for the content, which are used when setting permissions.
  • children.page returns pages that are descendants at the level immediately below the content.
  • children.attachment returns all attachments for the content.
  • children.comment returns all comments on the content.
  • restrictions.read.restrictions.user returns the users that have permission to read the content.
  • restrictions.read.restrictions.group returns the groups that have permission to read the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • restrictions.update.restrictions.user returns the users that have permission to update the content.
  • restrictions.update.restrictions.group returns the groups that have permission to update the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • history returns the history of the content, including the date it was created.
  • history.lastUpdated returns information about the most recent update of the content, including
    who updated it and when it was updated.
  • history.previousVersion returns information about the update prior to the current content update.
  • history.contributors returns all of the users who have contributed to the content.
  • history.nextVersion returns information about the update after to the current content update.
  • ancestors returns the parent page, if the content is a page.
  • body returns the body of the content in different formats, including the editor format,
    view format, and export format.
  • version returns information about the most recent update of the content, including who updated it
    and when it was updated.
  • descendants.page returns pages that are descendants at any level below the content.
  • descendants.attachment returns all attachments for the content, same as children.attachment.
  • descendants.comment returns all comments on the content, same as children.comment.
  • space returns the space that the content is in. This is the same as the information returned by
    Get space.

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

Valid values: childTypes.all, childTypes.attachment, childTypes.comment, childTypes.page, container, metadata.currentuser, metadata.properties, metadata.labels, metadata.frontend, operations …(Show more)

trigger

string

If set to viewed, the request will trigger a ‘viewed’ event for the content.
When this event is triggered, the page/blogpost will appear on the ‘Recently visited’
tab of the user’s Confluence dashboard.

Valid values: viewed

orderby

string

Orders the content by a particular field. Specify the field and sort direction for
this parameter, as follows: ‘fieldpath asc/desc’. For example, ‘history.createdDate desc’.

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
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content’
–header ‘Accept: application/json’

Responses

Returned if the requested list of content is returned.

Create content

POST /wiki/rest/api/content

Creates a new piece of content or publishes an existing draft.

To publish a draft, add the id and status properties to the body of the request.
Set the id to the ID of the draft and set the status to ‘current’. When the
request is sent, a new piece of content will be created and the metadata from the
draft will be transferred into it.

By default, the following objects are expanded: space, history, version.

Permissions required: ‘Add’ permission for the
space that the content will be created in, and permission to view the draft if publishing a draft.

App scope required: WRITE

OAuth scopes required

:

write:confluence-content

Request

Query parameters

status

string

Filter the returned content by status.

Default: current

expand

Array<string>

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

  • childTypes.all returns whether the content has attachments, comments, or child pages.
    Use this if you only need to check whether the content has children of a particular type.
  • childTypes.attachment returns whether the content has attachments.
  • childTypes.comment returns whether the content has comments.
  • childTypes.page returns whether the content has child pages.
  • container returns the space that the content is in. This is the same as the information
    returned by Get space.
  • metadata.currentuser returns information about the current user in relation to the content,
    including when they last viewed it, modified it, contributed to it, or added it as a favourite.
  • metadata.properties returns content properties that have been set via the Confluence REST API.
  • metadata.labels returns the labels that have been added to the content.
  • metadata.frontend (this property is only used by Atlassian)
  • operations returns the operations for the content, which are used when setting permissions.
  • children.page returns pages that are descendants at the level immediately below the content.
  • children.attachment returns all attachments for the content.
  • children.comment returns all comments on the content.
  • restrictions.read.restrictions.user returns the users that have permission to read the content.
  • restrictions.read.restrictions.group returns the groups that have permission to read the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • restrictions.update.restrictions.user returns the users that have permission to update the content.
  • restrictions.update.restrictions.group returns the groups that have permission to update the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • history returns the history of the content, including the date it was created.
  • history.lastUpdated returns information about the most recent update of the content, including
    who updated it and when it was updated.
  • history.previousVersion returns information about the update prior to the current content update.
  • history.contributors returns all of the users who have contributed to the content.
  • history.nextVersion returns information about the update after to the current content update.
  • ancestors returns the parent page, if the content is a page.
  • body returns the body of the content in different formats, including the editor format,
    view format, and export format.
  • version returns information about the most recent update of the content, including who updated it
    and when it was updated.
  • descendants.page returns pages that are descendants at any level below the content.
  • descendants.attachment returns all attachments for the content, same as children.attachment.
  • descendants.comment returns all comments on the content, same as children.comment.
  • space returns the space that the content is in. This is the same as the information returned by
    Get space.

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

Valid values: childTypes.all, childTypes.attachment, childTypes.comment, childTypes.page, container, metadata.currentuser, metadata.properties, metadata.labels, metadata.frontend, operations …(Show more)

Body parameters

id

string

The ID of the draft content. Required when publishing a draft.

title Required

string

Max length: 255

type Required

string

The type of the new content. Custom content types defined by apps are also supported.

Valid values: page, blogpost, comment, attachment

space Required

object

The space that the content is being created in.

status

string

The status of the new content.

Default: current

Valid values: current, trashed, historical, draft

ancestors

Array<object>

The parent content of the new content. Only one parent content
id can be specified.

body Required

object

The body of the new content. Does not apply to attachments.
Only one body format should be specified as the property for
this object, e.g. storage.

Note, editor2 format is used by Atlassian only. anonymous_export_view is
the same as ‘export_view’ format but only content viewable by an anonymous
user is included.

Min properties: 1, Max properties: 1

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
44curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“id”: “<string>”,
“title”: “<string>”,
“type”: “page”,
“space”: {
“key”: “<string>”
},
“status”: “current”,
“ancestors”: [
{
“id”: “<string>”
}
],
“body”: {
“view”: {
“value”: “<string>”,
“representation”: “view”
},
“export_view”: {
“value”: “<string>”,
“representation”: “view”
},
“styled_view”: {
“value”: “<string>”,
“representation”: “view”
},
“storage”: {
“value”: “<string>”,
“representation”: “view”
},
“editor2”: {
“value”: “<string>”,
“representation”: “view”
},
“anonymous_export_view”: {
“value”: “<string>”,
“representation”: “view”
}
}
}’

Responses

Returned if the content is created.

Content type Value
application/json

Content

Publish shared draft

PUT /wiki/rest/api/content/blueprint/instance/

Publishes a shared draft of a page created from a blueprint.

By default, the following objects are expanded: body.storage, history, space, version, ancestors.

Permissions required:
Permission to view the draft and ‘Add’ permission for the space that
the content will be created in.

App scope required: WRITE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

draftId Required

string

The ID of the draft page that was created from a blueprint.
You can find the draftId in the Confluence application by
opening the draft page and checking the page URL.

Query parameters

status

string

The status of the content to be updated, i.e. the draft. This is set
to ‘draft’ by default, so you shouldn’t need to specify it.

Default: draft

expand

Array<string>

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

  • childTypes.all returns whether the content has attachments, comments, or child pages.
    Use this if you only need to check whether the content has children of a particular type.
  • childTypes.attachment returns whether the content has attachments.
  • childTypes.comment returns whether the content has comments.
  • childTypes.page returns whether the content has child pages.
  • container returns the space that the content is in. This is the same as the information
    returned by Get space.
  • metadata.currentuser returns information about the current user in relation to the content,
    including when they last viewed it, modified it, contributed to it, or added it as a favourite.
  • metadata.properties returns content properties that have been set via the Confluence REST API.
  • metadata.labels returns the labels that have been added to the content.
  • metadata.frontend (this property is only used by Atlassian)
  • operations returns the operations for the content, which are used when setting permissions.
  • children.page returns pages that are descendants at the level immediately below the content.
  • children.attachment returns all attachments for the content.
  • children.comment returns all comments on the content.
  • restrictions.read.restrictions.user returns the users that have permission to read the content.
  • restrictions.read.restrictions.group returns the groups that have permission to read the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • restrictions.update.restrictions.user returns the users that have permission to update the content.
  • restrictions.update.restrictions.group returns the groups that have permission to update the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • history returns the history of the content, including the date it was created.
  • history.lastUpdated returns information about the most recent update of the content, including
    who updated it and when it was updated.
  • history.previousVersion returns information about the update prior to the current content update.
  • history.contributors returns all of the users who have contributed to the content.
  • history.nextVersion returns information about the update after to the current content update.
  • ancestors returns the parent page, if the content is a page.
  • body returns the body of the content in different formats, including the editor format,
    view format, and export format.
  • version returns information about the most recent update of the content, including who updated it
    and when it was updated.
  • descendants.page returns pages that are descendants at any level below the content.
  • descendants.attachment returns all attachments for the content, same as children.attachment.
  • descendants.comment returns all comments on the content, same as children.comment.
  • space returns the space that the content is in. This is the same as the information returned by
    Get space.

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

Valid values: childTypes.all, childTypes.attachment, childTypes.comment, childTypes.page, container, metadata.currentuser, metadata.properties, metadata.labels, metadata.frontend, operations …(Show more)

Body parameters

version Required

object

The version for the new content.

title Required

string

The title of the content. If you don’t want to change the title,
set this to the current title of the draft.

Max length: 255

type Required

string

The type of content. Set this to page.

Valid values: page

status

string

The status of the content. Set this to current or omit it altogether.

Default: current

Valid values: current

space

object

The space for the content.

ancestors

Array<object>

The new ancestor (i.e. parent page) for the content. If you have
specified an ancestor, you must also specify a space property
in the request body for the space that the ancestor is in.

Note, if you specify more than one ancestor, the last ID in the array
will be selected as the parent page for the content.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20curl –request PUT
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content/blueprint/instance/’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“version”: {
“number”: 36
},
“title”: “<string>”,
“type”: “page”,
“status”: “current”,
“space”: {
“key”: “<string>”
},
“ancestors”: [
{
“id”: “<string>”
}
]
}’

Responses

Returned if the draft was successfully published.

Content type Value
application/json

Content

Publish legacy draft

POST /wiki/rest/api/content/blueprint/instance/

Publishes a legacy draft of a page created from a blueprint. Legacy drafts
will eventually be removed in favor of shared drafts. For now, this method
works the same as Publish shared draft.

By default, the following objects are expanded: body.storage, history, space, version, ancestors.

Permissions required:
Permission to view the draft and ‘Add’ permission for the space that
the content will be created in.

App scope required: WRITE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

draftId Required

string

The ID of the draft page that was created from a blueprint.
You can find the draftId in the Confluence application by
opening the draft page and checking the page URL.

Query parameters

status

string

The status of the content to be updated, i.e. the draft. This is set
to ‘draft’ by default, so you shouldn’t need to specify it.

Default: draft

expand

Array<string>

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

  • childTypes.all returns whether the content has attachments, comments, or child pages.
    Use this if you only need to check whether the content has children of a particular type.
  • childTypes.attachment returns whether the content has attachments.
  • childTypes.comment returns whether the content has comments.
  • childTypes.page returns whether the content has child pages.
  • container returns the space that the content is in. This is the same as the information
    returned by Get space.
  • metadata.currentuser returns information about the current user in relation to the content,
    including when they last viewed it, modified it, contributed to it, or added it as a favourite.
  • metadata.properties returns content properties that have been set via the Confluence REST API.
  • metadata.labels returns the labels that have been added to the content.
  • metadata.frontend (this property is only used by Atlassian)
  • operations returns the operations for the content, which are used when setting permissions.
  • children.page returns pages that are descendants at the level immediately below the content.
  • children.attachment returns all attachments for the content.
  • children.comment returns all comments on the content.
  • restrictions.read.restrictions.user returns the users that have permission to read the content.
  • restrictions.read.restrictions.group returns the groups that have permission to read the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • restrictions.update.restrictions.user returns the users that have permission to update the content.
  • restrictions.update.restrictions.group returns the groups that have permission to update the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • history returns the history of the content, including the date it was created.
  • history.lastUpdated returns information about the most recent update of the content, including
    who updated it and when it was updated.
  • history.previousVersion returns information about the update prior to the current content update.
  • history.contributors returns all of the users who have contributed to the content.
  • history.nextVersion returns information about the update after to the current content update.
  • ancestors returns the parent page, if the content is a page.
  • body returns the body of the content in different formats, including the editor format,
    view format, and export format.
  • version returns information about the most recent update of the content, including who updated it
    and when it was updated.
  • descendants.page returns pages that are descendants at any level below the content.
  • descendants.attachment returns all attachments for the content, same as children.attachment.
  • descendants.comment returns all comments on the content, same as children.comment.
  • space returns the space that the content is in. This is the same as the information returned by
    Get space.

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

Valid values: childTypes.all, childTypes.attachment, childTypes.comment, childTypes.page, container, metadata.currentuser, metadata.properties, metadata.labels, metadata.frontend, operations …(Show more)

Body parameters

version Required

object

The version for the new content.

title Required

string

The title of the content. If you don’t want to change the title,
set this to the current title of the draft.

Max length: 255

type Required

string

The type of content. Set this to page.

Valid values: page

status

string

The status of the content. Set this to current or omit it altogether.

Default: current

Valid values: current

space

object

The space for the content.

ancestors

Array<object>

The new ancestor (i.e. parent page) for the content. If you have
specified an ancestor, you must also specify a space property
in the request body for the space that the ancestor is in.

Note, if you specify more than one ancestor, the last ID in the array
will be selected as the parent page for the content.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content/blueprint/instance/’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“version”: {
“number”: 36
},
“title”: “<string>”,
“type”: “page”,
“status”: “current”,
“space”: {
“key”: “<string>”
},
“ancestors”: [
{
“id”: “<string>”
}
]
}’

Responses

Returned if the draft was successfully published.

Content type Value
application/json

Content

Search content by CQL

GET /wiki/rest/api/content/search

Returns the list of content that matches a Confluence Query Language
(CQL) query. For information on CQL, see:
Advanced searching using CQL.

Permissions required:
Permission to access the Confluence site (‘Can use’ global permission).
Only content that the user has permission to view will be returned.

App scope required: READ

OAuth scopes required

:

search:confluence

Request

Query parameters

cql

string

The CQL string that is used to find the requested content.

cqlcontext

string

The space, content, and content status to execute the search against.
Specify this as an object with the following properties:

  • spaceKey Key of the space to search against. Optional.
  • contentId ID of the content to search against. Optional. Must
    be in the space spacified by spaceKey.
  • contentStatuses Content statuses to search against. Optional.

expand

Array<string>

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

  • childTypes.all returns whether the content has attachments, comments, or child pages.
    Use this if you only need to check whether the content has children of a particular type.
  • childTypes.attachment returns whether the content has attachments.
  • childTypes.comment returns whether the content has comments.
  • childTypes.page returns whether the content has child pages.
  • container returns the space that the content is in. This is the same as the information
    returned by Get space.
  • metadata.currentuser returns information about the current user in relation to the content,
    including when they last viewed it, modified it, contributed to it, or added it as a favourite.
  • metadata.properties returns content properties that have been set via the Confluence REST API.
  • metadata.labels returns the labels that have been added to the content.
  • metadata.frontend (this property is only used by Atlassian)
  • operations returns the operations for the content, which are used when setting permissions.
  • children.page returns pages that are descendants at the level immediately below the content.
  • children.attachment returns all attachments for the content.
  • children.comment returns all comments on the content.
  • restrictions.read.restrictions.user returns the users that have permission to read the content.
  • restrictions.read.restrictions.group returns the groups that have permission to read the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • restrictions.update.restrictions.user returns the users that have permission to update the content.
  • restrictions.update.restrictions.group returns the groups that have permission to update the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • history returns the history of the content, including the date it was created.
  • history.lastUpdated returns information about the most recent update of the content, including
    who updated it and when it was updated.
  • history.previousVersion returns information about the update prior to the current content update.
  • history.contributors returns all of the users who have contributed to the content.
  • history.nextVersion returns information about the update after to the current content update.
  • ancestors returns the parent page, if the content is a page.
  • body returns the body of the content in different formats, including the editor format,
    view format, and export format.
  • version returns information about the most recent update of the content, including who updated it
    and when it was updated.
  • descendants.page returns pages that are descendants at any level below the content.
  • descendants.attachment returns all attachments for the content, same as children.attachment.
  • descendants.comment returns all comments on the content, same as children.comment.
  • space returns the space that the content is in. This is the same as the information returned by
    Get space.

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

Valid values: childTypes.all, childTypes.attachment, childTypes.comment, childTypes.page, container, metadata.currentuser, metadata.properties, metadata.labels, metadata.frontend, operations …(Show more)

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
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content/search’
–header ‘Accept: application/json’

Responses

Returned if the requested list of content is returned.

Get content by ID

GET /wiki/rest/api/content/

Returns a single piece of content, like a page or a blog post.

By default, the following objects are expanded: space, history, version.

Permissions required:
Permission to view the content. If the content is a blog post, ‘View’ permission
for the space is required.

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Path parameters

id Required

string

The ID of the content to be returned. If you don’t know the content ID,
use Get content and filter the results.

Query parameters

status

Array<string>

Filter the results to a set of content based on their status.
If set to any, content with any status is returned. Note, the
historical status is currently not supported.

Default: current

version

integer

The version number of the content to be returned.

Format: int32

embeddedContentRender

string

The version of embedded content (e.g. attachments) to render.

  • current renders the latest version of the embedded content.
  • version-at-save renders the version of the embedded content
    at the time of save.

Default: current

Valid values: current, version-at-save

expand

Array<string>

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

  • childTypes.all returns whether the content has attachments, comments, or child pages.
    Use this if you only need to check whether the content has children of a particular type.
  • childTypes.attachment returns whether the content has attachments.
  • childTypes.comment returns whether the content has comments.
  • childTypes.page returns whether the content has child pages.
  • container returns the space that the content is in. This is the same as the information
    returned by Get space.
  • metadata.currentuser returns information about the current user in relation to the content,
    including when they last viewed it, modified it, contributed to it, or added it as a favourite.
  • metadata.properties returns content properties that have been set via the Confluence REST API.
  • metadata.labels returns the labels that have been added to the content.
  • metadata.frontend (this property is only used by Atlassian)
  • operations returns the operations for the content, which are used when setting permissions.
  • children.page returns pages that are descendants at the level immediately below the content.
  • children.attachment returns all attachments for the content.
  • children.comment returns all comments on the content.
  • restrictions.read.restrictions.user returns the users that have permission to read the content.
  • restrictions.read.restrictions.group returns the groups that have permission to read the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • restrictions.update.restrictions.user returns the users that have permission to update the content.
  • restrictions.update.restrictions.group returns the groups that have permission to update the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • history returns the history of the content, including the date it was created.
  • history.lastUpdated returns information about the most recent update of the content, including
    who updated it and when it was updated.
  • history.previousVersion returns information about the update prior to the current content update.
  • history.contributors returns all of the users who have contributed to the content.
  • history.nextVersion returns information about the update after to the current content update.
  • ancestors returns the parent page, if the content is a page.
  • body returns the body of the content in different formats, including the editor format,
    view format, and export format.
  • version returns information about the most recent update of the content, including who updated it
    and when it was updated.
  • descendants.page returns pages that are descendants at any level below the content.
  • descendants.attachment returns all attachments for the content, same as children.attachment.
  • descendants.comment returns all comments on the content, same as children.comment.
  • space returns the space that the content is in. This is the same as the information returned by
    Get space.

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

Valid values: childTypes.all, childTypes.attachment, childTypes.comment, childTypes.page, container, metadata.currentuser, metadata.properties, metadata.labels, metadata.frontend, operations …(Show more)

trigger

string

If set to viewed, the request will trigger a ‘viewed’ event for the content.
When this event is triggered, the page/blogpost will appear on the ‘Recently visited’
tab of the user’s Confluence dashboard.

Valid values: viewed

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content/’
–header ‘Accept: application/json’

Responses

Returned if the requested content is returned.

Content type Value
application/json

Content

Update content

PUT /wiki/rest/api/content/

Updates a piece of content. Use this method to update the title or body
of a piece of content, change the status, change the parent page, and more.

Note, updating draft content is currently not supported.

Permissions required:
Permission to update the content.

App scope required: WRITE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

id Required

string

The ID of the content to be updated.

Query parameters

status

string

The updated status of the content. Use this parameter to change the
status of a piece of content without passing the entire request body.

Default: current

Valid values: current, trashed, historical, draft

conflictPolicy

string

The action that should be taken when conflicts are discovered.
Only used when publishing a draft page.

Default: abort

Valid values: abort

Body parameters

version Required

object

The new version for the updated content. Set this to the current version number incremented by one, unless you are changing the status to ‘draft’ which must have a version number of 1.

To get the current version number, use Get content by ID and retrieve version.number.

title Required

string

The updated title of the content. If you are not changing this field, set this to the current title.

Max length: 255

type Required

string

The type of content. Set this to the current type of the content.

Valid values: page, blogpost, comment, attachment

status

string

The updated status of the content. Note, if you change the status of a page from
‘current’ to ‘draft’ and it has an existing draft, the existing draft will be deleted
in favor of the updated page.

Valid values: current, trashed, historical, draft

ancestors

Array<object>

The new parent for the content. Only one parent content ‘id’ can be specified.

body

object

The updated body of the content. Does not apply to attachments.
If you are not sure how to generate these formats, you can create a page in the
Confluence application, retrieve the content using Get content,
and expand the desired content format, e.g. expand=body.storage.

Min properties: 1, Max properties: 1

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
43curl –request PUT
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content/’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“version”: {
“number”: 19
},
“title”: “<string>”,
“type”: “page”,
“status”: “current”,
“ancestors”: [
{
“id”: “<string>”
}
],
“body”: {
“view”: {
“value”: “<string>”,
“representation”: “view”
},
“export_view”: {
“value”: “<string>”,
“representation”: “view”
},
“styled_view”: {
“value”: “<string>”,
“representation”: “view”
},
“storage”: {
“value”: “<string>”,
“representation”: “view”
},
“editor2”: {
“value”: “<string>”,
“representation”: “view”
},
“anonymous_export_view”: {
“value”: “<string>”,
“representation”: “view”
}
}
}’

Responses

Returned if the content is updated.

Content type Value
application/json

Content

Delete content

DELETE /wiki/rest/api/content/

Moves a piece of content to the space’s trash or purges it from the trash,
depending on the content’s type and status:

  • If the content’s type is page or blogpost and its status is current,
    it will be trashed.
  • If the content’s type is page or blogpost and its status is trashed,
    the content will be purged from the trash and deleted permanently. Note,
    you must also set the status query parameter to trashed in your request.
  • If the content’s type is comment or attachment, it will be deleted
    permanently without being trashed.

Permissions required:
‘Delete’ permission for the space that the content is in, and permission to edit the content.

App scope required: DELETE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

id Required

string

The ID of the content to be deleted.

Query parameters

status

string

Set this to trashed, if the content’s status is trashed and you want to purge it.

Example

1
2curl –request DELETE
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content/’

Responses

Returned if the content is successfully trashed.

A schema has not been defined for this response code.

Get content children

GET /wiki/rest/api/content//child

Returns a map of the direct children of a piece of content. A piece of content
has different types of child content, depending on its type. These are
the default parent-child content type relationships:

  • page: child content is page, comment, attachment
  • blogpost: child content is comment, attachment
  • attachment: child content is comment
  • comment: child content is attachment

Apps can override these default relationships. Apps can also introduce
new content types that create new parent-child content relationships.

Note, the map will always include all child content types that are valid
for the content. However, if the content has no instances of a child content
type, the map will contain an empty array for that child content type.

Permissions required: ‘View’ permission for the space,
and permission to view the content if it is a page.

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Path parameters

id Required

string

The ID of the content to be queried for its children.

Query parameters

expand

Array<string>

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

  • attachment returns all attachments for the content.
  • comments returns all comments for the content.
  • page returns all child pages of the content.

Style: form

Valid values: attachment, comment, page

parentVersion

integer

The version of the parent content to retrieve children for.
Currently, this only works for the latest version.

Default: 0, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//child’
–header ‘Accept: application/json’

Responses

Returned if the requested content children are returned.

Get attachments

GET /wiki/rest/api/content//child/attachment

Returns the attachments for a piece of content.

By default, the following objects are expanded: metadata.

Permissions required:
Permission to view the content. If the content is a blog post, ‘View’ permission
for the space is required.

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Path parameters

id Required

string

The ID of the content to be queried for its attachments.

Query parameters

expand

Array<string>

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

  • childTypes.all returns whether the content has attachments, comments, or child pages.
    Use this if you only need to check whether the content has children of a particular type.
  • childTypes.attachment returns whether the content has attachments.
  • childTypes.comment returns whether the content has comments.
  • childTypes.page returns whether the content has child pages.
  • container returns the space that the content is in. This is the same as the information
    returned by Get space.
  • metadata.currentuser returns information about the current user in relation to the content,
    including when they last viewed it, modified it, contributed to it, or added it as a favourite.
  • metadata.properties returns content properties that have been set via the Confluence REST API.
  • metadata.labels returns the labels that have been added to the content.
  • metadata.frontend (this property is only used by Atlassian)
  • operations returns the operations for the content, which are used when setting permissions.
  • children.page returns pages that are descendants at the level immediately below the content.
  • children.attachment returns all attachments for the content.
  • children.comment returns all comments on the content.
  • restrictions.read.restrictions.user returns the users that have permission to read the content.
  • restrictions.read.restrictions.group returns the groups that have permission to read the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • restrictions.update.restrictions.user returns the users that have permission to update the content.
  • restrictions.update.restrictions.group returns the groups that have permission to update the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • history returns the history of the content, including the date it was created.
  • history.lastUpdated returns information about the most recent update of the content, including
    who updated it and when it was updated.
  • history.previousVersion returns information about the update prior to the current content update.
  • history.contributors returns all of the users who have contributed to the content.
  • history.nextVersion returns information about the update after to the current content update.
  • ancestors returns the parent page, if the content is a page.
  • body returns the body of the content in different formats, including the editor format,
    view format, and export format.
  • version returns information about the most recent update of the content, including who updated it
    and when it was updated.
  • descendants.page returns pages that are descendants at any level below the content.
  • descendants.attachment returns all attachments for the content, same as children.attachment.
  • descendants.comment returns all comments on the content, same as children.comment.
  • space returns the space that the content is in. This is the same as the information returned by
    Get space.

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

Valid values: childTypes.all, childTypes.attachment, childTypes.comment, childTypes.page, container, metadata.currentuser, metadata.properties, metadata.labels, metadata.frontend, operations …(Show more)

start

integer

The starting index of the returned attachments.

Default: 0, Minimum: 0, Format: int32

limit

integer

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

Default: 25, Minimum: 0, Format: int32

filename

string

Filter the results to attachments that match the filename.

mediaType

string

Filter the results to attachments that match the media type.

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//child/attachment’
–header ‘Accept: application/json’

Responses

Returned if the requested attachments are returned.

Create or update attachment

PUT /wiki/rest/api/content//child/attachment

Adds an attachment to a piece of content. If the attachment already exists
for the content, then the attachment is updated (i.e. a new version of the
attachment is created).

Note, you must set a X-Atlassian-Token: nocheck header on the request
for this method, otherwise it will be blocked. This protects against XSRF
attacks, which is necessary as this method accepts multipart/form-data.

The media type ‘multipart/form-data’ is defined in RFC 1867.
Most client libraries have classes that make it easier to implement
multipart posts, like the MultiPartEntity
Java class provided by Apache HTTP Components.

Example: This curl command attaches a file (‘example.txt’) to a piece of
content (id=’123′) with a comment and minorEdits=true. If the ‘example.txt’
file already exists, it will update it with a new version of the attachment.

1
2
3
4
5
6
7
8curl -D-
-u admin:admin
-X PUT
-H “X-Atlassian-Token: nocheck”
-F “file=@example.txt”
-F “minorEdit=true”
-F “comment=Example attachment comment”
http://myhost/rest/api/content/123/child/attachment

Permissions required:
Permission to update the content.

App scope required: WRITE

OAuth scopes required

:

write:confluence-file

Request

Path parameters

id Required

string

The ID of the content to add the attachment to.

Query parameters

status

string

The status of the content that the attachment is being added to.
This should always be set to ‘current’.

Default: current

Valid values: current, draft

Body parameters
Content type Value
multipart/form-data

object

Example

1
2
3curl –request PUT
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//child/attachment’
–header ‘Accept: application/json’

Responses

Returned if the attachments were added to the content.

Create attachment

POST /wiki/rest/api/content//child/attachment

Adds an attachment to a piece of content. This method only adds a new
attachment. If you want to update an existing attachment, use
Create or update attachments.

Note, you must set a X-Atlassian-Token: nocheck header on the request
for this method, otherwise it will be blocked. This protects against XSRF
attacks, which is necessary as this method accepts multipart/form-data.

The media type ‘multipart/form-data’ is defined in RFC 1867.
Most client libraries have classes that make it easier to implement
multipart posts, like the MultiPartEntity
Java class provided by Apache HTTP Components.

Example: This curl command attaches a file (‘example.txt’) to a container
(id=’123′) with a comment and minorEdits=true.

1
2
3
4
5
6
7
8curl -D-
-u admin:admin
-X POST
-H “X-Atlassian-Token: nocheck”
-F “file=@example.txt”
-F “minorEdit=true”
-F “comment=Example attachment comment”
http://myhost/rest/api/content/123/child/attachment

Permissions required:
Permission to update the content.

App scope required: WRITE

OAuth scopes required

:

write:confluence-file

Request

Path parameters

id Required

string

The ID of the content to add the attachment to.

Query parameters

status

string

The status of the content that the attachment is being added to.

Default: current

Valid values: current, draft

Body parameters
Content type Value
multipart/form-data

object

Example

1
2
3curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//child/attachment’
–header ‘Accept: application/json’

Responses

Returned if the attachments were added to the content.

Update attachment properties

PUT /wiki/rest/api/content//child/attachment/

Updates the attachment properties, i.e. the non-binary data of an attachment
like the filename, media-type, comment, and parent container.

Permissions required:
Permission to update the content.

App scope required: WRITE

OAuth scopes required

:

write:confluence-file

,

write:confluence-props

Request

Path parameters

id Required

string

The ID of the content that the attachment is attached to.

attachmentId Required

string

The ID of the attachment to update.

Body parameters

version Required

object

The attachment version. Set this to the current version number of the
attachment. Note, the version number only needs to be incremented when
updating the actual attachment, not its properties.

id Required

string

The ID of the attachment to be updated.

type Required

string

Set this to attachment.

Valid values: attachment

title

string

The updated name of the attachment.

Max length: 255

metadata

object

container

object

The new content to attach the attachment to.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20curl –request PUT
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//child/attachment/’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“version”: {
“number”: 19
},
“id”: “<string>”,
“type”: “attachment”,
“title”: “<string>”,
“metadata”: {
“mediaType”: “<string>”,
“comment”: “<string>”
},
“container”: {
“id”: “<string>”,
“type”: “<string>”
}
}’

Responses

Returned if the attachment is updated.

Content type Value
application/json

Content

Update attachment data

POST /wiki/rest/api/content//child/attachment//data

Updates the binary data of an attachment, given the attachment ID, and
optionally the comment and the minor edit field.

This method is essentially the same as Create or update attachments,
except that it matches the attachment ID rather than the name.

Note, you must set a X-Atlassian-Token: nocheck header on the request
for this method, otherwise it will be blocked. This protects against XSRF
attacks, which is necessary as this method accepts multipart/form-data.

The media type ‘multipart/form-data’ is defined in RFC 1867.
Most client libraries have classes that make it easier to implement
multipart posts, like the MultiPartEntity
Java class provided by Apache HTTP Components.

Example: This curl command updates an attachment (id=’att456′) that is attached
to a piece of content (id=’123′) with a comment and minorEdits=true.

1
2
3
4
5
6
7
8curl -D-
-u admin:admin
-X POST
-H “X-Atlassian-Token: nocheck”
-F “file=@example.txt”
-F “minorEdit=true”
-F “comment=Example attachment comment”
http://myhost/rest/api/content/123/child/attachment/att456/data

Permissions required:
Permission to update the content.

App scope required: WRITE

OAuth scopes required

:

write:confluence-file

Request

Path parameters

id Required

string

The ID of the content that the attachment is attached to.

attachmentId Required

string

The ID of the attachment to update.

Body parameters
Content type Value
multipart/form-data

object

Example

1
2
3curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//child/attachment//data’
–header ‘Accept: application/json’

Responses

Returned if the attachment is updated.

Content type Value
application/json

Content

GET /wiki/rest/api/content//child/comment

Returns the comments on a piece of content.

Permissions required: ‘View’ permission for the space,
and permission to view the content if it is a page.

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Path parameters

id Required

string

The ID of the content to be queried for its comments.

Query parameters

expand

Array<string>

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

  • childTypes.all returns whether the content has attachments, comments, or child pages.
    Use this if you only need to check whether the content has children of a particular type.
  • childTypes.attachment returns whether the content has attachments.
  • childTypes.comment returns whether the content has comments.
  • childTypes.page returns whether the content has child pages.
  • container returns the space that the content is in. This is the same as the information
    returned by Get space.
  • metadata.currentuser returns information about the current user in relation to the content,
    including when they last viewed it, modified it, contributed to it, or added it as a favourite.
  • metadata.properties returns content properties that have been set via the Confluence REST API.
  • metadata.labels returns the labels that have been added to the content.
  • metadata.frontend (this property is only used by Atlassian)
  • operations returns the operations for the content, which are used when setting permissions.
  • children.page returns pages that are descendants at the level immediately below the content.
  • children.attachment returns all attachments for the content.
  • children.comment returns all comments on the content.
  • restrictions.read.restrictions.user returns the users that have permission to read the content.
  • restrictions.read.restrictions.group returns the groups that have permission to read the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • restrictions.update.restrictions.user returns the users that have permission to update the content.
  • restrictions.update.restrictions.group returns the groups that have permission to update the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • history returns the history of the content, including the date it was created.
  • history.lastUpdated returns information about the most recent update of the content, including
    who updated it and when it was updated.
  • history.previousVersion returns information about the update prior to the current content update.
  • history.contributors returns all of the users who have contributed to the content.
  • history.nextVersion returns information about the update after to the current content update.
  • ancestors returns the parent page, if the content is a page.
  • body returns the body of the content in different formats, including the editor format,
    view format, and export format.
  • version returns information about the most recent update of the content, including who updated it
    and when it was updated.
  • descendants.page returns pages that are descendants at any level below the content.
  • descendants.attachment returns all attachments for the content, same as children.attachment.
  • descendants.comment returns all comments on the content, same as children.comment.
  • space returns the space that the content is in. This is the same as the information returned by
    Get space.

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

Valid values: childTypes.all, childTypes.attachment, childTypes.comment, childTypes.page, container, metadata.currentuser, metadata.properties, metadata.labels, metadata.frontend, operations …(Show more)

parentVersion

integer

The version of the parent content to retrieve children for.
Currently, this only works for the latest version.

Default: 0, Minimum: 0, Format: int32

start

integer

The starting index of the returned comments.

Format: int32

limit

integer

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

Default: 25, Minimum: 0, Format: int32

location

Array<string>

The location of the comments in the page. Multiple locations can be specified.
If no location is specified, comments from all locations are returned.

depth

string

Currently, this parameter is not used.
Comments are returned at the root level only.

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//child/comment’
–header ‘Accept: application/json’

Responses

Returned if the requested comments are returned.

Get content children by type

GET /wiki/rest/api/content//child/

Returns all children of a given type, for a piece of content.
A piece of content has different types of child content, depending on its type:

  • page: child content is page, comment, attachment
  • blogpost: child content is comment, attachment
  • attachment: child content is comment
  • comment: child content is attachment

Custom content types that are provided by apps can also be returned.

Note, this method only returns direct children. To return children at all
levels, use Get descendants by type.

Permissions required: ‘View’ permission for the space,
and permission to view the content if it is a page.

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Path parameters

id Required

string

The ID of the content to be queried for its children.

type Required

string

The type of children to return.

Valid values: page, comment, attachment

Query parameters

expand

Array<string>

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

  • childTypes.all returns whether the content has attachments, comments, or child pages.
    Use this if you only need to check whether the content has children of a particular type.
  • childTypes.attachment returns whether the content has attachments.
  • childTypes.comment returns whether the content has comments.
  • childTypes.page returns whether the content has child pages.
  • container returns the space that the content is in. This is the same as the information
    returned by Get space.
  • metadata.currentuser returns information about the current user in relation to the content,
    including when they last viewed it, modified it, contributed to it, or added it as a favourite.
  • metadata.properties returns content properties that have been set via the Confluence REST API.
  • metadata.labels returns the labels that have been added to the content.
  • metadata.frontend (this property is only used by Atlassian)
  • operations returns the operations for the content, which are used when setting permissions.
  • children.page returns pages that are descendants at the level immediately below the content.
  • children.attachment returns all attachments for the content.
  • children.comment returns all comments on the content.
  • restrictions.read.restrictions.user returns the users that have permission to read the content.
  • restrictions.read.restrictions.group returns the groups that have permission to read the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • restrictions.update.restrictions.user returns the users that have permission to update the content.
  • restrictions.update.restrictions.group returns the groups that have permission to update the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • history returns the history of the content, including the date it was created.
  • history.lastUpdated returns information about the most recent update of the content, including
    who updated it and when it was updated.
  • history.previousVersion returns information about the update prior to the current content update.
  • history.contributors returns all of the users who have contributed to the content.
  • history.nextVersion returns information about the update after to the current content update.
  • ancestors returns the parent page, if the content is a page.
  • body returns the body of the content in different formats, including the editor format,
    view format, and export format.
  • version returns information about the most recent update of the content, including who updated it
    and when it was updated.
  • descendants.page returns pages that are descendants at any level below the content.
  • descendants.attachment returns all attachments for the content, same as children.attachment.
  • descendants.comment returns all comments on the content, same as children.comment.
  • space returns the space that the content is in. This is the same as the information returned by
    Get space.

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

Valid values: childTypes.all, childTypes.attachment, childTypes.comment, childTypes.page, container, metadata.currentuser, metadata.properties, metadata.labels, metadata.frontend, operations …(Show more)

parentVersion

integer

The version of the parent content to retrieve children for.
Currently, this only works for the latest version.

Default: 0, Minimum: 0, Format: int32

start

integer

The starting index of the returned content.

Format: int32

limit

integer

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

Default: 25, Minimum: 0, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//child/’
–header ‘Accept: application/json’

Responses

Returned if the requested content is returned.

Get content descendants

GET /wiki/rest/api/content//descendant

Returns a map of the descendants of a piece of content. This is similar
to Get content children, except that this
method returns child pages at all levels, rather than just the direct
child pages.

A piece of content has different types of descendants, depending on its type:

  • page: descendant is page, comment, attachment
  • blogpost: descendant is comment, attachment
  • attachment: descendant is comment
  • comment: descendant is attachment

The map will always include all descendant types that are valid for the content.
However, if the content has no instances of a descendant type, the map will
contain an empty array for that descendant type.

Permissions required:
‘View’ permission for the space, and permission to view the content if it
is a page.

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Path parameters

id Required

string

The ID of the content to be queried for its descendants.

Query parameters

expand

Array<string>

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

  • attachment returns all attachments for the content.
  • comments returns all comments for the content.
  • page returns all child pages of the content.

Style: form

Valid values: attachment, comment, page

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//descendant’
–header ‘Accept: application/json’

Responses

Returned if the requested descendants are returned.

Get content descendants by type

GET /wiki/rest/api/content//descendant/

Returns all descendants of a given type, for a piece of content. This is
similar to Get content children by type,
except that this method returns child pages at all levels, rather than just
the direct child pages.

A piece of content has different types of descendants, depending on its type:

  • page: descendant is page, comment, attachment
  • blogpost: descendant is comment, attachment
  • attachment: descendant is comment
  • comment: descendant is attachment

Custom content types that are provided by apps can also be returned.

Permissions required:
‘View’ permission for the space, and permission to view the content if it
is a page.

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Path parameters

id Required

string

The ID of the content to be queried for its descendants.

type Required

string

The type of descendants to return.

Valid values: page, comment, attachment

Query parameters

expand

Array<string>

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

  • childTypes.all returns whether the content has attachments, comments, or child pages.
    Use this if you only need to check whether the content has children of a particular type.
  • childTypes.attachment returns whether the content has attachments.
  • childTypes.comment returns whether the content has comments.
  • childTypes.page returns whether the content has child pages.
  • container returns the space that the content is in. This is the same as the information
    returned by Get space.
  • metadata.currentuser returns information about the current user in relation to the content,
    including when they last viewed it, modified it, contributed to it, or added it as a favourite.
  • metadata.properties returns content properties that have been set via the Confluence REST API.
  • metadata.labels returns the labels that have been added to the content.
  • metadata.frontend (this property is only used by Atlassian)
  • operations returns the operations for the content, which are used when setting permissions.
  • children.page returns pages that are descendants at the level immediately below the content.
  • children.attachment returns all attachments for the content.
  • children.comment returns all comments on the content.
  • restrictions.read.restrictions.user returns the users that have permission to read the content.
  • restrictions.read.restrictions.group returns the groups that have permission to read the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • restrictions.update.restrictions.user returns the users that have permission to update the content.
  • restrictions.update.restrictions.group returns the groups that have permission to update the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • history returns the history of the content, including the date it was created.
  • history.lastUpdated returns information about the most recent update of the content, including
    who updated it and when it was updated.
  • history.previousVersion returns information about the update prior to the current content update.
  • history.contributors returns all of the users who have contributed to the content.
  • history.nextVersion returns information about the update after to the current content update.
  • ancestors returns the parent page, if the content is a page.
  • body returns the body of the content in different formats, including the editor format,
    view format, and export format.
  • version returns information about the most recent update of the content, including who updated it
    and when it was updated.
  • descendants.page returns pages that are descendants at any level below the content.
  • descendants.attachment returns all attachments for the content, same as children.attachment.
  • descendants.comment returns all comments on the content, same as children.comment.
  • space returns the space that the content is in. This is the same as the information returned by
    Get space.

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

Valid values: childTypes.all, childTypes.attachment, childTypes.comment, childTypes.page, container, metadata.currentuser, metadata.properties, metadata.labels, metadata.frontend, operations …(Show more)

start

integer

The starting index of the returned content.

Default: 0, Minimum: 0, Format: int32

limit

integer

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

Default: 25, Minimum: 0, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//descendant/’
–header ‘Accept: application/json’

Responses

Returned if the requested content is returned.

Get history for content

GET /wiki/rest/api/content//history

Returns the most recent update for a piece of content.

Permissions required: Permission to view the content.

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Path parameters

id Required

string

The ID of the content to be queried for its history.

Query parameters

expand

Array<string>

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

  • lastUpdated returns information about the most recent update of the content,
    including who updated it and when it was updated.
  • previousVersion returns information about the update prior to the current content
    update. For this method, it contains the same information as lastUpdated.
  • contributors returns all of the users who have contributed to the content.
  • nextVersion This parameter is not used for this method.

Style: form

Valid values: lastUpdated, previousVersion, contributors, nextVersion

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//history’
–header ‘Accept: application/json’

Responses

Returned if the requested content history is returned.

Get macro body by macro ID

GET /wiki/rest/api/content//history//macro/id/

Returns the body of a macro in storage format, for the given macro ID.
This includes information like the name of the macro, the body of the macro,
and any macro parameters. This method is mainly used by Cloud apps.

About the macro ID: When a macro is created in a new version of content,
Confluence will generate a random ID for it, unless an ID is specified
(by an app). The macro ID will look similar to this: ‘50884bd9-0cb8-41d5-98be-f80943c14f96’.
The ID is then persisted as new versions of content are created, and is
only modified by Confluence if there are conflicting IDs.

Note, to preserve backwards compatibility this resource will also match on
the hash of the macro body, even if a macro ID is found. This check will
eventually become redundant, as macro IDs are generated for pages and
transparently propagate out to all instances.

Permissions required:
Permission to view the content that the macro is in.

App scope required: READ

OAuth scopes required

:

read:confluence-content.all

Request

Path parameters

id Required

string

The ID for the content that contains the macro.

version Required

integer

The version of the content that contains the macro.

Format: int32

macroId Required

string

The ID of the macro. This is usually passed by the app that the
macro is in. Otherwise, find the macro ID by querying the desired
content and version, then expanding the body in storage format.
For example, ‘/content/196611/version/7?expand=content.body.storage’.

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//history//macro/id/’
–header ‘Accept: application/json’

Responses

Returned if the requested macro body is returned.

Get labels for content

GET /wiki/rest/api/content//label

Returns the labels on a piece of content.

Permissions required:
‘View’ permission for the space and permission to view the content if it is a page.

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Path parameters

id Required

string

The ID of the content to be queried for its labels.

Query parameters

prefix

string

Filters the results to labels with the specified prefix. If this parameter
is not specified, then labels with any prefix will be returned.

  • global prefix is used by default when a user adds a label
    via the UI.
  • my prefix can be explicitly added by a user when adding a label
    via the UI, e.g. ‘my:example-label’. Also, when a page is selected as
    a favourite, the ‘my:favourite’ label is automatically added.
  • team can used when adding labels via Add labels to content
    but is not used in the UI.

Valid values: global, my, team

start

integer

The starting index of the returned labels.

Default: 0, Minimum: 0, Format: int32

limit

integer

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

Default: 200, Minimum: 0, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//label’
–header ‘Accept: application/json’

Responses

Returned if the requested labels are returned.

Add labels to content

POST /wiki/rest/api/content//label

Adds labels to a piece of content. Does not modify the existing labels.

Notes:

  • Labels can also be added when creating content (Create content).
  • Labels can be updated when updating content (Update content).
    This will delete the existing labels and replace them with the labels in
    the request.

Permissions required:
Permission to update the content.

App scope required: WRITE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

id Required

string

The ID of the content that will have labels added to it.

Body parameters

Example

1
2
3
4
5
6
7
8
9
10curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//label’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘[
{
“prefix”: “global”,
“name”: “<string>”
}
]’

Responses

Returned if the labels are added to the content.

Remove label from content using query parameter

DELETE /wiki/rest/api/content//label

Removes a label from a piece of content. This is similar to
Remove label from content
except that the label name is specified via a query parameter.

Use this method if the label name has “/” characters, as
Remove label from content using query parameter
does not accept “/” characters for the label name.

Permissions required:
Permission to update the content.

App scope required: DELETE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

id Required

string

The ID of the content that the label will be removed from.

Query parameters

name

string

The name of the label to be removed.

Example

1
2curl –request DELETE
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//label’

Responses

Returned if the label is removed. The response body will be empty.

Remove label from content

DELETE /wiki/rest/api/content//label/

Removes a label from a piece of content. This is similar to
Remove label from content using query parameter
except that the label name is specified via a path parameter.

Use this method if the label name does not have “/” characters, as the path
parameter does not accept “/” characters for security reasons. Otherwise,
use Remove label from content using query parameter.

Permissions required:
Permission to update the content.

App scope required: DELETE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

id Required

string

The ID of the content that the label will be removed from.

label Required

string

The name of the label to be removed.

Example

1
2curl –request DELETE
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//label/’

Responses

Returned if the label is removed. The response body will be empty.

Get watches for page

GET /wiki/rest/api/content//notification/child-created

Returns the watches for a page. A user that watches a page will receive
receive notifications when the page is updated.

If you want to manage watches for a page, use the following user methods:

  • Get content watch status for user
  • Add content watch
  • Remove content watch

Permissions required:
Permission to access the Confluence site (‘Can use’ global permission).

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Path parameters

id Required

string

The ID of the content to be queried for its watches.

Query parameters

start

integer

The starting index of the returned watches.

Default: 0, Minimum: 0, Format: int32

limit

integer

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

Default: 200, Minimum: 0, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//notification/child-created’
–header ‘Accept: application/json’

Responses

Returned if the requested watches are returned.

Get watches for space

GET /wiki/rest/api/content//notification/created

Returns all space watches for the space that the content is in. A user that
watches a space will receive receive notifications when any content in the
space is updated.

If you want to manage watches for a space, use the following user methods:

  • Get space watch status for user
  • Add space watch
  • Remove space watch

Permissions required:
Permission to access the Confluence site (‘Can use’ global permission).

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Path parameters

id Required

string

The ID of the content to be queried for its watches.

Query parameters

start

integer

The starting index of the returned watches.

Default: 0, Minimum: 0, Format: int32

limit

integer

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

Default: 200, Minimum: 0, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//notification/created’
–header ‘Accept: application/json’

Responses

Returned if the requested watches are returned.

Copy page hierarchy

POST /wiki/rest/api/content//pagehierarchy/copy

Copy page hierarchy allows the copying of an entire hierarchy of pages and their associated properties, permissions and attachments.
The id path parameter refers to the content id of the page to copy, and the new parent of this copied page is defined using the destinationPageId in the request body.
The titleOptions object defines the rules of renaming page titles during the copy;
for example, search and replace can be used in conjunction to rewrite the copied page titles.

Response example:

Use the /longtask/ REST API to get the copy task status.

App scope required: WRITE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

id Required

string

Body parameters

copyAttachments

boolean

copyPermissions

boolean

copyProperties

boolean

copyLabels

boolean

originalPageId

string

destinationPageId

string

titleOptions

CopyPageHierarchyTitleOptions

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//pagehierarchy/copy’
–header ‘Content-Type: application/json’
–data ‘{
“copyAttachments”: true,
“copyPermissions”: true,
“copyProperties”: true,
“copyLabels”: true,
“originalPageId”: “<string>”,
“destinationPageId”: “<string>”,
“titleOptions”: {
“prefix”: “<string>”,
“replace”: “<string>”,
“search”: “<string>”
}
}’

Responses

Returns a full JSON representation of a long running task

A schema has not been defined for this response code.

Get content properties

GET /wiki/rest/api/content//property

Returns the properties for a piece of content. For more information
about content properties, see Confluence entity properties.

Permissions required:
‘View’ permission for the space, and permission to view the content if it is a page.

App scope required: READ

OAuth scopes required

:

read:confluence-props

Request

Path parameters

id Required

string

The ID of the content to be queried for its properties.

Query parameters

expand

Array<string>

A multi-value parameter indicating which properties of the content to
expand. By default, the version object is expanded.

  • content returns the content that the property is stored against.
  • version returns information about the version of the property, such
    as the version number, when it was created, etc.

Style: form

Valid values: content, version

start

integer

The starting index of the returned properties.

Default: 0, Minimum: 0, Format: int32

limit

integer

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

Default: 10, Minimum: 0, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//property’
–header ‘Accept: application/json’

Responses

Returned if the requested properties are returned.

Create content property

POST /wiki/rest/api/content//property

Creates a property for an existing piece of content. For more information
about content properties, see Confluence entity properties.

This is the same as Create content property for key
except that the key is specified in the request body instead of as a
path parameter.

Content properties can also be added when creating a new piece of content
by including them in the metadata.properties of the request.

Permissions required:
Permission to update the content.

App scope required: WRITE

OAuth scopes required

:

write:confluence-props

Request

Path parameters

id Required

string

The ID of the content to add the property to.

Body parameters

key Required

string

The key of the new property.

Max length: 255

value Required

PropertyValue

The value of the property. This can be empty or a complex object.
For example,

1
2
3
4
5″value”: {
“example1”: “value”,
“example2”: true,
“example3”: 123
}

Example

1
2
3
4
5
6
7
8curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//property’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“key”: “<string>”,
“value”: {}
}’

Responses

Returned if the content property is created.

Get content property

GET /wiki/rest/api/content//property/

Returns a content property for a piece of content. For more information, see
Confluence entity properties.

Permissions required:
‘View’ permission for the space, and permission to view the content if it is a page.

App scope required: READ

OAuth scopes required

:

read:confluence-props

Request

Path parameters

id Required

string

The ID of the content to be queried for the property.

key Required

string

The key of the content property.

Query parameters

expand

Array<string>

A multi-value parameter indicating which properties of the content to
expand. By default, the version object is expanded.

  • content returns the content that the property is stored against.
  • version returns information about the version of the property, such
    as the version number, when it was created, etc.

Style: form

Valid values: content, version

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//property/’
–header ‘Accept: application/json’

Responses

Returned if the content property is returned.

Update content property

PUT /wiki/rest/api/content//property/

Updates an existing content property. This method will also create a new
property for a piece of content, if the property key does not exist and
the property version is 1. For more information about content properties, see
Confluence entity properties.

Permissions required:
Permission to update the content.

App scope required: WRITE

OAuth scopes required

:

write:confluence-props

Request

Path parameters

id Required

string

The ID of the content that the property belongs to.

key Required

string

The key of the property.

Body parameters

value Required

object

The value of the property.

Min properties: 1, Max properties: 1

version Required

object

The version number of the property.

Example

1
2
3
4
5
6
7
8
9
10
11curl –request PUT
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//property/’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“value”: {},
“version”: {
“number”: 201,
“minorEdit”: true
}
}’

Responses

Returned if the content property is created.

Create content property for key

POST /wiki/rest/api/content//property/

Creates a property for an existing piece of content. For more information
about content properties, see Confluence entity properties.

This is the same as Create content property
except that the key is specified as a path parameter instead of in the
request body.

Content properties can also be added when creating a new piece of content
by including them in the metadata.properties of the request.

Permissions required:
Permission to update the content.

App scope required: WRITE

OAuth scopes required

:

write:confluence-props

Request

Path parameters

id Required

string

The ID of the content to add the property to.

key Required

string

The key of the content property. Required.

Body parameters

value Required

PropertyValue

The value of the property. This can be empty or a complex object.
For example,

1
2
3
4
5″value”: {
“example1”: “value”,
“example2”: true,
“example3”: 123
}

Example

1
2
3
4
5
6
7curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//property/’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“value”: {}
}’

Responses

Returned if the content property is created.

Delete content property

DELETE /wiki/rest/api/content//property/

Deletes a content property. For more information about content properties, see
Confluence entity properties.

Permissions required:
Permission to update the content.

App scope required: DELETE

OAuth scopes required

:

write:confluence-props

Request

Path parameters

id Required

string

The ID of the content that the property belongs to.

key Required

string

The key of the property.

Example

1
2curl –request DELETE
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//property/’

Responses

Returned if the content property is deleted.

Get restrictions

GET /wiki/rest/api/content//restriction

Returns the restrictions on a piece of content.

Permissions required:
Permission to view the content.

App scope required: READ

OAuth scopes required

:

read:confluence-content.all

Request

Path parameters

id Required

string

The ID of the content to be queried for its restrictions.

Query parameters

expand

Array<string>

A multi-value parameter indicating which properties of the content
restrictions to expand. By default, the following objects are expanded:
restrictions.user, restrictions.group.

  • restrictions.user returns the piece of content that the restrictions are
    applied to.
  • restrictions.group returns the piece of content that the restrictions are
    applied to.
  • content returns the piece of content that the restrictions are
    applied to.

Style: form

Valid values: restrictions.user, restrictions.group, content

start

integer

The starting index of the users and groups in the returned restrictions.

Default: 0, Minimum: 0, Format: int32

limit

integer

The maximum number of users and the maximum number of groups, in the
returned restrictions, to return per page. Note, this may be restricted
by fixed system limits.

Default: 100, Minimum: 0, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//restriction’
–header ‘Accept: application/json’

Responses

Returned if the requested restrictions are returned.

Update restrictions

PUT /wiki/rest/api/content//restriction

Updates restrictions for a piece of content. This removes the existing
restrictions and replaces them with the restrictions in the request.

Permissions required:
Permission to edit the content.

App scope required: WRITE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

id Required

string

The ID of the content to update restrictions for.

Query parameters

expand

Array<string>

A multi-value parameter indicating which properties of the content
restrictions (returned in response) to expand.

  • restrictions.user returns the piece of content that the restrictions are
    applied to. Expanded by default.
  • restrictions.group returns the piece of content that the restrictions are
    applied to. Expanded by default.
  • content returns the piece of content that the restrictions are
    applied to.

Style: form

Valid values: restrictions.user, restrictions.group, content

Body parameters

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
25curl –request PUT
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//restriction’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘[
{
“operation”: “administer”,
“restrictions”: {
“user”: [
{
“type”: “known”,
“username”: “<string>”,
“userKey”: “<string>”,
“accountId”: “<string>”
}
],
“group”: [
{
“type”: “group”,
“name”: “<string>”
}
]
}
}
]’

Responses

Returned if the requested restrictions are updated.

Add restrictions

POST /wiki/rest/api/content//restriction

Adds restrictions to a piece of content. Note, this does not change any
existing restrictions on the content.

Permissions required:
Permission to edit the content.

App scope required: WRITE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

id Required

string

The ID of the content to add restrictions to.

Query parameters

expand

Array<string>

A multi-value parameter indicating which properties of the content
restrictions (returned in response) to expand.

  • restrictions.user returns the piece of content that the restrictions are
    applied to. Expanded by default.
  • restrictions.group returns the piece of content that the restrictions are
    applied to. Expanded by default.
  • content returns the piece of content that the restrictions are
    applied to.

Style: form

Valid values: restrictions.user, restrictions.group, content

Body parameters

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
25curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//restriction’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘[
{
“operation”: “administer”,
“restrictions”: {
“user”: [
{
“type”: “known”,
“username”: “<string>”,
“userKey”: “<string>”,
“accountId”: “<string>”
}
],
“group”: [
{
“type”: “group”,
“name”: “<string>”
}
]
}
}
]’

Responses

Returned if the requested restrictions are added.

Delete restrictions

DELETE /wiki/rest/api/content//restriction

Removes all restrictions (read and update) on a piece of content.

Permissions required:
Permission to edit the content.

App scope required: DELETE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

id Required

string

The ID of the content to remove restrictions from.

Query parameters

expand

Array<string>

A multi-value parameter indicating which properties of the content
restrictions (returned in response) to expand.

  • restrictions.user returns the piece of content that the restrictions are
    applied to. Expanded by default.
  • restrictions.group returns the piece of content that the restrictions are
    applied to. Expanded by default.
  • content returns the piece of content that the restrictions are
    applied to.

Style: form

Valid values: restrictions.user, restrictions.group, content

Example

1
2
3curl –request DELETE
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//restriction’
–header ‘Accept: application/json’

Responses

Returned if the restrictions are removed.

Get restrictions by operation

GET /wiki/rest/api/content//restriction/byOperation

Returns restrictions on a piece of content by operation. This method is
similar to Get restrictions except that
the operations are properties of the return object, rather than items in
a results array.

Permissions required:
Permission to view the content.

App scope required: READ

OAuth scopes required

:

read:confluence-content.all

Request

Path parameters

id Required

string

The ID of the content to be queried for its restrictions.

Query parameters

expand

Array<string>

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

  • restrictions.user returns the piece of content that the restrictions are
    applied to. Expanded by default.
  • restrictions.group returns the piece of content that the restrictions are
    applied to. Expanded by default.
  • content returns the piece of content that the restrictions are
    applied to.

Style: form

Valid values: restrictions.user, restrictions.group, content

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//restriction/byOperation’
–header ‘Accept: application/json’

Responses

Returned if the requested restrictions are returned.

Content type Value
application/json

object

Get restrictions for operation

GET /wiki/rest/api/content//restriction/byOperation/

Returns the restictions on a piece of content for a given operation (read
or update).

Permissions required:
Permission to view the content.

App scope required: READ

OAuth scopes required

:

read:confluence-content.all

Request

Path parameters

id Required

string

The ID of the content to be queried for its restrictions.

operationKey Required

string

The operation type of the restrictions to be returned.

Valid values: read, update

Query parameters

expand

Array<string>

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

  • restrictions.user returns the piece of content that the restrictions are
    applied to. Expanded by default.
  • restrictions.group returns the piece of content that the restrictions are
    applied to. Expanded by default.
  • content returns the piece of content that the restrictions are
    applied to.

Style: form

Valid values: restrictions.user, restrictions.group, content

start

integer

The starting index of the users and groups in the returned restrictions.

Default: 0, Minimum: 0, Format: int32

limit

integer

The maximum number of users and the maximum number of groups, in the
returned restrictions, to return per page. Note, this may be restricted
by fixed system limits.

Default: 100, Minimum: 0, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//restriction/byOperation/’
–header ‘Accept: application/json’

Responses

Returned if the requested restrictions are returned.

Get content restriction status for group

GET /wiki/rest/api/content//restriction/byOperation//group/

Returns whether the specified content restriction applies to a group.
For example, if a page with id=123 has a read restriction for the admins group,
the following request will return true:

https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/group/admins

Note that a response of true does not guarantee that the group can view the page, as it does not account for
account-inherited restrictions, space permissions, or even product access. For more
information, see Confluence permissions.

Permissions required:
Permission to view the content.

App scope required: READ

OAuth scopes required

:

read:confluence-content.all

Request

Path parameters

id Required

string

The ID of the content that the restriction applies to.

operationKey Required

string

The operation that the restriction applies to.

Valid values: read, update

groupName Required

string

The name of the group to be queried for whether the content restriction
applies to it.

Example

1
2curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//restriction/byOperation//group/’

Responses

Returns true if the content restriction applies to the group. The response
will not return a response body.

A schema has not been defined for this response code.

Add group to content restriction

PUT /wiki/rest/api/content//restriction/byOperation//group/

Adds a group to a content restriction. That is, grant read or update
permission to the group for a piece of content.

Permissions required:
Permission to edit the content.

App scope required: WRITE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

id Required

string

The ID of the content that the restriction applies to.

operationKey Required

string

The operation that the restriction applies to.

Valid values: read, update

groupName Required

string

The name of the group to add to the content restriction.

Example

1
2curl –request PUT
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//restriction/byOperation//group/’

Responses

Returned if the group is added to the content restriction. The response
body will be empty.

A schema has not been defined for this response code.

Remove group from content restriction

DELETE /wiki/rest/api/content//restriction/byOperation//group/

Removes a group from a content restriction. That is, remove read or update
permission for the group for a piece of content.

Permissions required:
Permission to edit the content.

App scope required: DELETE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

id Required

string

The ID of the content that the restriction applies to.

operationKey Required

string

The operation that the restriction applies to.

Valid values: read, update

groupName Required

string

The name of the group to remove from the content restriction.

Example

1
2curl –request DELETE
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//restriction/byOperation//group/’

Responses

Returned if the group is removed from the content restriction. The response
body will be empty.

A schema has not been defined for this response code.

Get content restriction status for user

GET /wiki/rest/api/content//restriction/byOperation//user

Returns whether the specified content restriction applies to a user.
For example, if a page with id=123 has a read restriction for a user with an account ID of
384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192, the following request will return true:

https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/user?accountId=384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192

Note that a response of true does not guarantee that the user can view the page, as it does not account for
account-inherited restrictions, space permissions, or even product access. For more
information, see Confluence permissions.

Permissions required:
Permission to view the content.

App scope required: READ

OAuth scopes required

:

read:confluence-content.all

Request

Path parameters

id Required

string

The ID of the content that the restriction applies to.

operationKey Required

string

The operation that is restricted.

Query parameters

key

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The key of the user to be queried for whether the content restriction applies to it.
Required, unless the username or accountId is specified.

userName

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The username of the user to be queried for whether the content restriction applies to it.
Required, unless the key or accountId is specified.

accountId

string

The account ID of the user to be queried for whether the content restriction applies to it. The accountId
uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.
Required, unless username or userKey is specified.

Example

1
2curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//restriction/byOperation//user’

Responses

Return true if the content restriction applies to the user. The response
body will be empty.

A schema has not been defined for this response code.

Add user to content restriction

PUT /wiki/rest/api/content//restriction/byOperation//user

Adds a user to a content restriction. That is, grant read or update
permission to the user for a piece of content.

Permissions required:
Permission to edit the content.

App scope required: WRITE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

id Required

string

The ID of the content that the restriction applies to.

operationKey Required

string

The operation that the restriction applies to.

Query parameters

key

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The key of the user to add to the content restriction. Required, unless the username or accountId is specified.

userName

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The username of the user to add to the content restriction. Required, unless the key or accountId is specified.

accountId

string

The account ID of the user to add to the content restriction. The accountId uniquely identifies the user across
all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.
Required, unless username or userKey is specified.

Example

1
2curl –request PUT
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//restriction/byOperation//user’

Responses

Returned if the user is added to the content restriction. The response
body will be empty.

A schema has not been defined for this response code.

Remove user from content restriction

DELETE /wiki/rest/api/content//restriction/byOperation//user

Removes a group from a content restriction. That is, remove read or update
permission for the group for a piece of content.

Permissions required:
Permission to edit the content.

App scope required: DELETE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

id Required

string

The ID of the content that the restriction applies to.

operationKey Required

string

The operation that the restriction applies to.

Valid values: read, update

Query parameters

key

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The key of the user to remove from the content restriction. Required, unless the username or accountId is specified.

userName

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The username of the user to remove from the content restriction. Required, unless the key or accountId is specified.

accountId

string

The account ID of the user to remove from the content restriction. The accountId uniquely identifies the user
across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.
Required, unless username or userKey is specified.

Example

1
2curl –request DELETE
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//restriction/byOperation//user’

Responses

Returned if the user is removed from the content restriction. The response
body will be empty.

A schema has not been defined for this response code.

Get content versions

GET /wiki/rest/api/content//version

Returns the versions for a piece of content in descending order.

Permissions required:
Permission to view the content. If the content is a blog post, ‘View’ permission
for the space is required.

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Path parameters

id Required

string

The ID of the content to be queried for its versions.

Query parameters

start

integer

The starting index of the returned versions.

Default: 0, Minimum: 0, Format: int32

limit

integer

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

Default: 200, Minimum: 0, Format: int32

expand

Array<string>

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

  • collaborators returns the users that collaborated on the version.
  • content returns the content for the version.

Style: form

Valid values: collaborators, content

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//version’
–header ‘Accept: application/json’

Responses

Returned if the requested versions are returned.

Restore content version

POST /wiki/rest/api/content//version

Restores a historical version to be the latest version. That is, a new version
is created with the content of the historical version.

Permissions required:
Permission to update the content.

App scope required: WRITE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

id Required

string

The ID of the content for which the history will be restored.

Query parameters

expand

Array<string>

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

  • collaborators returns the users that collaborated on the version.
  • content returns the content for the version.

Style: form

Valid values: collaborators, content

Body parameters

operationKey Required

string

Set to ‘RESTORE’.

Valid values: RESTORE

params Required

object

Example

1
2
3
4
5
6
7
8
9
10
11curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//version’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“operationKey”: “RESTORE”,
“params”: {
“versionNumber”: 34,
“message”: “<string>”
}
}’

Responses

Returned if the version is restored.

Content type Value
application/json

Version

Get content version

GET /wiki/rest/api/content//version/

Returns a version for a piece of content.

Permissions required:
Permission to view the content. If the content is a blog post, ‘View’ permission
for the space is required.

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Path parameters

id Required

string

The ID of the content to be queried for its version.

versionNumber Required

integer

The number of the version to be retrieved.

Format: int32

Query parameters

expand

Array<string>

A multi-value parameter indicating which properties of the content to
expand. By default, the content object is expanded.

  • collaborators returns the users that collaborated on the version.
  • content returns the content for the version.

Style: form

Valid values: collaborators, content

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//version/’
–header ‘Accept: application/json’

Responses

Returned if the version is returned.

Content type Value
application/json

Version

Delete content version

DELETE /wiki/rest/api/content//version/

Delete a historical version. This does not delete the changes made to the
content in that version, rather the changes for the deleted version are
rolled up into the next version. Note, you cannot delete the current version.

Permissions required:
Permission to update the content.

App scope required: DELETE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

id Required

string

The ID of the content that the version will be deleted from.

versionNumber Required

integer

The number of the version to be deleted. The version number starts
from 1 up to current version.

Format: int32

Example

1
2curl –request DELETE
–url ‘https://your-domain.atlassian.net/wiki/rest/api/content//version/’

Responses

Returned if the version is deleted.

Contentbody

Convert content body

POST /wiki/rest/api/contentbody/convert/

Converts a content body from one format to another format.

Supported conversions:

  • storage: view, export_view, styled_view, editor
  • editor: storage
  • view: none
  • export_view: none
  • styled_view: none

Permissions required:
If request specifies ‘contentIdContext’, ‘View’ permission for the space, and permission to view the content.

App scope required: READ

Request

Path parameters

to Required

string

The name of the target format for the content body.

Query parameters

expand

Array<string>

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

  • childTypes.all returns whether the content has attachments, comments, or child pages.
    Use this if you only need to check whether the content has children of a particular type.
  • childTypes.attachment returns whether the content has attachments.
  • childTypes.comment returns whether the content has comments.
  • childTypes.page returns whether the content has child pages.
  • container returns the space that the content is in. This is the same as the information
    returned by Get space.
  • metadata.currentuser returns information about the current user in relation to the content,
    including when they last viewed it, modified it, contributed to it, or added it as a favourite.
  • metadata.properties returns content properties that have been set via the Confluence REST API.
  • metadata.labels returns the labels that have been added to the content.
  • metadata.frontend (this property is only used by Atlassian)
  • operations returns the operations for the content, which are used when setting permissions.
  • children.page returns pages that are descendants at the level immediately below the content.
  • children.attachment returns all attachments for the content.
  • children.comment returns all comments on the content.
  • restrictions.read.restrictions.user returns the users that have permission to read the content.
  • restrictions.read.restrictions.group returns the groups that have permission to read the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • restrictions.update.restrictions.user returns the users that have permission to update the content.
  • restrictions.update.restrictions.group returns the groups that have permission to update the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • history returns the history of the content, including the date it was created.
  • history.lastUpdated returns information about the most recent update of the content, including
    who updated it and when it was updated.
  • history.previousVersion returns information about the update prior to the current content update.
  • history.contributors returns all of the users who have contributed to the content.
  • history.nextVersion returns information about the update after to the current content update.
  • ancestors returns the parent page, if the content is a page.
  • body returns the body of the content in different formats, including the editor format,
    view format, and export format.
  • version returns information about the most recent update of the content, including who updated it
    and when it was updated.
  • descendants.page returns pages that are descendants at any level below the content.
  • descendants.attachment returns all attachments for the content, same as children.attachment.
  • descendants.comment returns all comments on the content, same as children.comment.
  • space returns the space that the content is in. This is the same as the information returned by
    Get space.

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

Valid values: childTypes.all, childTypes.attachment, childTypes.comment, childTypes.page, container, metadata.currentuser, metadata.properties, metadata.labels, metadata.frontend, operations …(Show more)

spaceKeyContext

string

The space key used for resolving embedded content (page includes,
files, and links) in the content body. For example, if the source content
contains the link <ac:link><ri:page ri:content-title=”Example page” /><ac:link>
and the spaceKeyContext=TEST parameter is provided, then the link
will be converted to a link to the “Example page” page in the “TEST” space.

contentIdContext

string

The content ID used to find the space for resolving embedded content
(page includes, files, and links) in the content body. For example,
if the source content contains the link <ac:link><ri:page ri:content-title=”Example page” /><ac:link>
and the contentIdContext=123 parameter is provided, then the link
will be converted to a link to the “Example page” page in the same space
that has the content with ID=123. Note, spaceKeyContext will be ignored
if this parameter is provided.

embeddedContentRender

string

Mode used for rendering embedded content, like attachments.

  • current renders the embedded content using the latest version.
  • version-at-save renders the embedded content using the version at
    the time of save.

Default: current

Valid values: current, version-at-save

Body parameters

This object is used when creating or updating content.

value Required

string

The body of the content in the relevant format.

representation Required

string

The content format type. Set the value of this property to
the name of the format being used, e.g. ‘storage’.

Valid values: view, export_view, styled_view, storage, editor2, anonymous_export_view

Example

1
2
3
4
5
6
7
8curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/contentbody/convert/’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“value”: “<string>”,
“representation”: “view”
}’

Responses

Returned if the content is converted.

Experimental

Convert user identifiers to account IDs in CQL queries

POST /wiki/rest/api/experimental/cql/pdcleaner

Converts one or more CQL queries with user identifiers (username or user key)
to equivalent CQL queries with account IDs.

You may wish to use this operation if your system stores CQL queries and you
want to make them GDPR-compliant. For more information about GDPR-related changes,
see the migration guide.

Permissions required: None

Apps cannot access this REST resource.

Request

Body parameters

The CQL queries to be converted.

queryStrings Required

Array<string>

A list of queries with user identifiers. Maximum of 100 queries.

Example

1
2
3
4
5
6
7
8
9curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/experimental/cql/pdcleaner’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“queryStrings”: [
“type = page and creator != admin and space = DEV”
]
}’

Responses

Returned if the request is successful. The CQL queries are returned
in the same order that they were passed. Note that if the user in a
CQL query cannot be found, a 200 code is still returned but the username
or key is converted to an empty string.

Example response (application/json)

1
2
3
4
5{
“queryStrings”: [
“type = page and creator != ‘847586:5371623a-12b4-1a11-ed01-a53542f02dd1’ and space = DEV”
]
}

Group

Get groups

GET /wiki/rest/api/group

Returns all user groups. The returned groups are ordered alphabetically in
ascending order by group name.

Permissions required:
Permission to access the Confluence site (‘Can use’ global permission).

App scope required: READ

Request

Query parameters

start

integer

The starting index of the returned groups.

Default: 0, Minimum: 0, Format: int32

limit

integer

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

Default: 200, Minimum: 0, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/group’
–header ‘Accept: application/json’

Responses

Returned if the requested groups are returned.

Get group

GET /wiki/rest/api/group/

Returns a user group for a given group name.

Permissions required:
Permission to access the Confluence site (‘Can use’ global permission).

App scope required: READ

Request

Path parameters

groupName Required

string

The name of the group. This is the same as the group name shown in
the Confluence administration console.

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/group/’
–header ‘Accept: application/json’

Responses

Returned if the requested group is returned.

Content type Value
application/json

Group

Get group members

GET /wiki/rest/api/group//member

Returns the users that are members of a group.

Permissions required:
Permission to access the Confluence site (‘Can use’ global permission).

App scope required: READ

Request

Path parameters

groupName Required

string

The name of the group to be queried for its members.

Query parameters

start

integer

The starting index of the returned users.

Default: 0, Minimum: 0, Format: int32

limit

integer

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

Default: 200, Minimum: 0, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/group//member’
–header ‘Accept: application/json’

Responses

Returned if the requested users are returned.

Longtask

Get long-running tasks

GET /wiki/rest/api/longtask

Returns information about all active long-running tasks (e.g. space export),
such as how long each task has been running and the percentage of each task
that has completed.

Permissions required:
Permission to access the Confluence site (‘Can use’ global permission).

App scope required: READ

Request

Query parameters

start

integer

The starting index of the returned tasks.

Default: 0, Minimum: 0, Format: int32

limit

integer

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

Default: 100, Minimum: 0, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/longtask’
–header ‘Accept: application/json’

Responses

Returned if the requested tasks are returned.

Get long-running task

GET /wiki/rest/api/longtask/

Returns information about an active long-running task (e.g. space export),
such as how long it has been running and the percentage of the task that
has completed.

Permissions required:
Permission to access the Confluence site (‘Can use’ global permission).

App scope required: READ

Request

Path parameters

id Required

string

The ID of the task.

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/longtask/’
–header ‘Accept: application/json’

Responses

Returned if the requested task is returned.

Relation

Find target entities related to a source entity

GET /wiki/rest/api/relation//from///to/

Returns all target entities that have a particular relationship to the
source entity. Note, relationships are one way.

For example, the following method finds all content that the current user
has an ‘ignore’ relationship with:
GET https://your-domain.atlassian.net/wiki/rest/api/relation/ignore/from/user/current/to/content
Note, ‘ignore’ is an example custom relationship type.

Permissions required:
Permission to view both the target entity and source entity.

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Path parameters

relationName Required

string

The name of the relationship. This method supports relationships created via
Create relationship.
Note, this method does not support ‘favourite’ relationships.

sourceType Required

string

The source entity type of the relationship.

Valid values: user, content, space

sourceKey Required

string

The identifier for the source entity:

  • If sourceType is user, then specify either current (logged-in user), the user key of the user, or
    the account ID of the user. Note that the user key has been deprecated in favor of the account ID for this parameter. See the
    migration guide
    for details.
  • If sourceType is ‘content’, then specify the content ID.
  • If sourceType is ‘space’, then specify the space key.

targetType Required

string

The target entity type of the relationship.

Valid values: user, content, space

Query parameters

sourceStatus

string

The status of the source. This parameter is only used when the
sourceType is ‘content’.

targetStatus

string

The status of the target. This parameter is only used when the
targetType is ‘content’.

sourceVersion

integer

The version of the source. This parameter is only used when the
sourceType is ‘content’ and the sourceStatus is ‘historical’.

Format: int32

targetVersion

integer

The version of the target. This parameter is only used when the
targetType is ‘content’ and the targetStatus is ‘historical’.

Format: int32

expand

Array<string>

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

  • relationData returns information about the relationship, such as
    who created it and when it was created.
  • source returns the source entity.
  • target returns the target entity.

Style: form

Valid values: relationData, source, target

start

integer

The starting index of the returned relationships.

Default: 0, Minimum: 0, Format: int32

limit

integer

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

Default: 25, Minimum: 0, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/relation//from///to/’
–header ‘Accept: application/json’

Responses

Returned if the requested relationships are returned.

Find relationship from source to target

GET /wiki/rest/api/relation//from///to//

Find whether a particular type of relationship exists from a source
entity to a target entity. Note, relationships are one way.

For example, you can use this method to find whether the current user has
selected a particular page as a favorite (i.e. ‘save for later’):
GET https://your-domain.atlassian.net/wiki/rest/api/relation/favourite/from/user/current/to/content/123

Permissions required:
Permission to view both the target entity and source entity.

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Path parameters

relationName Required

string

The name of the relationship. This method supports the ‘favourite’
(i.e. ‘save for later’) relationship as well as any other relationship
types created via Create relationship.

sourceType Required

string

The source entity type of the relationship. This must be ‘user’, if
the relationName is ‘favourite’.

Valid values: user, content, space

sourceKey Required

string

  • The identifier for the source entity:

  • If sourceType is user, then specify either current (logged-in user), the user key of the user, or
    the account ID of the user. Note that the user key has been deprecated in favor of the account ID for this parameter. See the
    migration guide
    for details.

  • If sourceType is ‘content’, then specify the content ID.
  • If sourceType is ‘space’, then specify the space key.

targetType Required

string

The target entity type of the relationship. This must be ‘space’ or
‘content’, if the relationName is ‘favourite’.

Valid values: user, content, space

targetKey Required

string

The identifier for the target entity:

  • If targetType is user, then specify either current (logged-in user), the user key of the user, or
    the account ID of the user. Note that the user key has been deprecated in favor of the account ID for this parameter. See the
    migration guide
    for details.
  • If targetType is ‘content’, then specify the content ID.
  • If targetType is ‘space’, then specify the space key.
Query parameters

sourceStatus

string

The status of the source. This parameter is only used when the
sourceType is ‘content’.

targetStatus

string

The status of the target. This parameter is only used when the
targetType is ‘content’.

sourceVersion

integer

The version of the source. This parameter is only used when the
sourceType is ‘content’ and the sourceStatus is ‘historical’.

Format: int32

targetVersion

integer

The version of the target. This parameter is only used when the
targetType is ‘content’ and the targetStatus is ‘historical’.

Format: int32

expand

Array<string>

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

  • relationData returns information about the relationship, such as
    who created it and when it was created.
  • source returns the source entity.
  • target returns the target entity.

Style: form

Valid values: relationData, source, target

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/relation//from///to//’
–header ‘Accept: application/json’

Responses

Returned if the relationship exists.

Content type Value
application/json

Relation

Create relationship

PUT /wiki/rest/api/relation//from///to//

Creates a relationship between two entities (user, space, content). The
‘favourite’ relationship is supported by default, but you can use this method
to create any type of relationship between two entities.

For example, the following method creates a ‘sibling’ relationship between
two pieces of content:
GET https://your-domain.atlassian.net/wiki/rest/api/relation/sibling/from/content/123/to/content/456

Permissions required:
Permission to access the Confluence site (‘Can use’ global permission).

App scope required: WRITE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

relationName Required

string

The name of the relationship. This method supports the ‘favourite’
(i.e. ‘save for later’) relationship. You can also specify any other
value for this parameter to create a custom relationship type.

sourceType Required

string

The source entity type of the relationship. This must be ‘user’, if
the relationName is ‘favourite’.

Valid values: user, content, space

sourceKey Required

string

  • The identifier for the source entity:

  • If sourceType is ‘user’, then specify either ‘current’ (logged-in
    user) or the user key.

  • If sourceType is ‘content’, then specify the content ID.
  • If sourceType is ‘space’, then specify the space key.

targetType Required

string

The target entity type of the relationship. This must be ‘space’ or
‘content’, if the relationName is ‘favourite’.

Valid values: user, content, space

targetKey Required

string

  • The identifier for the target entity:

  • If sourceType is ‘user’, then specify either ‘current’ (logged-in
    user) or the user key.

  • If sourceType is ‘content’, then specify the content ID.
  • If sourceType is ‘space’, then specify the space key.
Query parameters

sourceStatus

string

The status of the source. This parameter is only used when the
sourceType is ‘content’.

targetStatus

string

The status of the target. This parameter is only used when the
targetType is ‘content’.

sourceVersion

integer

The version of the source. This parameter is only used when the
sourceType is ‘content’ and the sourceStatus is ‘historical’.

Format: int32

targetVersion

integer

The version of the target. This parameter is only used when the
targetType is ‘content’ and the targetStatus is ‘historical’.

Format: int32

Example

1
2
3curl –request PUT
–url ‘https://your-domain.atlassian.net/wiki/rest/api/relation//from///to//’
–header ‘Accept: application/json’

Responses

Returned if the relationship is created.

Content type Value
application/json

Relation

Delete

DELETE /wiki/rest/api/relation//from///to//

Deletes a relationship between two entities (user, space, content).

Permissions required:
Permission to access the Confluence site (‘Can use’ global permission).
For favourite relationships, the current user can only delete their own
favourite relationships. A space administrator can delete favourite
relationships for any user.

App scope required: DELETE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

relationName Required

string

The name of the relationship.

sourceType Required

string

The source entity type of the relationship. This must be ‘user’, if
the relationName is ‘favourite’.

Valid values: user, content, space

sourceKey Required

string

  • The identifier for the source entity:

  • If sourceType is ‘user’, then specify either ‘current’ (logged-in
    user) or the user key.

  • If sourceType is ‘content’, then specify the content ID.
  • If sourceType is ‘space’, then specify the space key.

targetType Required

string

The target entity type of the relationship. This must be ‘space’ or
‘content’, if the relationName is ‘favourite’.

Valid values: user, content, space

targetKey Required

string

  • The identifier for the target entity:

  • If sourceType is ‘user’, then specify either ‘current’ (logged-in
    user) or the user key.

  • If sourceType is ‘content’, then specify the content ID.
  • If sourceType is ‘space’, then specify the space key.
Query parameters

sourceStatus

string

The status of the source. This parameter is only used when the
sourceType is ‘content’.

targetStatus

string

The status of the target. This parameter is only used when the
targetType is ‘content’.

sourceVersion

integer

The version of the source. This parameter is only used when the
sourceType is ‘content’ and the sourceStatus is ‘historical’.

Format: int32

targetVersion

integer

The version of the target. This parameter is only used when the
targetType is ‘content’ and the targetStatus is ‘historical’.

Format: int32

Example

1
2curl –request DELETE
–url ‘https://your-domain.atlassian.net/wiki/rest/api/relation//from///to//’

Responses

Returned if the relationship is deleted or the relationship didn’t
exist.

Find target entities related to a source entity

GET /wiki/rest/api/relation//to///from/

Returns all target entities that have a particular relationship to the
source entity. Note, relationships are one way.

For example, the following method finds all users that have a ‘collaborator’
relationship to a piece of content with an ID of ‘1234’:
GET https://your-domain.atlassian.net/wiki/rest/api/relation/collaborator/to/content/1234/from/user
Note, ‘collaborator’ is an example custom relationship type.

Permissions required:
Permission to view both the target entity and source entity.

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Path parameters

relationName Required

string

The name of the relationship. This method supports relationships created via
Create relationship.
Note, this method does not support ‘favourite’ relationships.

sourceType Required

string

The source entity type of the relationship.

Valid values: user, content, space

targetType Required

string

The target entity type of the relationship.

Valid values: user, content, space

targetKey Required

string

The identifier for the target entity:

  • If targetType is user, then specify either current (logged-in user), the user key of the user, or
    the account ID of the user. Note that the user key has been deprecated in favor of the account ID for this parameter. See the
    migration guide
    for details.
  • If targetType is ‘content’, then specify the content ID.
  • If targetType is ‘space’, then specify the space key.
Query parameters

sourceStatus

string

The status of the source. This parameter is only used when the
sourceType is ‘content’.

targetStatus

string

The status of the target. This parameter is only used when the
targetType is ‘content’.

sourceVersion

integer

The version of the source. This parameter is only used when the
sourceType is ‘content’ and the sourceStatus is ‘historical’.

Format: int32

targetVersion

integer

The version of the target. This parameter is only used when the
targetType is ‘content’ and the targetStatus is ‘historical’.

Format: int32

expand

Array<string>

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

  • relationData returns information about the relationship, such as
    who created it and when it was created.
  • source returns the source entity.
  • target returns the target entity.

Style: form

Valid values: relationData, source, target

start

integer

The starting index of the returned relationships.

Default: 0, Minimum: 0, Format: int32

limit

integer

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

Default: 25, Minimum: 0, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/relation//to///from/’
–header ‘Accept: application/json’

Responses

Returned if the requested relationships are returned.

Search

Search

GET /wiki/rest/api/search

Searches for content using the
Confluence Query Language (CQL)

Permissions required:
Permission to view the entities. Note, only entities that the user has
permission to view will be returned.

App scope required: READ

OAuth scopes required

:

search:confluence

Request

Query parameters

cql Required

string

The CQL query to be used for the search. See
Advanced Searching using CQL
for instructions on how to build a CQL query.

cqlcontext

string

The space, content, and content status to execute the search
against.

  • spaceKey Key of the space to search against. Optional.
  • contentId ID of the content to search against. Optional. Must be
    in the space specified by spaceKey.
  • contentStatuses Content statuses to search against. Optional.

Specify these values in an object. For example,
cqlcontext={%22spaceKey%22:%22TEST%22, %22contentId%22:%22123%22}

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

includeArchivedSpaces

boolean

Include content from archived spaces in the results.

Default: false

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/search?cql=’
–header ‘Accept: application/json’

Responses

Returned if the requested results are returned.

Search

GET /wiki/rest/api/search/user

Searches for users using user-specific queries from the
Confluence Query Language (CQL).

Note that some user fields may be set to null depending on the user’s privacy settings.
These are: email, profilePicture, and displayName.

App scope required: READ

Request

Query parameters

cql Required

string

The CQL query to be used for the search. See
Advanced Searching using CQL
for instructions on how to build a CQL query.

Example queries:
cql=type=user will return all users
cql=user=“1234” will return user with accountId “1234”
You can also use IN, NOT IN, != operators
cql=user IN (“12”, “34″) will return users with accountids “12” and “34”
cql=user.fullname~jo will return users with nickname/full name starting with “jo”
cql=user.accountid=“123” will return user with accountId “123”

start

integer

The starting index of the returned users.

Default: 0, Minimum: 0, Format: int32

limit

integer

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

Default: 25, Minimum: 0, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/search/user?cql=’
–header ‘Accept: application/json’

Responses

Returned if the requested results are returned.

Settings

Get look and feel settings

GET /wiki/rest/api/settings/lookandfeel

Returns the look and feel settings for the site or a single space. This
includes attributes such as the color scheme, padding, and border radius.

The look and feel settings for a space can be inherited from the global
look and feel settings or provided by a theme.

Permissions required:
None

App scope required: READ

OAuth scopes required

:

manage:confluence-configuration

Request

Query parameters

spaceKey

string

The key of the space for which the look and feel settings will be
returned. If this is not set, only the global look and feel settings
are returned.

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/settings/lookandfeel’
–header ‘Accept: application/json’

Responses

Returned if the requested look and feel settings are returned.

Update look and feel settings

POST /wiki/rest/api/settings/lookandfeel/custom

Updates the look and feel settings for the site or for a single space.
If custom settings exist, they are updated. If no custom settings exist,
then a set of custom settings is created.

Note, if a theme is selected for a space, the space look and feel settings
are provided by the theme and cannot be overridden.

Permissions required:
‘Admin’ permission for the space.

App scope required: WRITE

OAuth scopes required

:

manage:confluence-configuration

Request

Query parameters

spaceKey

string

The key of the space for which the look and feel settings will be
updated. If this is not set, the global look and feel settings will
be updated.

Body parameters

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
81
82curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/settings/lookandfeel/custom’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“headings”: {
“color”: “<string>”
},
“links”: {
“color”: “<string>”
},
“menus”: {
“hoverOrFocus”: {
“backgroundColor”: “<string>”
},
“color”: “<string>”
},
“header”: {
“backgroundColor”: “<string>”,
“button”: {
“backgroundColor”: “<string>”,
“color”: “<string>”
},
“primaryNavigation”: {
“color”: “<string>”,
“hoverOrFocus”: {
“backgroundColor”: “<string>”,
“color”: “<string>”
}
},
“secondaryNavigation”: {
“color”: “<string>”,
“hoverOrFocus”: {
“backgroundColor”: “<string>”,
“color”: “<string>”
}
},
“search”: {
“backgroundColor”: “<string>”,
“color”: “<string>”
}
},
“content”: {
“screen”: {
“background”: “<string>”,
“backgroundColor”: “<string>”,
“backgroundImage”: “<string>”,
“backgroundSize”: “<string>”,
“gutterTop”: “<string>”,
“gutterRight”: “<string>”,
“gutterBottom”: “<string>”,
“gutterLeft”: “<string>”
},
“container”: {
“background”: “<string>”,
“backgroundColor”: “<string>”,
“backgroundImage”: “<string>”,
“backgroundSize”: “<string>”,
“padding”: “<string>”,
“borderRadius”: “<string>”
},
“header”: {
“background”: “<string>”,
“backgroundColor”: “<string>”,
“backgroundImage”: “<string>”,
“backgroundSize”: “<string>”,
“padding”: “<string>”,
“borderRadius”: “<string>”
},
“body”: {
“background”: “<string>”,
“backgroundColor”: “<string>”,
“backgroundImage”: “<string>”,
“backgroundSize”: “<string>”,
“padding”: “<string>”,
“borderRadius”: “<string>”
}
},
“bordersAndDividers”: {
“color”: “<string>”
}
}’

Responses

Returned if the look and feel settings are updated.

Reset look and feel settings

DELETE /wiki/rest/api/settings/lookandfeel/custom

Resets the custom look and feel settings for the site or a single space.
This changes the values of the custom settings to be the same as the
default settings. It does not change which settings (default or custom)
are selected. Note, the default space settings are inherited from the
current global settings.

Permissions required:
‘Admin’ permission for the space.

App scope required: DELETE

OAuth scopes required

:

manage:confluence-configuration

Request

Query parameters

spaceKey

string

The key of the space for which the look and feel settings will be
reset. If this is not set, the global look and feel settings will
be reset.

Example

1
2curl –request DELETE
–url ‘https://your-domain.atlassian.net/wiki/rest/api/settings/lookandfeel/custom’

Responses

Returned if the look and feel settings have been reset.

Set look and feel settings

PUT /wiki/rest/api/settings/lookandfeel/selected

Sets the look and feel settings to either the default settings or the
custom settings, for the site or a single space. Note, the default
space settings are inherited from the current global settings.

Permissions required:
‘Admin’ permission for the space.

App scope required: WRITE

OAuth scopes required

:

manage:confluence-configuration

Request

Query parameters

spaceKey

string

The key of the space for which the look and feel settings will be
set. If this is not set, the global look and feel settings will be
set.

Body parameters

The object for choosing the look and feel settings for the site or a space.

selected Required

string

The look and feel scheme. If you set this to global, you must specify
the current global look and feel settings as a global object in this
request. Similarly, if you set this to custom, you must specify the
current custom look and feel settings as a custom object in this request.

Valid values: global, custom

global

LookAndFeel

custom

LookAndFeel

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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163curl –request PUT
–url ‘https://your-domain.atlassian.net/wiki/rest/api/settings/lookandfeel/selected’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“selected”: “global”,
“global”: {
“headings”: {
“color”: “<string>”
},
“links”: {
“color”: “<string>”
},
“menus”: {
“hoverOrFocus”: {
“backgroundColor”: “<string>”
},
“color”: “<string>”
},
“header”: {
“backgroundColor”: “<string>”,
“button”: {
“backgroundColor”: “<string>”,
“color”: “<string>”
},
“primaryNavigation”: {
“color”: “<string>”,
“hoverOrFocus”: {
“backgroundColor”: “<string>”,
“color”: “<string>”
}
},
“secondaryNavigation”: {
“color”: “<string>”,
“hoverOrFocus”: {
“backgroundColor”: “<string>”,
“color”: “<string>”
}
},
“search”: {
“backgroundColor”: “<string>”,
“color”: “<string>”
}
},
“content”: {
“screen”: {
“background”: “<string>”,
“backgroundColor”: “<string>”,
“backgroundImage”: “<string>”,
“backgroundSize”: “<string>”,
“gutterTop”: “<string>”,
“gutterRight”: “<string>”,
“gutterBottom”: “<string>”,
“gutterLeft”: “<string>”
},
“container”: {
“background”: “<string>”,
“backgroundColor”: “<string>”,
“backgroundImage”: “<string>”,
“backgroundSize”: “<string>”,
“padding”: “<string>”,
“borderRadius”: “<string>”
},
“header”: {
“background”: “<string>”,
“backgroundColor”: “<string>”,
“backgroundImage”: “<string>”,
“backgroundSize”: “<string>”,
“padding”: “<string>”,
“borderRadius”: “<string>”
},
“body”: {
“background”: “<string>”,
“backgroundColor”: “<string>”,
“backgroundImage”: “<string>”,
“backgroundSize”: “<string>”,
“padding”: “<string>”,
“borderRadius”: “<string>”
}
},
“bordersAndDividers”: {
“color”: “<string>”
}
},
“custom”: {
“headings”: {
“color”: “<string>”
},
“links”: {
“color”: “<string>”
},
“menus”: {
“hoverOrFocus”: {
“backgroundColor”: “<string>”
},
“color”: “<string>”
},
“header”: {
“backgroundColor”: “<string>”,
“button”: {
“backgroundColor”: “<string>”,
“color”: “<string>”
},
“primaryNavigation”: {
“color”: “<string>”,
“hoverOrFocus”: {
“backgroundColor”: “<string>”,
“color”: “<string>”
}
},
“secondaryNavigation”: {
“color”: “<string>”,
“hoverOrFocus”: {
“backgroundColor”: “<string>”,
“color”: “<string>”
}
},
“search”: {
“backgroundColor”: “<string>”,
“color”: “<string>”
}
},
“content”: {
“screen”: {
“background”: “<string>”,
“backgroundColor”: “<string>”,
“backgroundImage”: “<string>”,
“backgroundSize”: “<string>”,
“gutterTop”: “<string>”,
“gutterRight”: “<string>”,
“gutterBottom”: “<string>”,
“gutterLeft”: “<string>”
},
“container”: {
“background”: “<string>”,
“backgroundColor”: “<string>”,
“backgroundImage”: “<string>”,
“backgroundSize”: “<string>”,
“padding”: “<string>”,
“borderRadius”: “<string>”
},
“header”: {
“background”: “<string>”,
“backgroundColor”: “<string>”,
“backgroundImage”: “<string>”,
“backgroundSize”: “<string>”,
“padding”: “<string>”,
“borderRadius”: “<string>”
},
“body”: {
“background”: “<string>”,
“backgroundColor”: “<string>”,
“backgroundImage”: “<string>”,
“backgroundSize”: “<string>”,
“padding”: “<string>”,
“borderRadius”: “<string>”
}
},
“bordersAndDividers”: {
“color”: “<string>”
}
}
}’

Responses

Returned if the look and feel settings were set.

Get system info

GET /wiki/rest/api/settings/systemInfo

Returns the system information for the Confluence Cloud tenant. This
information is used by Atlassian.

Permissions required:
Permission to access the Confluence site (‘Can use’ global permission).

App scope required: READ

OAuth scopes required

:

manage:confluence-configuration

Request

There are no parameters for this request.

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/settings/systemInfo’
–header ‘Accept: application/json’

Responses

Returned if the system information for the Confluence Cloud tenant
is returned.

Get themes

GET /wiki/rest/api/settings/theme

Returns all themes, not including the default theme.

Permissions required: None

App scope required: READ

OAuth scopes required

:

manage:confluence-configuration

Request

Query parameters

start

integer

The starting index of the returned themes.

Default: 0, Minimum: 0, Format: int32

limit

integer

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

Default: 100, Minimum: 0, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/settings/theme’
–header ‘Accept: application/json’

Responses

Returned if the requested themes are returned.

Get global theme

GET /wiki/rest/api/settings/theme/selected

Returns the globally assigned theme.

Permissions required: None

App scope required: READ

OAuth scopes required

:

manage:confluence-configuration

Request

There are no parameters for this request.

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/settings/theme/selected’
–header ‘Accept: application/json’

Responses

Returned if the global theme is returned.

Get theme

GET /wiki/rest/api/settings/theme/

Returns a theme. This includes information about the theme name,
description, and icon.

Permissions required: None

App scope required: READ

OAuth scopes required

:

manage:confluence-configuration

Request

Path parameters

themeKey Required

string

The key of the theme to be returned.

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/settings/theme/’
–header ‘Accept: application/json’

Responses

Returned if the requested theme is returned.

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.

App scope required: READ

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.

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.

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

The userKey of the user, whose favourite spaces are used to filter
the results when using the favourite parameter.

Leave blank for the current user. Use Get user to
get the userKey for a user.

expand

Array<string>

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

  • settings returns the settings for the space, similar to Get space settings.
  • metadata.labels returns the space labels, which are used to categorize the space.
  • operations returns the operations for a space, which are used when setting permissions.
  • lookAndFeel returns information about the look and feel of the space, including the color scheme.
  • permissions returns the permissions for the space. Note that this may return permissions for deleted groups,
    because deleting a group doesn’t remove associated space permissions.
  • icon returns information about space icon.
  • description.plain returns the description of the space.
  • description.view returns the description of the space.
  • theme returns information about the space theme.
  • homepage returns information about the space homepage.

Style: form

Valid values: settings, metadata.labels, operations, lookAndFeel, permissions, icon, description.plain, description.view, theme, homepage

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
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/space’
–header ‘Accept: application/json’

Responses

Returned if the requested spaces are returned.

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.

App scope required: WRITE

OAuth scopes required

:

write:confluence-space

Request

Body parameters

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

key Required

string

The key for the new space. Format: See Space
keys
.

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.

permissions

Array<SpacePermission>

The permissions for the new space. If no permissions are provided, the
Confluence default space permissions
are applied. Note, for security reasons, permissions cannot be changed
via the API after the space has been created, and must be changed via
the user interface instead.

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
81
82
83curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/space’
–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>”,
“operations”: [
{
“operation”: “administer”,
“targetType”: “page”
}
],
“details”: {},
“personalSpace”: {
“id”: 2154,
“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>”,
“_links”: {}
}
],
“size”: 2154
},
“_expandable”: {
“user”: “<string>”,
“group”: “<string>”
}
},
“operation”: {
“operation”: “administer”,
“targetType”: “page”
},
“anonymousAccess”: true,
“unlicensedAccess”: true
}
]
}’

Responses

Returned if the space is created.

Content type Value
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.

App scope required: WRITE

OAuth scopes required

:

write:confluence-space

Request

Body parameters

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

key Required

string

The key for the new space. Format: See Space
keys
.

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.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/space/_private’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“key”: “<string>”,
“name”: “<string>”,
“description”: {
“plain”: {
“value”: “<string>”,
“representation”: “<string>”
}
}
}’

Responses

Returned if the space is created.

Content type Value
application/json

Space

Get space

GET /wiki/rest/api/space/

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.

App scope required: READ

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:

  • settings returns the settings for the space, similar to Get space settings.
  • metadata.labels returns the space labels, which are used to categorize the space.
  • operations returns the operations for a space, which are used when setting permissions.
  • lookAndFeel returns information about the look and feel of the space, including the color scheme.
  • permissions returns the permissions for the space. Note that this may return permissions for deleted groups,
    because deleting a group doesn’t remove associated space permissions.
  • icon returns information about space icon.
  • description.plain returns the description of the space.
  • description.view returns the description of the space.
  • theme returns information about the space theme.
  • homepage returns information about the space homepage.

Style: form

Valid values: settings, metadata.labels, operations, lookAndFeel, permissions, icon, description.plain, description.view, theme, homepage

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/space/’
–header ‘Accept: application/json’

Responses

Returned if the requested space is returned.

Content type Value
application/json

Space

Update space

PUT /wiki/rest/api/space/

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.

App scope required: WRITE

OAuth scopes required

:

write:confluence-space

Request

Path parameters

spaceKey Required

string

The key of the space to update.

Body parameters

name

string

The name of the 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.

homepage

object

The page to set as the homepage of the space.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16curl –request PUT
–url ‘https://your-domain.atlassian.net/wiki/rest/api/space/’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“name”: “<string>”,
“description”: {
“plain”: {
“value”: “<string>”,
“representation”: “<string>”
}
},
“homepage”: {
“id”: “<string>”
}
}’

Responses

Returned if the space is updated.

Content type Value
application/json

Space

Delete space

DELETE /wiki/rest/api/space/

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.

App scope required: DELETE

OAuth scopes required

:

write:confluence-space

Request

Path parameters

spaceKey Required

string

The key of the space to delete.

Example

1
2curl –request DELETE
–url ‘https://your-domain.atlassian.net/wiki/rest/api/space/’

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//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.

App scope required: READ

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.

  • childTypes.all returns whether the content has attachments, comments, or child pages.
    Use this if you only need to check whether the content has children of a particular type.
  • childTypes.attachment returns whether the content has attachments.
  • childTypes.comment returns whether the content has comments.
  • childTypes.page returns whether the content has child pages.
  • container returns the space that the content is in. This is the same as the information
    returned by Get space.
  • metadata.currentuser returns information about the current user in relation to the content,
    including when they last viewed it, modified it, contributed to it, or added it as a favourite.
  • metadata.properties returns content properties that have been set via the Confluence REST API.
  • metadata.labels returns the labels that have been added to the content.
  • metadata.frontend (this property is only used by Atlassian)
  • operations returns the operations for the content, which are used when setting permissions.
  • children.page returns pages that are descendants at the level immediately below the content.
  • children.attachment returns all attachments for the content.
  • children.comment returns all comments on the content.
  • restrictions.read.restrictions.user returns the users that have permission to read the content.
  • restrictions.read.restrictions.group returns the groups that have permission to read the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • restrictions.update.restrictions.user returns the users that have permission to update the content.
  • restrictions.update.restrictions.group returns the groups that have permission to update the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • history returns the history of the content, including the date it was created.
  • history.lastUpdated returns information about the most recent update of the content, including
    who updated it and when it was updated.
  • history.previousVersion returns information about the update prior to the current content update.
  • history.contributors returns all of the users who have contributed to the content.
  • history.nextVersion returns information about the update after to the current content update.
  • ancestors returns the parent page, if the content is a page.
  • body returns the body of the content in different formats, including the editor format,
    view format, and export format.
  • version returns information about the most recent update of the content, including who updated it
    and when it was updated.
  • descendants.page returns pages that are descendants at any level below the content.
  • descendants.attachment returns all attachments for the content, same as children.attachment.
  • descendants.comment returns all comments on the content, same as children.comment.
  • space returns the space that the content is in. This is the same as the information returned by
    Get space.

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

Valid values: childTypes.all, childTypes.attachment, childTypes.comment, childTypes.page, container, metadata.currentuser, metadata.properties, metadata.labels, metadata.frontend, operations …(Show more)

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
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/space//content’
–header ‘Accept: application/json’

Responses

Returned if the requested content is returned.

Get content by type for space

GET /wiki/rest/api/space//content/

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.

App scope required: READ

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.

Valid values: page, blogpost

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.

  • childTypes.all returns whether the content has attachments, comments, or child pages.
    Use this if you only need to check whether the content has children of a particular type.
  • childTypes.attachment returns whether the content has attachments.
  • childTypes.comment returns whether the content has comments.
  • childTypes.page returns whether the content has child pages.
  • container returns the space that the content is in. This is the same as the information
    returned by Get space.
  • metadata.currentuser returns information about the current user in relation to the content,
    including when they last viewed it, modified it, contributed to it, or added it as a favourite.
  • metadata.properties returns content properties that have been set via the Confluence REST API.
  • metadata.labels returns the labels that have been added to the content.
  • metadata.frontend (this property is only used by Atlassian)
  • operations returns the operations for the content, which are used when setting permissions.
  • children.page returns pages that are descendants at the level immediately below the content.
  • children.attachment returns all attachments for the content.
  • children.comment returns all comments on the content.
  • restrictions.read.restrictions.user returns the users that have permission to read the content.
  • restrictions.read.restrictions.group returns the groups that have permission to read the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • restrictions.update.restrictions.user returns the users that have permission to update the content.
  • restrictions.update.restrictions.group returns the groups that have permission to update the content. Note that
    this may return deleted groups, because deleting a group doesn’t remove associated restrictions.
  • history returns the history of the content, including the date it was created.
  • history.lastUpdated returns information about the most recent update of the content, including
    who updated it and when it was updated.
  • history.previousVersion returns information about the update prior to the current content update.
  • history.contributors returns all of the users who have contributed to the content.
  • history.nextVersion returns information about the update after to the current content update.
  • ancestors returns the parent page, if the content is a page.
  • body returns the body of the content in different formats, including the editor format,
    view format, and export format.
  • version returns information about the most recent update of the content, including who updated it
    and when it was updated.
  • descendants.page returns pages that are descendants at any level below the content.
  • descendants.attachment returns all attachments for the content, same as children.attachment.
  • descendants.comment returns all comments on the content, same as children.comment.
  • space returns the space that the content is in. This is the same as the information returned by
    Get space.

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

Valid values: childTypes.all, childTypes.attachment, childTypes.comment, childTypes.page, container, metadata.currentuser, metadata.properties, metadata.labels, metadata.frontend, operations …(Show more)

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
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/space//content/’
–header ‘Accept: application/json’

Responses

Returned if the requested content is returned.

Get space properties

GET /wiki/rest/api/space//property

Returns all properties for the given space. Space properties are a key-value storage associated with a space.

Permissions required: ‘View’ permission for the space.

App scope required: READ

OAuth scopes required

:

read:confluence-props

Request

Path parameters

spaceKey Required

string

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

Query parameters

expand

Array<string>

A multi-value parameter indicating which properties of the space
property to expand. By default, the version object is expanded.

  • version returns information about the version of the content.
  • space returns the space that the properties are in.

Style: form

Valid values: version, space

start

integer

The starting index of the returned objects.

Default: 0, Minimum: 0, Format: int32

limit

integer

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

Default: 10, Minimum: 0, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/space//property’
–header ‘Accept: application/json’

Responses

Returned if the requested space properties are returned.

Create space property

POST /wiki/rest/api/space//property

Creates a new space property.

Permissions required:
‘Admin’ permission for the space.

App scope required: WRITE

OAuth scopes required

:

write:confluence-props

Request

Path parameters

spaceKey Required

string

The key of the space that the property will be created in.

Body parameters

key Required

string

The key of the new property.

Maximum: 255

value Required

PropertyValue

The value of the property. This can be empty or a complex object.
For example,

1
2
3
4
5″value”: {
“example1”: “value”,
“example2”: true,
“example3”: 123
}

Example

1
2
3
4
5
6
7
8curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/space//property’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“key”: “<string>”,
“value”: {}
}’

Responses

Returned if the space property is created.

Get space property

GET /wiki/rest/api/space//property/

Returns a space property.

Permissions required: ‘View’ permission for the space.

App scope required: READ

OAuth scopes required

:

read:confluence-props

Request

Path parameters

spaceKey Required

string

The key of the space that the property is in.

key Required

string

The key of the space property.

Query parameters

expand

Array<string>

A multi-value parameter indicating which properties of the space
property to expand. By default, the version object is expanded.

  • version returns information about the version of the content.
  • space returns the space that the properties are in.

Style: form

Valid values: version, space

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/space//property/’
–header ‘Accept: application/json’

Responses

Returned if the requested space property is returned.

Update space property

PUT /wiki/rest/api/space//property/

Updates a space property. Note, you cannot update the key of a space
property, only the value.

Permissions required:
‘Admin’ permission for the space.

App scope required: WRITE

OAuth scopes required

:

write:confluence-props

Request

Path parameters

spaceKey Required

string

The key of the space that the property is in.

key Required

string

The key of the property to be updated.

Body parameters

value Required

object

The value of the property.

version Required

object

The version number of the property.

Example

1
2
3
4
5
6
7
8
9
10
11curl –request PUT
–url ‘https://your-domain.atlassian.net/wiki/rest/api/space//property/’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“value”: {},
“version”: {
“number”: 197,
“minorEdit”: true
}
}’

Responses

Returned if the space property is updated.

Create space property for key

POST /wiki/rest/api/space//property/

Creates a new space property. This is the same as POST
/space//property but the key for the property is passed as a
path parameter, rather than in the request body.

Permissions required:
‘Admin’ permission for the space.

App scope required: WRITE

OAuth scopes required

:

write:confluence-props

Request

Path parameters

spaceKey Required

string

The key of the space that the property will be created in.

key Required

string

The key of the property to be created.

Body parameters

value Required

PropertyValue

The value of the property. This can be empty or a complex object.
For example,

1
2
3
4
5″value”: {
“example1”: “value”,
“example2”: true,
“example3”: 123
}

Example

1
2
3
4
5
6
7curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/space//property/’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“value”: {}
}’

Responses

Returned if the space property is created.

Delete space property

DELETE /wiki/rest/api/space//property/

Deletes a space property.

Permissions required:
‘Admin’ permission for the space.

App scope required: DELETE

OAuth scopes required

:

write:confluence-props

Request

Path parameters

spaceKey Required

string

The key of the space that the property is in.

key Required

string

The key of the property to be deleted.

Example

1
2curl –request DELETE
–url ‘https://your-domain.atlassian.net/wiki/rest/api/space//property/’

Responses

Returned if the space property is deleted.

Get space settings

GET /wiki/rest/api/space//settings

Returns the settings of a space. Currently only the
routeOverrideEnabled setting can be returned.

Permissions required:
‘View’ permission for the space.

App scope required: READ

OAuth scopes required

:

read:confluence-space.summary

Request

Path parameters

spaceKey Required

string

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

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/space//settings’
–header ‘Accept: application/json’

Responses

Returned if the space settings are returned.

Update space settings

PUT /wiki/rest/api/space//settings

Updates the settings for a space. Currently only the
routeOverrideEnabled setting can be updated.

Permissions required:
‘Admin’ permission for the space.

App scope required: WRITE

OAuth scopes required

:

write:confluence-space

Request

Path parameters

spaceKey Required

string

The key of the space whose settings will be updated.

Body parameters

routeOverrideEnabled

boolean

Defines whether an override for the space home should be used. This is
used in conjunction with a space theme provided by an app. For
example, if this property is set to true, a theme can display a page
other than the space homepage when users visit the root URL for a
space. This property allows apps to provide content-only theming
without overriding the space home.

Example

1
2
3
4
5
6
7curl –request PUT
–url ‘https://your-domain.atlassian.net/wiki/rest/api/space//settings’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“routeOverrideEnabled”: true
}’

Responses

Returned if space settings are updated.

Get space theme

GET /wiki/rest/api/space//theme

Returns the theme selected for a space, if one is set. If no space
theme is set, this means that the space is inheriting the global look
and feel settings.

Permissions required: ‘View’ permission for the space.

App scope required: READ

OAuth scopes required

:

read:confluence-space.summary

Request

Path parameters

spaceKey Required

string

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

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/space//theme’
–header ‘Accept: application/json’

Responses

Returned if the requested theme is returned.

Set space theme

PUT /wiki/rest/api/space//theme

Sets the theme for a space. Note, if you want to reset the space theme to
the default Confluence theme, use the ‘Reset space theme’ method instead
of this method.

Permissions required:
‘Admin’ permission for the space.

App scope required: WRITE

OAuth scopes required

:

write:confluence-space

Request

Path parameters

spaceKey Required

string

The key of the space to set the theme for.

Body parameters

themeKey Required

string

The key of the theme to be set as the space theme.

Example

1
2
3
4
5
6
7curl –request PUT
–url ‘https://your-domain.atlassian.net/wiki/rest/api/space//theme’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“themeKey”: “<string>”
}’

Responses

Returned if the theme was set for the space.

Reset space theme

DELETE /wiki/rest/api/space//theme

Resets the space theme. This means that the space will inherit the
global look and feel settings

Permissions required:
‘Admin’ permission for the space.

App scope required: DELETE

OAuth scopes required

:

write:confluence-space

Request

Path parameters

spaceKey Required

string

The key of the space to reset the theme for.

Example

1
2curl –request DELETE
–url ‘https://your-domain.atlassian.net/wiki/rest/api/space//theme’

Responses

Returned if the theme was reset for the space.

Returns a list of watchers of a space

GET /wiki/rest/api/space//watch

Returns a list of watchers of a space

App scope required: READ

Request

Path parameters

spaceKey Required

string

The key of the space to get watchers.

Query parameters

start

string

The start point of the collection to return.

limit

string

The limit of the number of items to return, this may be restricted by fixed system limits.

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/space//watch’
–header ‘Accept: application/json’

Responses

Returned if watchers list is returned.

Template

Update content template

PUT /wiki/rest/api/template

Updates a content template. Note, blueprint templates cannot be updated
via the REST API.

Permissions required:
‘Admin’ permission for the space to create a space template or ‘Confluence Administrator’
global permission to create a global template.

App scope required: WRITE

OAuth scopes required

:

write:confluence-content

Request

Body parameters

This object is used to update content templates.

templateId Required

string

The ID of the template being updated.

name Required

string

The name of the template. Set to the current name if this field is
not being updated.

templateType Required

string

The type of the template. Set to page.

Valid values: page

body Required

ContentBodyCreate

This object is used when creating or updating content.

description

string

A description of the template.

Max length: 100

labels

Array<Label>

Labels for the template.

space

object

The key for the space of the template. Required if the template is a
space template. Set this to the current space.key.

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
25curl –request PUT
–url ‘https://your-domain.atlassian.net/wiki/rest/api/template’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“templateId”: “<string>”,
“name”: “<string>”,
“templateType”: “page”,
“body”: {
“value”: “<string>”,
“representation”: “view”
},
“description”: “<string>”,
“labels”: [
{
“prefix”: “<string>”,
“name”: “<string>”,
“id”: “<string>”,
“label”: “<string>”
}
],
“space”: {
“key”: “<string>”
}
}’

Responses

Returned if the template is updated.

Create content template

POST /wiki/rest/api/template

Creates a new content template. Note, blueprint templates cannot be created via the REST API.

Permissions required:
‘Admin’ permission for the space to create a space template or ‘Confluence Administrator’
global permission to create a global template.

App scope required: WRITE

OAuth scopes required

:

write:confluence-content

Request

Body parameters

This object is used to create content templates.

name Required

string

The name of the new template.

templateType Required

string

The type of the new template. Set to page.

body Required

ContentBodyCreate

This object is used when creating or updating content.

description

string

A description of the new template.

Max length: 255

labels

Array<Label>

Labels for the new template.

space

object

The key for the space of the new template. Only applies to space templates.
If the spaceKey is not specified, the template will be created as a global
template.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/template’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ‘{
“name”: “<string>”,
“templateType”: “<string>”,
“body”: {
“value”: “<string>”,
“representation”: “view”
},
“description”: “<string>”,
“labels”: [
{
“prefix”: “<string>”,
“name”: “<string>”,
“id”: “<string>”,
“label”: “<string>”
}
],
“space”: {
“key”: “<string>”
}
}’

Responses

Returned if the template is created.

Get blueprint templates

GET /wiki/rest/api/template/blueprint

Returns all templates provided by blueprints. Use this method to retrieve
all global blueprint templates or all blueprint templates in a space.

Note, all global blueprints are inherited by each space. Space blueprints
can be customised without affecting the global blueprints.

Permissions required:
Permission to access the Confluence site (‘Can use’ global permission).

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Query parameters

spaceKey

string

The key of the space to be queried for templates. If the spaceKey
is not specified, global blueprint templates will be returned.

start

integer

The starting index of the returned templates.

Default: 0, Minimum: 0, Format: int32

limit

integer

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

Default: 25, Minimum: 0, Format: int32

expand

Array<string>

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

  • body returns the content of the template in storage format.

Style: form

Valid values: body

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/template/blueprint’
–header ‘Accept: application/json’

Responses

Returned if the requested templates are returned.

Get content templates

GET /wiki/rest/api/template/page

Returns all content templates. Use this method to retrieve all global
content templates or all content templates in a space.

Permissions required:
‘Admin’ permission for the space to view space templates and ‘Confluence
Administrator’ global permission to view global templates.

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Query parameters

spaceKey

string

The key of the space to be queried for templates. If the spaceKey
is not specified, global templates will be returned.

start

integer

The starting index of the returned templates.

Default: 0, Minimum: 0, Format: int32

limit

integer

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

Default: 25, Minimum: 0, Format: int32

expand

Array<string>

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

  • body returns the content of the template in storage format.

Style: form

Valid values: body

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/template/page’
–header ‘Accept: application/json’

Responses

Returned if the requested templates are returned.

Get content template

GET /wiki/rest/api/template/

Returns a content template. This includes information about template,
like the name, the space or blueprint that the template is in, the body
of the template, and more.

Permissions required:
‘Admin’ permission for the space to view space templates and ‘Confluence
Administrator’ global permission to view global templates.

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Path parameters

contentTemplateId Required

string

The ID of the content template to be returned.

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/template/’
–header ‘Accept: application/json’

Responses

Returned if the requested template is returned.

Remove template

DELETE /wiki/rest/api/template/

Deletes a template. This results in different actions depending on the
type of template:

  • If the template is a content template, it is deleted.
  • If the template is a modified space-level blueprint template, it reverts
    to the template inherited from the global-level blueprint template.
  • If the template is a modified global-level blueprint template, it reverts
    to the default global-level blueprint template.

    Note, unmodified blueprint templates cannot be deleted.

App scope required: DELETE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

contentTemplateId Required

string

The ID of the template to be deleted.

Example

1
2curl –request DELETE
–url ‘https://your-domain.atlassian.net/wiki/rest/api/template/’

Responses

Returned if the template has been successfully been deleted.

User

Get user

GET /wiki/rest/api/user

Returns a user. This includes information about the user, like the
display name, userKey, account ID, profile picture, and more.

The username, key, or accountId parameter must be specified, in
order to identify the user.

Permissions required:
Permission to access the Confluence site (‘Can use’ global permission).

App scope required: READ

Request

Query parameters

key

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The userKey of the user to be returned. Required, unless the
username or accountId is specified. The key uniquely identifies
a user in a Confluence instance and does not change.

username

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The username of the user to be returned. Required, unless the key
or accountId is specified. The username uniquely identifies a
user in a Confluence instance but can change if the user is renamed.

accountId

string

The account ID of the user, which uniquely identifies the user across all Atlassian products.
For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192. Required, unless username or userKey is specified.

expand

Array<string>

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

  • operations returns the operations that the user is allowed to do.
  • details.personal returns the ‘Personal’ details in the user’s profile, like the ‘Email’ and ‘Phone’.
    Note that these fields have been deprecated due to privacy changes. See the
    migration guide
    for details.
  • details.business returns the ‘Company’ details in the user’s profile, like the ‘Position’ and ‘Department’.
    Note that these fields have been deprecated due to privacy changes. See the
    migration guide
    for details.
  • personalSpace returns the user’s personal space, if it exists.

Style: form

Valid values: operations, details.personal, details.business, personalSpace

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/user’
–header ‘Accept: application/json’

Responses

Returned if the requested user is returned.

Content type Value
application/json

User

Get anonymous user

GET /wiki/rest/api/user/anonymous

Returns information about how anonymous users are represented, like the
profile picture and display name.

Permissions required:
Permission to access the Confluence site (‘Can use’ global permission).

App scope required: READ

Request

Query parameters

expand

Array<string>

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

  • operations returns the operations that the user is allowed to do.

Style: form

Valid values: operations

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/user/anonymous’
–header ‘Accept: application/json’

Responses

Returned if the anonymous user representation is returned.

Get current user

GET /wiki/rest/api/user/current

Returns the currently logged-in user. This includes information about
the user, like the display name, userKey, account ID, profile picture,
and more.

Permissions required:
Permission to access the Confluence site (‘Can use’ global permission).

App scope required: READ

Request

Query parameters

expand

Array<string>

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

  • operations returns the operations that the user is allowed to do.
  • details.personal returns the ‘Personal’ details in the user’s profile, like the ‘Email’ and ‘Phone’.
    Note that these fields have been deprecated due to privacy changes. See the
    migration guide
    for details.
  • details.business returns the ‘Company’ details in the user’s profile, like the ‘Position’ and ‘Department’.
    Note that these fields have been deprecated due to privacy changes. See the
    migration guide
    for details.
  • personalSpace returns the user’s personal space, if it exists.

Style: form

Valid values: operations, details.personal, details.business, personalSpace

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/user/current’
–header ‘Accept: application/json’

Responses

Returned if the current user is returned.

Content type Value
application/json

User

Get group memberships for user

GET /wiki/rest/api/user/memberof

Returns the groups that a user is a member of.

Permissions required:
Permission to access the Confluence site (‘Can use’ global permission).

App scope required: READ

Request

Query parameters

key

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The userKey of the user. Required, unless the username or accountId is specified. The key uniquely identifies
a user in a Confluence instance and does not change.

username

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The username of the user. Required, unless the key or accountId is specified. The username uniquely identifies a
user in a Confluence instance but can change if the user is renamed.

accountId

string

The account ID of the user, which uniquely identifies the user across all Atlassian products.
For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192. Required, unless username or userKey is specified.

start

integer

The starting index of the returned groups.

Default: 0, Minimum: 0, Format: int32

limit

integer

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

Default: 200, Minimum: 0, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/user/memberof’
–header ‘Accept: application/json’

Responses

Returned if the requested groups are returned.

Get multiple users using ids

GET /wiki/rest/api/user/bulk

Returns user details for the ids provided in request.

Permissions required:
Permission to access the Confluence site (‘Can use’ global permission).

Apps cannot access this REST resource.

Request

Query parameters

accountId Required

string

A list of accountId’s of users to be returned.

expand

Array<string>

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

  • operations returns the operations that the user is allowed to do.
  • details.personal returns the ‘Personal’ details in the user’s profile, like the ‘Email’ and ‘Phone’.
    Note that these fields have been deprecated due to privacy changes. See the
    migration guide
    for details.
  • details.business returns the ‘Company’ details in the user’s profile, like the ‘Position’ and ‘Department’.
    Note that these fields have been deprecated due to privacy changes. See the
    migration guide
    for details.
  • personalSpace returns the user’s personal space, if it exists.

Style: form

Valid values: operations, details.personal, details.business, personalSpace

limit

integer

The maximum number of results returned.
Currently API returns 200 results max.
If more that 200 ids are passed first 200 will be returned.

Minimum: 1, Maximum: 200, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/user/bulk?accountId=’
–header ‘Accept: application/json’

Responses

Returned if, the list of users is returned.

Get content watch status

GET /wiki/rest/api/user/watch/content/

Returns whether a user is watching a piece of content. Choose the user by
doing one of the following:

  • Specify a user via a query parameter: Use the username, key, or accountId to identify the user.
    Note that username and key have been deprecated in favor of accountId. See the
    migration guide
    for details.
  • Do not specify a user: The currently logged-in user will be used.

Permissions required:
‘Confluence Administrator’ global permission if specifying a user, otherwise
permission to access the Confluence site (‘Can use’ global permission).

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Path parameters

contentId Required

string

The ID of the content to be queried for whether the specified user is
watching it.

Query parameters

key

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The key of the user to be queried for whether they are watching the
content. Required, unless the username or accountId is specified.

username

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The username of the user to be queried for whether they are watching
the content. Required, unless the key or accountId is specified.

accountId

string

The accountId of the user to be queried for whether they are watching the content. The accountId uniquely
identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.
Required, unless username or userKey is specified.

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/user/watch/content/’
–header ‘Accept: application/json’

Responses

Returned if the requested watch status is returned.

Add content watcher

POST /wiki/rest/api/user/watch/content/

Adds a user as a watcher to a piece of content. Choose the user by doing
one of the following:

  • Specify a user via a query parameter: Use the username, key, or accountId to identify the user.
    Note that username and key have been deprecated in favor of accountId. See the
    migration guide
    for details.
  • Do not specify a user: The currently logged-in user will be used.

Note, you must add the X-Atlassian-Token: no-check header when making a
request, as this operation has XSRF protection.

Permissions required:
‘Confluence Administrator’ global permission if specifying a user, otherwise
permission to access the Confluence site (‘Can use’ global permission).

App scope required: WRITE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

contentId Required

string

The ID of the content to add the watcher to.

Query parameters

key

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The key of the user to be added as a watcher. Required, unless the username or accountId is specified.

username

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The username of the user to be added as a watcher. Required, unless the key or accountId is specified.

accountId

string

The accountId of the user to be added as a watcher. The accountId uniquely identifies the user across all Atlassian products.
For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192. Required, unless username or userKey is specified.

Example

1
2curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/user/watch/content/’

Responses

Returned if the watcher was successfully created. No response body is
returned.

Remove content watcher

DELETE /wiki/rest/api/user/watch/content/

Removes a user as a watcher from a piece of content. Choose the user by
doing one of the following:

  • Specify a user via a query parameter: Use the username, key, or accountId to identify the user.
    Note that username and key have been deprecated in favor of accountId. See the
    migration guide
    for details.
  • Do not specify a user: The currently logged-in user will be used.

Permissions required:
‘Confluence Administrator’ global permission if specifying a user, otherwise
permission to access the Confluence site (‘Can use’ global permission).

App scope required: DELETE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

contentId Required

string

The ID of the content to remove the watcher from.

Query parameters

key

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The key of the user to be removed as a watcher. Required, unless the username or accountId is specified.

username

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The username of the user to be removed as a watcher. Required, unless the key or accountId is specified.

accountId

string

The accountId of the user to be removed as a watcher. The accountId uniquely identifies the user across all Atlassian products.
For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192. Required, unless username or userKey is specified.

Example

1
2curl –request DELETE
–url ‘https://your-domain.atlassian.net/wiki/rest/api/user/watch/content/’

Responses

Returned if the watcher was successfully deleted. No response body is
returned.

Get label watch status

GET /wiki/rest/api/user/watch/label/

Returns whether a user is watching a label. Choose the user by doing one
of the following:

  • Specify a user via a query parameter: Use the username, key, or accountId to identify the user.
    Note that username and key have been deprecated in favor of accountId. See the
    migration guide
    for details.
  • Do not specify a user: The currently logged-in user will be used.

Permissions required:
‘Confluence Administrator’ global permission if specifying a user, otherwise
permission to access the Confluence site (‘Can use’ global permission).

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Path parameters

labelName Required

string

The name of the label to be queried for whether the specified user is
watching it.

Query parameters

key

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The key of the user to be queried for whether they are watching the label. Required, unless the username or accountId is specified.

username

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The username of the user to be queried for whether they are watching the label. Required, unless the key or accountId is specified.

accountId

string

The accountId of the user to be queried for whether they are watching the label. The accountId uniquely identifies
the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.
Required, unless username or userKey is specified.

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/user/watch/label/’
–header ‘Accept: application/json’

Responses

Returned if the requested watch status is returned.

Add label watcher

POST /wiki/rest/api/user/watch/label/

Adds a user as a watcher to a label. Choose the user by doing one of the
following:

  • Specify a user via a query parameter: Use the username, key, or accountId to identify the user.
    Note that username and key have been deprecated in favor of accountId. See the
    migration guide
    for details.
  • Do not specify a user: The currently logged-in user will be used.

Note, you must add the X-Atlassian-Token: no-check header when making a
request, as this operation has XSRF protection.

Permissions required:
‘Confluence Administrator’ global permission if specifying a user, otherwise
permission to access the Confluence site (‘Can use’ global permission).

App scope required: WRITE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

labelName Required

string

The name of the label to add the watcher to.

Query parameters

key

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The key of the user to be added as a watcher. Required, unless the username or accountId is specified.

username

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The username of the user to be added as a watcher. Required, unless the key or accountId is specified.

accountId

string

The accountId of the user to be added as a watcher. The accountId uniquely identifies the user across all Atlassian products.
For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192. Required, unless username or userKey is specified.

Example

1
2curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/user/watch/label/’

Responses

Returned if the watcher was successfully created. No response body is
returned.

Remove label watcher

DELETE /wiki/rest/api/user/watch/label/

Removes a user as a watcher from a label. Choose the user by doing one of
the following:

  • Specify a user via a query parameter: Use the username, key, or accountId to identify the user.
    Note that username and key have been deprecated in favor of accountId. See the
    migration guide
    for details.
  • Do not specify a user: The currently logged-in user will be used.

Permissions required:
‘Confluence Administrator’ global permission if specifying a user, otherwise
permission to access the Confluence site (‘Can use’ global permission).

App scope required: DELETE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

labelName Required

string

The name of the label to remove the watcher from.

Query parameters

key

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The key of the user to be removed as a watcher. Required, unless the username or accountId is specified.

username

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The username of the user to be removed as a watcher. Required, unless the key or accountId is specified.

accountId

string

The accountId of the user to be removed as a watcher. The accountId uniquely identifies the user across all Atlassian products.
For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192. Required, unless username or userKey is specified.

Example

1
2curl –request DELETE
–url ‘https://your-domain.atlassian.net/wiki/rest/api/user/watch/label/’

Responses

Returned if the watcher was successfully deleted. No response body is
returned.

Get space watch status

GET /wiki/rest/api/user/watch/space/

Returns whether a user is watching a space. Choose the user by
doing one of the following:

  • Specify a user via a query parameter: Use the username, key, or accountId to identify the user.
    Note that username and key have been deprecated in favor of accountId. See the
    migration guide
    for details.
  • Do not specify a user: The currently logged-in user will be used.

Permissions required:
‘Confluence Administrator’ global permission if specifying a user, otherwise
permission to access the Confluence site (‘Can use’ global permission).

App scope required: READ

OAuth scopes required

:

read:confluence-content.summary

Request

Path parameters

spaceKey Required

string

The key of the space to be queried for whether the specified user is
watching it.

Query parameters

key

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The key of the user to be queried for whether they are watching the space. Required, unless the username or accountId is specified.

username

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The username of the user to be queried for whether they are watching the space. Required, unless the key or accountId is specified.

accountId

string

The accountId of the user to be queried for whether they are watching the space. The accountId uniquely identifies
the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.
Required, unless username or userKey is specified.

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/user/watch/space/’
–header ‘Accept: application/json’

Responses

Returned if the requested watch status is returned.

Add space watcher

POST /wiki/rest/api/user/watch/space/

Adds a user as a watcher to a space. Choose the user by doing one of the
following:

  • Specify a user via a query parameter: Use the username, key, or accountId to identify the user.
    Note that username and key have been deprecated in favor of accountId. See the
    migration guide
    for details.
  • Do not specify a user: The currently logged-in user will be used.

Note, you must add the X-Atlassian-Token: no-check header when making a
request, as this operation has XSRF protection.

Permissions required:
‘Confluence Administrator’ global permission if specifying a user, otherwise
permission to access the Confluence site (‘Can use’ global permission).

App scope required: WRITE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

spaceKey Required

string

The key of the space to add the watcher to.

Query parameters

key

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The key of the user to be added as a watcher. Required, unless the username or accountId is specified.

username

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The username of the user to be added as a watcher. Required, unless the key or accountId is specified.

accountId

string

The accountId of the user to be added as a watcher. The accountId uniquely identifies the user across all
Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.
Required, unless username or userKey is specified.

Example

1
2curl –request POST
–url ‘https://your-domain.atlassian.net/wiki/rest/api/user/watch/space/’

Responses

Returned if the watcher was successfully created. No response body is
returned.

Remove space watch

DELETE /wiki/rest/api/user/watch/space/

Removes a user as a watcher from a space. Choose the user by doing one of
the following:

  • Specify a user via a query parameter: Use the username, key, or accountId to identify the user.
    Note that username and key have been deprecated in favor of accountId. See the
    migration guide
    for details.
  • Do not specify a user: The currently logged-in user will be used.

Permissions required:
‘Confluence Administrator’ global permission if specifying a user, otherwise
permission to access the Confluence site (‘Can use’ global permission).

App scope required: DELETE

OAuth scopes required

:

write:confluence-content

Request

Path parameters

spaceKey Required

string

The key of the space to remove the watcher from.

Query parameters

key

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The key of the user to be removed as a watcher. Required, unless the username or accountId is specified.

username

string

This parameter has been deprecated due to privacy changes. Use accountId instead. See the
migration guide
for details.

The username of the user to be removed as a watcher. Required, unless the key or accountId is specified.

accountId

string

The accountId of the user to be removed as a watcher. The accountId uniquely identifies the user across all
Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.
Required, unless username or userKey is specified.

Example

1
2curl –request DELETE
–url ‘https://your-domain.atlassian.net/wiki/rest/api/user/watch/space/’

Responses

Returned if the watcher was successfully deleted. No response body is returned.

Get a user’s email

GET /wiki/rest/api/user/email

Returns a user’s email address. This API is only available to apps approved by
Atlassian, according to these guidelines.

Permissions required:
Permission to access the Confluence site (‘Can use’ global permission).

App scope required: ACCESS_EMAIL_ADDRESSES

Request

Query parameters

accountId Required

string

The account ID of the user, which uniquely identifies the user across all Atlassian products.
For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192. Required.

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/user/email?accountId=’
–header ‘Accept: application/json’

Responses

Returned if the requested user’s email is returned.

Bulk fetch of users’ email addresses

GET /wiki/rest/api/user/email/bulk

Returns user email addresses for a set of accountIds. This API is only available to apps approved by
Atlassian, according to these guidelines.

Any accounts which are not available will not be included in the result.

Permissions required:
Permission to access the Confluence site (‘Can use’ global permission).

App scope required: ACCESS_EMAIL_ADDRESSES

Request

Query parameters

accountId Required

Array<string>

The account IDs of the users.

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/user/email/bulk?accountId=’
–header ‘Accept: application/json’

Responses

Returned if the request is successful.

Get accountIds for users

GET /wiki/rest/api/user/bulk/migration

Returns the accountIds for the users specified in the key or username parameters. Note that multiple key and username parameters can be specified.

Permissions required:
‘Confluence Administrator’ global permission if specifying a user, otherwise
permission to access the Confluence site (‘Can use’ global permission).

App scope required: READ

Request

Query parameters

key

Array<string>

The key of a user. To specify multiple users, pass multiple key parameters separated by ampersands.
For example, key=mia&key=alana. Required if username isn’t provided. Cannot be provided if username is present.

username

Array<string>

The username of a user. To specify multiple users, pass multiple username parameters separated by ampersands.
For example, username=mia&username=alana. Required if key isn’t provided. Cannot be provided if key is present.

start

integer

The index of the first item to return in a page of results (page offset).

Default: 0, Minimum: 0, Format: int32

limit

integer

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

Default: 200, Minimum: 0, Format: int32

Example

1
2
3curl –request GET
–url ‘https://your-domain.atlassian.net/wiki/rest/api/user/bulk/migration’
–header ‘Accept: application/json’

Responses

Returned if the request is successful.

Source

Leave a comment

Your email address will not be published. Required fields are marked *