Skip to main content

Jobs API

These routes expose async orchestration, polling, cancellation, cleanup, and campaign-level aggregation.

Generic Job Control

MethodPathPurposeAuth
GET/jobslist persisted jobs, newest firstyes
GET/jobs/{job_id}inspect one job result or in-flight statusyes
POST/jobs/{job_id}/cancelrequest cancellation of a queued or running taskyes
DELETE/jobs/{job_id}remove one job record from active registryyes
POST/jobs/cleanupdelete job records by age and/or terminal statusyes

Ingestion and Processing Jobs

MethodPathPurposeAuth
POST/jobs/nc-to-geotiffqueue long-running NetCDF or OPeNDAP conversionyes
POST/jobs/merge-terrainqueue merge plus optional terrain generationyes
POST/jobs/mago-terrainqueue mago terrain generationyes
POST/jobs/repair-csw-metadatarefresh CSW metadata in background for datasetsyes

HySpex Campaign and Repair Jobs

MethodPathPurposeAuth
POST/jobs/hyspex-csw-parentqueue one HySpex parent batch with cursor and campaign metadatayes
GET/jobs/hyspex-csw-campaigns/{campaign_id}aggregate progress across all parent batches and child jobs in one campaignno
POST/jobs/hyspex-missing-variantsqueue repair jobs for missing RGB or Z dataset variantsyes

Campaign-Specific Behavior

  • campaign_id groups sequential parent batches into one logical ingestion campaign.
  • campaign_total_children is optional and improves operator-facing progress summaries.
  • start_position is the deterministic cursor used to continue later batches without reprocessing earlier result pages.
  • The aggregate route reports totals, child job status counts, latest batch metadata, and next_start_position when available.

Practical Usage

  • For long campaigns, keep requests sequential rather than concurrent at the parent-batch level.
  • Poll the aggregate campaign endpoint rather than inferring progress from raw child jobs alone.
  • Use cancellation sparingly and expect partial child completion if a campaign is interrupted mid-batch.