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

Example API to enable hooks in Bitbucket - YACC or Reject Force Push

Sumant Renukarya May 27, 2020

I'm trying to enable webhooks - mainly YACC and Reject Force Push via API call but doesn't seem to work. 

code:

***
branch_repo_url = "https://stash.com/rest/api/1.0/projects/PR104043/repos/test123/settings/hooks/com.atlassian.bitbucket.server.bitbucket-bundled-hooks:force-push-hook/settings/"


r=requests.put(branch_repo_url, json={"string-value""Enable-git-force-push-hook""boolean-value"True}, auth=(username,password))

***

https://docs.atlassian.com/bitbucket-server/rest/7.2.3/bitbucket-rest.html#idp363

Bitbucket v - 5.9.1. 

Any help anyone? 

Thanks

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events