post
/vulnerability-management/v1/vulnerability-finding/snapshot/
Executes an XQL query against the uvm_findings dataset and returns results as a newline-delimited JSON (NDJSON) stream for large result sets.
Rate limit: 10 requests per 24-hour window per tenant
Response variants:
- Stream (
application/x-ndjson) — large result sets; each line is aVulnerabilityFindingJSON object - Inline (
application/json) — small result sets returned directly
Required license: Cortex Cloud Runtime Security or Cortex Cloud Posture Management
CLIENT REQUEST
curl -X 'POST'
-H
'Accept: application/x-ndjson,application/json'
-H
'Content-Type: application/json'
'https://api-yourfqdn/vulnerability-management/v1/vulnerability-finding/snapshot/'
-d
'{
"timeframe" : "",
"limit" : 10000
}'
import http.client
conn = http.client.HTTPSConnection("api-yourfqdn")
payload = "{\"request_data\":{\"limit\":10000,\"timeframe\":{\"from\":15989076,\"to\":1771482089874}}}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/vulnerability-management/v1/vulnerability-finding/snapshot/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api-yourfqdn/vulnerability-management/v1/vulnerability-finding/snapshot/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"request_data\":{\"limit\":10000,\"timeframe\":{\"from\":15989076,\"to\":1771482089874}}}"
response = http.request(request)
puts response.read_bodyconst data = JSON.stringify({
"request_data": {
"limit": 10000,
"timeframe": {
"from": 15989076,
"to": 1771482089874
}
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api-yourfqdn/vulnerability-management/v1/vulnerability-finding/snapshot/");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);HttpResponse<String> response = Unirest.post("https://api-yourfqdn/vulnerability-management/v1/vulnerability-finding/snapshot/")
.header("content-type", "application/json")
.body("{\"request_data\":{\"limit\":10000,\"timeframe\":{\"from\":15989076,\"to\":1771482089874}}}")
.asString();import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["request_data": [
"limit": 10000,
"timeframe": [
"from": 15989076,
"to": 1771482089874
]
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api-yourfqdn/vulnerability-management/v1/vulnerability-finding/snapshot/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-yourfqdn/vulnerability-management/v1/vulnerability-finding/snapshot/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"request_data\":{\"limit\":10000,\"timeframe\":{\"from\":15989076,\"to\":1771482089874}}}",
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;
}CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-yourfqdn/vulnerability-management/v1/vulnerability-finding/snapshot/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\"request_data\":{\"limit\":10000,\"timeframe\":{\"from\":15989076,\"to\":1771482089874}}}");
CURLcode ret = curl_easy_perform(hnd);var client = new RestClient("https://api-yourfqdn/vulnerability-management/v1/vulnerability-finding/snapshot/");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"request_data\":{\"limit\":10000,\"timeframe\":{\"from\":15989076,\"to\":1771482089874}}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);Body parameters
application/json
Top-level request envelope.
request_dataobjectRequest parameters for the vulnerability findings snapshot export.
Request parameters for the vulnerability findings snapshot export.
limitintegerMaximum number of rows to return. Omit for the full dataset.
Maximum number of rows to return. Omit for the full dataset.
Example:
10000timeframeobjectOptional XQL timeframe using an absolute range (from + to). When omitted the server's default lookback window is used.
Optional XQL timeframe using an absolute range (from + to). When omitted the server's default lookback window is used.
fromintegerrequiredint64Start of the timeframe as a Unix timestamp in milliseconds.
Start of the timeframe as a Unix timestamp in milliseconds.
Example:
15989076tointegerrequiredint64End of the timeframe as a Unix timestamp in milliseconds.
End of the timeframe as a Unix timestamp in milliseconds.
Example:
1771482089874REQUEST
{
"request_data": {
"timeframe": {
"from": 15989076874,
"to": 1771482089874
}
}
}{
"request_data": {
"limit": 5000
}
}{
"request_data": {
"timeframe": {
"from": 15989076787,
"to": 1771482089874
},
"limit": 10000
}
}Responses