Enable or Disable a Webhook

Coverity on Polaris

Version
latest
You can enable or disable a webhook by updating the enable property.
CAUTION:
Disabling a webhook affects all the projects that use it. To remove a webhook from a project (without affecting other projects), refer to the topic Remove Project-Webhook Association.
Use the following example to update the webhook.

Request (with mutual authentication enabled):


    // PATCH https://subdomain.cop.blackduck.com/api/notifications/v0/webhooks/c605f908-dfe4-11e9-8a34-2a2ae2dbcce4 
    
    {
    "data": {
        "type": "webhook",
        "id": "c605f908-dfe4-11e9-8a34-2a2ae2dbcce4",
          "attributes": {
             "url": "https://webhook.site/529870de-bc00-4463-8000-70ea5ff8326d",
             "name": "Webhook ",
             "enabled": "true"
         }
      }
    }
                    
This example updates the webhook so that data.enabled="true". This enables the webhook.