Hello,
I'm trying to get a rest response from insight with a groovy sentence, but i'm getting 401 error. According to insight documentation any authentication that works against JIRA will work against the Insight REST API, and thats true when I paste the URL directly into the explorer, but when I call it from groovy (inside Jira) it doesn't work. Which makes me think that there's a problem with ScriptRunner.
I'm using the following sentence from groovy:
return new URL("https://myinstanceofJira/rest/insight/1.0/objecttype/1/objects?key=myatlassianapikey").text
I'd tried with CURL sentence as well but got the same 401 error response.
Is there any auth configuration that I may be doing prior calling from groovy? Am I calling in a wrong way?
Please help me finding the issue here