how to get all file list from the API

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
mahmouduae
Posts: 1
Joined: Mon Nov 27, 2023 11:37 pm America/New_York
Answers: 0

how to get all file list from the API

by mahmouduae » Mon Nov 27, 2023 11:39 pm America/New_York

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 ?

Tags:

OB ODPS - towens
Subject Matter Expert
Subject Matter Expert
Posts: 378
Joined: Fri Feb 05, 2021 9:17 am America/New_York
Answers: 0
Been thanked: 4 times

Re: how to get all file list from the API

by OB ODPS - towens » Tue Nov 28, 2023 10:40 am America/New_York

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

Post Reply