Giter Site home page Giter Site logo

api-docs's Introduction

api-docs: gh-pages

nasa/api-docs repository contains the front-end for http://api.nasa.gov/. This site is currently CNAME mapped to NASA domain, but in the event the page is down, you can access it through Github Pages here: http://nasa.github.io/api-docs/ .

This is the current iteration of api.nasa.gov.

This project contains API listings of available NASA public APIs and well as a GSA API key form to allow NASA branded API pages to be integrated with the GSA api.data.gov system. Our listing is currently incomplete as we are currently displaying the more simple API's in our .json storage system.

For other US government agency API pages, see https://api.data.gov/

Features

  • Obtain an API key by filling out the form in the Generate API Key Section
  • Information about the usage capabilities of your API in the Authentication Section
  • A list of a few NASA publics API's and how to use them in the Browse APIs Section

Libraries and Software

api.nasa.gov utilizes the following libraries and resources:

  • NASA Web Design Service(CSS and JS): A style system created in order to help NASA websites have a more unified look. You can find their info here https://nasa.github.io/nasawds-site/
  • JQuery (JS): A library that simplifies the javascript coding process

The API information that our site hosts is currently archived in our apis.json folder which is then read and generated into the page dynamically.

NOTICE: NASA does not host/develop these APIs

We only map the orginal developer's endpoint to one of our api.nasa.gov endpoints. Basically, api.nasa.gov acts as a passthrough service. Please do not contact us with technical questions about a particular API as we do not have access to most API production environments. You can follow links on our site to get more information about each API and use the contact information on those pages to reach the people who control each API.

If you are a NASA civil servant or contractor and wish to add an API to api.nasa.gov, please contact [email protected].

If you are behind the NASA firewall, you can find additional details on https://developer.nasa.gov/pages/OpenInnovation/Table_of_Contents_Public/2021/05/14/API-NASA-GOV.html

Site Developer: Darith Yim, Daniel Rendon, Jeffery Rubio, Tessa Brazda

NASA Official: Nidhi Wahi

Last updated: 03/26/2024

api-docs's People

Contributors

adityadees avatar arcey-bot avatar corincerami avatar danhammer avatar darith27 avatar dcrendon avatar drbitboy avatar evantayloryates avatar hilarydev avatar ivanmarkchang avatar ivanstan avatar jasonduley avatar jmhorn2015 avatar jnbetancourt avatar justingosses avatar nwunderly avatar open-nasa-robot avatar rubiojeffery avatar tkantz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api-docs's Issues

APOD API documentation could use some updating.

Dan has added new functionality to the APOD API such as ?hd and ?direct but the official API reference still only states that 3 parameters are available:

Parameter Type Default Description
date YYYY-MM-DD today The date of the APOD image to retrieve
concept_tags bool False Return an ordered dictionary of concepts from the APOD explanation
api_key string DEMO_KEY api.nasa.gov key for expanded usage

I have had first hand experience of the issue this causes by wrongly thinking a parameter doesn't exist, writing code for a workaround, only to realise the only place the parameter was mentioned was in the issues section.

Updated version (parameters that I know of.)

Parameter Type Default Description
date YYYY-MM-DD today The date of the APOD image to retrieve
concept_tags bool False Return an ordered dictionary of concepts from the APOD explanation
api_key string DEMO_KEY api.nasa.gov key for expanded usage
hd boolean False Retrieve the URL for the high resolution image

Go to https://api.nasa.gov/planetary/apod/direct(insert_api_call) to retrieve the CORS enabled APOD image.

APOD API expose image credit

Hi again, sorry for all the requests.

