Delete Job File
curl --request DELETE \
--url https://api.tornadoapi.io/jobs/{id}/file \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.tornadoapi.io/jobs/{id}/file"
headers = {"x-api-key": "<x-api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.tornadoapi.io/jobs/{id}/file', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tornadoapi.io/jobs/{id}/file",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tornadoapi.io/jobs/{id}/file"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.tornadoapi.io/jobs/{id}/file")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tornadoapi.io/jobs/{id}/file")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"message": "File deleted successfully",
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"deleted_key": "videos/my-video.mp4"
}
Jobs
Delete Job File
Delete an S3 file or a recorded multi-clip delivery
DELETE
/
jobs
/
{id}
/
file
Delete Job File
curl --request DELETE \
--url https://api.tornadoapi.io/jobs/{id}/file \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.tornadoapi.io/jobs/{id}/file"
headers = {"x-api-key": "<x-api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.tornadoapi.io/jobs/{id}/file', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tornadoapi.io/jobs/{id}/file",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tornadoapi.io/jobs/{id}/file"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.tornadoapi.io/jobs/{id}/file")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tornadoapi.io/jobs/{id}/file")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"message": "File deleted successfully",
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"deleted_key": "videos/my-video.mp4"
}
Overview
Delete a single S3 object or all objects in a multi-clip delivery. The job record is retained. For a single file, the endpoint uses the current S3 configuration and the recordeds3_key; it is not a generic single-file deletion endpoint for every storage provider. Multi-clip deletion resolves and verifies the original destination before removing its objects.
Header Parameters
string
required
Your API key for authentication
Path Parameters
uuid
required
The job UUID
Response
string
Success message
string
The job ID
string
The S3 key deleted by the single-file path; absent from multi-clip responses.
integer
Number of recorded clip files deleted by the multi-clip path; absent from single-file responses.
Examples
curl -X DELETE "https://api.tornadoapi.io/jobs/550e8400-e29b-41d4-a716-446655440000/file" \
-H "x-api-key: sk_your_api_key"
const response = await fetch(
'https://api.tornadoapi.io/jobs/550e8400-e29b-41d4-a716-446655440000/file',
{
method: 'DELETE',
headers: {
'x-api-key': 'sk_your_api_key'
}
}
);
const data = await response.json();
console.log(`Deleted: ${data.deleted_key}`);
import requests
response = requests.delete(
'https://api.tornadoapi.io/jobs/550e8400-e29b-41d4-a716-446655440000/file',
headers={'x-api-key': 'sk_your_api_key'}
)
print(response.json())
Success Response
{
"message": "File deleted successfully",
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"deleted_key": "videos/my-video.mp4"
}
{
"message": "Clips deleted successfully",
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"deleted_files": 2
}
Error Responses
{
"error": "Job has no file to delete"
}
{
"error": "Missing x-api-key header"
}
{
"error": "Job not found"
}
{
"error": "The stored object is not proven to belong to this job; it was not deleted"
}
{
"error": "Internal server error"
}
{
"error": "Storage ownership check failed; nothing was deleted, retry deletion"
}
{
"error": "Storage cannot confirm the stored object belongs to this job; nothing was deleted, retry later"
}
{
"error": "Storage delete timed out"
}
Notes
- This requests deletion from the configured storage; provider versioning or retention policies may retain recoverable versions.
- The job record is kept in the database for reference
- The handler checks ownership and recorded delivery fields; it does not require the status to be
Completed. - A single-file job without
s3_keyreturns 400. A multi-clip job usesclip_files. - On Tornado-managed storage, a single-file deletion first checks that the stored object belongs to this job. It returns 409 when the object is present and cannot be proven to belong to this job, 502 when the storage check fails, 503 when storage cannot confirm ownership, and 504 on timeout. Nothing is deleted in these cases; 502, 503 and 504 can be retried.
- A single-file deletion whose recorded storage cannot be used returns 409 and can be retried once that storage is available again.
- On single-file success, clearing delivery metadata in Mongo is attempted; a Mongo failure is logged and does not change the 200 response.
- Multi-clip deletion clears cached delivery data and Mongo metadata before returning 200.
clip_files. If the original
storage credentials cannot be resolved and matched to the recorded destination,
the API returns 409. An incomplete object deletion returns 502; a checkpoint or metadata failure returns 500. A partially failed deletion can be retried.
The retry also succeeds when some of the original objects were already deleted
by the previous attempt. Keep the same storage destination configured until
the deletion finishes; changing the account, bucket or folder causes a 409.Was this page helpful?