Forums

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

Best practice for obtaining list of all issues in a specific JIRA service desk

Samuel Donadelli July 16, 2018

Hello all,

I would like to understand what is the best practice to obtain a list of all issues in a specific JIRA Service Desk.

As a test I used the following code:

https://jira.xxxxx.com/rest/api/2/search?jql=project="SANDBOXJSD"

 

It appears to have all fields from a JIRA service desk, however there are tons of customfields that appear null.

I wondered if in fact, we should be using this link instead:

https://jira.xxxxx.com/rest/servicedeskapi/request/

Also I found interesting the output of the link above that should only Jira Service Requests that I opened for ANY Jira Service Request project. The difference here is that the fields (including customfields) are not null.

What would be the best practice to obtain a list of all issues in a specific JIRA Service Desk.

 

Cheers, Samuel

 

 

1 answer

1 accepted

0 votes
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 19, 2018

In this case, there are actually two different APIs to look at

Jira Server REST API

and

Jira Service Desk Server REST API

 

In your case, I would recommend using the first guide; specifically the api/2/search endpoint.  This will show you all the issues in that project from the point of view of that user making that REST call.   The servicedesk/request endpoint you referenced isn't intended to provide all the issues in a JSD project.  Instead it's meant to be able to provide your own requests, or return a single request if you know the issue id or the issue key.  There isn't a JSD rest call to return all issues in the project.

Just because some fields have null values here is not a concern in my view.  Many issues in Jira that don't have a value for a custom field will show as null in both rest calls and in the database on the back end.   I don't think this is any kind of intentional obscuring of your data.    All requests in Service Desk are also being included in the search results of the Jira REST call, whereas it might be possible for someone to create an issue in that project outside of the customer portal.  If that happens, you won't be able to find the issue at all in the JSD REST endpoints, but it does still exist in Jira (Core) REST API results.

Suggest an answer

Log in or Sign up to answer