Solved

Unable to download imagery

  • 20 September 2022
  • 4 replies
  • 288 views

Userlevel 1
Badge +2
  • ‎‎ 🌱
  • 2 posts replied to


Hello There,

We are trying to download imagery from API and for this, we have followed the documentation ( https://developers.planet.com/docs/planetschool/downloading-imagery-with-data-api/ )

1) We are able to search imagery with coordinates ( as per documentation https://developers.planet.com/docs/planetschool/searching-for-imagery-with-data-api/) and response ( https://drive.google.com/file/d/1q3xyvH5ScfNs53kvtSSHCxsshr9uwLT_/view?usp=sharing ) uploaded on google docs 

2) As per other documentation ("https://developers.planet.com/docs/planetschool/downloading-imagery-with-data-api/") we are trying to download imagery from API and we are making the below API call 

Endpoint URL: https://api.planet.com/data/v1/item-types/PSOrthoTile/items/5940459_3761508_2022-09-19_2251/assets/

Headers : authorization => 

Method type: GET

 

But when we make API request from this. API return empty response Please have a look (https://www.screencast.com/t/R6I6OZDFTf3y) As per documentation is should return status of imagery and download URL 

Please advise if I am missing anything.


Thanks in advance
 

icon

Best answer by elyhienrich 10 May 2023, 01:19

View original

4 replies

Userlevel 1
Badge +2

Hello!

I am unable to reproduce the empty response using that endpoint URL using curl. If I use a valid API key and configure the authorization header correctly, I get a JSON document with links to download URLs. If I use an invalid key or fail to provide an authorization header, I get a JSON-encoded error message. What tool are you using to make the request? I don’t recognize it from the screenshot.

Userlevel 1
Badge +2

One of my coworkers introduced me to Postman, which I can see you are using. Here’s what I see in the successful requests that I am making (note that I’ve hidden my API key).

 

 

I’m not using an Authorization helper, whereas it appears that you are (from the green dot in your screenshot).

Userlevel 2
Badge +3

I might depend what product you are trying to access as the call function will be different if you are using scenes, tiles and basemaps (e.g. for the NICFI Satellite Data Program).  

Userlevel 7
Badge +13

Summary of Solution from @sean.gillies & @NICFI Program team 

 

In Postman, which you are using. Here’s what I see in the successful requests that I am making (note that I’ve hidden my API key).

I’m not using an Authorization helper, whereas it appears that you are (from the green dot in your screenshot).

And it might depend what product you are trying to access as the call function will be different if you are using scenes, tiles and basemaps (e.g. for the NICFI Satellite Data Program).  

Reply