Retrieve compliance standard and control results for a specific asset ID, with optional filtering, sorting and pagination.
Required params:
asset_id(string) - The asset identifierlast_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:
standardin ascending order
Pagination: (max number of elements is 100)
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_bodyconst 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);Request payload for retrieving asset compliance data. Supports filtering, sorting, and pagination.
request_dataobject
asset_idstringrequiredAsset identifier for which to retrieve control findings
Asset identifier for which to retrieve control findings
"eea3102e81bc8cf10b43168a7a1ff27cb539a7325428f3cd956240472335c6da"last_evaluation_timeintegerrequiredint64Unix timestamp in milliseconds for the evaluation time
Unix timestamp in milliseconds for the evaluation time
1763669115000filtersarrayArray of filter objects for filtering control findings
Array of filter objects for filtering control findings
fieldstring (Enum)requiredField to filter on
Field to filter on
"severity"operatorstring (Enum)requiredFilter operator to apply. Note: contains and not_contains are only valid for string fields (standard, category, control, source).
Filter operator to apply. Note: contains and not_contains are only valid for string fields (standard, category, control, source).
"eq"valuestringrequiredValue 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.
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.
"SEV_030_MEDIUM"sortobjectSort configuration (defaults to standard asc)
Sort configuration (defaults to standard asc)
fieldstring (Enum)Field to sort by
Field to sort by
"standard""standard"keywordstring (Enum)Sort direction
Sort direction
"asc""asc"search_fromintegerStarting index for pagination
Starting index for pagination
search_tointegerEnding index for pagination
Ending index for pagination
100{
"request_data": {
"asset_id": "eea3102e81bc8cf10b43168a7a1ff27cb539a7325428f3cd956240472335c6da",
"last_evaluation_time": 1763669115000,
"filters": [],
"sort": {},
"search_from": 0,
"search_to": 100
}
}