Skip to content

REST API

The REST API
Amazon API Gateway — REST API exposing `/catalog`, `/query`, and `/reprocess`. Browser CORS is locked to the Amplify hostname; CLI clients call the API Gateway URL directly.
is served through API Gateway. CORS does not apply to curl and scripts — use api_url directly.

From the demo repo root:

Terminal window
export API_URL="$(terraform -chdir=terraform output -raw api_url)"
echo "$API_URL"

Catalog uses prefix-based discovery on processed output:

Terminal window
curl "${API_URL}/catalog"

Response:

{
"stations": ["AUCK", "AVLN", "WGTN"]
}
Terminal window
curl -s "${API_URL}/catalog?station=auck" | jq .

Response:

{
"dates": [
{ "year": 2026, "doy": 179 },
{ "year": 2026, "doy": 178 }
]
}

Use sv on full-day requests for busy stations:

Terminal window
curl -s "${API_URL}/query?station=auck&start_time=2026-06-28T00:00:00Z&end_time=2026-06-28T23:59:59Z&sv=G01" | jq .meta

Expected meta:

{ "row_count": 519, "truncated": false }
ParameterConstraint
station4 alphanumeric characters

start_time / end_time

ISO 8601 UTC; max 7-day range
svOptional satellite filter (recommended for full-day queries)

See API Response Schemas and REST API Usage.

ClientURLCORS
curl / scriptsapi_urlNot applicable

Amplify
AWS Amplify — hosts the Vite portal SPA. This walkthrough deploys via manual zip upload (no Git connection required).
portal

app_url (calls api_url internally)

Requires CORS Lockdown