Batch Processing
The batch API submits many projects at once and runs them in parallel — the right tool for portfolio-scale analysis.
Submitting a batch
Section titled “Submitting a batch”curl -X POST https://api.totalview.energy/api/v1/batch \ -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \ -d '{ "projects": [ { "project_name": "Site A", "latitude": 32.5, "longitude": -97.3, "nameplate_capacity": 100, "tech_type_id": "solar_ground", "sam_profile_flag": true }, { "project_name": "Site B", "latitude": 35.1, "longitude": -101.8, "nameplate_capacity": 250, "tech_type_id": "wind_onshore", "sam_profile_flag": true } ], "priority": "standard" }'Each item in projects is a full
create-project payload.
1–1000 projects per batch. Returns 202 Accepted:
{ "batch_id": "…", "project_count": 2, "project_ids": ["…", "…"], "status": "queued", "queue_type": "single", "estimated_completion_minutes": 20}Tracking progress
Section titled “Tracking progress”Aggregate status — poll until status is completed, failed, or partial:
curl https://api.totalview.energy/api/v1/batch/$BATCH_ID/status \ -H "Authorization: Bearer $TOKEN"{ "project_count": 2, "completed_count": 2, "failed_count": 0, "queued_count": 0, "status": "completed", "duration_seconds": 1180 }Per-project status — GET /batch/{batch_id}/projects returns each
project’s state and error_message for any failures.
Portfolio summary
Section titled “Portfolio summary”Once complete, GET /batch/{batch_id}/summary aggregates generation, impacts,
and emissions across all completed projects:
{ "total_projects": 2, "completed_projects": 2, "total_capacity_mw": 350.0, "impacts_summary": { "Cradle_to_Grave_Analysis": { "DALYs": 1234.5, "PDFs": 456.7, "USD": 78900000.0 } }}Check remaining capacity before large batches — see Usage & Limits.