Skip to main content
GET
/
batch
/
{id}
Get Batch Status
curl --request GET \
  --url https://api.example.com/batch/{id}
null

Overview

Retrieves the current status and progress of a batch download operation.

Path Parameters

id
string
required
The batch UUID returned from POST /jobs when submitting a Spotify show URL

Response

id
string
Batch UUID
show_url
string
Original Spotify show URL
status
string
Batch status: processing, completed, or finished
folder
string
S3 folder prefix for episodes
total_episodes
integer
Total number of episodes in the show
completed_episodes
integer
Number of successfully completed episodes
failed_episodes
integer
Number of failed episodes
episode_jobs
array
List of individual job UUIDs for each episode

Example

curl -X GET "https://tornado.velys.software/batch/550e8400-e29b-41d4-a716-446655440001"

Status Values

StatusMeaning
processingBatch is in progress, episodes are being downloaded
completedAll episodes finished successfully (0 failures)
finishedAll episodes done, but some failed

Progress Calculation

Progress = (completed_episodes + failed_episodes) / total_episodes * 100
A batch is finished when:
completed_episodes + failed_episodes >= total_episodes

Polling Example

import requests
import time

def wait_for_batch(batch_id, api_key):
    while True:
        response = requests.get(
            f"https://tornado.velys.software/batch/{batch_id}",
            headers={"x-api-key": api_key}
        )
        data = response.json()

        completed = data["completed_episodes"]
        failed = data["failed_episodes"]
        total = data["total_episodes"]

        print(f"Progress: {completed + failed}/{total} ({failed} failed)")

        if data["status"] in ["completed", "finished"]:
            return data

        time.sleep(10)

# Usage
result = wait_for_batch("batch-uuid", "sk_your_api_key")
print(f"Final status: {result['status']}")

Error Responses

null

Checking Individual Episodes

To see details about failed episodes, query individual job IDs:
curl -X GET "https://tornado.velys.software/jobs/{episode_job_id}"