sat-utils / sat-search

A python client for sat-api
MIT License
189 stars 43 forks source link

API Endpoints #126

Open saeedojaghi opened 2 years ago

saeedojaghi commented 2 years ago

I tried to check the different API endpoint from the https://stacindex.org/catalogs?access=public&type=api, however, just two of them are working with sat-search. The first one is https://landsatlook.usgs.gov/stac-server and the second one is https://earth-search.aws.element84.com/v0.Hoe is it possible to use other API in sat search ???

WebCoder49 commented 2 years ago

I have also encountered this error, when trying to use NASA's Earthdata endpoint and always returns zero results even when I have added my authentication credentials. satsearch.search.Search.collection also fails with an error that the response to the POST request it sent is invalid.

I think this is because the library is sending a POST request to the collection page (search.py_L86 and search.py_L76), whereas the API standard states this should be a GET. Most endpoints only support GET so do not work with this library.

I hope this is useful, and I hope it does not cause any other unexpected bugs. If you want to see the code and errors, please see below:


https://cmr.earthdata.nasa.gov/stac/ASF/AIRSAR_INT_JPG.v1 does not support POST requests, and therefore there is an invalid response. image - Error raised when I run collection_obj = results.collection(<collection_name>) image - this returns zero items on search; this is a custom class that worked with the element84 endpoint, even when using fsspec basic auth