Getting unexpected result from API call

Kristian Jackson September 13, 2017

When I make the API call :

https://XXX.XXX/rest/servicedeskapi/servicedesk/1/queue/38/issue?limit=50&start=50

I am returned a list of open issues. Then I issue the call:

https://XXX.XXX/rest/servicedeskapi/request/25871/comment/

To retreive the comments for the associated Service Desk issue. This works fine except that for one particular issue I am getting the following response (in JSON):

{
"errorMessage": "The request could not be found, or you do not have permission to see it.",
"i18nErrorMessage": {
"i18nKey": "sd.attachment.error.issue.not.found",
"parameters": []
}
}

I do, in fact, have permissions as the ticket is actually assigned to me, it exists, and I am working it. This call works great for other tickets. Thoughts?

3 answers

1 vote
Oles Hnatkevych (Princip-IT) May 11, 2018

Could be that request was created not from portal and request type is missing.

Artem Grotskyi July 6, 2018

Thank you mate,

you saved my time.

Dyakuyou!

Fernando Boucquez (PPL) August 31, 2018

It sounds like a Jira bug to me. How is that request type missing raises an issue not found error.

0 votes
WW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 12, 2021

Just in case somebody comes here later looking for the answer, it is this:

(First, I'm pretty sure that REST API call is specific to JSD Server, not Cloud, but who knows)

In order for this (and I'm pretty sure other) JSD REST API call(s) to work, the issues must have a request type (field name "Customer Request Type" behind the scenes).

If the issue says "No Match" in this field, you'll get the obscure error message.

Do one or more of the following:

  1. Create all issues through the portal
  2. If issue not created through portal, manually update Request Type field
  3. Do a bulk update of the Customer Request Type field before you run the REST API call
0 votes
somethingblue
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 21, 2017

Hi Kristian,

Hopefully you've figured this out by now but if not let me see if I can help.

  • Is this a Cloud instance or a Server instance?
  • Can any user make the call correctly and if so what permissions are different between the two accounts?
  • Are you using the Issue Key when making the call?
  • Are you able to get the data from any of the other fields on that issue individually?

I attempted the same call I am able to retrieve the results:

https://my.atlasurl.net/rest/servicedeskapi/request/ISSUE-2/comment/

This returned the following truncated example:

 {"_expands":["attachment","renderedBody"],"size":1,"start":0,"limit":50,"isLastPage":true,"_links":{"self":"https://my.atlasurl.net/rest/servicedeskapi/request/ISSUE-2/comment/","base":"https://my.atlasurl.net","context":""},"values":[{"_expands":["attachment","renderedBody"],"id":"10203","body":"This is my comment retrieved via API","public":false,"author":{"name":"ministrator","key":"ministrator","emailAddress":"my@email.com","displayName":"Branden McElveen","active":true,"timeZone":"America/Chicago","_links":{"jiraRest":"https://my.atlasurl.net/rest/api/2/user?username=ministrator","avatarUrls":{"48x48":"https://avatar-cdn.atlassian.com/3e73cdf5eb7a9feb3ef8c1b4e6ccbc08?s=48&d=https

I would try using the issue key, see if you can retrieve any other fields and check with another project admin and see if that makes a difference.  If none of that provides a path forward provide the answers to the questions and we'll see what else we can do.  If this is a Cloud instance please provide the Cloud URL.


Cheers,

Branden

 

Kristian Jackson September 21, 2017

Thank you for the response. This could happen for 1 request? If you look at the URL, I can change the request ID to + or - one (25870 or 25872) and I get responses just fine.

I just want to be clear before I go poking the database admin.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events