Hi Community,
I have been looking for ways to construct a get request inside Jira.
I want to use the rest API inside a Behavior to fetch certain board related data:
<jira Base URL>/rest/agile/1.0/board/{board Id}/configuration
Would anyone know how I can form a get request inside Jira as to receive a response from the url mentioned.
I have tried using the examples in the article but I have been getting this error:
groovyx.net.http.HttpResponseException: Unauthorized
I am doing the following in my code:
import groovyx.net.http.ContentType
import groovyx.net.http.RESTClient
def boardId = '3';
def activitiRestClient = new RESTClient("<Jira Base URL>/rest/agile/1.0/board/")
activitiRestClient.auth.basic "USERNAME", "PASWORD"
def response = activitiRestClient.get(
path: boardId+'/configuration'
)
output+="\nresponse: "+response+"\n"
Could someone provide some pointers as to why this isn't working for me?
Thank you!!
-Roberto