Forums

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

Authenticated Requests with JiraRestService

David Webb
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!
August 15, 2018

I am trying to call the Jira REST API from a Bamboo CommonTaskType.  I am successfully injecting the applicationLinks and the JiraRestService.  I have a bi-directional OAuth Application link between my local Bamboo development server and my Jira Server.

Whenever I make this call:

      JiraRestResponse response = jiraRestService.doRestCallViaApplink(jiraApplicationLink,

          "/rest/api/latest/configuration", MethodType.GET, null);

 I get a 401 with:

You are not authenticated. Authentication required to perform this operation

 I have linked Jiras in Bamboo and clicked the links to prompt the OAuth token generation and I can follow entity links between the 2 applications, but still no auth when using the ApplicationLink from the Task.

Any idea what I am missing, as its probably something stupid?  

Also, is that the recommended way to call Jira from a Bamboo Task?

 

Thanks!

-Dave

0 answers

Suggest an answer

Log in or Sign up to answer