Details
-
Suggestion
-
Resolution: Unresolved
-
1
-
Description
Issue Summary
With Confluence cloud V1 API, we can add/update page/content lables with the [content update API endpoint|]. Like this.
curl --location --request PUT 'https://sitename.atlassian.net/wiki/rest/api/content/{contentId}' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "version": { "number": <version_number>, "message": "<comment>" }, "title": "<page_title>", "type": "page", "status": "current", "body": { "storage": { "value": "<page_content>", "representation": "storage" } }, "metadata": { "labels": [ { "prefix": "global", "name": "label_here", "label": "label_here" }] } }'
However, the above API endpoint is getting deprecated and there's no compatible API endpoint in Confluence Cloud V2 APIs to perform the same operation.
V2 API Label group only contains GET methods. Update page, blogpost API endpoints doesn’t work with metadata.
Steps to Reproduce
- Attempt to add/update Confluence page labels using V2 api
Expected Results
THere should be a V2 endpoint to allow this.
Actual Results
There no V2 endpoint that allows to add/update page labels.
Workaround
We have the following non-deprecated V1 REST endpoints to manage content labels
Add labels to content
POST /wiki/rest/api/content/{id}/label
And, Remove labels from content
DELETE /wiki/rest/api/content/{id}/label/{label}