Process predictive alert (PDIE-authenticated)
curl --request POST \
--url https://api.example.com/v1/pre-alert \
--header 'Content-Type: application/json' \
--data '
{
"predicted_location": {
"latitude": 123,
"longitude": 123,
"altitude": 123
},
"alert_id": "<string>",
"type": "<string>",
"timestamp": "<string>",
"severity": "<string>",
"status": "<string>",
"message": "<string>",
"vulnerabilities": [
{
"sector_id": "<string>",
"vulnerability_type": "<string>",
"population_at_risk": 123,
"infrastructure": "<string>",
"priority": 123,
"is_critical": true
}
],
"impacted_radius_meters": 123,
"estimated_time_hours": 123,
"source": "<string>"
}
'import requests
url = "https://api.example.com/v1/pre-alert"
payload = {
"predicted_location": {
"latitude": 123,
"longitude": 123,
"altitude": 123
},
"alert_id": "<string>",
"type": "<string>",
"timestamp": "<string>",
"severity": "<string>",
"status": "<string>",
"message": "<string>",
"vulnerabilities": [
{
"sector_id": "<string>",
"vulnerability_type": "<string>",
"population_at_risk": 123,
"infrastructure": "<string>",
"priority": 123,
"is_critical": True
}
],
"impacted_radius_meters": 123,
"estimated_time_hours": 123,
"source": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
predicted_location: {latitude: 123, longitude: 123, altitude: 123},
alert_id: '<string>',
type: '<string>',
timestamp: '<string>',
severity: '<string>',
status: '<string>',
message: '<string>',
vulnerabilities: [
{
sector_id: '<string>',
vulnerability_type: '<string>',
population_at_risk: 123,
infrastructure: '<string>',
priority: 123,
is_critical: true
}
],
impacted_radius_meters: 123,
estimated_time_hours: 123,
source: '<string>'
})
};
fetch('https://api.example.com/v1/pre-alert', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/pre-alert",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'predicted_location' => [
'latitude' => 123,
'longitude' => 123,
'altitude' => 123
],
'alert_id' => '<string>',
'type' => '<string>',
'timestamp' => '<string>',
'severity' => '<string>',
'status' => '<string>',
'message' => '<string>',
'vulnerabilities' => [
[
'sector_id' => '<string>',
'vulnerability_type' => '<string>',
'population_at_risk' => 123,
'infrastructure' => '<string>',
'priority' => 123,
'is_critical' => true
]
],
'impacted_radius_meters' => 123,
'estimated_time_hours' => 123,
'source' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/pre-alert"
payload := strings.NewReader("{\n \"predicted_location\": {\n \"latitude\": 123,\n \"longitude\": 123,\n \"altitude\": 123\n },\n \"alert_id\": \"<string>\",\n \"type\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"severity\": \"<string>\",\n \"status\": \"<string>\",\n \"message\": \"<string>\",\n \"vulnerabilities\": [\n {\n \"sector_id\": \"<string>\",\n \"vulnerability_type\": \"<string>\",\n \"population_at_risk\": 123,\n \"infrastructure\": \"<string>\",\n \"priority\": 123,\n \"is_critical\": true\n }\n ],\n \"impacted_radius_meters\": 123,\n \"estimated_time_hours\": 123,\n \"source\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/pre-alert")
.header("Content-Type", "application/json")
.body("{\n \"predicted_location\": {\n \"latitude\": 123,\n \"longitude\": 123,\n \"altitude\": 123\n },\n \"alert_id\": \"<string>\",\n \"type\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"severity\": \"<string>\",\n \"status\": \"<string>\",\n \"message\": \"<string>\",\n \"vulnerabilities\": [\n {\n \"sector_id\": \"<string>\",\n \"vulnerability_type\": \"<string>\",\n \"population_at_risk\": 123,\n \"infrastructure\": \"<string>\",\n \"priority\": 123,\n \"is_critical\": true\n }\n ],\n \"impacted_radius_meters\": 123,\n \"estimated_time_hours\": 123,\n \"source\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/pre-alert")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"predicted_location\": {\n \"latitude\": 123,\n \"longitude\": 123,\n \"altitude\": 123\n },\n \"alert_id\": \"<string>\",\n \"type\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"severity\": \"<string>\",\n \"status\": \"<string>\",\n \"message\": \"<string>\",\n \"vulnerabilities\": [\n {\n \"sector_id\": \"<string>\",\n \"vulnerability_type\": \"<string>\",\n \"population_at_risk\": 123,\n \"infrastructure\": \"<string>\",\n \"priority\": 123,\n \"is_critical\": true\n }\n ],\n \"impacted_radius_meters\": 123,\n \"estimated_time_hours\": 123,\n \"source\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyIntelligence
Process predictive alert (PDIE-authenticated)
POST
/
v1
/
pre-alert
Process predictive alert (PDIE-authenticated)
curl --request POST \
--url https://api.example.com/v1/pre-alert \
--header 'Content-Type: application/json' \
--data '
{
"predicted_location": {
"latitude": 123,
"longitude": 123,
"altitude": 123
},
"alert_id": "<string>",
"type": "<string>",
"timestamp": "<string>",
"severity": "<string>",
"status": "<string>",
"message": "<string>",
"vulnerabilities": [
{
"sector_id": "<string>",
"vulnerability_type": "<string>",
"population_at_risk": 123,
"infrastructure": "<string>",
"priority": 123,
"is_critical": true
}
],
"impacted_radius_meters": 123,
"estimated_time_hours": 123,
"source": "<string>"
}
'import requests
url = "https://api.example.com/v1/pre-alert"
payload = {
"predicted_location": {
"latitude": 123,
"longitude": 123,
"altitude": 123
},
"alert_id": "<string>",
"type": "<string>",
"timestamp": "<string>",
"severity": "<string>",
"status": "<string>",
"message": "<string>",
"vulnerabilities": [
{
"sector_id": "<string>",
"vulnerability_type": "<string>",
"population_at_risk": 123,
"infrastructure": "<string>",
"priority": 123,
"is_critical": True
}
],
"impacted_radius_meters": 123,
"estimated_time_hours": 123,
"source": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
predicted_location: {latitude: 123, longitude: 123, altitude: 123},
alert_id: '<string>',
type: '<string>',
timestamp: '<string>',
severity: '<string>',
status: '<string>',
message: '<string>',
vulnerabilities: [
{
sector_id: '<string>',
vulnerability_type: '<string>',
population_at_risk: 123,
infrastructure: '<string>',
priority: 123,
is_critical: true
}
],
impacted_radius_meters: 123,
estimated_time_hours: 123,
source: '<string>'
})
};
fetch('https://api.example.com/v1/pre-alert', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/pre-alert",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'predicted_location' => [
'latitude' => 123,
'longitude' => 123,
'altitude' => 123
],
'alert_id' => '<string>',
'type' => '<string>',
'timestamp' => '<string>',
'severity' => '<string>',
'status' => '<string>',
'message' => '<string>',
'vulnerabilities' => [
[
'sector_id' => '<string>',
'vulnerability_type' => '<string>',
'population_at_risk' => 123,
'infrastructure' => '<string>',
'priority' => 123,
'is_critical' => true
]
],
'impacted_radius_meters' => 123,
'estimated_time_hours' => 123,
'source' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/pre-alert"
payload := strings.NewReader("{\n \"predicted_location\": {\n \"latitude\": 123,\n \"longitude\": 123,\n \"altitude\": 123\n },\n \"alert_id\": \"<string>\",\n \"type\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"severity\": \"<string>\",\n \"status\": \"<string>\",\n \"message\": \"<string>\",\n \"vulnerabilities\": [\n {\n \"sector_id\": \"<string>\",\n \"vulnerability_type\": \"<string>\",\n \"population_at_risk\": 123,\n \"infrastructure\": \"<string>\",\n \"priority\": 123,\n \"is_critical\": true\n }\n ],\n \"impacted_radius_meters\": 123,\n \"estimated_time_hours\": 123,\n \"source\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/pre-alert")
.header("Content-Type", "application/json")
.body("{\n \"predicted_location\": {\n \"latitude\": 123,\n \"longitude\": 123,\n \"altitude\": 123\n },\n \"alert_id\": \"<string>\",\n \"type\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"severity\": \"<string>\",\n \"status\": \"<string>\",\n \"message\": \"<string>\",\n \"vulnerabilities\": [\n {\n \"sector_id\": \"<string>\",\n \"vulnerability_type\": \"<string>\",\n \"population_at_risk\": 123,\n \"infrastructure\": \"<string>\",\n \"priority\": 123,\n \"is_critical\": true\n }\n ],\n \"impacted_radius_meters\": 123,\n \"estimated_time_hours\": 123,\n \"source\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/pre-alert")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"predicted_location\": {\n \"latitude\": 123,\n \"longitude\": 123,\n \"altitude\": 123\n },\n \"alert_id\": \"<string>\",\n \"type\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"severity\": \"<string>\",\n \"status\": \"<string>\",\n \"message\": \"<string>\",\n \"vulnerabilities\": [\n {\n \"sector_id\": \"<string>\",\n \"vulnerability_type\": \"<string>\",\n \"population_at_risk\": 123,\n \"infrastructure\": \"<string>\",\n \"priority\": 123,\n \"is_critical\": true\n }\n ],\n \"impacted_radius_meters\": 123,\n \"estimated_time_hours\": 123,\n \"source\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyBody
application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
200
Pre-alert processed
Was this page helpful?
⌘I