Skip to main content
GET
/
dashboard
/
batches
Dashboard Batches
curl --request GET \
  --url https://api.example.com/dashboard/batches
{
  "error": "Invalid API Key"
}

Overview

Returns all Spotify show batch operations for your API key with progress information.

Request

No query parameters required. Authentication via x-api-key header.

Response

batches
array
Array of batch objects
batches[].id
string
Batch UUID
batches[].show_url
string
Spotify show URL
batches[].folder
string
S3 folder prefix for episodes
batches[].total_episodes
integer
Total number of episodes in the show
batches[].completed_episodes
integer
Number of successfully completed episodes
batches[].failed_episodes
integer
Number of failed episodes
batches[].status
string
Batch status: processing, completed, or finished

Example

curl -X GET "https://tornado.velys.software/dashboard/batches" \
  -H "x-api-key: sk_your_api_key"

Error Responses

{
  "error": "Invalid API Key"
}

Status Values

StatusMeaning
processingBatch is in progress
completedAll episodes finished successfully
finishedAll episodes done, but some failed

Dashboard Usage

async function loadBatches(apiKey) {
  const response = await fetch('/dashboard/batches', {
    headers: { 'x-api-key': apiKey }
  });
  const data = await response.json();

  data.batches.forEach(batch => {
    const done = batch.completed_episodes + batch.failed_episodes;
    const progress = Math.round(done / batch.total_episodes * 100);

    console.log(`${batch.folder}: ${progress}% (${batch.failed_episodes} failed)`);
  });
}

Progress Calculation

function calculateProgress(batch) {
  const done = batch.completed_episodes + batch.failed_episodes;
  return {
    percentage: Math.round(done / batch.total_episodes * 100),
    isComplete: done >= batch.total_episodes,
    hasFailed: batch.failed_episodes > 0
  };
}