Overview
Retrieves the current status and progress of a batch download operation.
Path Parameters
The batch UUID returned from POST /jobs when submitting a Spotify show URL
Response
Original Spotify show URL
Batch status: processing, completed, or finished
S3 folder prefix for episodes
Total number of episodes in the show
Number of successfully completed episodes
Number of failed episodes
List of individual job UUIDs for each episode
Example
curl -X GET "https://tornado.velys.software/batch/550e8400-e29b-41d4-a716-446655440001"
Status Values
| Status | Meaning |
|---|
processing | Batch is in progress, episodes are being downloaded |
completed | All episodes finished successfully (0 failures) |
finished | All 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
Checking Individual Episodes
To see details about failed episodes, query individual job IDs:
curl -X GET "https://tornado.velys.software/jobs/{episode_job_id}"