Table of Contents
The Heliophysics Data Application Programmer’s Interface (HAPI) specification is a time series download and streaming format specification. A 1-page summary is given in HAPI_OnePager.pdf. A more detailed overview is given in the JGR article Weigel et al., 2021 and the presentation by Vandegriff et al. (pdf|YouTube video).
The HAPI specification was recommended by COSPAR in 2018 as the common data access API for space science and space weather data.
When data are available from a HAPI server, there is no need to download data files and write custom file reader programs. Using a HAPI client library, data can be loaded into an array using a single command using HAPI IDL, MATLAB, and Python clients. Data from HAPI servers is also accessible to users of Autoplot, PySPEDAS, and IDL SPEDAS. Sample scripts and containing instructions for accessing data using the above–listed clients may be found by selecting a server, dataset, and time range at the web interface http://hapi-server.org/servers/.
A list of HAPI-compliant data servers is available at http://hapi-server.org/servers/.
The hapi-server GitHub project contains a collection of repositories for HAPI–related software and documentation, including client and server libraries and code for verifying and testing a HAPI server.
Use the interface at http://hapi-server.org/servers/ to download data from your browser, generate ~10-line wget/curl/IDL/MATLAB/Python scripts to download data, or create preview plots.
A demonstration of using 5 different clients to access data from a HAPI server is shown in a YouTube video.
All software related to the HAPI specification is available from its GitHub project page. Software includes clients, servers, and a server verifier/validator.
The HAPI specification describes a minimum set of capabilities needed for a server to allow access to the time series data values within one or more data collections.
Prior to writing server-side software, we suggest trying the generic stand-alone HAPI server. If you can generate HAPI ASCII of your datasets with a command line program, you can use this server to quickly get a HAPI-compliant server running on your site.
User-contributed source code for servers in various languages is available at at GitHub. This contributed code is typically not up-to-date or generalized but it may be useful for getting started.
See the server-ui repository for a basic server entry/overview page template for a HAPI server. Code is also available for a web interface for generating URLs to download data, plotting data from a HAPI server, and generating scripts that read and plot the selected parameter (the code used by http://hapi-server.org/servers/).
Server developers can test their server for HAPI-compliance using the HAPI server verification service.