Returns the list of labels on a piece of Content. Example request URI(s):
http://example.com/confluence/rest/api/content/1234/label
http://example.com/confluence/rest/api/content/1234/label?prefix=global&start=0&limit=200
string
Requiredstring
string
string
returns a JSON representation of the existing labels on the content with the given id
1
2
3
curl --request GET \
--url 'http://{baseurl}/confluence/rest/api/content/{id}/label' \
--header 'Accept: application/json'
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
{
"results": [
{
"prefix": "my",
"name": "label",
"id": "1234",
"label": "<string>",
"_links": {
"base": "<string>",
"context": "<string>",
"self": "<string>"
},
"_expandable": {
"attribute": "<string>"
}
}
],
"totalCount": 2154,
"start": 25,
"limit": 25,
"size": 25,
"_links": {
"base": "http://localhost:8085/confluence",
"context": "confluence",
"self": "http://localhost:8085/rest/api/latest/..?limit=25&start=25",
"next": "http://localhost:8085/rest/api/latest/..?limit=25&start=50",
"prev": "http://localhost:8085/rest/api/latest/..?limit=25&start=0"
}
}
Adds a list of labels to the specified content. The body is the json representation of the list.
string
Requireda single label object or a list of labels to add
string
string
string
string
object
object
returns a JSON representation of the existing and added labels on the content with the given id, or a 404 NOT FOUND if there is no content with the given id or if the user is not permitted. An empty list will be returned if there are no labels on the given content
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
curl --request POST \
--url 'http://{baseurl}/confluence/rest/api/content/{id}/label' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"prefix": "my",
"name": "label",
"id": "1234",
"label": "<string>",
"_links": {
"base": "<string>",
"context": "<string>",
"self": "<string>"
},
"_expandable": {
"attribute": "<string>"
}
}'
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
{
"results": [
{
"prefix": "my",
"name": "label",
"id": "1234",
"label": "<string>",
"_links": {
"base": "<string>",
"context": "<string>",
"self": "<string>"
},
"_expandable": {
"attribute": "<string>"
}
}
],
"totalCount": 2154,
"start": 25,
"limit": 25,
"size": 25,
"_links": {
"base": "http://localhost:8085/confluence",
"context": "confluence",
"self": "http://localhost:8085/rest/api/latest/..?limit=25&start=25",
"next": "http://localhost:8085/rest/api/latest/..?limit=25&start=50",
"prev": "http://localhost:8085/rest/api/latest/..?limit=25&start=0"
}
}
Deletes a labels to the specified content.
string
Requiredstring
returns no response on successful delete
1
2
curl --request DELETE \
--url 'http://{baseurl}/confluence/rest/api/content/{id}/label'
Deletes a labels to the specified content. The body is the json representation of the list. When calling this method through REST the label parameter doesn't accept /
characters in label names, because of security constraints. For this case please use the query parameter version of this method (/content/{id}/label?name={label}
)
string
Requiredstring
Requiredreturns no response on successful delete
1
2
curl --request DELETE \
--url 'http://{baseurl}/confluence/rest/api/content/{id}/label/{label}'
Rate this page: