REST API - Space Categories

General informations


Get all categories

Available for all confluence users

Method type: GET

URL: {CONFLUENCE_URL}/rest/extender/1.0/category/getAllCategories

Response format - JSON

Example response:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 { "categories": [ { "name": "category1", "id": 1146882, "niceName": "Category1" }, { "name": "category2", "id": 1146883, "niceName": "Category2" }, { "name": "test", "id": 1146881, "niceName": "Test" } ] }

 

Get space categories

Available only for Confluence Administrators and Space Administrators

Method type: GET

URL: {CONFLUENCE_URL}/rest/extender/1.0/category/getSpaceCategories/{SPACE_KEY}

  • where {SPACE_KEY} is the space key

Response format - JSON

Example response:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 { "name": "Test space", "categories": [ { "name": "category1", "id": 1146882, "niceName": "Category1" }, { "name": "category2", "id": 1146883, "niceName": "Category2" }, { "name": "test", "id": 1146881, "niceName": "Test" } ], "key": "TESTSPACE" }

 

Add category to space

Available only for Confluence Administrators and Space Administrators

Method type: PUT

URL: {CONFLUENCE_URL}/rest/extender/1.0/category/addSpaceCategory/space/{SPACE_KEY}/category/{CATEGORY_NAME}

  • where {SPACE_KEY} is the space key

  • where {CATEGORY_NAME} is category name to add

Response format - JSON


 

Rename category

Available only for Confluence Administrators

Method type: PUT

URL: {CONFLUENCE_URL}/rest/extender/1.0/category/renameCategory/category/{OLD_CATEGORY_NAME}/renameTo/{NEW_CATEGORY_NAME}

  • where {OLD_CATEGORY_NAME} is existing category name

  • where {NEW_CATEGORY_NAME} is new category name after change

Response format - JSON


 

Remove category from space

This is internal Confluence API and its use is not dependent on Extender for Confluence

Method type: DELETE

URL: {CONFLUENCE_URL}/rest/ui/1.0/space/{SPACE_KEY}/label/{LABEL_ID}

  • where {SPACE_KEY} is the space key

  • where {LABEL_ID} is label id to delete form space