GNS Shaking Layers - First Release

First maps will be automatically generated and have not been reviewed. These may be updated by seismologists after significant earthquakes using evolving scientific information. If you would like to submit any feedback, please email: info@geonet.org.nz

 

Welcome to the Shaking Layers API.

The GeoNet project makes all its data and images freely available. Please ensure you have read and understood our Data Policy and Disclaimer before using any of these services.

The Shaking Layers API provides access to GeoNet shakemap data.

The following endpoints are available:

View published events (recent quakes or quakes in specific year)

Method: GET
URI
api/v1/events?year=(year)
Query Parameters
Optional:
year
e.g. 2022, if not specified, quakes in the past 30 days are returned.
Response Properties

The response is a list of eventIds for the request.

Request examples:

/api/v1/events
/api/v1/events?year=2022

Response example:
[
"2022p013266",
"2021p984529",
"2021p970877",
"2020p901938",
"2016p888683",
"2016p858000"
]
        

View published shakemap versions.

Method: GET
URI
api/v1/events/(eventId)/
Query Parameters
Required:
eventId
e.g. 771645
Optional:
Response Properties
Level 0:

eventid
The publicId of the event
versions
List of shakemap versions of the event in descending order of issue time.

Level 1:

versionpath
The path to request data for the shakemap version.
status
The publish status of the version, e.g. published, retracted.
issue_time
The time the shakemap is generated.
type
The run type of the shakemap, e.g. auto, reviewed.
Request example:

/api/v1/events/771645

Response example:
{
   "eventid":"771645",
   "versions":[
      {
         "versionpath":"2022-04-27T21:01:07-auto",
         "status":"published",
         "issue_time":"2022-04-27T21:01:07",
         "type":"auto"
      },
      {
         "versionpath":"2022-04-27T02:54:19-auto",
         "status":"published",
         "issue_time":"2022-04-27T02:54:19",
         "type":"auto"
      },
      {
         "versionpath":"2022-04-27T00:56:29-auto",
         "status":"published",
         "issue_time":"2022-04-27T00:56:29",
         "type":"auto"
      },
      {
         "versionpath":"2022-04-27T00:23:06-auto",
         "status":"published",
         "issue_time":"2022-04-27T00:23:06",
         "type":"auto"
      }
   ]
}
        

View published shakemap files (single file or list of file names)

Method: GET
URI
api/v1/events/(eventId)/(version)/(fileName)
Query Parameters
Required:
eventId
e.g. 771645
version
e.g. latest, 2022-01-14T03:20:22-auto
Optional:
fileName
e.g. cont_mmi.json, if not specified, the list of files are returned.
Response Properties
versionpath
The path to request data for the shakemap version.
status
The publish status of the version, e.g. published, retracted.
issue_time
The time the shakemap is generated.
type
The run type of the shakemap, e.g. auto, reviewed.
files
List of file names of the shakemap version.
Request examples:

/api/v1/events/771645/latest/intensity_mmi_contour_lines.json
/api/v1/events/771645/latest

Response example:
 {
   "versionpath":"2022-04-27T21:01:07-auto",
   "status":"published",
   "issue_time":"2022-04-27T21:01:07",
   "type":"auto",
   "files":[
      "intensity_mmi.tif",
      "intensity_mmi_contour_lines.json",
      "intensity_mmi_contour_polygons.zip",
      "intensity_mmi_map.pdf",
      "intensity_mmi_stddev.tif",
      "pga_g.tif",
      "pga_g_contour_lines.json",
      "pga_g_contour_polygons.zip",
      "pga_g_stddev.tif",
      "pgv_cms.tif",
      "pgv_cms_contour_lines.json",
      "pgv_cms_contour_polygons.zip",
      "pgv_cms_stddev.tif",
      "psa_0p3_g.tif",
      "psa_0p3_g_contour_lines.json",
      "psa_0p3_g_contour_polygons.zip",
      "psa_0p3_g_stddev.tif",
      "psa_1p0_g.tif",
      "psa_1p0_g_contour_lines.json",
      "psa_1p0_g_contour_polygons.zip",
      "psa_1p0_g_stddev.tif",
      "psa_3p0_g.tif",
      "psa_3p0_g_contour_lines.json",
      "psa_3p0_g_contour_polygons.zip",
      "psa_3p0_g_stddev.tif"
   ]
}
    

Download published shakemap files (latest) in a zip file.

Method: GET
URI
api/v1/download/events/(eventId)/(version).zip
Query Parameters
Required:
eventId
e.g. 771645
version
e.g. latest, 2022-01-13T09:20:22-auto
Request example:
 
      curl -o shaking.zip http://shakinglayers.geonet.org.nz/api/v1/download/events/771645/latest.zip