How to connect to ScriptRunner REST Endpoint from SR Behaviour without user authentication? Edited


I have a REST endpoint that fetches data from an external database. I am using it to convert text field into single select list and that is working like a charm but I also want to use the data provided by that endpoint to populate couple of custom fields. And that is a problem because I don't know how to connect to the endpoint from SR Behaviour.

I tried something simple like HTTPBuilder in the following script:



def builder = new HTTPBuilder('')
def data = builder.get(path: "/rest/scriptrunner/latest/custom/logistics")


But it only works if the endpoint isn't restricted to a particular user group and this endpoint must be restricted. I know that I could probably put authentication credentials to HTTPBuilder but it doesn't make sense to me since I am reaching an endpoint in the  same system.

Anyone knows of a way to get to a SR endpoint from groovy script without authentication?

Any suggestions would be very appreciated ;)




0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 25, 2018 in Jira

Atlassian Research Workshop opportunity on Sep. 28th in Austin, TX

We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...

461 views 7 5
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you