Requesting a Hazard’s Products
To request the list of products associated to a hazard:
Get a list of products
GET
https://api.disasteraware.com/hazards/{hazard-id}/products
Query Parameters
Headers
[
{
"app_IDs": null,
"comment_Text": "",
"data": null,
"filename": null,
"hazard_ID": 134583,
"is_Hidden": "N",
"org_ID": 0,
"org_IDs": "",
"organization_acronym": null,
"parent_ID": 0,
"product_ID": 1153909,
"product_Type": "FOLDER_PRODUCT",
"security_Flag": "A",
"title": "Situational Awareness (SA)",
"uuid": "4dabbee9-ec29-4da1-b1e4-2a6864672c63",
"user_ID": "DisasterAWARE (Automated)",
"product_url": null,
"suffix": "folder",
"create_Date": "1619972855960",
"update_Date": "1619972861478",
"timeline_Date": "1619972861478",
"update_User": "ddp",
"geo_Locations": ""
},
{
"app_IDs": null,
"comment_Text": "",
"data": null,
"filename": null,
"hazard_ID": 134583,
"is_Hidden": "N",
"org_ID": 0,
"org_IDs": "",
"organization_acronym": null,
"parent_ID": 1153909,
"product_ID": 1153910,
"product_Type": "FOLDER_PRODUCT",
"security_Flag": "A",
"title": "PDC (SA)",
"uuid": "d9671ac2-535d-410c-8f43-5c0ddf28bcb6",
"user_ID": "DisasterAWARE (Automated)",
"product_url": null,
"suffix": "folder",
"create_Date": "1619972856856",
"update_Date": "1619972861478",
"timeline_Date": "1619972861478",
"update_User": "ddp",
"geo_Locations": ""
},
{
"app_IDs": null,
"comment_Text": "Auto generated folder product",
"data": null,
"filename": null,
"hazard_ID": 134583,
"is_Hidden": "N",
"org_ID": 0,
"org_IDs": "",
"organization_acronym": null,
"parent_ID": 0,
"product_ID": 1153907,
"product_Type": "FOLDER_PRODUCT",
"security_Flag": "A",
"title": "Messages",
"uuid": "8141aa62-b375-4968-96a8-3f7d00418fd1",
"user_ID": "DisasterAWARE (Automated)",
"product_url": null,
"suffix": "folder",
"create_Date": "1619972596063",
"update_Date": "1619972596577",
"timeline_Date": "1619972596577",
"update_User": "d2p2",
"geo_Locations": ""
},
{
"app_IDs": null,
"comment_Text": "PDC GP-CIV-152466-02MAY21",
"data": "/cc3a6abf-4716-43e6-b621-b7a3f6d3ffe1/fa7158e1-335b-430b-9def-de3e8d7e145c/PDC_GP-CIV-152466-02MAY21.pdf",
"filename": "PDC_GP-CIV-152466-02MAY21.pdf",
"hazard_ID": 134583,
"is_Hidden": "N",
"org_ID": 0,
"org_IDs": "",
"organization_acronym": null,
"parent_ID": 1153910,
"product_ID": 1153911,
"product_Type": "FILE_PRODUCT",
"security_Flag": "A",
"title": "PDC GP-CIV-152466-02MAY21",
"uuid": "fa7158e1-335b-430b-9def-de3e8d7e145c",
"user_ID": "DisasterAWARE (Automated)",
"product_url": "../prodview/html/proddisplay.jsp?prodid=1153911",
"suffix": "pdf",
"create_Date": "1619972861478",
"update_Date": "1619972861478",
"timeline_Date": "1619972861478",
"update_User": "ddp",
"geo_Locations": ""
},
{
"app_IDs": null,
"comment_Text": "18bf97c1-0478-49ae-8bb2-320ef93891cd",
"data": "/cc3a6abf-4716-43e6-b621-b7a3f6d3ffe1/d1fb6bb3-3daa-460b-bfe0-63b242daf613/Civil_Unrest_Protest_Portland_Oregon_United_States.txt",
"filename": "Civil_Unrest_Protest_Portland_Oregon_United_States.txt",
"hazard_ID": 134583,
"is_Hidden": "N",
"org_ID": 0,
"org_IDs": "",
"organization_acronym": null,
"parent_ID": 1153907,
"product_ID": 1153908,
"product_Type": "FILE_PRODUCT",
"security_Flag": "A",
"title": "Civil Unrest (Protest) - Portland, Oregon, United States",
"uuid": "d1fb6bb3-3daa-460b-bfe0-63b242daf613",
"user_ID": "DisasterAWARE (Automated)",
"product_url": "../prodview/html/proddisplay.jsp?prodid=1153908",
"suffix": "txt",
"create_Date": "1619972596577",
"update_Date": "1619972596577",
"timeline_Date": "1619972596577",
"update_User": "d2p2",
"geo_Locations": ""
}
]
Invalid Token
See Authorizing Requests page to get your accessToken.
Below is an example request with path parameters hazard-id=134583
curl --location --request GET \
'https://api.disasteraware.com/hazards/134583/products' \
--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/products");
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/products', {
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/products', $headers);
import requests
headers = {
'Authorization': 'Bearer your_accessToken',
}
response = requests.get('https://api.disasteraware.com/hazards/134583/products', headers=headers)
The response will include an array of product objects. Each element in the array will include the following properties:
Last updated