Get asset compliance results

Cortex XSIAM Platform APIs

post /public_api/v1/compliance/get_asset

Retrieve compliance standard and control results for a specific asset ID, with optional filtering, sorting and pagination.

Required params:

  • asset_id (string) - The asset identifier
  • last_evaluation_time (integer) - Unix timestamp in milliseconds for the evaluation time

Filtering Support:

  • String fields (standard, category, control, source): eq, neq, contains, not_contains
  • Status fields (status, severity): eq, neq
  • Status valid values: [FAILED, PASSED, NOT_ASSESSED]
  • Severity valid values: [SEV_010_INFO, SEV_020_LOW, SEV_030_MEDIUM, SEV_040_HIGH, SEV_050_CRITICAL]

Sorting Support:

  • Available fields: standard, category, control, severity, status
  • Sort orders: asc, desc
  • Default: standard in ascending order

Pagination: (max number of elements is 100)

Authentication: XDRAuthToken Api Key "Authorization"
Authentication: XDRAuth Api Key "x-xdr-auth-id"
CLIENT REQUEST
curl -X 'POST'
-H "Authorization: [[apiKey]]" \
-H "x-xdr-auth-id: [[apiKey]]" \
-H 'Accept: application/json'
-H 'Content-Type: application/json'
'https://api-cortex.paloaltonetworks.com/public_api/v1/compliance/get_asset'
-d '{ "request_data" : { "search_from" : 0, "asset_id" : "eea3102e81bc8cf10b43168a7a1ff27cb539a7325428f3cd956240472335c6da", "last_evaluation_time" : 1763669115000, "filters" : [ { "field" : "severity", "value" : "SEV_030_MEDIUM", "operator" : "eq" }, { "field" : "severity", "value" : "SEV_030_MEDIUM", "operator" : "eq" } ], "sort" : "", "search_to" : 60 } }'
import http.client conn = http.client.HTTPSConnection("api-") payload = "{\"request_data\":{\"asset_id\":\"eea3102e81bc8cf10b43168a7a1ff27cb539a7325428f3cd956240472335c6da\",\"last_evaluation_time\":1763669115000,\"filters\":[],\"sort\":{\"field\":\"standard\",\"keyword\":\"asc\"},\"search_from\":0,\"search_to\":100}}" headers = { 'x-xdr-auth-id': "REPLACE_KEY_VALUE", 'content-type': "application/json" } conn.request("POST", "%7Bfqdn%7D/public_api/v1/compliance/get_asset", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
require 'uri' require 'net/http' require 'openssl' url = URI("https://api-/%7Bfqdn%7D/public_api/v1/compliance/get_asset") 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["x-xdr-auth-id"] = 'REPLACE_KEY_VALUE' request["content-type"] = 'application/json' request.body = "{\"request_data\":{\"asset_id\":\"eea3102e81bc8cf10b43168a7a1ff27cb539a7325428f3cd956240472335c6da\",\"last_evaluation_time\":1763669115000,\"filters\":[],\"sort\":{\"field\":\"standard\",\"keyword\":\"asc\"},\"search_from\":0,\"search_to\":100}}" response = http.request(request) puts response.read_body
const data = JSON.stringify({ "request_data": { "asset_id": "eea3102e81bc8cf10b43168a7a1ff27cb539a7325428f3cd956240472335c6da", "last_evaluation_time": 1763669115000, "filters": [], "sort": { "field": "standard", "keyword": "asc" }, "search_from": 0, "search_to": 100 } }); 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-/%7Bfqdn%7D/public_api/v1/compliance/get_asset"); xhr.setRequestHeader("x-xdr-auth-id", "REPLACE_KEY_VALUE"); xhr.setRequestHeader("content-type", "application/json"); xhr.send(data);
HttpResponse<String> response = Unirest.post("https://api-/%7Bfqdn%7D/public_api/v1/compliance/get_asset") .header("x-xdr-auth-id", "REPLACE_KEY_VALUE") .header("content-type", "application/json") .body("{\"request_data\":{\"asset_id\":\"eea3102e81bc8cf10b43168a7a1ff27cb539a7325428f3cd956240472335c6da\",\"last_evaluation_time\":1763669115000,\"filters\":[],\"sort\":{\"field\":\"standard\",\"keyword\":\"asc\"},\"search_from\":0,\"search_to\":100}}") .asString();
import Foundation let headers = [ "x-xdr-auth-id": "REPLACE_KEY_VALUE", "content-type": "application/json" ] let parameters = ["request_data": [ "asset_id": "eea3102e81bc8cf10b43168a7a1ff27cb539a7325428f3cd956240472335c6da", "last_evaluation_time": 1763669115000, "filters": [], "sort": [ "field": "standard", "keyword": "asc" ], "search_from": 0, "search_to": 100 ]] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-/%7Bfqdn%7D/public_api/v1/compliance/get_asset")! 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-/%7Bfqdn%7D/public_api/v1/compliance/get_asset", 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\":{\"asset_id\":\"eea3102e81bc8cf10b43168a7a1ff27cb539a7325428f3cd956240472335c6da\",\"last_evaluation_time\":1763669115000,\"filters\":[],\"sort\":{\"field\":\"standard\",\"keyword\":\"asc\"},\"search_from\":0,\"search_to\":100}}", CURLOPT_HTTPHEADER => [ "content-type: application/json", "x-xdr-auth-id: REPLACE_KEY_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-/%7Bfqdn%7D/public_api/v1/compliance/get_asset"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "x-xdr-auth-id: REPLACE_KEY_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\":{\"asset_id\":\"eea3102e81bc8cf10b43168a7a1ff27cb539a7325428f3cd956240472335c6da\",\"last_evaluation_time\":1763669115000,\"filters\":[],\"sort\":{\"field\":\"standard\",\"keyword\":\"asc\"},\"search_from\":0,\"search_to\":100}}"); CURLcode ret = curl_easy_perform(hnd);
var client = new RestClient("https://api-/%7Bfqdn%7D/public_api/v1/compliance/get_asset"); var request = new RestRequest(Method.POST); request.AddHeader("x-xdr-auth-id", "REPLACE_KEY_VALUE"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"request_data\":{\"asset_id\":\"eea3102e81bc8cf10b43168a7a1ff27cb539a7325428f3cd956240472335c6da\",\"last_evaluation_time\":1763669115000,\"filters\":[],\"sort\":{\"field\":\"standard\",\"keyword\":\"asc\"},\"search_from\":0,\"search_to\":100}}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
Body parameters
required
application/json

Request payload for retrieving asset compliance data. Supports filtering, sorting, and pagination.

request_dataobject
asset_idstringrequired

Asset identifier for which to retrieve control findings

Example:"eea3102e81bc8cf10b43168a7a1ff27cb539a7325428f3cd956240472335c6da"
last_evaluation_timeintegerrequiredint64

Unix timestamp in milliseconds for the evaluation time

Example:1763669115000
filtersarray

Array of filter objects for filtering control findings

[
fieldstring (Enum)required

Field to filter on

Example:"severity"
Allowed values:"standard""category""control""severity""status""source"
operatorstring (Enum)required

Filter operator to apply. Note: contains and not_contains are only valid for string fields (standard, category, control, source).

Example:"eq"
Allowed values:"eq""neq""contains""not_contains"
valuestringrequired

Value to filter by. For severity field, use: SEV_010_INFO, SEV_020_LOW, SEV_030_MEDIUM, SEV_040_HIGH, SEV_050_CRITICAL. For status field, use: FAILED, PASSED, NOT_ASSESSED.

Example:"SEV_030_MEDIUM"
]
sortobject

Sort configuration (defaults to standard asc)

fieldstring (Enum)

Field to sort by

Example:"standard"
Default:"standard"
Allowed values:"standard""category""control""severity""status"
keywordstring (Enum)

Sort direction

Example:"asc"
Default:"asc"
Allowed values:"asc""desc"
search_frominteger

Starting index for pagination

search_tointeger

Ending index for pagination

Default:100
REQUEST
{ "request_data": { "asset_id": "eea3102e81bc8cf10b43168a7a1ff27cb539a7325428f3cd956240472335c6da", "last_evaluation_time": 1763669115000, "filters": [], "sort": {}, "search_from": 0, "search_to": 100 } }
Responses

Successfully retrieved control findings

Body
application/json

Response containing asset compliance data including compliance status, findings, and associated standards.

replyobject
total_countintegerrequired

Total number of control findings available

Example:134
result_countintegerrequired

Number of control findings returned after filtering and pagination

Example:29
filter_countintegerrequired

Number of control findings matching the applied filters

Example:29
assetsarrayrequired

Array of control findings for the asset

[
STANDARDstring

Name of the compliance standard

Example:"Secure Controls Framework (SCF) v2024.2"
STANDARD_REVISIONstring

Revision identifier of the compliance standard

Example:"-3633352044114537559"
CATEGORYstring

Control category or domain

Example:"Continuous Monitoring"
CONTROL_REVISIONstring

Revision identifier of the specific control

Example:"5207648284675893530"
CONTROLstring

Control identifier and name

Example:"MON-05.1:Real-Time Alerts of Event Logging Failure"
SEVERITYstring (Enum)

Severity level of the control finding

Example:"SEV_030_MEDIUM"
Allowed values:"SEV_010_INFO""SEV_020_LOW""SEV_030_MEDIUM""SEV_040_HIGH""SEV_050_CRITICAL"
RULE_IDSarray[string]

Array of rule identifiers associated with this finding

Example:["ab0317ac-661a-4a7d-a28a-53f4fdf6d290"]
LAST_EVALUATION_TIMEintegerint64

Unix timestamp of the last evaluation

Example:1762718526
STATUSstring (Enum)

Assessment status of the control

Example:"FAILED"
Allowed values:"FAILED""PASSED""NOT_ASSESSED"
SOURCEstring

Source of the control assessment

Example:"Finding"
]
RESPONSE
{ "reply": { "total_count": 5, "result_count": 5, "filter_count": 5, "assets": [ { "STANDARD": "Secure Controls Framework (SCF) v2024.2", "STANDARD_REVISION": "-3633352044114537559", "CATEGORY": "Continuous Monitoring", "CONTROL_REVISION": "5207648284675893530", "CONTROL": "MON-05.1:Real-Time Alerts of Event Logging Failure", "SEVERITY": "SEV_030_MEDIUM", "RULE_IDS": [ "ab0317ac-661a-4a7d-a28a-53f4fdf6d290" ], "LAST_EVALUATION_TIME": 1762718526, "STATUS": "FAILED", "SOURCE": "Finding" } ] } }

Bad request - invalid parameters or request format

Body
application/json

Standard error response returned when the API request fails.

replyobject
err_codeintegerrequired

Error code

err_msgstringrequired

Error message describing what went wrong

err_extraobject

Additional error details

RESPONSE
{ "reply": { "err_code": 400, "err_msg": "Missing required parameter: asset_id", "err_extra": {} } }
{ "reply": { "err_code": 400, "err_msg": "Missing required parameter: last_evaluation_time", "err_extra": {} } }
{ "reply": { "err_code": 400, "err_msg": "Invalid filter field. Allowed fields: standard, category, control, severity, status, source", "err_extra": {} } }
{ "reply": { "err_code": 400, "err_msg": "Invalid severity value. Allowed values: SEV_010_INFO, SEV_020_LOW, SEV_030_MEDIUM, SEV_040_HIGH, SEV_050_CRITICAL", "err_extra": {} } }

Authentication required

Body
application/json

Standard error response returned when the API request fails.

replyobject
err_codeintegerrequired

Error code

err_msgstringrequired

Error message describing what went wrong

err_extraobject

Additional error details

RESPONSE
{ "reply": { "err_code": 401, "err_msg": "Authentication credentials were not provided or are invalid", "err_extra": {} } }

Access denied - insufficient permissions

Body
application/json

Standard error response returned when the API request fails.

replyobject
err_codeintegerrequired

Error code

err_msgstringrequired

Error message describing what went wrong

err_extraobject

Additional error details

RESPONSE
{ "reply": { "err_code": 403, "err_msg": "You do not have permission to access control findings", "err_extra": {} } }

Internal server error

Body
application/json

Standard error response returned when the API request fails.

replyobject
err_codeintegerrequired

Error code

err_msgstringrequired

Error message describing what went wrong

err_extraobject

Additional error details

RESPONSE
{ "reply": { "err_code": 500, "err_msg": "Failed to retrieve control findings", "err_extra": {} } }