Get a list of vulnerabilities that match the filter fields. The list includes key information about each vulnerability.
Required license: Cortex XSIAM Premium. In Cortex XSIAM Enterprise and Cortex NG SIEM, requires the Cortex Cloud Posture Management add-on.
curl -X 'POST'
-H
'Accept: application/json'
-H
'Content-Type: application/json'
'https://api-yourfqdn/public_api/uvem/v1/get_vulnerabilities'
-d
''
import http.client
conn = http.client.HTTPSConnection("api-yourfqdn")
payload = "{\"request_data\":{\"filters\":[{\"field\":\"attack_vector\",\"operator\":\"string\",\"value\":\"string\"}],\"sort\":{\"field\":\"string\",\"keyword\":\"asc\"},\"search_from\":0,\"search_to\":0,\"use_page_token\":true,\"next_page_token\":\"string\"}}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/public_api/uvem/v1/get_vulnerabilities", 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/public_api/uvem/v1/get_vulnerabilities")
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\":{\"filters\":[{\"field\":\"attack_vector\",\"operator\":\"string\",\"value\":\"string\"}],\"sort\":{\"field\":\"string\",\"keyword\":\"asc\"},\"search_from\":0,\"search_to\":0,\"use_page_token\":true,\"next_page_token\":\"string\"}}"
response = http.request(request)
puts response.read_bodyconst data = JSON.stringify({
"request_data": {
"filters": [
{
"field": "attack_vector",
"operator": "string",
"value": "string"
}
],
"sort": {
"field": "string",
"keyword": "asc"
},
"search_from": 0,
"search_to": 0,
"use_page_token": true,
"next_page_token": "string"
}
});
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/public_api/uvem/v1/get_vulnerabilities");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);HttpResponse<String> response = Unirest.post("https://api-yourfqdn/public_api/uvem/v1/get_vulnerabilities")
.header("content-type", "application/json")
.body("{\"request_data\":{\"filters\":[{\"field\":\"attack_vector\",\"operator\":\"string\",\"value\":\"string\"}],\"sort\":{\"field\":\"string\",\"keyword\":\"asc\"},\"search_from\":0,\"search_to\":0,\"use_page_token\":true,\"next_page_token\":\"string\"}}")
.asString();import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["request_data": [
"filters": [
[
"field": "attack_vector",
"operator": "string",
"value": "string"
]
],
"sort": [
"field": "string",
"keyword": "asc"
],
"search_from": 0,
"search_to": 0,
"use_page_token": true,
"next_page_token": "string"
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api-yourfqdn/public_api/uvem/v1/get_vulnerabilities")! 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/public_api/uvem/v1/get_vulnerabilities",
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\":{\"filters\":[{\"field\":\"attack_vector\",\"operator\":\"string\",\"value\":\"string\"}],\"sort\":{\"field\":\"string\",\"keyword\":\"asc\"},\"search_from\":0,\"search_to\":0,\"use_page_token\":true,\"next_page_token\":\"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;
}CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-yourfqdn/public_api/uvem/v1/get_vulnerabilities");
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\":{\"filters\":[{\"field\":\"attack_vector\",\"operator\":\"string\",\"value\":\"string\"}],\"sort\":{\"field\":\"string\",\"keyword\":\"asc\"},\"search_from\":0,\"search_to\":0,\"use_page_token\":true,\"next_page_token\":\"string\"}}");
CURLcode ret = curl_easy_perform(hnd);var client = new RestClient("https://api-yourfqdn/public_api/uvem/v1/get_vulnerabilities");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"request_data\":{\"filters\":[{\"field\":\"attack_vector\",\"operator\":\"string\",\"value\":\"string\"}],\"sort\":{\"field\":\"string\",\"keyword\":\"asc\"},\"search_from\":0,\"search_to\":0,\"use_page_token\":true,\"next_page_token\":\"string\"}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);request_dataobjectrequired
filtersarrayAn array of filter fields
An array of filter fields
fieldstring (Enum)Identifies the field the filter is matching.
Identifies the field the filter is matching.
operatorstringIdentifies the comparison operator you want to use for this filter. Allowed values depend on the filter used.
- contains/not_contains: use with attack_vector, cvss_score_source, cvss_severity_source, cvss_version , distribution_and_releases, package_names, reported_exploited_by, vendors, vulnerability_id
- eq/neq: use with attack_vector, cisa_kev, cvss_score, cvss_score_source, cvss_severity_source, cvss_version, epss_score, vulnerability_id
- gte/lte: use with cvss_score, epss score, first_published, last_modified
- range: use with first_published, last_modified
- relative_timestamp: use with first_published, last_modified
Identifies the comparison operator you want to use for this filter. Allowed values depend on the filter used.
- contains/not_contains: use with attack_vector, cvss_score_source, cvss_severity_source, cvss_version , distribution_and_releases, package_names, reported_exploited_by, vendors, vulnerability_id
- eq/neq: use with attack_vector, cisa_kev, cvss_score, cvss_score_source, cvss_severity_source, cvss_version, epss_score, vulnerability_id
- gte/lte: use with cvss_score, epss score, first_published, last_modified
- range: use with first_published, last_modified
- relative_timestamp: use with first_published, last_modified
valuestringValues for filtering the results.
- array[string]: use with affected_cpu_archs, distribution_and_releases, package_names, reported_exploited_by
- boolean: cisa_kev
- string: use with attack_vector, cvss_score, cvss_severity, cvss_score_source, cvss_severity_source, cvss_version, vulnerability_id
- integer: use with first_published, last_modified
- number: use with cvss_score, epss_score
Values for filtering the results.
- array[string]: use with affected_cpu_archs, distribution_and_releases, package_names, reported_exploited_by
- boolean: cisa_kev
- string: use with attack_vector, cvss_score, cvss_severity, cvss_score_source, cvss_severity_source, cvss_version, vulnerability_id
- integer: use with first_published, last_modified
- number: use with cvss_score, epss_score
sortobject
fieldstringSort on any filter field except fields that take an array as their value.
Sort on any filter field except fields that take an array as their value.
keywordstring (Enum)
search_fromintegerAn integer representing the start offset index of results
Default value - 0
An integer representing the start offset index of results Default value - 0
search_tointegerAn integer representing the start offset index of results. Use this field to specify the number of results on a page when using page token pagination.
Default value - 500
An integer representing the start offset index of results. Use this field to specify the number of results on a page when using page token pagination. Default value - 500
use_page_tokenbooleanUse "use_page_token":true in the initial request to paginate the response data.
Use "use_page_token":true in the initial request to paginate the response data.
next_page_tokenstringIf "use_page_token":true was included in the initial request, the response for that request will include a page token.
Use "next_page_token":"string" to pass that page token into the next request to paginate the next set of data.
If "use_page_token":true was included in the initial request, the response for that request will include a page token.
Use "next_page_token":"string" to pass that page token into the next request to paginate the next set of data.
{
"request_data": {
"filters": [
{
"field": "attack_vector",
"operator": "example",
"value": "example"
}
],
"sort": {
"field": "example",
"keyword": "asc"
},
"search_from": 0,
"search_to": 0,
"use_page_token": false,
"next_page_token": "example"
}
}