Forums

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

REST-API GET /rest/servicedeskapi/request

petteri_saarikko July 5, 2021

Use case is retrieve all request endpoint data trough REST-API. (Endpoint GET /rest/servicedeskapi/request documentation below). Problem is that endpoint will not expose all data because of calling user identity. Documentation say” Returns all customer requests for the user that is executing the query. That is, the customer requests where the user is the creator of the customer request or has participated in the customer request.”

What are my options to retrieve all data or is this possible at all?  

 

https://docs.atlassian.com/jira-servicedesk/REST/4.17.1/#servicedeskapi/request-getMyCustomerRequests

 

 

1 answer

1 accepted

1 vote
Answer accepted
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 7, 2021

Hello @petteri_saarikko ,

Welcome to the Atlassian Community!

This question has been opened against Jira Service Management Cloud, while the documentation you are pointing to is for Jira Service Management Server. Can you kindly clarify whether you are on Server or Cloud?

Also, I am not sure what kind of data you expect to get running the REST API call. Can you provide more details?

 

Finally, please find below the REST API documentation for Jira Cloud (Core, Service Management and Software):

 

 

Cheers,
Dario

petteri_saarikko July 8, 2021

Thanks Dario

Used environment is cloud based and my original reference point of documentation was wrong.

Anyhow result is still same even http request parameter slightly different. https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-request/#api-rest-servicedeskapi-request-get. Link guide told. “Response limitations: For customers, the list returned will include request they created (or were created on their behalf) or are participating in only.”  Test queries are made based on basic authentication (private api key) if this has anything to do with this.

Original question remains. What are my options to retrieve all data from this endpoint or is this possible at all?  Endpoint will provide data what we are looking for. Problem just is to get all of it.

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 8, 2021 edited

Hello @petteri_saarikko ,

I am still not 100% sure I understand what you mean with "all data" but, if you mean all the customers requests from a service desk project, ten you can try one of the 2 possible approaches:

  1. Using Jira Service Management Cloud REST API :
    1. Call the Get queues (GET /rest/servicedeskapi/servicedesk/{serviceDeskId}/queue) endpoint to get all the queues id for your service desk project
    2. For each queue, call the Get issues in queue (GET /rest/servicedeskapi/servicedesk/{serviceDeskId}/queue/{queueId}/issue) endpoint to get all the customers requests in that queue
  2. Using one of the below 2 Jira Cloud platform REST API endpoints to search for all the issues in a specific project using JQL:
    1. Search for issues using JQL (GET) 
    2. Search for issues using JQL (POST)

 

I believe that using the Search for issues using JQL (GET) endpoint is the easier approach since you can easily get all the issues in a specific project (service desk or anything else) by running something like in below example (assuming that SD is the project key for the desired Service Desk project):

https://your-domain.atlassian.net/rest/api/3/search?jql=project=SD'

 

I hope this helps.

Like petteri_saarikko likes this
petteri_saarikko July 11, 2021

Thanks Dario

Just tested JQL logic and it work as expected. All issues are available and required data can be found.

Like Dario B likes this

Suggest an answer

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

Atlassian Community Events