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
Name | Type | Required | Description |
---|---|---|---|
library_id | String | Yes | The unique identifier of the library to delete. |
Example Request
DELETE /libraries/8b69f969c65e481385281331520cf1e2
Response
A successful request returns:
Name | Data Type | Description |
---|---|---|
status | Integer | Returns 204 No Content if the library was successfully deleted. |
Error Responses
Status Code | Description |
---|---|
400 | Bad Request - Invalid library ID format. |
401 | Unauthorized - Authentication required. |
403 | Forbidden - You do not have permission to delete this library. |
404 | Not 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()