I want to enable a hook via REST api for a repository in the inherited-from-project state.
How can I do this via REST api?
When I call
/rest/api/1.0/projects/some/repos/another/settings/hooks/com.nerdwin15.stash-stash-webhook-jenkins:jenkinsPostReceiveHook/enabled
I get
{
"details": {
"key": "com.nerdwin15.stash-stash-webhook-jenkins:jenkinsPostReceiveHook",
"name": "Webhook to Jenkins for Bitbucket Server",
"type": "POST_RECEIVE",
"description": "Webhook for notifying a configured endpoint of changes to this repository.",
"version": "4.4.2",
"configFormKey": "com.nerdwin15.stash-stash-webhook-jenkins:jenkinsPostReceiveHook-config-form",
"scopeTypes": [
"REPOSITORY",
"PROJECT"
]
},
"enabled": true,
"configured": true,
"scope": {
"type": "PROJECT",
"resourceId": 534
}
}
I want to set now that scope=type:PROJECT via REST api if its in any other state.
I could not find the needed http call to do so.
Please help.
Thanks in advance,
Maik