Skip to main content
PATCH
/
batch
/
{id}
/
jobs
Rename Batch Jobs
curl --request PATCH \
  --url https://api.tornadoapi.io/batch/{id}/jobs \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "renames": [
    {}
  ],
  "renames[].job_id": "<string>",
  "renames[].filename": "<string>"
}
'
{
  "error": "Batch is not paused. Only paused batches can be renamed."
}

Overview

Rename episode filenames in a paused batch. The batch must be in paused status (created with paused: true).

Header Parameters

x-api-key
string
required
Your API key for authentication

Path Parameters

id
string
required
The batch UUID returned from POST /jobs

Request Body

renames
array
required
List of rename operations
Each rename item contains:
renames[].job_id
string
required
The job UUID to rename (must belong to this batch)
renames[].filename
string
required
New filename (without extension). Will be sanitized for safe S3/filesystem usage.

Response

updated
integer
Number of jobs successfully renamed
errors
array
List of error messages for failed renames

Example

curl -X PATCH "https://api.tornadoapi.io/batch/550e8400-e29b-41d4-a716-446655440001/jobs" \
  -H "x-api-key: sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "renames": [
      {"job_id": "uuid-1", "filename": "01 - Introduction"},
      {"job_id": "uuid-2", "filename": "02 - Getting Started"},
      {"job_id": "uuid-3", "filename": "03 - Deep Dive"}
    ]
  }'

Error Responses

{
  "error": "Batch is not paused. Only paused batches can be renamed."
}