Comment on page

Hazard’s Smart Alert Geography

The Maximum Alert Geography (MAG) defines the hazard’s notification area, not the impact. The MAG is considered the most expansive area possible for which users should receive a notification for this hazard. For example, a flood in San Francisco may not affect Oakland. But if you are in Oakland, you’d want to know if there is a flood in San Francisco.
get
https://api.disasteraware.com/
hazard​s/{hazard-id}​/alert-geography
Get MAG for a hazard
See Authorizing Requests page to get your accessToken.
You may login to https://enterprise.disasteraware.com/enterprise/ to get a hazard-id.
Below is an example request with path parameters hazard-id=134583
cURL
Java
Node.js
PHP
Python
curl --location --request GET \
'https://api.disasteraware.com/hazards/134583/alert-geography' \
--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/134583/alert-geography");
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/134583/alert-geography', {
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/134583/alert-geography', $headers);
import requests
headers = {
'Authorization': 'Bearer your_accessToken',
}
response = requests.get('https://api.disasteraware.com/hazards/134583/alert-geography', headers=headers)
The response for this request will return an object with the following properties:
Properties
Definitions
createDate
The time this MAG was created. The value is a Unix timestamp.
creator
The user who created this MAG.
isActive
Whether this MAG is active or not. If the MAG is disabled, hazard updates will not produce new MAGs.
magId
The primary key and identifier for this MAG.
magType
This field has two potential values: CALCULATED or MANUAL. Calculated means this MAG was created using an algorithm. MANUAL means this MAG was created by a user.
title
A human-readable title for this MAG.
updateDate
The time this MAG was modified. The value is a Unix timestamp.
uuid
The unique identifier for this MAG across all DisasterAWARE systems.
wkt
This property describes the geometry for this MAG. The value is an object who has the geometry in two variations of Well-known text (WKT) - string and binary. For more information about the WKT format please visit: https://en.wikipedia.org/wiki/Well-known_text