Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Disable a bitbucket hook using REST-API

Edited

Hi,

I have "Yet Another Commit Checker" Plugin installed and I can enable configured hook using REST-API like this:

curl -k --user user:passwd -X PUT -H "Accept: application/json" -H "Content-Type: application/json" -X PUT https://bitbucket_url.com/rest/api/1.0/projects/my_project/repos/demo/settings/hooks/com.isroot.stash.plugin.yacc:yaccHook/enabled

After that I can see the hook is enabled:

curl -u user:passwd https://bitbucket_url.com/rest/api/1.0/projects/my_project/repos/demo/settings/hooks/com.isroot.stash.plugin.yacc:yaccHook
{"details":{"key":"com.isroot.stash.plugin.yacc:yaccHook","name":"Yet Another Commit Checker","type":"PRE_RECEIVE","description":"Yet Another Commit Checker pre-receive hook.","version":"1.24","configFormKey":"com.isroot.stash.plugin.yacc:yaccHook-config-form","scopeTypes":["PROJECT","REPOSITORY"]},"enabled":true,"configured":true,"scope":{"type":"REPOSITORY","resourceId":842}}

 

But how can I disable that hook via REST-API? I'm a bit confused :)

2 answers

You use:
curl -k --user user:passwd -X PUT -H "Accept: application/json" -H "Content-Type: application/json" -X DELETE https://bitbucket_url.com/rest/api/1.0/projects/my_project/repos/demo/settings/hooks/com.isroot.stash.plugin.yacc:yaccHook/enabled

Do you have news ?

 

i've the same question.

See my reply...

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

117 views 2 4
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you