Start Batch
curl --request POST \
--url https://api.tornadoapi.io/batch/{id}/start \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.tornadoapi.io/batch/{id}/start"
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/batch/{id}/start', 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/batch/{id}/start",
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/batch/{id}/start"
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/batch/{id}/start")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tornadoapi.io/batch/{id}/start")
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{
"error": "Batch is not paused (current status: processing)"
}
{
"error": "Batch does not belong to this API key"
}
{
"error": "Batch not found"
}
Batch Operations
Start Batch
Start a paused batch to begin downloading all episodes
POST
/
batch
/
{id}
/
start
Start Batch
curl --request POST \
--url https://api.tornadoapi.io/batch/{id}/start \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.tornadoapi.io/batch/{id}/start"
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/batch/{id}/start', 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/batch/{id}/start",
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/batch/{id}/start"
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/batch/{id}/start")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tornadoapi.io/batch/{id}/start")
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{
"error": "Batch is not paused (current status: processing)"
}
{
"error": "Batch does not belong to this API key"
}
{
"error": "Batch not found"
}
Overview
Starts a paused batch, enqueuing all episode jobs for processing. The batch must be inpaused status.
Header Parameters
string
required
Your API key for authentication
Path Parameters
string
required
The batch UUID returned from
POST /jobsResponse
string
The batch UUID
integer
Number of jobs successfully enqueued for processing
string
New batch status (
processing)Example
curl -X POST "https://api.tornadoapi.io/batch/550e8400-e29b-41d4-a716-446655440001/start" \
-H "x-api-key: sk_your_api_key"
{
"batch_id": "550e8400-e29b-41d4-a716-446655440001",
"started_jobs": 142,
"status": "processing"
}
Error Responses
{
"error": "Batch is not paused (current status: processing)"
}
{
"error": "Batch does not belong to this API key"
}
{
"error": "Batch not found"
}
Workflow
The typical paused batch workflow is:POST /jobswithpaused: true- Create batch, get episode titlesPATCH /batch/{id}/jobs- Rename episodes as neededPOST /batch/{id}/start- Start downloadingGET /batch/{id}- Poll for progress
Was this page helpful?