Menu

API

There are four public REST endpoints in version 0.1 of the CUAHSI subsetter: subset, gethucbox, jobs, and data (see Figure 1). The subset endpoint accepts bounding box coordinates in the WGS84 spatial reference system and uses these data to (1) validate the bounding box, (2) convert into the coordinate system used by NWM (an Albers Conformal Conic variant), and (3) submit the job to run as a background task. The jobs endpoint is used to lookup the status of any given job via unique identifier. Finally, the data endpoint is used to download the subset domain data via unique identifier. Technical details for each endpoint outlined below.

system-archiecture
GET - /nwm/v1_2_2/subset?{params}
  • Description: submits a new subsetting job for the NWM v1.2.2 domain data.
  • Returns: a json string containing the a unique job identifier. This job identifier can be used to check the status of the job.
  • Parameters (all coordinates are in the Spherical Lambert Conformal Conic SRS):
    • llat: the lower latitude of the bounding box
    • llon: the lower longitude of the bounding box
    • ulat: the upper latitude of the bounding box
    • ulon: the upper longitude of the bounding box
GET - /jobs/{id}
  • Description: gets the status of an existing job
  • Returns: a json string containg the job id, status, and output file location (if job has completed)
  • Parameters:
    • id: the unique identifier for the job
GET - /data/{id}.tar.gz
  • Description: downloads the subsetted data via job id
  • Returns: data archived in tar.gz
  • Parameters:
    • id: the unique identifier for the job