Next Previous Up Contents
Next: Virgo-Millennium Simulation Query
Up: Load Window
Previous: VizieR Catalogue Service Query

### A.6.10 HAPI Query

HAPI load dialogue

HAPI, the Heliophysics Data Application Programmer’s Interface is a protocol for serving streamed time series data. This window is opened using the HAPI Query button () in the Load Window's toolbar or the Control Window's VO menu. It lets you choose a HAPI service, select a dataset, and request time series data over a given time range. Queries can optionally be broken up into chunks to allow download of datasets larger than that allowed in a single download by the service.

The window is divided into the following parts.

Service Selection
  This allows you to select and configure a HAPI service:
  HAPI Server:
    Choose from one of the known servers by name. By default the list of production servers is provided, but you can configure which are shown using the HAPI|Server List menu item.
  HAPI URL:
    This is filled in automatically when you choose an item using the selector above, but you can also type a URL by hand if you want to use an unregistered HAPI server.
  Chunk Limit:
    This configures whether data requests longer than the server normally allows will succeed. Most HAPI servers will reject requests larger than a certain size, but by increasing the value here larger datasets can be downloaded by breaking the request up into multiple chunks. Setting this value too high may allow abuse of a service, so use with care.
Datasets
  The main part of this panel lists the datasets provided by the selected service. Clicking on one of these will populate the panels below with the details of the selected dataset.

  To the right of the listing, search text may be entered into the Filter field to restrict the datasets listed (it is not case-sensitive). The text below gives the visible and total number of datasets available from the service.

Dataset Parameters
  A table displays all the parameters available for the selected dataset. ("Parameter" is HAPI terminology for what is known as a table column elsewhere in TOPCAT). For each parameter, metadata items Name, Type, Size, Units and Description are shown. These are mostly self-explanatory, but in the Size column a value in square brackets indicates an array value, while an unbracketed number gives string length.

  There is also a column of checkboxes marked Include. This determines which parameters will be included when the data is downloaded; if you don't need them all, you can uncheck some of the items (the initial timestamp item is always included). As a convenience, the toolbar buttons Select All () and Unselect All () will check/uncheck all of the items at once.

Dataset Metadata
  Shows some additional information about the selected dataset, if available:
  Cadence:
    Approximate interval between time series samples in ISO-8601 Duration format (e.g. "PT5M" means every 5 minutes).
  Max Duration:
    The longest interval for which the service is likely to permit a single query (though TOPCAT can split queries into multiple chunks).
  Resource URL
    A web page which may provide more information about the dataset. Clicking on it should show the page content in a desktop browser.
Interval
  Selects the time interval over which data set values will be downloaded. The Start Date and Stop Date fields should be filled in to give the minimum and maximum epochs required. The format is a restricted form of ISO-8601, basically `yyyy-mm-ddThh:mm:ss` or `yyyy-dddThh:mm:ss` in which any of the trailing parts can be omitted, so for instance "`2001-01-01`" or "`2001-01-01T16`" are both allowed. The minimum and maximum values allowed for the selected dataset are displayed to the right of the Start/Stop fields; the entered values must fall within these bounds.

  As an alternative to typing in the dates, you can use the sliders at the bottom: the left hand one selects the start date, and the right hand one selects the length of interval. Or you can use the sliders to set an approximate interval and then edit the dates by hand.

  The Lock button () prevents the Start/Stop dates fields from being updated automatically by the sliders or as a consequence of changing datasets, and can be useful when you are entering dates by hand.

OK Button
  Once all the fields are filled in with values that specify a valid HAPI query, the OK button at the bottom will be enabled, and you can click it to download the data as a table.
HAPI Menu
  The HAPI menu contains a few items that control the details of the client's interaction with HAPI services:
  Server List
    Determines how the items in the HAPI Server selector are populated; choosing one of these submenu items will re-populate that selector. The options here mostly correspond to different files at https://github.com/hapi-server/servers, but the Fallback option uses a hard-coded (perhaps out of date) list in case the online service is hard to reach.
  Streaming Format
    Determines the data format in which time series data will be downloaded from the chosen HAPI service. Options are:
    - Auto: binary if supported by the server, CSV otherwise
    - csv: force CSV format
    - binary: force binary format
  Fail on Limit
    Configures what happens if too much data is requested from the service. If set false (the default), the maximum permitted amount of data will be downloaded, and the truncated table will be loaded into TOPCAT and marked "(OVERFLOW)" in the control window. If set true, the load will fail, and no table will be loaded. Note the Chunk Limit setting in the Service Selection panel influences how much data is too much.
  Include Header with Data
    If selected, the service is requested to return the header information along with the data stream downloaded. Otherwise, the header information is acquired once with an initial metadata request and reused to interpret the data streams.
  GZIP Coding
    If selected, HTTP-level gzip compression is requested when downloading data from the HAPI server.

Next Previous Up Contents
Next: Virgo-Millennium Simulation Query
Up: Load Window
Previous: VizieR Catalogue Service Query

TOPCAT - Tool for OPerations on Catalogues And Tables
Starlink User Note253
TOPCAT web page: http://www.starlink.ac.uk/topcat/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@jiscmail.ac.uk