Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Fornax Cutouts User Documentation

API Reference

Fornax Cutouts exposes a REST API mounted at /api/v0/. The API is built with FastAPI and follows the IVOA UWS 1.1 standard for asynchronous job management.

Interactive Documentation

When the service is running, full interactive documentation is available at:

InterfaceURLDescription
Swagger UI/docsInteractive API explorer with request/response schemas
ReDoc/redocClean reference documentation
OpenAPI JSON/openapi.jsonRaw OpenAPI 3.x schema

Endpoint Groups

Health

MethodPathDescription
GET/api/healthService health check. Pings Redis with a 0.5s timeout. Returns status, details, timestamp, and environment (omitted in ops environments).

Example response:

{
  "status": "ok",
  "details": "",
  "timestamp": "2026-01-01T00:00:00Z",
  "environment": "dev"
}

Missions & Metadata

MethodPathDescription
GET/api/v0/missionsList all registered mission sources with their metadata (name, pixel size, max cutout size, available filters and surveys).
GET/api/v0/missions/{mission}Metadata for a single mission. Returns 404 if the mission is not registered.
POST/api/v0/filenamesLook up source FITS filenames for one or more missions given sky positions.
POST/api/v0/filenames/countCount matching source files for one or more missions without returning filename lists.
POST/api/v0/filenames/{mission}File lookup scoped to a specific mission.
POST/api/v0/filenames/{mission}/countCount matching source files for a specific mission. Same request body as /filenames/{mission}.

Sync Cutouts

Sync endpoints execute cutouts inline and return results immediately. Suitable for single cutouts or low-latency use cases.

MethodPathDescription
GET/api/v0/cutouts/syncRedirects to /sync/single preserving query parameters.
GET/api/v0/cutouts/sync/singleGenerate a single FITS cutout. Returns a file path or presigned S3 URL.
GET/api/v0/cutouts/sync/colorGenerate a colorized JPEG preview from three FITS files (red, green, blue channels).

/sync/single query parameters:

ParameterTypeRequiredDescription
filenamestringYesSource FITS file path or S3 URI.
rafloatYesRight ascension in decimal degrees (0 to 360).
decfloatYesDeclination in decimal degrees (−90 to 90).
sizefloatYesCutout width in units.
size_yfloatNoCutout height in units. Defaults to size (square).
unitsstringNoUnits for size and size_y: px (default), s (arcsec), m (arcmin), d (deg).
include_previewboolNoAlso generate a JPEG preview alongside the FITS cutout.

/sync/color accepts the same size, size_y, and units parameters.

If a mission can be inferred from a source file (see source_file_patterns), the requested size is converted to pixels using that mission’s pixel_size and checked against its max_cutout_size. Requests that exceed it return 422.

For S3 storage backends, sync results are returned as presigned HTTPS URLs. The API signs any s3:// paths returned by the worker. Expiration is CUTOUTS__SYNC_TTL seconds (default: 1 hour). When CUTOUTS__STORAGE__RETURN_SIGNED_URLS is true, workers may already return presigned URLs (see Configuration).


Async Cutouts (UWS)

The async endpoints implement the IVOA UWS 1.1 standard. Jobs are queued in Redis and executed by Celery workers. Results are written to Parquet files and queryable before the job finishes. Job state in Redis expires CUTOUTS__ASYNC_TTL seconds after job creation (default: 1 week).

Job Management

MethodPathDescription
GET/api/v0/cutouts/asyncList jobs. Defaults to the 100 most recent. Filterable by phase, after (creation time), and last (count). Returns UWS XML.
POST/api/v0/cutouts/asyncCreate and immediately queue a new cutout job. Returns 303 See Other to the job resource.
GET/api/v0/cutouts/async/{job_id}Full UWS JobSummary for a job (XML).
DELETE/api/v0/cutouts/async/{job_id}Not implemented (501).

Job Sub-resources

MethodPathDescription
GET/api/v0/cutouts/async/{job_id}/phaseCurrent execution phase (e.g. QUEUED, EXECUTING, COMPLETED).
POST/api/v0/cutouts/async/{job_id}/phaseNot implemented (501).
GET/api/v0/cutouts/async/{job_id}/resultsUWS results list (XML) with links to summary and cutouts sub-resources.
GET/api/v0/cutouts/async/{job_id}/results/summaryJSON object with task counters: queued, executing, completed, total.
GET/api/v0/cutouts/async/{job_id}/results/cutoutsPaginated cutout results. Supports output_format=xml|json|csv|votable, page, and limit query params.
GET/api/v0/cutouts/async/{job_id}/parametersUWS job parameters (XML).
GET/api/v0/cutouts/async/{job_id}/parameters/positionPaginated list of input sky positions.
GET/api/v0/cutouts/async/{job_id}/executiondurationExecution duration (always 0; not estimated).
GET/api/v0/cutouts/async/{job_id}/errorError summary if the job failed; empty 200 otherwise.
GET/api/v0/cutouts/async/{job_id}/ownerJob owner ID.
GET/api/v0/cutouts/async/{job_id}/quoteExecution time quote (not provided; returns empty string).
GET/api/v0/cutouts/async/{job_id}/destructionJob destruction time.

Submitting an Async Job

Jobs are submitted as multipart/form-data. Mission-specific parameters are passed as mission_name.param_name fields or as a JSON-encoded value under the mission name key.

Required fields:

FieldTypeDescription
positionstring[]One or more sky positions as "ra,dec" decimal strings or resolvable object names.
sizefloatCutout width in units.

Optional fields:

FieldTypeDescription
output_formatstring[]Output formats: fits (default), jpeg.
size_yfloatCutout height in units. Defaults to size (square).
unitsstringUnits for size and size_y: px (default), s (arcsec), m (arcmin), d (deg).
RUNIDstringClient-provided run identifier (max 64 chars).
{mission}.{param}stringMission-specific parameter (e.g. {mission}.filter=r).
{mission}JSON stringAll mission params as a JSON object (e.g. {mission}={"filter":"r", "survey": "my_survey"}).

Example using curl:

curl -X POST http://localhost:8000/api/v0/cutouts/async \
  -F "position=189.997633,-11.623054" \
  -F "position=241.516310,55.425480" \
  -F "size=256" \
  -F "output_format=fits" \
  -F "my_mission.filter=r" \
  -F "my_mission.survey=my_survey"

The response redirects (303) to /api/v0/cutouts/async/{job_id}.