Requesting Hazard Types
To request the list of hazard types configured in the system please use the route defined here:
Get hazard types
GET
https://api.disasteraware.com/hazards/types
Headers
Name
Type
Description
Authorization
string
Authorize to access the API.
[
{
"type_id": "ACCIDENT",
"type_name": "Accident",
"type_icon": "accident.png"
},
{
"type_id": "ACTIVESHOOTER",
"type_name": "Active Shooter",
"type_icon": "active_shooter.png"
},
{
"type_id": "AVALANCHE",
"type_name": "Avalanche",
"type_icon": "avalanche.png"
},
{
"type_id": "BIOMEDICAL",
"type_name": "Biomedical",
"type_icon": "bio_medical.png"
},
{
"type_id": "CIVILUNREST",
"type_name": "Civil Unrest",
"type_icon": "civil_unrest.png"
},
{
"type_id": "COMBAT",
"type_name": "Combat",
"type_icon": "combat.png"
},
{
"type_id": "CONFLICT",
"type_name": "Conflict",
"type_icon": "conflict.png"
},
{
"type_id": "CYBER",
"type_name": "Cyber",
"type_icon": "cyber.png"
},
{
"type_id": "DROUGHT",
"type_name": "Drought",
"type_icon": "drought.png"
},
{
"type_id": "EARTHQUAKE",
"type_name": "Earthquake",
"type_icon": "earthquake.png"
},
{
"type_id": "EQUIPMENT",
"type_name": "Equipment",
"type_icon": "equipment.png"
},
{
"type_id": "EXTREMETEMPERATURE",
"type_name": "Extreme Temperature",
"type_icon": "extreme_temperature.png"
},
{
"type_id": "FLOOD",
"type_name": "Flood",
"type_icon": "flood.png"
},
{
"type_id": "HIGHSURF",
"type_name": "High Surf",
"type_icon": "high_surf.png"
},
{
"type_id": "HIGHWIND",
"type_name": "High Wind",
"type_icon": "high_wind.png"
},
{
"type_id": "INCIDENT",
"type_name": "Incident",
"type_icon": "incident.png"
},
{
"type_id": "LANDSLIDE",
"type_name": "Landslide",
"type_icon": "landslide.png"
},
{
"type_id": "MANMADE",
"type_name": "Man-Made",
"type_icon": "man_made.png"
},
{
"type_id": "MARINE",
"type_name": "Marine",
"type_icon": "marine.png"
},
{
"type_id": "OCCURRENCE",
"type_name": "Occurrence",
"type_icon": "occurrence.png"
},
{
"type_id": "POLITICALCONFLICT",
"type_name": "political_conflict.png",
"type_icon": "political_conflict.png"
},
{
"type_id": "STORM",
"type_name": "Storm",
"type_icon": "storm.png"
},
{
"type_id": "TERRORISM",
"type_name": "Terrorism",
"type_icon": "terrorism.png"
},
{
"type_id": "TORNADO",
"type_name": "Tornado",
"type_icon": "tornado.png"
},
{
"type_id": "CYCLONE",
"type_name": "Tropical Cyclone",
"type_icon": "cyclone.png"
},
{
"type_id": "TSUNAMI",
"type_name": "Tsunami",
"type_icon": "tsunami.png"
},
{
"type_id": "UNIT",
"type_name": "Unit",
"type_icon": "unit.png"
},
{
"type_id": "VOLCANO",
"type_name": "Volcanic Eruption",
"type_icon": "volcano.png"
},
{
"type_id": "WEAPONS",
"type_name": "Weapons",
"type_icon": "weapons.png"
},
{
"type_id": "WILDFIRE",
"type_name": "Wildfire",
"type_icon": "wildfire.png"
},
{
"type_id": "WINTERSTORM",
"type_name": "Winter Storm",
"type_icon": "winter_storm.png"
}
]
See Authorizing Requests page to get your accessToken.
curl --location --request GET \
'https://api.disasteraware.com/hazards/types' \
--header 'Authorization: Bearer your_accessToken'
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Scanner;
class Main {
public static void main(String[] args) throws IOException {
URL url = new URL("https://api.disasteraware.com/hazards/types");
HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();
httpConn.setRequestMethod("GET");
httpConn.setRequestProperty("Authorization", "Bearer your_accessToken");
InputStream responseStream = httpConn.getResponseCode() / 100 == 2
? httpConn.getInputStream()
: httpConn.getErrorStream();
Scanner s = new Scanner(responseStream).useDelimiter("\\A");
String response = s.hasNext() ? s.next() : "";
System.out.println(response);
}
}
var fetch = require('node-fetch');
fetch('https://api.disasteraware.com/hazards/types', {
headers: {
'Authorization': 'Bearer your_accessToken'
}
});
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
'Authorization' => 'Bearer your_accessToken'
);
$response = Requests::get('https://api.disasteraware.com/hazards/types', $headers);
import requests
headers = {
'Authorization': 'Bearer your_accessToken',
}
response = requests.get('https://api.disasteraware.com/hazards/types', headers=headers)
This request will return an array that contains all of the hazard types. Each element in the array will have three properties:
Properties
Definitions
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
Last updated
Was this helpful?