navigation bar
endpoints

Endpoints

An API endpoint is a location where users submit requests for information stored on the server. Endpoints available on this API include the following:

  1. schema
  2. flatfile

Each endpoint has a default set of information that is returned when no query string parameters are provided. Those defaults are described here. Customization of the returned information can be achieved using query string parameters.

schema

The schema endpoint provides access to the organizational structure of the database, including tables, fields, and key constraints. The default set of parameters is obtained using the URL below.

https://gmdatabase.org/schema

By default, this query returns a set of HTML tables that includes a list of publicly accessible tables in the database, as well as a list of the fields and the attributes of the fields in those tables.

flatfile

A flatfile is a single table that contains information synthesized from many different tables. You may be familiar with NGA flatfiles. The flatfile endpoint allows you to customize the information you’d like to put into your flatfile, and return it in HTML, or JSON. The flatfile endpoint provides access to data contained in most of the publicly accessible tables in the database. The URL below will return the first 50 rows containing data from the following tables:

'event', 'event_type', 'network', 'station', 'site', 'motion', 'path', 'time_series_metadata', 'intensity_measure', 'response_spectra'

All fields within these tables are returned, with the exception of foreign keys that associated with tables for which the primary key has already been requested. For example, event_id appears in both the event table (as a primary key) and the motion table (as a foreign key) to identify the event that generated the motion. These keys are really important to relate tables to each other within the relational database, but they are redundant in a flatfile where the data are merged into a single table.

https://gmdatabase.org/flatfile

If you’d like to customize your flatfile, check out our Query string parameters section.

timeseries

The timeseries service will provide access to publicly available timeseries data.

… under development …