Media - Delete
- 22 Dec 2023
- 1 Minute to read
- Print
- DarkLight
Media - Delete
- Updated on 22 Dec 2023
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Delete Media
DELETE /1/media/{media_id}
Host: https://api.cogniac.io
Example: Delete Media
curl -X DELETE https://api.cogniac.io/1/media/YAHZLMQEYTWB7OBG1RT8HG6OUQOS \
-H "Authorization: Bearer abcdefg.hijklmnop.qrstuvwxyz" \
import requests
url_prefix = 'https://api.cogniac.io'
api_version = "1"
media_id = 'Z2EQR5NFJREOYVUBS6L9XGNX0SDA'
token = '' # add your token here
headers = {'Authorization': f'Bearer {token}'}
url = f'{url_prefix}/{api_version}/media/{media_id}'
response = requests.delete(url, headers=headers)
if response.status_code == 204:
print(f"{media_id} was deleted successfully.")
else:
print(f"Error: {response.status_code}")
print(response.content)
HTTP 204 Code (with no body)
Was this article helpful?