• 13
    • 1
    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      Please provide REST API to update confluence Space Category.
      Currently there is no REST API to update Space Category.

      We have REST API to update Labels and if we update the Label using a content ID of a page it actually updates the Category as a Label, but actually it does not update the table in confluence database.

      Post data to update Category Label-
      https://<confluence-url>/rest/api/content/19540293/label

      [

      { "prefix": "team", "name": "test" }

      ]

      This updates category but when you check the space in the category it does not list the space here-
      http://<confluence-url>/spacedirectory/view.action?selectedSpaceCategory=test

       

      workaround-

      use CLI plugin command to update the category-

      ./confluence.bat --action addLabels --space  "<Space name>" --labels "team:<Category name>"

        1. Postman.jpg
          Postman.jpg
          40 kB
        2. Space Category.jpg
          Space Category.jpg
          32 kB

            [CONFSERVER-54743] REST API to update Confluence Space Category

            Updated to 9.3.1 and it works!

            Florian Obradovic added a comment - Updated to 9.3.1 and it works!

            I found this in the docs but it doesn't work for me on 9.2.0 

            https://developer.atlassian.com/server/confluence/rest/v1000/api-group-category/#api-group-category

            curl --request POST \ --url 'http://{baseurl}/confluence/rest/api/space/{spaceKey}/category/{labelName}'

            Florian Obradovic added a comment - I found this in the docs but it doesn't work for me on 9.2.0  https://developer.atlassian.com/server/confluence/rest/v1000/api-group-category/#api-group-category curl --request POST \ --url 'http: //{baseurl}/confluence/ rest /api/space/{spaceKey}/category/{labelName}'

            I've created a support request, and the agent shared this query, which is working fine on my end:

            curl -X POST -u admin:password --header "X-Atlassian-Token: no-check" --data "newTeamLabel=<the category name>&Add=Add&key=<target space key>&labelType=team" <confluence-url>/spaces/addteamlabeltospace.action 

            Maxime Lemanissier added a comment - I've created a support request, and the agent shared this query, which is working fine on my end: curl -X POST -u admin:password --header "X-Atlassian-Token: no-check" --data "newTeamLabel=<the category name>&Add=Add&key=<target space key>&labelType=team" <confluence-url>/spaces/addteamlabeltospace.action

            Always surprised to find in Atlassian products so many features that cannot be done through API. This is quite standard now to support the same actions from API than from webUI (and in this case your frontend can use your API).
            This is a basic feature, to properly classify our Confluence spaces. Please implement.

            Maxime Lemanissier added a comment - Always surprised to find in Atlassian products so many features that cannot be done through API. This is quite standard now to support the same actions from API than from webUI (and in this case your frontend can use your API). This is a basic feature, to properly classify our Confluence spaces. Please implement.

            ANDREI IONUT HRISCA added a comment - - edited

            Hello all, its weird because you can GET those labels from any space.

            https://.../rest/api/space/SPACEKEY?expand=metadata.labels

            But you can't PUT or POST labels for space. Only for content...

             

            No idea why they implemented this only for content.

            ANDREI IONUT HRISCA added a comment - - edited Hello all, its weird because you can GET those labels from any space. https://.../rest/api/space/SPACEKEY?expand=metadata.labels But you can't PUT or POST labels for space. Only for content...   No idea why they implemented this only for content.

            This would be useful to us as well.  We create our spaces via API so it would be helpful to set the category at the same time.

            Kristopher Drew Perez added a comment - This would be useful to us as well.  We create our spaces via API so it would be helpful to set the category at the same time.

              Unassigned Unassigned
              e4010cfae695 amit raj
              Votes:
              44 Vote for this issue
              Watchers:
              32 Start watching this issue

                Created:
                Updated: