It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

get SLA information via jira rest API

i want to develop a java application and i want to retrieve the SLA informations via Jira REST API or jira rest java client or jql or any way,can i do this?

i try to search the entire http://jiraServer/jira/rest/api/2/search informations of an issue and i get this information:


but i don't understand it.

can it help me? and what it is mean?

can you me?

4 answers

0 votes
Timothy Community Leader May 27, 2014

Have you checked whether the Service Desk add on exposes its REST API?

how can i do this?

Try this way,


CustomField cf = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_xxxx”);
String v = cf.getCustomFieldType().getStringFromSingularObject(cf.getValue(issue))

you can get sla information by java

SlaInformationService slaInformationService = ComponentAccessor.getOSGIComponentInstanceOfType(SlaInformationService.class);

SlaInformationQuery query = slaInformationService.newInfoQueryBuilder() .issue(issue.getId()) .pagedRequest(SimplePagedRequest.paged(0, 50)) .build();

ApplicationUser user = ComponentAccessor.getJiraAuthenticationContext.getLoggedInUser();

PagedResponse<SlaInformation> pagedResponse = slaInformationService.getInfo(user, query).getOrNull();

SlaInformationService.DurationFormatter formatter = slaInformationService.getDurationFormatter();
List<SlaInformation> list = pagedResponse.getResults();

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you