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 a job file from S3 storage
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
Permanently delete a job’s downloaded file from S3 storage. The job record is kept in the database, but thes3_key field is cleared. Use this to free up storage space for completed downloads you no longer need.
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 that was deleted
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"
}
Error Responses
{
"error": "Job has no file to delete"
}
{
"error": "Missing x-api-key header"
}
{
"error": "Job not found"
}
{
"error": "Failed to delete file: AccessDenied"
}
Notes
- This permanently deletes the file from S3 storage
- The job record is kept in the database for reference
- You cannot recover deleted files
- Only works for jobs with status
Completed - Jobs without an
s3_key(failed or pending) cannot have files deleted
Was this page helpful?