Skip to content

OpenScienceComputing/erddap-openapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

erddap-openapi

OpenAPI 3.1 specification for the ERDDAP REST API.

ERDDAP is a scientific data server used by NOAA, IOOS, Copernicus, and hundreds of other institutions worldwide. This spec makes the API machine-readable so that LLM agents, code generators, and API tooling can interact with any ERDDAP server without needing the documentation in context.

Coverage

Endpoint group Path pattern Status
Simple search GET /search/index.{fileType}
Advanced search GET /search/advanced.{fileType}
List all datasets GET /info/index.{fileType}
Dataset metadata GET /info/{datasetID}/index.{fileType}
Categorize (list values) GET /categorize/{attribute}/index.{fileType}
Categorize (filter) GET /categorize/{attribute}/{value}/index.{fileType}
Tabular data (tabledap) GET /tabledap/{datasetID}.{fileType}
Gridded data (griddap) GET /griddap/{datasetID}.{fileType}
Raw files GET /files/{datasetID}/

Usage

With any ERDDAP server

The spec uses a server variable for the base URL. Override it with any ERDDAP instance:

https://coastwatch.pfeg.noaa.gov/erddap   # NOAA CoastWatch (default)
https://erddap.ioos.us/erddap             # US IOOS
https://erddap.emodnet-physics.eu/erddap  # EMODnet Physics

Two-phase workflow

Because tabledap and griddap query parameters (variable names, valid ranges) are dataset-specific, the recommended agent workflow is:

  1. Search — find a dataset with /search/advanced.json
  2. Inspect — fetch its metadata with /info/{datasetID}/index.json to discover variable names, units, and coordinate ranges
  3. Download — request a subset from /tabledap/ or /griddap/

Constraint syntax

Data requests use a constraint language appended to the query string:

# tabledap — variable list followed by constraints
/tabledap/cwwcNDBCMet.csv?time,latitude,longitude,wtmp&time>=2020-01-01T00:00:00Z&time<=2020-01-08T00:00:00Z&latitude>=35&latitude<=45

# griddap — dimension subscripts in parentheses
/griddap/erdMBsstd1day.nc?sst[(2020-01-01T12:00:00Z)][(0.0)][(20.0):(50.0)][(-80.0):(-60.0)]

Supported operators: =, !=, <, <=, >, >=, =~ (Java regex). Relative time: now-7days, now-1hour.

ERDDAP documentation

Contributing

PRs welcome. The spec is validated on every pull request via Spectral — run it locally with:

npx @stoplight/spectral-cli lint --ruleset spectral.yaml openapi.yaml

License

Apache 2.0

About

OpenAPI 3.1 specification for the ERDDAP REST API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors