Skip to content
atlassian-dc-mcp
Esc
↑↓navigate↵open⌘Jpreview

Add Labels

Adds a list of labels to the specified content. The body is the json representation of the list.

POST/rest/api/content/{id}/label
Path parameters
idstringrequired

the id of the content to get the labels for

Request body
application/json

a single label object or a list of labels to add

prefixstring
namestring
idstring
labelstring
Responses
200

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

resultsLabel[]
Show properties
Array of Label
prefixstring
namestring
idstring
labelstring
startnumber
limitnumber
sizenumber
_linksobject
Show properties
basestring
selfstring
contextstring
nextstring
prevstring
404

Returned if there is no content with the given id, or if the calling user does not have permission to view the content.

statusCodeinteger<int32>
dataValidationResult
Show properties
authorizedboolean
validboolean
errorsobject
successfulboolean
allowedInReadOnlyModeboolean
messagestring
reasonstring
Try it
Server
Parameters
Bodyapplication/json
Request
curl -X POST 'http://example.com:7990/confluence/rest/api/content/string/label' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "prefix": "my",
  "name": "label",
  "id": "1234",
  "label": "string"
}'
Response
{
  "results": [
    {
      "prefix": "my",
      "name": "label",
      "id": "1234",
      "label": "string"
    }
  ],
  "start": 25,
  "limit": 25,
  "size": 25,
  "_links": {
    "base": "http://localhost:8085/rest/api",
    "self": "http://localhost:8085/rest/api",
    "context": "http://localhost:8085/rest/api",
    "next": "http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50",
    "prev": "http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"
  }
}

Was this page helpful?