Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Unable to authenticate to manipulate Workflow Hooks via API in ScriptRunner

I've got over 500x projects and trying to enforce enablement of hooks across all of them.

Have found the APIs required to retrieve, and make the necessary manipulation.

However, I am facing 401 error when running within ScriptRunner. I know my user has the permission as I am able to reach the https://********/rest/api/1.0/projects/TEST/settings/hooks endpoint directly through my browser.

I read into Application Links and understood it to be a means to authenticate into other atlassian suite of projects (i.e. Bitbucket -> Jira/Confluence/Etc). In my particular case, am intending to execute the ScriptRunner scripts within Bitbucket to manipulate bitbucket settings.

Any help would be appreciated! Thanks.

1 answer

Hi @Sean Lim ,

Thank you for your post.

As you are trying to access details about the native Bitbucket Hooks from within a ScriptRunner for Bitbucket script, you can bypass the REST API altogether and access the Bitbucket Java API directly.

For example, here is the documentation for the RepositoryHookService:

If you also provide an example of your script, I might be able to help further?

Kind regards,

Robert Giddings,

Product Manager, ScriptRunner for Bitbucket

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events