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