Scriptrunner endpoint rest: script location

I created a new Custom REST endpoint, and entered the location of my script file. My script file is located in a sub-folder of my scripts root folder, and I use a relative path to my scripts root. Type checking says the file can be found, and I can save the custom endpoint. But when running the REST call, I get an error: when looking the error I see it tries to find my script under the scripts root, NOT under the relative path I entered.

Is this a Bug ? A known limitation ?

When I put the script file directly under the script root folder (and just give the name of the script in the Custom REST Endpoint screen), evrything goes fine! My REST Endpoint is saved and the REST call is working correctly...



2 answers

1 accepted

The package declaration needs to be correct - if not there should be an error logged.

So if you have script foo/bar/thing.groovy it needs to begin:


// etc


Hi Jamie,

Oups, indeed, thats the problem. I must have seen this by myself :-(

Thanks for you reply.

@Daniel, thanks for your reply too :-)

Hello Marc.

I'm trying to reproduce this, but I haven't been able to. Could you please provide the full error you are getting, your Jira version, and your Scriptrunner version?

Thanks in advance

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Wednesday in Marketplace Apps

Marketplace Spotlight: Marketing apps for Confluence to keep your teams working on the same page


125 views 0 3
Read article

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