Poll the status of a BYOS import job

Cortex XSIAM Platform APIs

get /public_api/vulnerability-management/v1/external-scans/assets/jobs/{job_id}

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 queued
  • PROCESSING — job is actively being processed
  • COMPLETED — all assets imported successfully
  • COMPLETED_WITH_ERRORS — import finished but some assets failed; check error_log
  • FAILED — job failed entirely; check error_log for details

Response codes:

  • 200 — Job status retrieved successfully. The HTTP status reflects only the poll request itself; the job's outcome is in job_status (including the terminal FAILED and COMPLETED_WITH_ERRORS states).
  • 404job_id was 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

Path parameters
job_id String required

The unique identifier of the BYOS import job, returned by the Submit assets and vulnerabilities from an external scanner endpoint.

Example: jobId_example
Request headers
x-xdr-auth-id required
Authorization String required
Example: authorization_example
CLIENT REQUEST
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_body
const 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);
Responses

Job status retrieved successfully.

Body
application/json

Status and metadata for a BYOS import job.

job_idstringrequired

Unique job ID. Use this value with the Get BYOS Import Job Status endpoint to poll for completion.

created_timestampstringrequireddate-time

ISO 8601 timestamp of when the job was received.

job_statusobjectrequired

Current status of the import job.

string (Enum)

Possible status values for a BYOS import job.

Allowed values:"INITIATED""PROCESSING""COMPLETED""COMPLETED_WITH_ERRORS""FAILED"
last_updatedstringdate-time

ISO 8601 timestamp of when the job was last updated.

error_logstring or null

Error details if the job failed or completed with errors. May be null when there is no error.

RESPONSE
{ "job_id": "example", "created_timestamp": "2020-01-01T12:00:00Z", "job_status": "INITIATED", "last_updated": "2020-01-01T12:00:00Z", "error_log": null }

Job not found — the specified job_id does not exist.

Body
application/json
detailstring
Example:"Job with id 'a2b1aba2-37fe-4fb4-ba6d-829e8cf5d653' not found"
RESPONSE
{ "detail": "Job with id 'a2b1aba2-37fe-4fb4-ba6d-829e8cf5d653' not found" }

Validation Error — the job_id path parameter failed schema validation.

Body
application/json
detailarray
[
locarrayrequired
[
string
integer
]
msgstringrequired
typestringrequired
]
RESPONSE
{ "detail": [ { "loc": [ 0 ], "msg": "example", "type": "example" } ] }