corincerami / mars-photo-api

A Rails API for photo data from NASA's Mars Rovers
https://api.nasa.gov/#MarsPhotos
GNU General Public License v3.0
352 stars 48 forks source link

How to use the manifest endpoint? #36

Closed krtkush closed 7 years ago

krtkush commented 7 years ago

I was going through the Manifest Endpoint section but could not figure out how the request URL will look like.

I tried these -

  1. https://api.nasa.gov/mars-photos/api/v1/manifesst/Curiosity&api_key=DEMO_KEY
  2. https://api.nasa.gov/mars-photos/api/v1/manifest/Curiosity/api_key=DEMO_KEY

But neither of them are working for me.

Also, in the documentation, the endpoints are referred differently in two different instances. Once as /manifest/<rover_name> and the other time as /manifests/Curiosity.

corincerami commented 7 years ago

Ah, thanks for pointing that out. I'll fix the documentation. The endpoint for Curiosity should look like https://api.nasa.gov/mars-photos/api/v1/manifests/Curiosity?api_key=DEMO_KEY, so manifests is plural and api_key is a query parameter so it needs to follow a ?

corincerami commented 7 years ago

This was fixed in this repo's documentation by #37, I'm also going to open a pull request to fix the documentation in https://github.com/nasa/api-docs.

corincerami commented 7 years ago

https://github.com/nasa/api-docs/pull/78 has been opened, but I believe the maintainer is away for the next week. I'll close this issue once that's merged.

krtkush commented 7 years ago

Perfect! Thank you so much for the help.