Api referenceCommands
Delete Command Files
Delete all output files associated with a command from R2 storage.
Delete Command Files
DELETE /api/v1/commands/:commandId/filesDelete all output files associated with a command from storage. This permanently removes the files from R2 and marks them as deleted. The command metadata itself is preserved -- only the stored files are removed.
Authentication
Requires API key via X-API-KEY header.
Request
Headers
| Header | Type | Required | Description |
|---|---|---|---|
X-API-KEY | string | Yes | Your API key with ffsk_ prefix |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
commandId | string | Yes | The unique identifier of the command whose files should be deleted. |
Response
200 OK
{
deleted: true;
files_deleted: number;
}| Field | Type | Description |
|---|---|---|
deleted | boolean | Always true on success. |
files_deleted | number | The number of files that were deleted. |
Error responses
| Status | Error | Description |
|---|---|---|
401 | UNAUTHORIZED | Missing or invalid API key. |
404 | NOT_FOUND | No command found with the given ID, or the command belongs to a different account. |
429 | RATE_LIMITED | Too many requests. Retry after the period indicated in the Retry-After header. |
Examples
curl
curl -X DELETE https://renderio.dev/api/v1/commands/a1b2c3d4-e5f6-7890-abcd-ef1234567890/files \
-H "X-API-KEY: ffsk_your_api_key_here"JavaScript (fetch)
const commandId = "a1b2c3d4-e5f6-7890-abcd-ef1234567890";
const response = await fetch(
`https://renderio.dev/api/v1/commands/${commandId}/files`,
{
method: "DELETE",
headers: {
"X-API-KEY": "ffsk_your_api_key_here",
},
},
);
const { deleted, files_deleted } = await response.json();
console.log(`Deleted: ${deleted}, Files removed: ${files_deleted}`);Python (requests)
import requests
command_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
response = requests.delete(
f"https://renderio.dev/api/v1/commands/{command_id}/files",
headers={
"X-API-KEY": "ffsk_your_api_key_here",
},
)
data = response.json()
print(f"Deleted: {data['deleted']}, Files removed: {data['files_deleted']}")