This is the reference for the Confluence Cloud REST API. This API is the primary way to get and modify data in Confluence Cloud, whether you are developing an app or any other integration. Use it to interact with Confluence entities, like pages and blog posts, spaces, users, groups, and more.
Authentication: If you are building a Cloud app, authentication is implemented via JWT (see Authentication for apps). Otherwise, if you are authenticating directly against the REST API, the REST API supports basic auth (see Basic auth for REST APIs).
Authorization: If you are building a Cloud app, authorization can be implemented by scopes or by OAuth 2.0 user impersonation. Otherwise, if you are making calls directly against the REST API, authorization is based on the user used in the authentication process.
See Security overview for more details on authentication and authorization.
The Confluence REST API uses the standard HTTP status codes.
Responses that return an error status code will also return a response body, similar to the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
{
"statusCode": 404,
"data": {
"authorized": false,
"valid": false,
"errors": [
{
"message": {
"translation": "This is an example error message.",
"args": []
}
}
],
"successful": false
},
"message": "This is an example error message."
}Expansion: The Confluence REST API uses resource expansion: some parts of a resource are not returned unless explicitly specified. This simplifies responses and minimizes network traffic.
To expand part of a resource in a request, use the expand query parameter and specify the entities to be expanded. If you need to expand nested entities, use the . dot notation. For example, the following request will expand information about the requested content's space and labels:
1
GET /wiki/rest/api/content/{id}?expand=space,metadata.labelsPagination: The Confluence REST API uses pagination: a method that returns a response with multiple objects can only return a limited number at one time. This limits the size of responses and conserves server resources.
Use the 'limit' and 'start' query parameters to specify pagination:
limit is the number of objects to return per page. This may be restricted by system limits.start is the index of the first item returned in the page of results. The base index is 0.For example, the following request will return ten content objects, starting from the fifth object.
1
GET /wiki/rest/api/content?start=4,limit=10Special headers:
X-Atlassian-Token: no-check request header must be specified for methods
that are protected from Cross Site Request Forgery (XSRF/CSRF) attacks. This is
stated in the method description, if required. For more information, see this
KB article.Webhooks: A webhook is a user-defined callback over HTTP. You can use Confluence webhooks to notify your app or web application when certain events occur in Confluence. For example, when a page is created or updated. To learn more, see Webhooks.
Content properties: Content properties are a key-value storage associated with a piece of Confluence content. If you are building an app, this is one form of persistence that you can use. You can use the Confluence REST API to get, update, and delete content properties. To learn more, see Content properties in the REST API.
CQL: The Confluence Query Language (CQL) allows you to perform complex searches for content using an SQL-like syntax in the search resource. To learn more, see Advanced searching using CQL.
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.
string
Filters the results to the records on or after the startDate.
The startDate must be specified as a timestamp.
string
Filters the results to the records on or before the endDate.
The endDate must be specified as a timestamp.
string
Filters the results to records that have string property values
matching the searchString.
integer
The starting index of the returned records.
0, Minimum: 0, Format: int32integer
The maximum number of records to return per page. Note, this may be restricted by fixed system limits.
1000, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/audit' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested records are returned.
| Content type | Value |
|---|---|
| application/json |
POST /wiki/rest/api/audit
Creates a record in the audit log.
Permissions required: 'Confluence Administrator' global permission.
Apps cannot access this REST resource.
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'.
string
The IP address of the computer where the event was initiated from.
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.
int64string
The summary of the event, which is displayed in the 'Change' column on the audit log in the Confluence UI.
string
A long description of the event, which is displayed in the 'Description' field on the audit log in the Confluence UI.
string
The category of the event, which is displayed in the 'Event type' column on the audit log in the Confluence UI.
boolean
Indicates whether the event was actioned by a system administrator.
falseArray<ChangedValue>
The values that were changed in the event.
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.
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
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/audit' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"author": {
"type": "user",
"displayName": "<string>",
"operations": {},
"username": "<string>",
"userKey": "<string>"
},
"remoteAddress": "<string>",
"creationDate": 228,
"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>"
}
]
}'Returned if the record is created in the audit log.
| Content type | Value |
|---|---|
| application/json |
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.
string
Filters the exported results to the records on or after the startDate.
The startDate must be specified as a timestamp.
string
Filters the exported results to the records on or before the endDate.
The endDate must be specified as a timestamp.
string
Filters the exported results to records that have string property values
matching the searchString.
string
The format of the export file for the audit records.
csvValid values: csv, zip
1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/audit/export' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/zip'Returned if the requested export of the audit records is returned.
| Content type | Value |
|---|---|
| application/zip | string |
| text/csv | string |
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.
1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/audit/retention' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested retention period is returned.
| Content type | Value |
|---|---|
| application/json |
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.
integer
The number of units for the retention period.
int32string
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)
1 2 3 4 5 6 7 8 9
curl --request PUT \
--url 'https://your-domain.atlassian.net/wiki/rest/api/audit/retention' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"number": 45,
"units": "NANOS"
}'Returned if the retention period is updated.
| Content type | Value |
|---|---|
| application/json |
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.
integer
The number of units for the time period.
3, Format: int64string
The unit of time that the time period is measured in.
MONTHSValid values: NANOS, MICROS, MILLIS, SECONDS, MINUTES, HOURS, HALF_DAYS, DAYS, WEEKS, MONTHS ...(Show more)
string
Filters the results to records that have string property values
matching the searchString.
integer
The starting index of the returned records.
0, Minimum: 0, Format: int32integer
The maximum number of records to return per page. Note, this may be restricted by fixed system limits.
1000, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/audit/since' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested records are returned.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/content
Returns all content in a Confluence instance.
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
string
The type of content to return.
pageValid values: page, blogpost
string
The key of the space to be queried for its content.
string
The title of the page to be returned. Required for page type.
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.
currentstring
The posting date of the blog post to be returned. Required for blogpost type. Format: yyyy-mm-dd.
Array<string>
A multi-value parameter indicating which properties of the content to expand.
By default, the following objects are expanded: space, history, version.
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,
like 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.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.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.formstring
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
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'.
integer
The starting index of the returned content.
0, Minimum: 0, Format: int32integer
The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits.
25, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested list of content is returned.
| Content type | Value |
|---|---|
| application/json |
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.
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
string
Filter the returned content by status.
currentArray<string>
A multi-value parameter indicating which properties of the new content to expand.
By default, the following objects are expanded: space, history, version.
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,
like 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.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.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.formstring
The ID of the draft content. Required when publishing a draft.
string
255string
The type of the new content. Custom content types defined by apps are also supported.
Valid values: page, blogpost, comment, attachment
The space that the content is being created in.
string
The status of the new content.
currentValid values: current, trashed, historical, draft
Array<object>
The parent content of the new content. Only one parent content
id can be specified.
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.
1, Max properties: 11 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
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content' \
--user 'email@example.com:<api_token>' \
--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"
}
}
}'Returned if the content is created.
| Content type | Value |
|---|---|
| application/json |
PUT /wiki/rest/api/content/blueprint/instance/{draftId}
Publishes a shared draft of a page created from a blueprint.
Permissions required: Permission to view the draft and 'Add' permission for the space that the content will be created in.
App scope required: WRITE
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.
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.
draftArray<string>
A multi-value parameter indicating which properties of the new content
to expand when returned. By default, the following objects are expanded:
body.storage,history,space,version,ancestors
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,
like 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.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.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.formThe version for the new content.
string
The title of the content. If you don't want to change the title, set this to the current title of the draft.
255string
The type of content. Set this to page.
Valid values: page
string
The status of the content. Set this to current or omit it altogether.
currentValid values: current
The space for the content.
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
curl --request PUT \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/blueprint/instance/{draftId}' \
--user 'email@example.com:<api_token>' \
--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>"
}
]
}'Returned if the draft was successfully published.
| Content type | Value |
|---|---|
| application/json |
POST /wiki/rest/api/content/blueprint/instance/{draftId}
Publishes a legacy draft of a page created from a blueprint. Legacy drafts will eventually be removed in favour of shared drafts. For now, this method works the same as Publish shared draft.
Permissions required: Permission to view the draft and 'Add' permission for the space that the content will be created in.
App scope required: WRITE
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.
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.
draftArray<string>
A multi-value parameter indicating which properties of the new content
to expand when returned. By default, the following objects are expanded:
body.storage,history,space,version,ancestors
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,
like 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.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.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.formThe version for the new content.
string
The title of the content. If you don't want to change the title, set this to the current title of the draft.
255string
The type of content. Set this to page.
Valid values: page
string
The status of the content. Set this to current or omit it altogether.
currentValid values: current
The space for the content.
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/blueprint/instance/{draftId}' \
--user 'email@example.com:<api_token>' \
--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>"
}
]
}'Returned if the draft was successfully published.
| Content type | Value |
|---|---|
| application/json |
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
string
The CQL string that is used to find the requested content.
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.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, like 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.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.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.forminteger
The starting index of the returned content.
0, Minimum: 0, Format: int32integer
The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits.
25, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/search' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested list of content is returned.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/content/{id}
Returns a single piece of content, like a page or a blog post.
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
string
The ID of the content to be returned. If you don't know the content ID, use Get content and filter the results.
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.
currentinteger
The version number of the content to be returned.
int32string
The version of embedded content (e.g. attachments) to render.
currentValid values: current, version-at-save
Array<string>
A multi-value parameter indicating which properties of the content to expand.
By default, the following objects are expanded: space, history, version.
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,
like 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.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.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.formstring
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
1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested content is returned.
| Content type | Value |
|---|---|
| application/json |
PUT /wiki/rest/api/content/{id}
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
string
The ID of the content to be updated.
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.
currentValid values: current, trashed, historical, draft
string
The action that should be taken when conflicts are discovered. Only used when publishing a draft page.
abortValid values: abort
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.
string
The updated title of the content. If you are not changing this field, set this to the current title.
255string
The type of content. Set this to the current type of the content.
Valid values: page, blogpost, comment, attachment
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 favour of the updated page.
Valid values: current, trashed, historical, draft
Array<object>
The new parent for the content. Only one parent content 'id' can be specified.
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.
1, Max properties: 11 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
curl --request PUT \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}' \
--user 'email@example.com:<api_token>' \
--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"
}
}
}'Returned if the content is updated.
| Content type | Value |
|---|---|
| application/json |
DELETE /wiki/rest/api/content/{id}
Moves a piece of content to the space's trash or purges it from the trash, depending on the content's type and status:
page or blogpost and its status is current,
it will be trashed.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.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
string
The ID of the content to be deleted.
string
Set this to trashed, if the content's status is trashed and you want to purge it.
1 2 3
curl --request DELETE \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}' \
--user 'email@example.com:<api_token>'Returned if the content is successfully trashed.
A schema has not been defined for this response code.
GET /wiki/rest/api/content/{id}/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, attachmentblogpost: child content is comment, attachmentattachment: child content is commentcomment: child content is attachmentApps 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
string
The ID of the content to be queried for its children.
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.forminteger
The version of the parent content to retrieve children for. Currently, this only works for the latest version.
0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/child' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested content children are returned.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/content/{id}/child/attachment
Returns the attachments 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
string
The ID of the content to be queried for its attachments.
Array<string>
A multi-value parameter indicating which properties of the
attachments to expand. By default, the following objects are expanded:
metadata.
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,
like 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.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.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.forminteger
The starting index of the returned attachments.
0, Minimum: 0, Format: int32integer
The maximum number of attachments to return per page. Note, this may be restricted by fixed system limits.
25, Minimum: 0, Format: int32string
Filter the results to attachments that match the filename.
string
Filter the results to attachments that match the media type.
1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/child/attachment' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested attachments are returned.
| Content type | Value |
|---|---|
| application/json |
PUT /wiki/rest/api/content/{id}/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 8
curl -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/attachmentPermissions required: Permission to update the content.
App scope required: WRITE
string
The ID of the content to add the attachment to.
string
The status of the content that the attachment is being added to. This should always be set to 'current'.
currentValid values: current, draft
| Content type | Value |
|---|---|
| multipart/form-data |
1 2 3 4
curl --request PUT \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/child/attachment' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the attachments were added to the content.
| Content type | Value |
|---|---|
| application/json |
POST /wiki/rest/api/content/{id}/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 8
curl -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/attachmentPermissions required: Permission to update the content.
App scope required: WRITE
string
The ID of the content to add the attachment to.
string
The status of the content that the attachment is being added to.
currentValid values: current, draft
| Content type | Value |
|---|---|
| multipart/form-data |
1 2 3 4
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/child/attachment' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the attachments were added to the content.
| Content type | Value |
|---|---|
| application/json |
PUT /wiki/rest/api/content/{id}/child/attachment/{attachmentId}
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
string
The ID of the content that the attachment is attached to.
string
The ID of the attachment to update.
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.
string
The ID of the attachment to be updated.
string
Set this to attachment.
Valid values: attachment
string
The updated name of the attachment.
255The new content to attach the attachment to.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
curl --request PUT \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/child/attachment/{attachmentId}' \
--user 'email@example.com:<api_token>' \
--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>"
}
}'Returned if the attachment is updated.
| Content type | Value |
|---|---|
| application/json |
POST /wiki/rest/api/content/{id}/child/attachment/{attachmentId}/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 8
curl -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/dataPermissions required: Permission to update the content.
App scope required: WRITE
string
The ID of the content that the attachment is attached to.
string
The ID of the attachment to update.
| Content type | Value |
|---|---|
| multipart/form-data |
1 2 3 4
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/child/attachment/{attachmentId}/data' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the attachment is updated.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/content/{id}/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
string
The ID of the content to be queried for its comments.
Array<string>
A multi-value parameter indicating which properties of the attachments 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,
like 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.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.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.forminteger
The version of the parent content to retrieve children for. Currently, this only works for the latest version.
0, Minimum: 0, Format: int32integer
The starting index of the returned comments.
int32integer
The maximum number of comments to return per page. Note, this may be restricted by fixed system limits.
25, Minimum: 0, Format: int32Array<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.
string
Currently, this parameter is not used. Comments are returned at the root level only.
1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/child/comment' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested comments are returned.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/content/{id}/child/{type}
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, attachmentblogpost: child content is comment, attachmentattachment: child content is commentcomment: child content is attachmentCustom 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
string
The ID of the content to be queried for its children.
string
The type of children to return.
Valid values: page, comment, attachment
Array<string>
A multi-value parameter indicating which properties of the new 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,
like 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.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.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.forminteger
The version of the parent content to retrieve children for. Currently, this only works for the latest version.
0, Minimum: 0, Format: int32integer
The starting index of the returned content.
int32integer
The maximum number of content to return per page. Note, this may be restricted by fixed system limits.
25, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/child/{type}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested content is returned.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/content/{id}/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, attachmentblogpost: descendant is comment, attachmentattachment: descendant is commentcomment: descendant is attachmentThe 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
string
The ID of the content to be queried for its descendants.
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.form1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/descendant' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested descendants are returned.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/content/{id}/descendant/{type}
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, attachmentblogpost: descendant is comment, attachmentattachment: descendant is commentcomment: descendant is attachmentCustom 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
string
The ID of the content to be queried for its descendants.
string
The type of descendants to return.
Valid values: page, comment, attachment
Array<string>
A multi-value parameter indicating which properties of the new 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,
like 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.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.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.forminteger
The starting index of the returned content.
0, Minimum: 0, Format: int32integer
The maximum number of content to return per page. Note, this may be restricted by fixed system limits.
25, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/descendant/{type}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested content is returned.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/content/{id}/history
Returns the most recent update for a piece of content.
Permissions required: Permission to view the content.
App scope required: READ
string
The ID of the content to be queried for its history.
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.form1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/history' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested content history is returned.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/content/{id}/history/{version}/macro/id/{macroId}
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
string
The ID for the content that contains the macro.
integer
The version of the content that contains the macro.
int32string
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'.
1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/history/{version}/macro/id/{macroId}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested macro body is returned.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/content/{id}/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
string
The ID of the content to be queried for its labels.
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
integer
The starting index of the returned labels.
0, Minimum: 0, Format: int32integer
The maximum number of labels to return per page. Note, this may be restricted by fixed system limits.
200, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/label' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested labels are returned.
| Content type | Value |
|---|---|
| application/json |
POST /wiki/rest/api/content/{id}/label
Adds labels to a piece of content. Does not modify the existing labels.
Notes:
Permissions required: Permission to update the content.
App scope required: WRITE
string
The ID of the content that will have labels added to it.
1 2 3 4 5 6 7 8 9 10 11
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/label' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '[
{
"prefix": "global",
"name": "<string>"
}
]'Returned if the labels are added to the content.
| Content type | Value |
|---|---|
| application/json |
DELETE /wiki/rest/api/content/{id}/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
string
The ID of the content that the label will be removed from.
string
The name of the label to be removed.
1 2 3
curl --request DELETE \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/label' \
--user 'email@example.com:<api_token>'Returned if the label is removed. The response body will be empty.
DELETE /wiki/rest/api/content/{id}/label/{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
string
The ID of the content that the label will be removed from.
string
The name of the label to be removed.
1 2 3
curl --request DELETE \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/label/{label}' \
--user 'email@example.com:<api_token>'Returned if the label is removed. The response body will be empty.
GET /wiki/rest/api/content/{id}/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:
Permissions required: Permission to access the Confluence site ('Can use' global permission).
App scope required: READ
string
The ID of the content to be queried for its watches.
integer
The starting index of the returned watches.
0, Minimum: 0, Format: int32integer
The maximum number of watches to return per page. Note, this may be restricted by fixed system limits.
200, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/notification/child-created' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested watches are returned.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/content/{id}/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:
Permissions required: Permission to access the Confluence site ('Can use' global permission).
App scope required: READ
string
The ID of the content to be queried for its watches.
integer
The starting index of the returned watches.
0, Minimum: 0, Format: int32integer
The maximum number of watches to return per page. Note, this may be restricted by fixed system limits.
200, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/notification/created' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested watches are returned.
| Content type | Value |
|---|---|
| application/json |
POST /wiki/rest/api/content/{id}/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
string
boolean
boolean
boolean
boolean
string
string
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/pagehierarchy/copy' \
--user 'email@example.com:<api_token>' \
--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>"
}
}'Returns a full JSON representation of a long running task
A schema has not been defined for this response code.
GET /wiki/rest/api/content/{id}/property
Returns the properties for a piece of content. For more information about content properties, see Content properties in the REST API.
Permissions required: 'View' permission for the space, and permission to view the content if it is a page.
App scope required: READ
string
The ID of the content to be queried for its properties.
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.forminteger
The starting index of the returned properties.
0, Minimum: 0, Format: int32integer
The maximum number of properties to return per page. Note, this may be restricted by fixed system limits.
10, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/property' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested properties are returned.
| Content type | Value |
|---|---|
| application/json |
POST /wiki/rest/api/content/{id}/property
Creates a property for an existing piece of content. For more information about content properties, see Content properties in the REST API.
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
string
The ID of the content to add the property to.
string
The key of the new property.
255The 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
}1 2 3 4 5 6 7 8 9
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/property' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"key": "<string>",
"value": {}
}'Returned if the content property is created.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/content/{id}/property/{key}
Returns a content property for a piece of content. For more information, see Content properties in the REST API.
Permissions required: 'View' permission for the space, and permission to view the content if it is a page.
App scope required: READ
string
The ID of the content to be queried for the property.
string
The key of the content property.
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.form1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/property/{key}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the content property is returned.
| Content type | Value |
|---|---|
| application/json |
PUT /wiki/rest/api/content/{id}/property/{key}
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 Content properties in the REST API.
Permissions required: Permission to update the content.
App scope required: WRITE
string
The ID of the content that the property belongs to.
string
The key of the property.
1 2 3 4 5 6 7 8 9 10 11 12
curl --request PUT \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/property/{key}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"value": {},
"version": {
"number": 201,
"minorEdit": true
}
}'Returned if the content property is created.
| Content type | Value |
|---|---|
| application/json |
POST /wiki/rest/api/content/{id}/property/{key}
Creates a property for an existing piece of content. For more information about content properties, see Content properties in the REST API.
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
string
The ID of the content to add the property to.
string
The key of the content property. Required.
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
}1 2 3 4 5 6 7 8
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/property/{key}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"value": {}
}'Returned if the content property is created.
| Content type | Value |
|---|---|
| application/json |
DELETE /wiki/rest/api/content/{id}/property/{key}
Deletes a content property. For more information about content properties, see Content properties in the REST API.
Permissions required: Permission to update the content.
App scope required: DELETE
string
The ID of the content that the property belongs to.
string
The key of the property.
1 2 3
curl --request DELETE \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/property/{key}' \
--user 'email@example.com:<api_token>'Returned if the content property is deleted.
GET /wiki/rest/api/content/{id}/restriction
Returns the restrictions on a piece of content.
Permissions required: Permission to view the content.
App scope required: READ
string
The ID of the content to be queried for its restrictions.
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.forminteger
The starting index of the users and groups in the returned restrictions.
0, Minimum: 0, Format: int32integer
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.
100, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/restriction' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested restrictions are returned.
| Content type | Value |
|---|---|
| application/json |
PUT /wiki/rest/api/content/{id}/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
string
The ID of the content to update restrictions for.
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. form1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
curl --request PUT \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/restriction' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '[
{
"operation": "administer",
"restrictions": {
"user": [
{
"type": "known",
"username": "<string>",
"userKey": "<string>"
}
],
"group": [
{
"type": "group",
"name": "<string>"
}
]
}
}
]'Returned if the requested restrictions are updated.
| Content type | Value |
|---|---|
| application/json |
POST /wiki/rest/api/content/{id}/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
string
The ID of the content to add restrictions to.
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. form1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/restriction' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '[
{
"operation": "administer",
"restrictions": {
"user": [
{
"type": "known",
"username": "<string>",
"userKey": "<string>"
}
],
"group": [
{
"type": "group",
"name": "<string>"
}
]
}
}
]'Returned if the requested restrictions are added.
| Content type | Value |
|---|---|
| application/json |
DELETE /wiki/rest/api/content/{id}/restriction
Removes all restrictions (read and update) on a piece of content.
Permissions required: Permission to edit the content.
App scope required: DELETE
string
The ID of the content to remove restrictions from.
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. form1 2 3 4
curl --request DELETE \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/restriction' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the restrictions are removed.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/content/{id}/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
string
The ID of the content to be queried for its restrictions.
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. form1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/restriction/byOperation' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested restrictions are returned.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}
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
string
The ID of the content to be queried for its restrictions.
string
The operation type of the restrictions to be returned.
Valid values: read, update
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. forminteger
The starting index of the users and groups in the returned restrictions.
0, Minimum: 0, Format: int32integer
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.
100, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested restrictions are returned.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}/group/{groupName}
Returns whether the specified content restriction applies to a group. For example, if the 'admins' group has permission to read a page with an ID of 123, then the following request will return true:
https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/group/admins
Permissions required: Permission to view the content.
App scope required: READ
string
The ID of the content that the restriction applies to.
string
The operation that the restriction applies to.
Valid values: read, update
string
The name of the group to be queried for whether the content restriction applies to it.
1 2 3
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}/group/{groupName}' \
--user 'email@example.com:<api_token>'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.
PUT /wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}/group/{groupName}
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
string
The ID of the content that the restriction applies to.
string
The operation that the restriction applies to.
Valid values: read, update
string
The name of the group to add to the content restriction.
1 2 3
curl --request PUT \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}/group/{groupName}' \
--user 'email@example.com:<api_token>'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.
DELETE /wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}/group/{groupName}
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
string
The ID of the content that the restriction applies to.
string
The operation that the restriction applies to.
Valid values: read, update
string
The name of the group to remove from the content restriction.
1 2 3
curl --request DELETE \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}/group/{groupName}' \
--user 'email@example.com:<api_token>'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 /wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}/user
Returns whether the specified content restriction applies to a user. For example, if the user 'admin' has permission to read a page with an ID of 123, then the following request will return true:
https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/user?username=admin
One of key, username, or accountId must be specified as a query
parameter to identify the user.
Permissions required: Permission to view the content.
App scope required: READ
string
The ID of the content that the restriction applies to.
string
The operation that is restricted.
string
The key of the user to be queried for whether the content restriction applies to it.
string
The username of the user to be queried for whether the content restriction applies to it.
string
The account ID of the user to be queried for whether the content restriction applies to it.
1 2 3
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}/user' \
--user 'email@example.com:<api_token>'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.
PUT /wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}/user
Adds a user to a content restriction. That is, grant read or update permission to the user for a piece of content.
One of key, username, or accountId must be specified as a query
parameter to identify the user.
Permissions required: Permission to edit the content.
App scope required: WRITE
string
The ID of the content that the restriction applies to.
string
The operation that the restriction applies to.
string
The key of the user to add to the content restriction.
string
The username of the user to add to the content restriction.
string
The account ID of the user to add to the content restriction.
1 2 3
curl --request PUT \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}/user' \
--user 'email@example.com:<api_token>'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.
DELETE /wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}/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
string
The ID of the content that the restriction applies to.
string
The operation that the restriction applies to.
Valid values: read, update
string
The key of the user to remove from the content restriction.
string
The username of the user to remove from the content restriction.
string
The account ID of the user to remove from the content restriction.
1 2 3
curl --request DELETE \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}/user' \
--user 'email@example.com:<api_token>'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 /wiki/rest/api/content/{id}/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
string
The ID of the content to be queried for its versions.
integer
The starting index of the returned versions.
0, Minimum: 0, Format: int32integer
The maximum number of versions to return per page. Note, this may be restricted by fixed system limits.
200, Minimum: 0, Format: int32Array<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.form1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/version' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested versions are returned.
| Content type | Value |
|---|---|
| application/json |
POST /wiki/rest/api/content/{id}/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
string
The ID of the content for which the history will be restored.
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.formstring
Set to 'RESTORE'.
Valid values: RESTORE
1 2 3 4 5 6 7 8 9 10 11 12
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/version' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"operationKey": "RESTORE",
"params": {
"versionNumber": 34,
"message": "<string>"
}
}'Returned if the version is restored.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/content/{id}/version/{versionNumber}
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
string
The ID of the content to be queried for its version.
integer
The number of the version to be retrieved.
int32Array<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.form1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/version/{versionNumber}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the version is returned.
| Content type | Value |
|---|---|
| application/json |
DELETE /wiki/rest/api/content/{id}/version/{versionNumber}
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
string
The ID of the content that the version will be deleted from.
integer
The number of the version to be deleted. The version number starts from 1 up to current version.
int321 2 3
curl --request DELETE \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/version/{versionNumber}' \
--user 'email@example.com:<api_token>'Returned if the version is deleted.
POST /wiki/rest/api/contentbody/convert/{to}
Converts a content body from one format to another format.
Supported conversions:
Permissions required: If request specifies 'contentIdContext', 'View' permission for the space, and permission to view the content.
App scope required: READ
string
The name of the target format for the content body.
Array<string>
A multi-value parameter indicating which properties of the new 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,
like 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.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.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.formstring
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.
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.
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.currentValid values: current, version-at-save
This object is used when creating or updating content.
string
The body of the content in the relevant format.
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
1 2 3 4 5 6 7 8 9
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/contentbody/convert/{to}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"value": "<string>",
"representation": "view"
}'Returned if the content is converted.
| Content type | Value |
|---|---|
| application/json |
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
integer
The starting index of the returned groups.
0, Minimum: 0, Format: int32integer
The maximum number of groups to return per page. Note, this may be restricted by fixed system limits.
200, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/group' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested groups are returned.
| Content type | Value |
|---|---|
| application/json | allOf [GroupArray, object] |
GET /wiki/rest/api/group/{groupName}
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
string
The name of the group. This is the same as the group name shown in the Confluence administration console.
1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/group/{groupName}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested group is returned.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/group/{groupName}/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
string
The name of the group to be queried for its members.
integer
The starting index of the returned users.
0, Minimum: 0, Format: int32integer
The maximum number of users to return per page. Note, this may be restricted by fixed system limits.
200, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/group/{groupName}/member' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'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
integer
The starting index of the returned tasks.
0, Minimum: 0, Format: int32integer
The maximum number of tasks to return per page. Note, this may be restricted by fixed system limits.
100, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/longtask' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested tasks are returned.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/longtask/{id}
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
string
The ID of the task.
1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/longtask/{id}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested task is returned.
| Content type | Value |
|---|---|
| application/json | allOf [LongTaskStatus, object] |
GET /wiki/rest/api/relation/{relationName}/from/{sourceType}/{sourceKey}/to/{targetType}
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
string
The name of the relationship. This method supports relationships created via Create relationship. Note, this method does not support 'favourite' relationships.
string
The source entity type of the relationship.
Valid values: user, content, space
string
The identifier for the source entity:
sourceType is 'user', then specify either 'current' (logged-in
user) or the user key.sourceType is 'content', then specify the content ID.sourceType is 'space', then specify the space key.string
The target entity type of the relationship.
Valid values: user, content, space
string
The status of the source. This parameter is only used when the
sourceType is 'content'.
string
The status of the target. This parameter is only used when the
targetType is 'content'.
integer
The version of the source. This parameter is only used when the
sourceType is 'content' and the sourceStatus is 'historical'.
int32integer
The version of the target. This parameter is only used when the
targetType is 'content' and the targetStatus is 'historical'.
int32Array<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.forminteger
The starting index of the returned relationships.
0, Minimum: 0, Format: int32integer
The maximum number of relationships to return per page. Note, this may be restricted by fixed system limits.
25, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/relation/{relationName}/from/{sourceType}/{sourceKey}/to/{targetType}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested relationships are returned.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/relation/{relationName}/from/{sourceType}/{sourceKey}/to/{targetType}/{targetKey}
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
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.
string
The source entity type of the relationship. This must be 'user', if
the relationName is 'favourite'.
Valid values: user, content, space
string
The identifier for the source entity:
sourceType is 'user', then specify either 'current' (logged-in
user) or the user key.sourceType is 'content', then specify the content ID.sourceType is 'space', then specify the space key.string
The target entity type of the relationship. This must be 'space' or
'content', if the relationName is 'favourite'.
Valid values: user, content, space
string
The identifier for the target entity:
sourceType is 'user', then specify either 'current' (logged-in
user) or the user key.sourceType is 'content', then specify the content ID.sourceType is 'space', then specify the space key.string
The status of the source. This parameter is only used when the
sourceType is 'content'.
string
The status of the target. This parameter is only used when the
targetType is 'content'.
integer
The version of the source. This parameter is only used when the
sourceType is 'content' and the sourceStatus is 'historical'.
int32integer
The version of the target. This parameter is only used when the
targetType is 'content' and the targetStatus is 'historical'.
int32Array<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.form1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/relation/{relationName}/from/{sourceType}/{sourceKey}/to/{targetType}/{targetKey}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the relationship exists.
| Content type | Value |
|---|---|
| application/json |
PUT /wiki/rest/api/relation/{relationName}/from/{sourceType}/{sourceKey}/to/{targetType}/{targetKey}
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
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.
string
The source entity type of the relationship. This must be 'user', if
the relationName is 'favourite'.
Valid values: user, content, space
string
The identifier for the source entity:
sourceType is 'user', then specify either 'current' (logged-in
user) or the user key.sourceType is 'content', then specify the content ID.sourceType is 'space', then specify the space key.string
The target entity type of the relationship. This must be 'space' or
'content', if the relationName is 'favourite'.
Valid values: user, content, space
string
The identifier for the target entity:
sourceType is 'user', then specify either 'current' (logged-in
user) or the user key.sourceType is 'content', then specify the content ID.sourceType is 'space', then specify the space key.string
The status of the source. This parameter is only used when the
sourceType is 'content'.
string
The status of the target. This parameter is only used when the
targetType is 'content'.
integer
The version of the source. This parameter is only used when the
sourceType is 'content' and the sourceStatus is 'historical'.
int32integer
The version of the target. This parameter is only used when the
targetType is 'content' and the targetStatus is 'historical'.
int321 2 3 4
curl --request PUT \
--url 'https://your-domain.atlassian.net/wiki/rest/api/relation/{relationName}/from/{sourceType}/{sourceKey}/to/{targetType}/{targetKey}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the relationship is created.
| Content type | Value |
|---|---|
| application/json |
DELETE /wiki/rest/api/relation/{relationName}/from/{sourceType}/{sourceKey}/to/{targetType}/{targetKey}
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
string
The name of the relationship.
string
The source entity type of the relationship. This must be 'user', if
the relationName is 'favourite'.
Valid values: user, content, space
string
The identifier for the source entity:
sourceType is 'user', then specify either 'current' (logged-in
user) or the user key.sourceType is 'content', then specify the content ID.sourceType is 'space', then specify the space key.string
The target entity type of the relationship. This must be 'space' or
'content', if the relationName is 'favourite'.
Valid values: user, content, space
string
The identifier for the target entity:
sourceType is 'user', then specify either 'current' (logged-in
user) or the user key.sourceType is 'content', then specify the content ID.sourceType is 'space', then specify the space key.string
The status of the source. This parameter is only used when the
sourceType is 'content'.
string
The status of the target. This parameter is only used when the
targetType is 'content'.
integer
The version of the source. This parameter is only used when the
sourceType is 'content' and the sourceStatus is 'historical'.
int32integer
The version of the target. This parameter is only used when the
targetType is 'content' and the targetStatus is 'historical'.
int321 2 3
curl --request DELETE \
--url 'https://your-domain.atlassian.net/wiki/rest/api/relation/{relationName}/from/{sourceType}/{sourceKey}/to/{targetType}/{targetKey}' \
--user 'email@example.com:<api_token>'Returned if the relationship is deleted or the relationship didn't exist.
GET /wiki/rest/api/relation/{relationName}/to/{targetType}/{targetKey}/from/{sourceType}
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
string
The name of the relationship. This method supports relationships created via Create relationship. Note, this method does not support 'favourite' relationships.
string
The source entity type of the relationship.
Valid values: user, content, space
string
The target entity type of the relationship.
Valid values: user, content, space
string
The identifier for the target entity:
sourceType is 'user', then specify either 'current' (logged-in
user) or the user key.sourceType is 'content', then specify the content ID.sourceType is 'space', then specify the space key.string
The status of the source. This parameter is only used when the
sourceType is 'content'.
string
The status of the target. This parameter is only used when the
targetType is 'content'.
integer
The version of the source. This parameter is only used when the
sourceType is 'content' and the sourceStatus is 'historical'.
int32integer
The version of the target. This parameter is only used when the
targetType is 'content' and the targetStatus is 'historical'.
int32Array<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.forminteger
The starting index of the returned relationships.
0, Minimum: 0, Format: int32integer
The maximum number of relationships to return per page. Note, this may be restricted by fixed system limits.
25, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/relation/{relationName}/to/{targetType}/{targetKey}/from/{sourceType}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested relationships are returned.
| Content type | Value |
|---|---|
| application/json |
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
string
The CQL query to be used for the search. See Advanced Searching using CQL for instructions on how to build a CQL query.
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}
integer
The starting index of the returned content.
0, Minimum: 0, Format: int32integer
The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits.
25, Minimum: 0, Format: int32boolean
Include content from archived spaces in the results.
false1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/search' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested results are returned.
| Content type | Value |
|---|---|
| application/json |
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
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.
1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/settings/lookandfeel' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested look and feel settings are returned.
| Content type | Value |
|---|---|
| application/json |
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
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.
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
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/settings/lookandfeel/custom' \
--user 'email@example.com:<api_token>' \
--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>"
}
}'Returned if the look and feel settings are updated.
| Content type | Value |
|---|---|
| application/json | allOf [LookAndFeel, object] |
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
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.
1 2 3
curl --request DELETE \
--url 'https://your-domain.atlassian.net/wiki/rest/api/settings/lookandfeel/custom' \
--user 'email@example.com:<api_token>'Returned if the look and feel settings have been reset.
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
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.
The object for choosing the look and feel settings for the site or a space.
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
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 163 164
curl --request PUT \
--url 'https://your-domain.atlassian.net/wiki/rest/api/settings/lookandfeel/selected' \
--user 'email@example.com:<api_token>' \
--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>"
}
}
}'Returned if the look and feel settings were set.
| Content type | Value |
|---|---|
| application/json |
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
1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/settings/systemInfo' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the system information for the Confluence Cloud tenant is returned.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/settings/theme
Returns all themes, not including the default theme.
Permissions required: None
App scope required: READ
integer
The starting index of the returned themes.
0, Minimum: 0, Format: int32integer
The maximum number of themes to return per page. Note, this may be restricted by fixed system limits.
100, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/settings/theme' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested themes are returned.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/settings/theme/selected
Returns the globally assigned theme.
Permissions required: None
App scope required: READ
1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/settings/theme/selected' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the global theme is returned.
| Content type | Value |
|---|---|
| application/json | allOf [ThemeNoLinks, object] |
GET /wiki/rest/api/settings/theme/{themeKey}
Returns a theme. This includes information about the theme name, description, and icon.
Permissions required: None
App scope required: READ
string
The key of the theme to be returned.
1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/settings/theme/{themeKey}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested theme is returned.
| Content type | Value |
|---|---|
| application/json | allOf [ThemeNoLinks, object] |
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
Array<string>
The key of the space to be returned. To return multiple spaces, specify this parameter multiple times with different values.
string
Filter the results to spaces based on their type.
Valid values: global, personal
string
Filter the results to spaces based on their status.
Valid values: current, archived
Array<string>
Filter the results to spaces based on their label.
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.
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.
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, like the color scheme.permissions returns the permissions for the space.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.forminteger
The starting index of the returned spaces.
0, Minimum: 0, Format: int32integer
The maximum number of spaces to return per page. Note, this may be restricted by fixed system limits.
25, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/space' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested spaces are returned.
| Content type | Value |
|---|---|
| application/json |
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
This is the request object used when creating a new space.
string
The key for the new space. Format: See Space keys.
string
The name of the new space.
200The description of the new/updated space. Note, only the 'plain' representation can be used for the description when creating or updating a space.
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.
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
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/space' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"key": "<string>",
"name": "<string>",
"description": {
"plain": {
"value": "<string>",
"representation": "<string>"
}
},
"permissions": [
{
"subjects": {
"user": {
"results": [
{
"type": "known",
"username": "<string>",
"userKey": "<string>",
"accountId": "<string>",
"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
}
]
}'Returned if the space is created.
| Content type | Value |
|---|---|
| application/json |
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
This is the request object used when creating a new private space.
string
The key for the new space. Format: See Space keys.
string
The name of the new space.
200The description of the new/updated space. Note, only the 'plain' representation can be used for the description when creating or updating a space.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/space/_private' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"key": "<string>",
"name": "<string>",
"description": {
"plain": {
"value": "<string>",
"representation": "<string>"
}
}
}'Returned if the space is created.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/space/{spaceKey}
Returns a space. This includes information like the name, description, and permissions, but not the content in the space.
Permissions required: 'View' permission for the space.
App scope required: READ
string
The key of the space to be returned.
Array<string>
A multi-value parameter indicating which properties of the space 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, like the color scheme.permissions returns the permissions for the space.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.form1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested space is returned.
| Content type | Value |
|---|---|
| application/json |
PUT /wiki/rest/api/space/{spaceKey}
Updates the name, description, or homepage of a space.
Permissions required: 'Admin' permission for the space.
App scope required: WRITE
string
The key of the space to update.
string
The name of the space.
200The description of the new/updated space. Note, only the 'plain' representation can be used for the description when creating or updating a space.
The page to set as the homepage of the space.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
curl --request PUT \
--url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"description": {
"plain": {
"value": "<string>",
"representation": "<string>"
}
},
"homepage": {
"id": "<string>"
}
}'Returned if the space is updated.
| Content type | Value |
|---|---|
| application/json |
DELETE /wiki/rest/api/space/{spaceKey}
Deletes a space. Note, the space will be deleted in a long running task. Therefore, the space may not be deleted yet when this method has returned. Clients should poll the status link that is returned in the response until the task completes.
Permissions required: 'Admin' permission for the space.
App scope required: DELETE
string
The key of the space to delete.
1 2 3
curl --request DELETE \
--url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}' \
--user 'email@example.com:<api_token>'Returns a pointer to the status of the space deletion task.
A schema has not been defined for this response code.
GET /wiki/rest/api/space/{spaceKey}/content
Returns all content in a space. The returned content is grouped by type (pages then blogposts), then ordered by content ID in ascending order.
Permissions required: 'View' permission for the space. Note, the returned list will only contain content that the current user has permission to view.
App scope required: READ
string
The key of the space to be queried for its content.
string
Filter the results to content at the root level of the space or all content.
allValid values: all, root
Array<string>
A multi-value parameter indicating which properties of the content to expand, where:
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, like 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.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.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.forminteger
The starting index of the returned content.
0, Minimum: 0, Format: int32integer
The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits.
25, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}/content' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested content is returned.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/space/{spaceKey}/content/{type}
Returns all content of a given type, in a space. The returned content is ordered by content ID in ascending order.
Permissions required: 'View' permission for the space. Note, the returned list will only contain content that the current user has permission to view.
App scope required: READ
string
The key of the space to be queried for its content.
string
The type of content to return.
Valid values: page, blogpost
string
Filter the results to content at the root level of the space or all content.
allValid values: all, root
Array<string>
A multi-value parameter indicating which properties of the content to expand, where:
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, like 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.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.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.forminteger
The starting index of the returned content.
0, Minimum: 0, Format: int32integer
The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits.
25, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}/content/{type}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested content is returned.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/space/{spaceKey}/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
string
The key of the space to be queried for its properties.
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.forminteger
The starting index of the returned objects.
0, Minimum: 0, Format: int32integer
The maximum number of properties to return per page. Note, this may be restricted by fixed system limits.
10, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}/property' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested space properties are returned.
| Content type | Value |
|---|---|
| application/json |
POST /wiki/rest/api/space/{spaceKey}/property
Creates a new space property.
Permissions required: ‘Admin’ permission for the space.
App scope required: WRITE
string
The key of the space that the property will be created in.
string
The key of the new property.
255The 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
}1 2 3 4 5 6 7 8 9
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}/property' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"key": "<string>",
"value": {}
}'Returned if the space property is created.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/space/{spaceKey}/property/{key}
Returns a space property.
Permissions required: ‘View’ permission for the space.
App scope required: READ
string
The key of the space that the property is in.
string
The key of the space property.
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.form1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}/property/{key}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested space property is returned.
| Content type | Value |
|---|---|
| application/json |
PUT /wiki/rest/api/space/{spaceKey}/property/{key}
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
string
The key of the space that the property is in.
string
The key of the property to be updated.
1 2 3 4 5 6 7 8 9 10 11 12
curl --request PUT \
--url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}/property/{key}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"value": {},
"version": {
"number": 197,
"minorEdit": true
}
}'Returned if the space property is updated.
| Content type | Value |
|---|---|
| application/json |
POST /wiki/rest/api/space/{spaceKey}/property/{key}
Creates a new space property. This is the same as POST
/space/{spaceKey}/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
string
The key of the space that the property will be created in.
string
The key of the property to be created.
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
}1 2 3 4 5 6 7 8
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}/property/{key}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"value": {}
}'Returned if the space property is created.
| Content type | Value |
|---|---|
| application/json |
DELETE /wiki/rest/api/space/{spaceKey}/property/{key}
Deletes a space property.
Permissions required: ‘Admin’ permission for the space.
App scope required: DELETE
string
The key of the space that the property is in.
string
The key of the property to be deleted.
1 2 3
curl --request DELETE \
--url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}/property/{key}' \
--user 'email@example.com:<api_token>'Returned if the space property is deleted.
GET /wiki/rest/api/space/{spaceKey}/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
string
The key of the space to be queried for its settings.
1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}/settings' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the space settings are returned.
| Content type | Value |
|---|---|
| application/json |
PUT /wiki/rest/api/space/{spaceKey}/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
string
The key of the space whose settings will be updated.
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.
1 2 3 4 5 6 7 8
curl --request PUT \
--url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}/settings' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"routeOverrideEnabled": true
}'Returned if space settings are updated.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/space/{spaceKey}/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
string
The key of the space to be queried for its theme.
1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}/theme' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested theme is returned.
| Content type | Value |
|---|---|
| application/json | allOf [ThemeNoLinks, object] |
PUT /wiki/rest/api/space/{spaceKey}/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
string
The key of the space to set the theme for.
string
The key of the theme to be set as the space theme.
1 2 3 4 5 6 7 8
curl --request PUT \
--url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}/theme' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"themeKey": "<string>"
}'Returned if the theme was set for the space.
| Content type | Value |
|---|---|
| application/json | allOf [ThemeNoLinks, object] |
DELETE /wiki/rest/api/space/{spaceKey}/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
string
The key of the space to reset the theme for.
1 2 3
curl --request DELETE \
--url 'https://your-domain.atlassian.net/wiki/rest/api/space/{spaceKey}/theme' \
--user 'email@example.com:<api_token>'Returned if the theme was reset for the space.
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
This object is used to update content templates.
string
The ID of the template being updated.
string
The name of the template. Set to the current name if this field is
not being updated.
string
The type of the template. Set to page.
Valid values: page
This object is used when creating or updating content.
string
A description of the template.
100Array<Label>
Labels for the template.
The key for the space of the template. Required if the template is a
space template. Set this to the current space.key.
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
curl --request PUT \
--url 'https://your-domain.atlassian.net/wiki/rest/api/template' \
--user 'email@example.com:<api_token>' \
--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>"
}
}'Returned if the template is updated.
| Content type | Value |
|---|---|
| application/json |
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
This object is used to create content templates.
string
The name of the new template.
string
The type of the new template. Set to page.
This object is used when creating or updating content.
string
A description of the new template.
255Array<Label>
Labels for the new template.
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.
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
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/template' \
--user 'email@example.com:<api_token>' \
--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>"
}
}'Returned if the template is created.
| Content type | Value |
|---|---|
| application/json |
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
string
The key of the space to be queried for templates. If the spaceKey
is not specified, global blueprint templates will be returned.
integer
The starting index of the returned templates.
0, Minimum: 0, Format: int32integer
The maximum number of templates to return per page. Note, this may be restricted by fixed system limits.
25, Minimum: 0, Format: int32Array<string>
A multi-value parameter indicating which properties of the template to expand.
body returns the content of the template in storage format.form1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/template/blueprint' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested templates are returned.
| Content type | Value |
|---|---|
| application/json |
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
string
The key of the space to be queried for templates. If the spaceKey
is not specified, global templates will be returned.
integer
The starting index of the returned templates.
0, Minimum: 0, Format: int32integer
The maximum number of templates to return per page. Note, this may be restricted by fixed system limits.
25, Minimum: 0, Format: int32Array<string>
A multi-value parameter indicating which properties of the template to expand.
body returns the content of the template in storage format.form1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/template/page' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested templates are returned.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/template/{contentTemplateId}
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
string
The ID of the content template to be returned.
1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/template/{contentTemplateId}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested template is returned.
| Content type | Value |
|---|---|
| application/json |
DELETE /wiki/rest/api/template/{contentTemplateId}
Deletes a template. This results in different actions depending on the type of 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
string
The ID of the template to be deleted.
1 2 3
curl --request DELETE \
--url 'https://your-domain.atlassian.net/wiki/rest/api/template/{contentTemplateId}' \
--user 'email@example.com:<api_token>'Returned if the template has been successfully been deleted.
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
string
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.
string
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.
string
The accountId of the user to be returned. Required, unless the
username or key is specified. The accountId uniquely identifies
a user across all Atlassian products.
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'.details.business returns the 'Company' details in the user's
profile, like the 'Position' and 'Department'.form1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/user' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested user is returned.
| Content type | Value |
|---|---|
| application/json |
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
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.form1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/user/anonymous' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the anonymous user representation is returned.
| Content type | Value |
|---|---|
| application/json |
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
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'.details.business returns the 'Company' details in the user's
profile, like the 'Position' and 'Department'.form1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/user/current' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the current user is returned.
| Content type | Value |
|---|---|
| application/json |
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
string
The userKey of the user to be queried. Required, unless the
username or accountId is specified. The key uniquely identifies
a user in a Confluence instance and does not change.
string
The username of the user to be queried. 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.
string
The accountId of the user to be queried. Required, unless the
username or key is specified. The accountId uniquely identifies
a user across all Atlassian products.
integer
The starting index of the returned groups.
0, Minimum: 0, Format: int32integer
The maximum number of groups to return per page. Note, this may be restricted by fixed system limits.
200, Minimum: 0, Format: int321 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/user/memberof' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested groups are returned.
| Content type | Value |
|---|---|
| application/json |
GET /wiki/rest/api/user/watch/content/{contentId}
Returns whether a user is watching a piece of content. Choose the user by doing one of the following:
username, key, or accountId
to identify the user. The user making the request must be a Confluence administrator.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
string
The ID of the content to be queried for whether the specified user is watching it.
string
The key of the user to be queried for whether they are watching the
content. Only one of username, key, accountId can be used to
identify the user in the request.
string
The username of the user to be queried for whether they are watching
the content. Only one of username, key, accountId can be used to
identify the user in the request.
string
The accountId of the user to be queried for whether they are watching
the content. Only one of username, key, accountId can be used to
identify the user in the request.
1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/user/watch/content/{contentId}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested watch status is returned.
| Content type | Value |
|---|---|
| application/json |
POST /wiki/rest/api/user/watch/content/{contentId}
Adds a user as a watcher to a piece of content. Choose the user by doing one of the following:
username, key, or accountId
to identify the user. The user making the request must be a Confluence administrator.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).
Apps cannot access this REST resource.
string
The ID of the content to add the watcher to.
string
The key of the user that will be added as a watcher. Only one of
username, key, accountId can be used to identify the user in
the request.
string
The username of the user that will be added as a watcher. Only one
of username, key, accountId can be used to identify the user in
the request.
string
The accountId of the user that will be added as a watcher. Only one
of username, key, accountId can be used to identify the user in
the request.
1 2 3
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/user/watch/content/{contentId}' \
--user 'email@example.com:<api_token>'Returned if the watcher was successfully created. No response body is returned.
DELETE /wiki/rest/api/user/watch/content/{contentId}
Removes a user as a watcher from a piece of content. Choose the user by doing one of the following:
username, key, or accountId
to identify the user. The user making the request must be a Confluence administrator.Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).
Apps cannot access this REST resource.
string
The ID of the content to remove the watcher from.
string
The key of the user that will be removed as a watcher. Only one of
username, key, accountId can be used to identify the user in
the request.
string
The username of the user that will be removed as a watcher. Only one of
username, key, accountId can be used to identify the user in
the request.
string
The accountId of the user that will be removed as a watcher. Only one of
username, key, accountId can be used to identify the user in
the request.
1 2 3
curl --request DELETE \
--url 'https://your-domain.atlassian.net/wiki/rest/api/user/watch/content/{contentId}' \
--user 'email@example.com:<api_token>'Returned if the watcher was successfully deleted. No response body is returned.
GET /wiki/rest/api/user/watch/label/{labelName}
Returns whether a user is watching a label. Choose the user by doing one of the following:
username, key, or accountId
to identify the user. The user making the request must be a Confluence administrator.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
string
The name of the label to be queried for whether the specified user is watching it.
string
The key of the user to be queried for whether they are watching the
label. Only one of username, key, accountId can be used to
identify the user in the request.
string
The username of the user to be queried for whether they are watching
the label. Only one of username, key, accountId can be used to
identify the user in the request.
string
The accountId of the user to be queried for whether they are watching
the label. Only one of username, key, accountId can be used to
identify the user in the request.
1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/user/watch/label/{labelName}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested watch status is returned.
| Content type | Value |
|---|---|
| application/json |
POST /wiki/rest/api/user/watch/label/{labelName}
Adds a user as a watcher to a label. Choose the user by doing one of the following:
username, key, or accountId
to identify the user. The user making the request must be a Confluence administrator.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).
Apps cannot access this REST resource.
string
The name of the label to add the watcher to.
string
The key of the user that will be added as a watcher. Only one of
username, key, accountId can be used to identify the user in
the request.
string
The username of the user that will be added as a watcher. Only one
of username, key, accountId can be used to identify the user in
the request.
string
The accountId of the user that will be added as a watcher. Only one
of username, key, accountId can be used to identify the user in
the request.
1 2 3
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/user/watch/label/{labelName}' \
--user 'email@example.com:<api_token>'Returned if the watcher was successfully created. No response body is returned.
DELETE /wiki/rest/api/user/watch/label/{labelName}
Removes a user as a watcher from a label. Choose the user by doing one of the following:
username, key, or accountId
to identify the user. The user making the request must be a Confluence administrator.Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).
Apps cannot access this REST resource.
string
The name of the label to remove the watcher from.
string
The key of the user that will be removed as a watcher. Only one of
username, key, accountId can be used to identify the user in
the request.
string
The username of the user that will be removed as a watcher. Only one of
username, key, accountId can be used to identify the user in
the request.
string
The accountId of the user that will be removed as a watcher. Only one of
username, key, accountId can be used to identify the user in
the request.
1 2 3
curl --request DELETE \
--url 'https://your-domain.atlassian.net/wiki/rest/api/user/watch/label/{labelName}' \
--user 'email@example.com:<api_token>'Returned if the watcher was successfully deleted. No response body is returned.
GET /wiki/rest/api/user/watch/space/{spaceKey}
Returns whether a user is watching a space. Choose the user by doing one of the following:
username, key, or accountId
to identify the user. The user making the request must be a Confluence administrator.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
string
The key of the space to be queried for whether the specified user is watching it.
string
The key of the user to be queried for whether they are watching the
space. Only one of username, key, accountId can be used to
identify the user in the request.
string
The username of the user to be queried for whether they are watching
the space. Only one of username, key, accountId can be used to
identify the user in the request.
string
The accountId of the user to be queried for whether they are watching
the space. Only one of username, key, accountId can be used to
identify the user in the request.
1 2 3 4
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/user/watch/space/{spaceKey}' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'Returned if the requested watch status is returned.
| Content type | Value |
|---|---|
| application/json |
POST /wiki/rest/api/user/watch/space/{spaceKey}
Adds a user as a watcher to a space. Choose the user by doing one of the following:
username, key, or accountId
to identify the user. The user making the request must be a Confluence administrator.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).
Apps cannot access this REST resource.
string
The key of the space to add the watcher to.
string
The key of the user that will be added as a watcher. Only one of
username, key, accountId can be used to identify the user in
the request.
string
The username of the user that will be added as a watcher. Only one
of username, key, accountId can be used to identify the user in
the request.
string
The accountId of the user that will be added as a watcher. Only one
of username, key, accountId can be used to identify the user in
the request.
1 2 3
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/user/watch/space/{spaceKey}' \
--user 'email@example.com:<api_token>'Returned if the watcher was successfully created. No response body is returned.
DELETE /wiki/rest/api/user/watch/space/{spaceKey}
Removes a user as a watcher from a space. Choose the user by doing one of the following:
username, key, or accountId
to identify the user. The user making the request must be a Confluence administrator.Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).
Apps cannot access this REST resource.
string
The key of the space to remove the watcher from.
string
The key of the user that will be removed as a watcher. Only one of
username, key, accountId can be used to identify the user in
the request.
string
The username of the user that will be removed as a watcher. Only one of
username, key, accountId can be used to identify the user in
the request.
string
The accountId of the user that will be removed as a watcher. Only one of
username, key, accountId can be used to identify the user in
the request.
1 2 3
curl --request DELETE \
--url 'https://your-domain.atlassian.net/wiki/rest/api/user/watch/space/{spaceKey}' \
--user 'email@example.com:<api_token>'Returned if the watcher was successfully deleted. No response body is returned.