Delete Blackout

v4

Deletes a blackout configuration from a live channel.

Request

Request syntax:

DELETE /channels/{Live Channel ID}/blackouts/{Blackout ID}

Define the following variables when submitting the above request:

VariableDescription
Live Channel ID RequiredIdentifies a live channel by its system-defined ID.
Blackout ID RequiredIdentifies a blackout configuration by its system-defined or external ID. Use the Get Multiple Blackouts endpoint to retrieve a list of blackout configurations and their IDs.

Response

A successful request returns a 200 OK response that contains the following properties:

NameData TypeDescription
@idStringIndicates the relative path to the requested endpoint.
@typeStringReturns Blackout.
messageStringReturns Deleted.

Sample Request/Response

The code below (Python 3) shows how to delete a blackout configuration from a live channel.

This code imports names from the api_auth module for V4 APIs (see below).

import json, requests
from api_auth import APICredentials, APIParams
channel_id = 'Hak3zjnPLSW5o0j8GMpzRMsa' # Replace with the ID for the desired live channel.
blackout_id = 'degf8923f093kfd932kd9fa4' # Replace with the ID for the desired blackout configuration.

class DeleteBlackout:
    def __init__(self):
        self.host = "https://services.uplynk.com"

    def run(self):
        """
        Deletes a blackout configuration.
        """
        self._delete_blackout()

    def _delete_blackout(self):
        url = "{}{}{}{}{}".format(self.host, "/api/v4/channels/", channel_id, "/blackouts", blackout_id)

        response = requests.delete(
            url, params=APIParams(APICredentials()).get_params({})
        )

        print(response.json())

DeleteBlackout().run()

Response:

{
	"@id": "/api/v4/channels/Hak3zjnPLSW5o0j8GMpzRMsa/blackouts/degf8923f093kfd932kd9fa4",
	"@type": "Blackout",
	"message": "Deleted"
}