Forums

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

Service Desk Rest API querying requests by organisation fails

Andreas Kunter February 26, 2018

Hello,

I am trying to access JIRA Service Desk through the REST api with my web application. The problem I encountered is that I cannot query requests ("ticket lists") for a specific organization in which the api user is not a member of.

I use a specific user in JIRA for api communications, and this user has admin rights and is a member of the service desk group (so he is an agent of some sort, not a customer user).

Regarding the docs

https://developer.atlassian.com/cloud/jira/service-desk/rest/#api-request-get

I can put up filters for organizations, but once I do this I do not get any requests. If I leave them out, I get all.

Filter example:

organizationId=3

requestOwnership=ORGANIZATION

Any idea on how to accomplish it? I need to query different organizations for different users on the web frontend, so putting the api user in all orgs is not an option (and I think he can be member of only 1 group, anyhow).

Any help/ideas would be very much appreciated.

 

1 answer

0 votes
Aliaksei Melnikau
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 14, 2018

Hi, Andreas

Thank you for raising your concern.

  

I would advice to try jira search API for your particular case:

https://docs.atlassian.com/software/jira/docs/api/REST/7.12.0/#api/2/search-searchUsingSearchRequest

The jql query you are looking for should be something like this:

Organizations in ("Agent Organization") and reporter = agent1 

 

Best regards,

Jira Service Desk.

Andreas Kunter September 14, 2018

Thanks, we solved the problem already - ticket is almost 7 months old ;)

But good to know it is now in the docs.

 

Best regards

Andreas Kunter

Mike Voermans
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 19, 2018

Hello Andreas Kunter,

 

How did you solve the problem? Because I don't get requests based on organization when I send this API call.

http://localhost:8080/rest/servicedeskapi/request/?organizationId=1&requestOwnership=ORGANIZATION

 

I can't use JQL because it's not allowed for users with role 'Customer'.

 

Kind regards,

 

Mike Voermans

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events