Requesting Hazard Types
To request the list of hazard types configured in the system please use the route defined here:
Returns the full set of hazard type reference values (e.g. EARTHQUAKE, FLOOD).
JWT access token obtained from POST /authorize. Tokens expire after
15 minutes.
Array of hazard types.
Unique type identifier.
EARTHQUAKEHuman-readable type name.
EarthquakeIcon filename for UI rendering.
earthquake.pngForbidden -- invalid or expired token.
GET /hazards/types HTTP/1.1
Host: api-v2.disasteraware.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"type_id": "EARTHQUAKE",
"type_name": "Earthquake",
"type_icon": "earthquake.png"
}
]This request will return an array that contains all of the hazard types. Each element in the array will have three properties:
type_id
This is like the primary key for the hazard type. This is the value that will be found on the hazard object.
type_name
A human readable value for the hazard e.g. Volcano.
type_icon
This is the url for the hazard type icon's image e.g. avalanche.png. The hazard icons are hosted at: https://static.pdc.org/icons/hazard/large/. To construct the fully qualified location for the hazard type's icon combine the host location with type_icon value.
Last updated
