Remove Library

Deletes a specified library, making it unavailable for use. If the library has been shared, other users will no longer have access to it or its assets.

Endpoint

DELETE /libraries/{library_id}

Request Parameters

NameTypeRequiredDescription
library_idStringYesThe unique identifier of the library to delete.

Example Request

DELETE /libraries/8b69f969c65e481385281331520cf1e2

Response

A successful request returns:

NameData TypeDescription
statusIntegerReturns 204 No Content if the library was successfully deleted.

Error Responses

Status CodeDescription
400Bad Request - Invalid library ID format.
401Unauthorized - Authentication required.
403Forbidden - You do not have permission to delete this library.
404Not Found - The specified library does not exist.

Sample Code

import requests
from api_auth import APICredentials, APIParams

class Remove_Library:
    def __init__(self, library_id):
        self.host = "https://services.uplynk.com"
        self.library_id = library_id
    
    def run(self):
        self._remove_library()

    def _remove_library(self):
        url = f"{self.host}/api/v4/libraries/{self.library_id}"
        headers = {'Content-Type': 'application/json'}
        
        response = requests.delete(
            url, params=APIParams(APICredentials()).get_params({}), headers=headers
        )
        
        print(response.status_code)

Remove_Library("8b69f969c65e481385281331520cf1e2").run()