Retry Job
curl --request POST \
--url https://api.tornadoapi.io/jobs/{id}/retry \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.tornadoapi.io/jobs/{id}/retry"
headers = {"x-api-key": "<x-api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.tornadoapi.io/jobs/{id}/retry', 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}/retry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/retry"
req, _ := http.NewRequest("POST", 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.post("https://api.tornadoapi.io/jobs/{id}/retry")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tornadoapi.io/jobs/{id}/retry")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"job_id": "660f9511-f30c-52e5-b827-557766551111",
"original_job_id": "550e8400-e29b-41d4-a716-446655440000",
"message": "Job re-queued successfully"
}
Jobs
Retry Job
Retry a failed, warning or client-cancelled job with the same parameters
POST
/
jobs
/
{id}
/
retry
Retry Job
curl --request POST \
--url https://api.tornadoapi.io/jobs/{id}/retry \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.tornadoapi.io/jobs/{id}/retry"
headers = {"x-api-key": "<x-api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.tornadoapi.io/jobs/{id}/retry', 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}/retry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/retry"
req, _ := http.NewRequest("POST", 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.post("https://api.tornadoapi.io/jobs/{id}/retry")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tornadoapi.io/jobs/{id}/retry")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"job_id": "660f9511-f30c-52e5-b827-557766551111",
"original_job_id": "550e8400-e29b-41d4-a716-446655440000",
"message": "Job re-queued successfully"
}
Overview
Re-queue a failed or warning job with the same parameters. Creates a new job with a new ID while preserving the original job’s configuration. Jobs with statusFailed or Warning can be retried.
Header Parameters
string
required
Your API key for authentication
Path Parameters
uuid
required
The failed job UUID to retry
Response
string
UUID of the new retry job
string
UUID of the original failed job
string
Success message
Examples
curl -X POST "https://api.tornadoapi.io/jobs/550e8400-e29b-41d4-a716-446655440000/retry" \
-H "x-api-key: sk_your_api_key"
const response = await fetch(
'https://api.tornadoapi.io/jobs/550e8400-e29b-41d4-a716-446655440000/retry',
{
method: 'POST',
headers: {
'x-api-key': 'sk_your_api_key'
}
}
);
const data = await response.json();
console.log(`New job ID: ${data.job_id}`);
import requests
response = requests.post(
'https://api.tornadoapi.io/jobs/550e8400-e29b-41d4-a716-446655440000/retry',
headers={'x-api-key': 'sk_your_api_key'}
)
data = response.json()
print(f"New job ID: {data['job_id']}")
Success Response
{
"job_id": "660f9511-f30c-52e5-b827-557766551111",
"original_job_id": "550e8400-e29b-41d4-a716-446655440000",
"message": "Job re-queued successfully"
}
Error Responses
{
"error": "Only failed, warning or cancelled jobs can be retried"
}
{
"error": "Missing x-api-key header"
}
{
"error": "Invalid API Key"
}
{
"error": "Job not found"
}
{
"error": "Failed to queue retry job"
}
Notes
- Jobs with status
FailedorWarningcan be retried - A new job is created with a new UUID
- The original failed job remains unchanged (for audit purposes)
- All original parameters are preserved (URL, format, codecs, webhook, etc.)
- The new job uses your current S3 configuration (in case you updated it)
- Usage/billing is counted for the new job
Was this page helpful?