Forums

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

Retrieve all service desk issues

Madhav Dube July 3, 2023

Trying to fetch all Service desk issues using rest API endpoint search but this endpoint is not returning all the results. The total number of issues is way less. Is there a different endpoint for service desk or do we need different permissions on the project since the service account is a user in Service Desk project. 

2 answers

0 votes
Rudy Holtkamp
Community Champion
July 3, 2023

Hi @Madhav Dube ,

The results of the REST API are paginated. Standard you will only get 50 results back and the response will also tell you how many results there are. So you can use this to get the next 50 results.

See https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#expansion

 

* Updated the link

Madhav Dube July 5, 2023

Thanks, @Rudy Holtkamp Yes I am aware of paginated results as I am pulling the same rest endpoint for extracting data for another project as well. The total I am referring to here is the total issues after dealing with pagination. 

Rudy Holtkamp
Community Champion
July 5, 2023

The account (and API key) you are using must have the appropriate permissions. You should check if it has the correct JSM  license, the correct role to see all issues you are searching for. Perhaps there is a security level set?

You better run the search with the same account in the UI and see what issues you are missing. With the permission helper you might be able to figure out where it goes wrong.

Like Trudy Claspill likes this
Madhav Dube July 5, 2023

So we are using Service account and I might not have access to service desk. Can you help me with the permissions it needs to view everything and I'm curious why I can see just the subset of tickets? So if the user does not have permission then it should not return anything. 

Rudy Holtkamp
Community Champion
July 6, 2023

There are a lot of scenario's possible:

  1. There are issue security levels in place, then it depends on the settings of these levels. You have to take a look (with your Jira admin) which user/group/role/etc can access all issues. You might need to add your API user account 
  2. Your API user account does not have access at all to Jira or is disabled (not very likely)
  3. Your API user account does not have access at all to the JSM project. Add the account to a role which can see all issues. Verify this in the UI. If you can fetch the issues with this account in the UI, you can fetch them via the REST API
  4. The permissions of the JSM project can be set so only reporters and assignees are able to access the issues, make sure the API user account has the browse projects permission
0 votes
Trudy Claspill
Community Champion
July 3, 2023

Hello @Madhav Dube 

Please share the details of the actual call you are making to the API. What payload are you sending with the API call?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events