Page 1 of 1

how to get all file list from the API

Posted: Mon Nov 27, 2023 11:39 pm America/New_York
by mahmouduae
Dears,
i was using this way before to get all file list data (https://oceandata.sci.gsfc.nasa.gov/api/file_search?search=AQUA_MODIS.2020*.L3m.DAY.CHL.chlor_a.4km.nc&format=json)
now it shows me the first 2 months of the year 2020. how i can get all of the year ?

Re: how to get all file list from the API

Posted: Tue Nov 28, 2023 10:40 am America/New_York
by OB ODPS - towens
While they work out the json issue, these will give you a list of URLs

Code: Select all

wget -q --post-data="results_as_file=1&sensor_id=7&dtid=1043&sdate=2020-01-01 00:00:00&edate=2020-12-31 59:59:59&subType=1&addurl=1&prod_id=chlor_a&resolution_id=4km&period=DAY" -O - https://oceandata.sci.gsfc.nasa.gov/api/file_search
or
curl -d "results_as_file=1&sensor_id=7&dtid=1043&sdate=2020-01-01 00:00:00&edate=2020-12-31 59:59:59&subType=1&addurl=1&prod_id=chlor_a&resolution_id=4km&period=DAY" https://oceandata.sci.gsfc.nasa.gov/api/file_search
and these will get you the checksums:

Code: Select all

wget -q --post-data="results_as_file=1&sensor_id=7&dtid=1043&sdate=2020-01-01 00:00:00&edate=2020-12-31 59:59:59&subType=1&cksum=1&prod_id=chlor_a&resolution_id=4km&period=DAY" -O - https://oceandata.sci.gsfc.nasa.gov/api/file_search
or
curl -d "results_as_file=1&sensor_id=7&dtid=1043&sdate=2020-01-01 00:00:00&edate=2020-12-31 59:59:59&subType=1&cksum=1&prod_id=chlor_a&resolution_id=4km&period=DAY" https://oceandata.sci.gsfc.nasa.gov/api/file_search