Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-76866

Cannot add/update page labels with Confluence cloud V2 API

    XMLWordPrintable

Details

    • 1
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    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

      1. 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}

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              2ed764d1efd7 Nashid Farhad
              Votes:
              5 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: