Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Although the REST API is currently in StatuscolourGreytitleprivate, you can already use the API to bulk load managed labels or migrate your standard labels to managed labels.

For a general introduction to JIRAJira's REST API and to find out about different Authentication Methods please read through the Official Atlassian Documentation for JIRAJira's REST APIs.

We recommend you use the Atlassian REST API Browser to explore the API. (info) Make sure you uncheck the option "Show only public APIs" and search for "labelit" .




Image Modified




Getting Labels 

Warning

Note: for performance reasons alle results are limited to 100 labels. Use the offset method to get results higher than 100.


URL: <rest-base-url>/labelit/1.0/items

HTTP-METHOD: GET

For specific custom field:

Add parameter "customFieldId" to the URL: <rest-base-url>/labelit/1.0/items?customFieldId=10200

For specific project:

Add parameter "projectId" to the URL: <rest-base-url>/labelit/1.0/items?projectId=1000

Combined:

<rest-base-url>/labelit/1.0/items?projectId=1000&customFieldId=10200




Getting Labels with offset

URL: <rest-base-url>/labelit/1.0/items/offset

HTTP-METHOD: GET

The supported parameters are the same like for getting labels without offset. Additionally the offset can be set. For example: 

<rest-base-url>/labelit/1.0/items?projectId=1000&customFieldId=10200&offset=100




Creating Labels 

URL: <rest-base-url>/labelit/1.0/items

HTTP-METHOD: POST

HTTP-BODY / Request payload: JSON 

Code Block
languagejs
titleCreate new global label for customfield with id 10200
{ "name":"mylabel1", "customFieldId":"customfield_10200"}

(info) To find your project id in the user interface follow this knowledge base article from Atlassian.

Code Block
languagejs
titleChange/Rename global label id 22 to "newLabelName" for customfield with id 10200
{ "id":22, "name":"mylabel2", "customFieldId":"customfield_10200"}





Deleteting Labels 

URL: <rest-base-url>/labelit/1.0/items/{label-id}

HTTP-METHOD: DELETE