Update a Webhook from the API
To update a webhook from the API, you send a PUT command to the webhook’s
API endpoint with the parameter that you want to update.
See Update Org Webhook or Update Site Webhook for the sample
POST structure. A sample response is provided below.
The following is an example configuration of an existing, organization-level
mxedge-events webhook viewed from the API.
{
"enabled": true,
"name": "mist-edge",
"url": "https://webhook.site/4ec10796-16ec-4225-aba4-xxxxxxxxxxxx",
"secret": "",
"topics": [
"mxedge-events"
],
"verify_cert": true,
"id": "a7c61a9c-a25b-4c27-xxxx-xxxxxxxxxxxx",
"for_site": false,
"site_id": "00000000-0000-0000-0000-000000000000",
"org_id": "3f12cb79-fb5e-4d4b-xxxx-xxxxxxxxxxxx",
"created_time": 1575305516,
"modified_time": 1692974137
}
If you want to make a change to this webhook, you need to make a (PUT) API
call from your API client to the webhook API URL
/api/v1/orgs/{org_id}/webhooks/{webhook_id} with the updated
configuration in the request body.
In the following example, the URL to display (GET), update
(PUT), or delete (DELETE) the configuration of the webhook
having the id
4ec10796-16ec-4225-aba4-xxxxxxxxxxxx
is:
https://{api-host}/api/v1/orgs/3f12cb79-fb5e-4d4b-xxxx-xxxxxxxxxxxxx/webhooks/4ec10796-16ec-4225-aba4-xxxxxxxxxxxxIn place of {api-host}, use the API Host (or Endpoint) for your global region. See API Endpoints and Global Regions.
So, let's say you want to change the URL for the webhook receiver to
https://enicxxxx72vx.x.pipedream.net. To do that, you need to update
(PUT) the webhook API endpoint described above with the following request
body:
{
"url":"https://enicxxxx72vx.x.pipedream.net"
}