Returns the current status of an asynchronous BYOS import job.
After submitting assets via the Submit assets and vulnerabilities from an external scanner endpoint, use the returned job_id to poll this endpoint until the job reaches a terminal state (COMPLETED, FAILED, or COMPLETED_WITH_ERRORS).
Possible job_status values:
INITIATED— job received, not yet queuedPROCESSING— job is actively being processedCOMPLETED— all assets imported successfullyCOMPLETED_WITH_ERRORS— import finished but some assets failed; checkerror_logFAILED— job failed entirely; checkerror_logfor details
Response codes:
200— Job status retrieved successfully. The HTTP status reflects only the poll request itself; the job's outcome is injob_status(including the terminalFAILEDandCOMPLETED_WITH_ERRORSstates).404—job_idwas not found.
422 Unprocessable Entity is only returned by the upstream Submit assets and vulnerabilities from an external scanner endpoint when the request payload fails schema validation. A 422 therefore means the job was never created; a FAILED job_status returned in a 200 response means the job ran but could not complete — see error_log for details.
RBAC permission required: manage_vulnerabilities_action
Required licenses: Exposure Management; and either Cortex XSIAM Premium or any Cortex XSIAM product with the Cloud Runtime Security or Cloud Posture Security add-ons
job_id
String
required
The unique identifier of the BYOS import job, returned by the Submit assets and vulnerabilities from an external scanner endpoint.
The unique identifier of the BYOS import job, returned by the Submit assets and vulnerabilities from an external scanner endpoint.
jobId_example
x-xdr-auth-id required
Authorization String required
authorization_example
curl -X 'GET'
-H
'Accept: application/json'
-H
'x-xdr-auth-id: '
-H
'Authorization: authorization_example'
'https://api-yourfqdn/public_api/vulnerability-management/v1/external-scans/assets/jobs/{job_id}'
import http.client
conn = http.client.HTTPSConnection("api-yourfqdn")
headers = {
'x-xdr-auth-id': "SOME_INTEGER_VALUE",
'Authorization': "SOME_STRING_VALUE"
}
conn.request("GET", "/public_api/vulnerability-management/v1/external-scans/assets/jobs/%7Bjob_id%7D", headers=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/vulnerability-management/v1/external-scans/assets/jobs/%7Bjob_id%7D")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["x-xdr-auth-id"] = 'SOME_INTEGER_VALUE'
request["Authorization"] = 'SOME_STRING_VALUE'
response = http.request(request)
puts response.read_bodyconst data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api-yourfqdn/public_api/vulnerability-management/v1/external-scans/assets/jobs/%7Bjob_id%7D");
xhr.setRequestHeader("x-xdr-auth-id", "SOME_INTEGER_VALUE");
xhr.setRequestHeader("Authorization", "SOME_STRING_VALUE");
xhr.send(data);HttpResponse<String> response = Unirest.get("https://api-yourfqdn/public_api/vulnerability-management/v1/external-scans/assets/jobs/%7Bjob_id%7D")
.header("x-xdr-auth-id", "SOME_INTEGER_VALUE")
.header("Authorization", "SOME_STRING_VALUE")
.asString();import Foundation
let headers = [
"x-xdr-auth-id": "SOME_INTEGER_VALUE",
"Authorization": "SOME_STRING_VALUE"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://api-yourfqdn/public_api/vulnerability-management/v1/external-scans/assets/jobs/%7Bjob_id%7D")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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/vulnerability-management/v1/external-scans/assets/jobs/%7Bjob_id%7D",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: SOME_STRING_VALUE",
"x-xdr-auth-id: SOME_INTEGER_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, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-yourfqdn/public_api/vulnerability-management/v1/external-scans/assets/jobs/%7Bjob_id%7D");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-xdr-auth-id: SOME_INTEGER_VALUE");
headers = curl_slist_append(headers, "Authorization: SOME_STRING_VALUE");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);var client = new RestClient("https://api-yourfqdn/public_api/vulnerability-management/v1/external-scans/assets/jobs/%7Bjob_id%7D");
var request = new RestRequest(Method.GET);
request.AddHeader("x-xdr-auth-id", "SOME_INTEGER_VALUE");
request.AddHeader("Authorization", "SOME_STRING_VALUE");
IRestResponse response = client.Execute(request);