Forums

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

401 Error when calling insight api from ScriptRunner

Nicolas Bedregal _EVERIS_
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!
June 19, 2020

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

0 answers

Suggest an answer

Log in or Sign up to answer