I know on the APOD website it makes a point to credit the images to their owners and has a disclaimer about sharing images on the about page (http://apod.nasa.gov/apod/lib/about_apod.html).

Would it be possible to expose the image credit in the API response so we can build in handling for those not in the public domain?

No 'Access-Control-Allow-Origin' header is present on the requested resource. Does APOD allow CORS?

It looks like https://api.data.gov/nasa/planetary/apod doesn't allow CORS? I can access it via my web browser just fine with my API_KEY, but not from my development web server running on localhost. Thus I get:
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.

I'm just wondering if that can be changed - to allow CORS? I was hoping to avoid JSONP ...
Thanks!
-Ben
Benjamin H Boruff
[email protected]
benjaminboruff.github.io

example API query 404s

I just created an API key and the resulting page (and email that was sent to me) had an example API request just like this: https://api.nasa.gov/api.nasa.gov/nasa/planetary/apod?api_key=MY_API_KEY&format=JSON. But that returns a gh-pages 404.

Change the contact-us link in the api key signup

At http://nasa.github.io/api-docs/#apply-for-an-api-key, after filling out the form and requesting the key, the default language includes a contact us link that goes to https://api.data.gov/contact/. It would be better to have that link to https://github.com/nasa/api-docs/issues or the NASA API team's preferred contact mechanism.

It looks like this is hard baked into https://api.data.gov/static/javascripts/signup_embed.js, so it may be that the api.data.gov team needs to create an agency-specfic version of the file to do this.

@GUI - any thoughts?

APOD API response with date

Wondering if it would be possible to expose the posted_at date in the response body just so it's easy to compare the expected post with the response?

APOD: Only Content-Type and cache-control headers return non-Null values

These are the headers the APOD API response are supposed to return, but I'm only getting the Content-Type and cache-control headers as non-Null values. Anyone else getting Null for the other header values? The X-RateLimit-Remaining is kind of important to know!

accept-ranges:bytes
access-control-allow-origin:*
age:0
alternate-protocol:80:quic,p=0
cache-control:no-cache
Connection:keep-alive
content-encoding:gzip
Content-Length:662
Content-Type:application/json
Date:Wed, 03 Jun 2015 16:24:45 GMT
Server:nginx
vary:Accept-Encoding, Accept-Encoding
via:1.1 varnish-v4
x-cache:MISS
X-RateLimit-Limit:30
X-RateLimit-Remaining:24
x-varnish:15443927

Don't we also need something like an access-control-expose-headers for the X-RateLimit-Remaining header on the server? (see section 5.3 Access-Control-Expose-Headers Response Header at w3.org). Or am I missing something?

Earth (Landsat) API Image Compiling

I'm currently building a web app with the Earth (Landsat) API, and am frustrated at its limited functionality. The images are quite small (0.025° x 0.025°), so trying to grid out a map at any reasonable zoom level requires hundreds of requests.

It'd be quite easy to compile images server-side and then serve such compiled images. Off the top of my head, this could be done in PHP (example).

The idea is that you would be able to send a request of bounds instead of a single lat/lon, like so:

[[northWestCorner],[northEastCorner],[southWestCorner],[southEastCorner]]

And the API would return a stitched png of all the 0.025° x 0.025° pngs within those bounds. This would drastically decrease the number of requests required to grid out a map.

open links in new tab

When opening a link (example query) it should open in a new window target="_blank"

Connection error response issues/architecture for api.nasa.gov

This is hard to explain ...
This weekend, there were obviously some sort of connection issues to the APOD api endpoint. I was a bit perplexed as to why my app failed to deal with this issue. My AJAX requests use promises to deal with both successful and failed http get requests to the APOD api.

So I logged the response from api.data.gov to my console, and it was clear: a "failed" connection to the APOD endpoint looks like it is detected by something called a HTTPConnectionPool, which redirects the request (or is a result of redirection itself). This results in a "successful" connection and a response with a JSON payload with error and message (Admins have been notified) properties.

That is why my app failed! The AJAX request was not allowed to fail! That is a problem, IMHO ... at least from a JavaScript/AJAX/Frontend developer perspective. Had the request just failed to connect at all, my app would have immediately responded, alerting the user to the failure. Since the request did not, could NOT fail, then my app tried to process the JSON payload as if it were a regular, successful JSON data response from APOD. Well, that meant I had to rewrite the app to check for an "error" property in the JSON response, and deal with it accordingly rather than relying on the AJAX promise handler.

This has a negative side effect in that it takes a LONG time for the response to return to the app! And, IMHO, is probably putting an unnecessary load on the backend infrastructure. I could be wrong about that, though. It certainly is unnecessary, from my perspective, to receive any info about a failed resource. It just needs to fail to connect. THAT, I can deal with! It is much faster and more efficient from a frontend perspective to deal with a refused/failed connection, than to deal with a successful but wrong connection!

In other words, a failed connection is generic, thus efficiently dealt with via promises on the frontend. A successful but wrong connection (i.e. a request to one resource that leads to a response from a different resource) makes dealing with the error very difficult since it makes frontend promises irrelevant. And figuring out the format of the JSON "failure" response, and what to do with it, may require a case-by-case analysis of each resource to figure out what "failure" means, as opposed to a generic connect failure.

Long story short: If I had my druthers, I would rather get a failed connection, full-stop, than a successful connection (that I don't want) telling me that what I wanted is unavailable. Does that make sense? :) Outage info could be posted elsewhere.

I hope not TLDR!

https

The documentation should require https, as it did before.

sample queries

create a sample query for each. maybe even surface these at the top.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.