[object Object] Icon

Encoding
Learn how to create, start, manage and modify Encodings

[object Object] Icon

Player
Learn how to create, start, manage and modify Players

[object Object] Icon

Analytics
Learn how to create, start, manage and modify Analyticss

Docs Home
User shortcuts for search
Focus by pressing f
Hide results by pressing Esc
Navigate via   keys

Wed Mar 24 2021

How can I mute/unmute a Webhook?

Webhook notifications are a great way to handle your encoding workflows in an event-based manner instead of polling the status of its processes all the time.

Why would I have to unmute a webhook notification? It can happen though that the URL of an webhook notification becomes unreachable (e.g. no longers responds with 200 OK), therefore the Bitmovin API can't deliver its message. A Webhook notification delivery counts as failed if:

  • It takes longer than 30s to establish a connection (connection timeout)
  • It takes longer than 10s to complete the request (read timeout)

If the notification delivery fails 10 times a row, this webhook notification will be auto-muted. This means that the API will no longer attempt to deliver any events to that webhook until the user

  • ensured the availability of the URL for their backend again
  • unmutes the notification in the Bitmovin API

How can I mute/unmute notifications?

List all notifications

API Reference: GET /notifications This step is needed to obtain the ID of the notification you want to mute or unmute.

1curl --location --request GET 'https://api.bitmovin.com/v1/notifications' \
2--header 'x-api-key: API-KEY-HERE' \
3--header 'x-tenant-org-id: ORGANISATION-ID-HERE'

Bitmovin Open API SDK for Java Example:

1bitmovinApi =
2 BitmovinApi.builder()
3 .withApiKey("API-KEY-HERE")
4 .withTenantOrgId("ORGANISATION-ID-HERE")
5
6//Returns the ID of the first notification found in the API response
7bitmovinApi.notifications.list().getItems().get(0).getId();

Mute a Notification

API Reference: POST /notifications/{NOTIFICATION-ID-HERE}/mute

1curl --location --request POST 'https://api.bitmovin.com/v1/notifications/NOTIFICATION-ID-HERE/mute' \
2--header 'x-api-key: API-KEY-HERE' \
3--header 'x-tenant-org-id: ORGANISATION-ID-HERE'

Bitmovin Open API SDK for Java Example:

1bitmovinApi =
2 BitmovinApi.builder()
3 .withApiKey("API-KEY-HERE")
4 .withTenantOrgId("ORGANISATION-ID-HERE")
5
6bitmovinApi.notifications.mute("NOTIFICATION-ID-HERE");

Unmute Notification

API Reference: POST /notifications/{NOTIFICATION-ID-HERE}/unmute

1curl --location --request POST 'https://api.bitmovin.com/v1/notifications/NOTIFICATION-ID-HERE/unmute' \
2--header 'x-api-key: API-KEY-HERE' \
3--header 'x-tenant-org-id: ORGANISATION-ID-HERE'

Bitmovin Open API SDK for Java Example:

1bitmovinApi =
2 BitmovinApi.builder()
3 .withApiKey("API-KEY-HERE")
4 .withTenantOrgId("ORGANISATION-ID-HERE")
5
6bitmovinApi.notifications.unmute("NOTIFICATION-ID-HERE");

Give us feedback