The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get all space categories in Confluence via API

Roy Lu
July 22, 2019

Hi,

Is there a way to list all the space category labels in a Confluence instance using Confluence API?

Best,

Roy

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Ron Elazar
Contributor
April 26, 2021

import com.atlassian.confluence.labels.LabelManager
import com.atlassian.confluence.pages.PageManager
import com.atlassian.sal.api.component.ComponentLocator

def labelManager = ComponentLocator.getComponent(LabelManager)
def pageManager = ComponentLocator.getComponent(PageManager)
def spaceKey = pageManager.getPage(1234).getSpaceKey()

def result = labelManager.getLabelsByDetail("","team",spaceKey,"") 
TAGS
AUG Leaders

Atlassian Community Events