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,"")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.