Get affected software

Cortex XSIAM Platform APIs

post /public_api/uvem/v1/get_affected_software

Get a filtered list of the software affected by one or more vulnerabilities.

Required license: Cortex XSIAM Premium. In Cortex XSIAM Enterprise and Cortex NG SIEM, requires the Cortex Cloud Posture Management add-on.

Request headers
Authorization String required

{api-key}

Example: authorization_example
x-xdr-auth-id String required

{api-key-id}

Example: xXdrAuthId_example
CLIENT REQUEST
curl -X 'POST'
-H 'Accept: application/json'
-H 'Content-Type: application/json'
-H 'Authorization: authorization_example' -H 'x-xdr-auth-id: xXdrAuthId_example'
'https://api-yourfqdn/public_api/uvem/v1/get_affected_software'
-d ''
import http.client conn = http.client.HTTPSConnection("api-yourfqdn") payload = "{\"request_data\":{\"filters\":[{\"field\":\"affected_cpu_archs\",\"operator\":\"contains\",\"value\":[\"string\"]}],\"sort\":{\"field\":\"string\",\"keyword\":\"string\"},\"search_from\":0,\"search_to\":500,\"use_page_token\":true,\"next_page_token\":\"string\"}}" headers = { 'Authorization': "SOME_STRING_VALUE", 'x-xdr-auth-id': "SOME_STRING_VALUE", 'content-type': "application/json" } conn.request("POST", "/public_api/uvem/v1/get_affected_software", 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_affected_software") 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"] = 'SOME_STRING_VALUE' request["x-xdr-auth-id"] = 'SOME_STRING_VALUE' request["content-type"] = 'application/json' request.body = "{\"request_data\":{\"filters\":[{\"field\":\"affected_cpu_archs\",\"operator\":\"contains\",\"value\":[\"string\"]}],\"sort\":{\"field\":\"string\",\"keyword\":\"string\"},\"search_from\":0,\"search_to\":500,\"use_page_token\":true,\"next_page_token\":\"string\"}}" response = http.request(request) puts response.read_body
const data = JSON.stringify({ "request_data": { "filters": [ { "field": "affected_cpu_archs", "operator": "contains", "value": [ "string" ] } ], "sort": { "field": "string", "keyword": "string" }, "search_from": 0, "search_to": 500, "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_affected_software"); xhr.setRequestHeader("Authorization", "SOME_STRING_VALUE"); xhr.setRequestHeader("x-xdr-auth-id", "SOME_STRING_VALUE"); xhr.setRequestHeader("content-type", "application/json"); xhr.send(data);
HttpResponse<String> response = Unirest.post("https://api-yourfqdn/public_api/uvem/v1/get_affected_software") .header("Authorization", "SOME_STRING_VALUE") .header("x-xdr-auth-id", "SOME_STRING_VALUE") .header("content-type", "application/json") .body("{\"request_data\":{\"filters\":[{\"field\":\"affected_cpu_archs\",\"operator\":\"contains\",\"value\":[\"string\"]}],\"sort\":{\"field\":\"string\",\"keyword\":\"string\"},\"search_from\":0,\"search_to\":500,\"use_page_token\":true,\"next_page_token\":\"string\"}}") .asString();
import Foundation let headers = [ "Authorization": "SOME_STRING_VALUE", "x-xdr-auth-id": "SOME_STRING_VALUE", "content-type": "application/json" ] let parameters = ["request_data": [ "filters": [ [ "field": "affected_cpu_archs", "operator": "contains", "value": ["string"] ] ], "sort": [ "field": "string", "keyword": "string" ], "search_from": 0, "search_to": 500, "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_affected_software")! 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_affected_software", 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\":\"affected_cpu_archs\",\"operator\":\"contains\",\"value\":[\"string\"]}],\"sort\":{\"field\":\"string\",\"keyword\":\"string\"},\"search_from\":0,\"search_to\":500,\"use_page_token\":true,\"next_page_token\":\"string\"}}", CURLOPT_HTTPHEADER => [ "Authorization: SOME_STRING_VALUE", "content-type: application/json", "x-xdr-auth-id: SOME_STRING_VALUE" ], ]); $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_affected_software"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: SOME_STRING_VALUE"); headers = curl_slist_append(headers, "x-xdr-auth-id: SOME_STRING_VALUE"); 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\":\"affected_cpu_archs\",\"operator\":\"contains\",\"value\":[\"string\"]}],\"sort\":{\"field\":\"string\",\"keyword\":\"string\"},\"search_from\":0,\"search_to\":500,\"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_affected_software"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "SOME_STRING_VALUE"); request.AddHeader("x-xdr-auth-id", "SOME_STRING_VALUE"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"request_data\":{\"filters\":[{\"field\":\"affected_cpu_archs\",\"operator\":\"contains\",\"value\":[\"string\"]}],\"sort\":{\"field\":\"string\",\"keyword\":\"string\"},\"search_from\":0,\"search_to\":500,\"use_page_token\":true,\"next_page_token\":\"string\"}}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
Body parameters
application/json
request_dataobjectrequired
filtersarray
[
fieldstring (Enum)

The field to use for filtering results.

Field Operator Value
affected_cpu_archs contains, not contains array(string)
A2 B2 C2
last_modified gte, lte, range, relative_timestamp integer
Allowed values:"affected_cpu_archs""affected_versions""cvss_score""cvss_severity""distro""last_modified""package_name""release"
operatorstring (Enum)

Comparison operator to use with the filter. Allowed values depend on the filters field.

  • contains/not_contains: use with affected_cpu_archs, affected_versions, cvss_severity, distro, package_name, release, vulnerability_id
  • eq/neq: use with distro, cvss_severity, cvss_score, package_name, release, vulnerability_id
  • gte/lte: use with cvss_score, last_modified
  • range: use with last_modified
  • relative_timestamp: use with last_modified
Allowed values:"contains""not_contains""eq""neq""gte""lte""range""relative_timestamp"
valueobject

Values for filtering the results.

  • array[string]: use with affected_cpu_archs, affected_versions
  • string: use with cvss_score, distro, release, package_name, vulnerability_id
  • integer: use with last_modified
  • number: use with cvss_score
Array
string

Values for filtering the results.

  • array[string]: use with affected_cpu_archs, affected_versions
  • string: use with cvss_score, distro, release, package_name, vulnerability_id
  • integer: use with last_modified
  • number: use with cvss_score
integer

Values for filtering the results.

  • array[string]: use with affected_cpu_archs, affected_versions
  • string: use with cvss_score, distro, release, package_name, vulnerability_id
  • integer: use with last_modified
  • number: use with cvss_score
numberfloat

Values for filtering the results.

  • array[string]: use with affected_cpu_archs, affected_versions
  • string: use with cvss_score, distro, release, package_name, vulnerability_id
  • integer: use with last_modified
  • number: use with cvss_score
]
sortobject
fieldstring
keywordstring
search_frominteger

An integer representing the start offset index of results Default value - 0

search_tointeger

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

Default:500
use_page_tokenboolean

Use "use_page_token":true in the initial request to paginate the response data.

next_page_tokenstring

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
{ "request_data": { "filters": [ { "field": "affected_cpu_archs", "operator": "contains", "value": 0.1 } ], "sort": { "field": "example", "keyword": "example" }, "search_from": 0, "search_to": 0, "use_page_token": false, "next_page_token": "example" } }
Responses

OK

Body
application/json
replyobject
result_countinteger
total_countinteger
vulnerabilitiesarray
[
vulnerability_idstring
cvss_scorenumber
cvss_severitystring
package_namestring
distrostring
releasestring
affected_cpu_archsarray
[
]
last_modifiedobject
affected_versionsarray[string]
]
next_page_tokenobject
RESPONSE
{ "reply": { "result_count": 0, "total_count": 0, "vulnerabilities": [ { "vulnerability_id": "example", "cvss_score": 0.1, "cvss_severity": "example", "package_name": "example", "distro": "example", "release": "example", "affected_cpu_archs": [ {} ], "last_modified": {}, "affected_versions": [ "example" ] } ], "next_page_token": {} } }

Unauthorized access. An issue occurred during authentication. This can indicate an incorrect key, id, or other invalid authentication parameters.

Body
application/json
replyobject
err_codestring
err_msgstring
err_extrastring
RESPONSE
{ "reply": { "err_code": "example", "err_msg": "example", "err_extra": "example" } }

Internal server error. A unified status for API communication type errors.

Body
application/json
replyobject
err_codestring
err_msgstring
err_extrastring
RESPONSE
{ "reply": { "err_code": "example", "err_msg": "example", "err_extra": "example" } }