Rate this page:
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
read:confluence-content.summary
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: int32
integer
The maximum number of labels to return per page. Note, this may be restricted by fixed system limits.
200
, Minimum: 0
, Format: int32
1 2 3
curl --request GET \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/label' \
--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
write:confluence-content
string
The ID of the content that will have labels added to it.
Content type | Value |
---|---|
application/json | Array<LabelCreate> |
1 2 3 4 5 6 7 8 9 10
curl --request POST \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/label' \
--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
write:confluence-content
string
The ID of the content that the label will be removed from.
string
The name of the label to be removed.
1 2
curl --request DELETE \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/label?name={name}'
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
write:confluence-content
string
The ID of the content that the label will be removed from.
string
The name of the label to be removed.
1 2
curl --request DELETE \
--url 'https://your-domain.atlassian.net/wiki/rest/api/content/{id}/label/{label}'
Returned if the label is removed. The response body will be empty.
Rate this page: