post
/public_api/v1/assets/get_vulnerability_tests/
Get a complete or filtered list of vulnerability tests. Response include details about each test, including the number of services confirmed vulnerable.
To view vulnerability test results, use the Get All Services or Get Service Details endpoints.
Request headers
authorization
String
required
api-key
api-key
Example:
{{api_key}}
x-xdr-auth-id
String
required
api-key-id
api-key-id
Example:
{{api_key_id}}
CLIENT REQUEST
curl -X 'POST'
-H
'Accept: application/json'
-H
'Content-Type: application/json'
-H
'authorization: {{api_key}}'
-H
'x-xdr-auth-id: {{api_key_id}}'
'https://api-}/public_api/v1/assets/get_vulnerability_tests/'
-d
'{
"request_data" : {
"search_from" : 0,
"filters" : [ {
"field" : "name",
"value" : "VulnerabilityTestFilter_value",
"operator" : "in"
}, {
"field" : "name",
"value" : "VulnerabilityTestFilter_value",
"operator" : "in"
} ],
"sort" : {
"field" : "severity_score",
"keyword" : "desc"
},
"search_to" : 0
}
}'
import http.client
conn = http.client.HTTPSConnection("api-")
payload = "{\"request_data\":{\"filters\":[{\"field\":\"name\",\"operator\":\"in\",\"value\":\"string\"}],\"search_from\":0,\"search_to\":500,\"sort\":{\"field\":\"severity_score\",\"keyword\":\"ASC\"}}}"
headers = {
'authorization': "{{api_key}}",
'x-xdr-auth-id': "{{api_key_id}}",
'content-type': "application/json"
}
conn.request("POST", "%7B%7Bfqdn%7D%7D/public_api/v1/assets/get_vulnerability_tests/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api-/%7B%7Bfqdn%7D%7D/public_api/v1/assets/get_vulnerability_tests/")
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["authorization"] = '{{api_key}}'
request["x-xdr-auth-id"] = '{{api_key_id}}'
request["content-type"] = 'application/json'
request.body = "{\"request_data\":{\"filters\":[{\"field\":\"name\",\"operator\":\"in\",\"value\":\"string\"}],\"search_from\":0,\"search_to\":500,\"sort\":{\"field\":\"severity_score\",\"keyword\":\"ASC\"}}}"
response = http.request(request)
puts response.read_bodyconst data = JSON.stringify({
"request_data": {
"filters": [
{
"field": "name",
"operator": "in",
"value": "string"
}
],
"search_from": 0,
"search_to": 500,
"sort": {
"field": "severity_score",
"keyword": "ASC"
}
}
});
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-/%7B%7Bfqdn%7D%7D/public_api/v1/assets/get_vulnerability_tests/");
xhr.setRequestHeader("authorization", "{{api_key}}");
xhr.setRequestHeader("x-xdr-auth-id", "{{api_key_id}}");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);HttpResponse<String> response = Unirest.post("https://api-/%7B%7Bfqdn%7D%7D/public_api/v1/assets/get_vulnerability_tests/")
.header("authorization", "{{api_key}}")
.header("x-xdr-auth-id", "{{api_key_id}}")
.header("content-type", "application/json")
.body("{\"request_data\":{\"filters\":[{\"field\":\"name\",\"operator\":\"in\",\"value\":\"string\"}],\"search_from\":0,\"search_to\":500,\"sort\":{\"field\":\"severity_score\",\"keyword\":\"ASC\"}}}")
.asString();import Foundation
let headers = [
"authorization": "{{api_key}}",
"x-xdr-auth-id": "{{api_key_id}}",
"content-type": "application/json"
]
let parameters = ["request_data": [
"filters": [
[
"field": "name",
"operator": "in",
"value": "string"
]
],
"search_from": 0,
"search_to": 500,
"sort": [
"field": "severity_score",
"keyword": "ASC"
]
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api-/%7B%7Bfqdn%7D%7D/public_api/v1/assets/get_vulnerability_tests/")! 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-/%7B%7Bfqdn%7D%7D/public_api/v1/assets/get_vulnerability_tests/",
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\":\"name\",\"operator\":\"in\",\"value\":\"string\"}],\"search_from\":0,\"search_to\":500,\"sort\":{\"field\":\"severity_score\",\"keyword\":\"ASC\"}}}",
CURLOPT_HTTPHEADER => [
"authorization: {{api_key}}",
"content-type: application/json",
"x-xdr-auth-id: {{api_key_id}}"
],
]);
$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-/%7B%7Bfqdn%7D%7D/public_api/v1/assets/get_vulnerability_tests/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{api_key}}");
headers = curl_slist_append(headers, "x-xdr-auth-id: {{api_key_id}}");
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\":\"name\",\"operator\":\"in\",\"value\":\"string\"}],\"search_from\":0,\"search_to\":500,\"sort\":{\"field\":\"severity_score\",\"keyword\":\"ASC\"}}}");
CURLcode ret = curl_easy_perform(hnd);var client = new RestClient("https://api-/%7B%7Bfqdn%7D%7D/public_api/v1/assets/get_vulnerability_tests/");
var request = new RestRequest(Method.POST);
request.AddHeader("authorization", "{{api_key}}");
request.AddHeader("x-xdr-auth-id", "{{api_key_id}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"request_data\":{\"filters\":[{\"field\":\"name\",\"operator\":\"in\",\"value\":\"string\"}],\"search_from\":0,\"search_to\":500,\"sort\":{\"field\":\"severity_score\",\"keyword\":\"ASC\"}}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);Body parameters
required
request_dataobject
filtersarray
search_frominteger
search_tointeger
sortobject
fieldstring (Enum)
keywordstring (Enum)
Free-Form objectFree-Form objectFree-Form object
application/json
request_dataobject
filtersarray
[fieldstring (Enum)
operatorstring (Enum)
valueobject
string
integer
numberfloat
Free-Form object]
fieldstring (Enum)
Allowed values:"name""test_names""vulnerability_ids""description""vendor_names""status""affected_software""severity_score""cwe_ids""epss_score""count_vulnerable_services"
operatorstring (Enum)Identifies the comparison operator to use for this filter. The following list shows which operator can be used for each filter field:
name: contains, eq, neq
status: eq
vulnerability_ids: contains, not_contains
description: contains
affected_software: contains, not_contains
cwe_ids: contains, not_contains
vendor_names: contains, not_contains
severity_score: eq, neq, gte, lte
epss_score: eq, neq, gte, lte
count_vulnerable_services: eq, neq, gte, lte
Identifies the comparison operator to use for this filter. The following list shows which operator can be used for each filter field:
name: contains, eq, neqstatus: eqvulnerability_ids: contains, not_containsdescription: containsaffected_software: contains, not_containscwe_ids: contains, not_containsvendor_names: contains, not_containsseverity_score: eq, neq, gte, lteepss_score: eq, neq, gte, ltecount_vulnerable_services: eq, neq, gte, lte
Allowed values:"in""contains""neq""eq""lte""gte""not_contains"
valueobjectValue depends on the filter field used.
name: string e.g. apache
status: Enabled, Disabled
vulnerability_ids: strings in the form of CVE IDs, such as CVE-1, CVE-2
description: string e.g. apache
affected_software: strings
cwe_ids: strings in the form of CWE IDs such as CWE-20
vendor_names: strings such as Cisco, Siemens
severity_score: numbers, such as 2, 3.5
epss_score: numbers, such as 2, 3.5
count_vulnerable_services: integers, such as 1,2,5
Value depends on the filter field used.
name: string e.g. apachestatus: Enabled, Disabledvulnerability_ids: strings in the form of CVE IDs, such as CVE-1, CVE-2description: string e.g. apacheaffected_software: stringscwe_ids: strings in the form of CWE IDs such as CWE-20vendor_names: strings such as Cisco, Siemensseverity_score: numbers, such as 2, 3.5epss_score: numbers, such as 2, 3.5count_vulnerable_services: integers, such as 1,2,5
stringValue depends on the filter field used.
name: string e.g. apache
status: Enabled, Disabled
vulnerability_ids: strings in the form of CVE IDs, such as CVE-1, CVE-2
description: string e.g. apache
affected_software: strings
cwe_ids: strings in the form of CWE IDs such as CWE-20
vendor_names: strings such as Cisco, Siemens
severity_score: numbers, such as 2, 3.5
epss_score: numbers, such as 2, 3.5
count_vulnerable_services: integers, such as 1,2,5
Value depends on the filter field used.
name: string e.g. apachestatus: Enabled, Disabledvulnerability_ids: strings in the form of CVE IDs, such as CVE-1, CVE-2description: string e.g. apacheaffected_software: stringscwe_ids: strings in the form of CWE IDs such as CWE-20vendor_names: strings such as Cisco, Siemensseverity_score: numbers, such as 2, 3.5epss_score: numbers, such as 2, 3.5count_vulnerable_services: integers, such as 1,2,5
integerValue depends on the filter field used.
name: string e.g. apache
status: Enabled, Disabled
vulnerability_ids: strings in the form of CVE IDs, such as CVE-1, CVE-2
description: string e.g. apache
affected_software: strings
cwe_ids: strings in the form of CWE IDs such as CWE-20
vendor_names: strings such as Cisco, Siemens
severity_score: numbers, such as 2, 3.5
epss_score: numbers, such as 2, 3.5
count_vulnerable_services: integers, such as 1,2,5
Value depends on the filter field used.
name: string e.g. apachestatus: Enabled, Disabledvulnerability_ids: strings in the form of CVE IDs, such as CVE-1, CVE-2description: string e.g. apacheaffected_software: stringscwe_ids: strings in the form of CWE IDs such as CWE-20vendor_names: strings such as Cisco, Siemensseverity_score: numbers, such as 2, 3.5epss_score: numbers, such as 2, 3.5count_vulnerable_services: integers, such as 1,2,5
numberfloatValue depends on the filter field used.
name: string e.g. apache
status: Enabled, Disabled
vulnerability_ids: strings in the form of CVE IDs, such as CVE-1, CVE-2
description: string e.g. apache
affected_software: strings
cwe_ids: strings in the form of CWE IDs such as CWE-20
vendor_names: strings such as Cisco, Siemens
severity_score: numbers, such as 2, 3.5
epss_score: numbers, such as 2, 3.5
count_vulnerable_services: integers, such as 1,2,5
Value depends on the filter field used.
name: string e.g. apachestatus: Enabled, Disabledvulnerability_ids: strings in the form of CVE IDs, such as CVE-1, CVE-2description: string e.g. apacheaffected_software: stringscwe_ids: strings in the form of CWE IDs such as CWE-20vendor_names: strings such as Cisco, Siemensseverity_score: numbers, such as 2, 3.5epss_score: numbers, such as 2, 3.5count_vulnerable_services: integers, such as 1,2,5
Array
Array
search_frominteger
search_tointeger
Default:
500sortobject
fieldstring (Enum)
Default:
"severity_score"Allowed values:"severity_score""created""first_published""status"
keywordstring (Enum)
Default:
"desc"Allowed values:"ASC""asc""DESC""desc"
REQUEST
{
"request_data": {
"filters": [
{
"field": "name",
"operator": "in",
"value": "example"
}
],
"search_from": 0,
"search_to": 0,
"sort": {
"field": "severity_score",
"keyword": "ASC"
}
}
}Responses