PSU-CSAR / snodas-ui

SNODAS Tools UI
0 stars 1 forks source link

Update date-range and doy queries to use the new endpoint as the source #8

Open lbross opened 3 weeks ago

lbross commented 3 weeks ago

The specs for the new zonal stats API endpoints are available via the OpenAPI docs (https://api.snodas.geog.pdx.edu/docs). One can experiment with the new endpoints on that page as well. Note that they return a json format response by default; to get a CSV like we'll want for the UI, the HTTP request ACCEPTS header needs to be set to "text/csv". To test that out, build and run a query via the test functionality on that page then copy the example curl command and change the ACCEPTS header from "/" to "text/csv".

The parameters are no longer part of the url and the query parameters are at the end of the url. Updating these endpoints to use the new api will allow us to retire the old api.