AppEEARS API

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
bholmes
Posts: 1
Joined: Wed Apr 06, 2022 9:02 am America/New_York

AppEEARS API

by bholmes » Wed Apr 06, 2022 9:12 am America/New_York

Hi all,

I have been following the AppEEARS API Python tutorial [1] and have a quick question with regards to the API URL. The article indicates that the API URL should be "https://lpdaacsvc.cr.usgs.gov/appeears/api/". However, when I attempt to generate a token with the following code:

api = 'https://lpdaacsvc.cr.usgs.gov/appeears/api/'

token_response = requests.post('{}login'.format(api), auth=(username, password)).json()

I receive the following error:
"JSONDecodeError: [Errno Expecting value] <html> <head><title>405 Not Allowed</title></head> <body> <center><h1>405 Not Allowed</h1></center> <hr><center>nginx</center> </body> </html> : 0"

In the AppEEARS API documentation [2], a different API URL is given "https://appeears.earthdatacloud.nasa.gov/api/". When I use this API URL no errors are returned and I receive a user token as expected.

My question is, why does the first URL fail and is there any drawback to using the second URL?

[1] https://lpdaac.usgs.gov/resources/e-learning/getting-started-with-the-a%CF%81%CF%81eears-api-submitting-and-downloading-an-area-request/
[2] https://appeears.earthdatacloud.nasa.gov/api/

LP DAAC - lien
User Services
User Services
Posts: 50
Joined: Thu Jun 25, 2020 9:51 am America/New_York

Re: AppEEARS API

by LP DAAC - lien » Mon Apr 11, 2022 3:10 pm America/New_York

Hi,
Sorry for the hassles with this, the tutorial has not been updated yet. Two weeks ago today AppEEARS was moved into the cloud. So that second URL (https://appeears.earthdatacloud.nasa.gov/api/) is correct.
Thanks,

Brett

Post Reply