Delete Media File
Delete a media file from database and storage
- file_id: ID of the file to delete
- delete_from_cloud: Whether to delete from cloud storage as well
| Method | Path |
|---|---|
DELETE | /api/v1/media/{file_id} |
Primary host: https://valara.cloud (legacy alias: https://dash.jacoballenmedia.com).
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
file_id | path | yes | string | |
delete_from_cloud | query | no | boolean | Also delete from cloud storage |
Request body
(no request body)
Response
null
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error (see error codes) |
Examples
curl
curl -X DELETE "https://valara.cloud/api/v1/media/{file_id}" \
-H "Authorization: Bearer $VALARA_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Idempotency-Key: $(uuidgen)"
Python
import os
import uuid
import httpx
res = httpx.request(
"DELETE",
"https://valara.cloud/api/v1/media/{file_id}",
headers={
"Authorization": f"Bearer {os.environ['VALARA_API_KEY']}",
"Content-Type": "application/json",
"X-Idempotency-Key": str(uuid.uuid4()),
},
)
res.raise_for_status()
print(res.json())