Get threat by ID
curl --request GET \
--url https://api.ocean.security/api/v1/threats/{id} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.ocean.security/api/v1/threats/{id}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.ocean.security/api/v1/threats/{id}', 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.ocean.security/api/v1/threats/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ocean.security/api/v1/threats/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ocean.security/api/v1/threats/{id}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ocean.security/api/v1/threats/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"results": {
"action_taken": "quarantined",
"authentication": {
"dkim": "fail",
"dmarc": "fail",
"spf": "pass"
},
"criticality": "high",
"detection_time": "2023-11-07T05:31:56Z",
"headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"id": "<string>",
"links": [
{
"is_suspicious": true,
"url": "<string>"
}
],
"messages": [
{
"action_taken": "quarantined",
"attachments": [
{
"name": "invoice.pdf",
"size": 84213,
"type": "application/pdf"
}
],
"bcc": [
{
"email": "dana.reed@example.com",
"name": "Dana Reed"
}
],
"cc": [
{
"email": "dana.reed@example.com",
"name": "Dana Reed"
}
],
"folder": "Spam",
"internet_message_id": "<CALFgCL@mail.example.com>",
"relation_type": "threat",
"replied": true,
"seen": true,
"sender_domain": "acme-billing.example",
"sender_email": "billing@acme-billing.example",
"sender_name": "Acme Billing",
"subject": "Invoice 4417 is overdue",
"time": "2023-11-07T05:31:56Z",
"to": [
{
"email": "dana.reed@example.com",
"name": "Dana Reed"
}
]
}
],
"messages_total": 3,
"reasoning": "<string>",
"recipient_email": "<string>",
"recipient_name": "<string>",
"remediation_summary": {},
"replied": true,
"roles": [
"VIP"
],
"seen": "partial",
"sender_domain": "<string>",
"sender_email": "<string>",
"sender_name": "<string>",
"sender_registry_date": "<string>",
"source": "<string>",
"subject": "<string>",
"targets": [
{
"email": "dana.reed@example.com",
"name": "Dana Reed"
}
],
"threat_indicators": [
{
"explanation": "The sender's email address is a generic Gmail account with a numerical suffix, often associated with throwaway accounts.",
"grounding": "The sender's email address is 'a.trent5589@example.com'.",
"indicator_type": "Generated Sender Pattern"
}
],
"threat_type": "<string>",
"time": "2023-11-07T05:31:56Z",
"verdict": "malicious",
"verdict_override": {
"as": "safe",
"at": "2023-11-07T05:31:56Z"
}
},
"status": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Threats
Get threat by ID
Retrieves the detailed information for a specific threat identified by its unique ID.
GET
/
api
/
v1
/
threats
/
{id}
Get threat by ID
curl --request GET \
--url https://api.ocean.security/api/v1/threats/{id} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.ocean.security/api/v1/threats/{id}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.ocean.security/api/v1/threats/{id}', 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.ocean.security/api/v1/threats/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ocean.security/api/v1/threats/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ocean.security/api/v1/threats/{id}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ocean.security/api/v1/threats/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"results": {
"action_taken": "quarantined",
"authentication": {
"dkim": "fail",
"dmarc": "fail",
"spf": "pass"
},
"criticality": "high",
"detection_time": "2023-11-07T05:31:56Z",
"headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"id": "<string>",
"links": [
{
"is_suspicious": true,
"url": "<string>"
}
],
"messages": [
{
"action_taken": "quarantined",
"attachments": [
{
"name": "invoice.pdf",
"size": 84213,
"type": "application/pdf"
}
],
"bcc": [
{
"email": "dana.reed@example.com",
"name": "Dana Reed"
}
],
"cc": [
{
"email": "dana.reed@example.com",
"name": "Dana Reed"
}
],
"folder": "Spam",
"internet_message_id": "<CALFgCL@mail.example.com>",
"relation_type": "threat",
"replied": true,
"seen": true,
"sender_domain": "acme-billing.example",
"sender_email": "billing@acme-billing.example",
"sender_name": "Acme Billing",
"subject": "Invoice 4417 is overdue",
"time": "2023-11-07T05:31:56Z",
"to": [
{
"email": "dana.reed@example.com",
"name": "Dana Reed"
}
]
}
],
"messages_total": 3,
"reasoning": "<string>",
"recipient_email": "<string>",
"recipient_name": "<string>",
"remediation_summary": {},
"replied": true,
"roles": [
"VIP"
],
"seen": "partial",
"sender_domain": "<string>",
"sender_email": "<string>",
"sender_name": "<string>",
"sender_registry_date": "<string>",
"source": "<string>",
"subject": "<string>",
"targets": [
{
"email": "dana.reed@example.com",
"name": "Dana Reed"
}
],
"threat_indicators": [
{
"explanation": "The sender's email address is a generic Gmail account with a numerical suffix, often associated with throwaway accounts.",
"grounding": "The sender's email address is 'a.trent5589@example.com'.",
"indicator_type": "Generated Sender Pattern"
}
],
"threat_type": "<string>",
"time": "2023-11-07T05:31:56Z",
"verdict": "malicious",
"verdict_override": {
"as": "safe",
"at": "2023-11-07T05:31:56Z"
}
},
"status": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}