Get identifier roles for cloud instance

Cortex XSIAM Platform APIs

post /public_api/v1/cloud_onboarding/get_identifiers

List all of the identifiers roles for the cloud instance. In the UI, these details are listed under Authorization details of the cloud instance.

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

CLIENT REQUEST
curl -X 'POST'
-H 'Accept: application/json'
-H 'Content-Type: application/json'
'https://api-yourfqdn/public_api/v1/cloud_onboarding/get_identifiers'
-d '{ "instance_id" : "instance_id", "cloud_provider" : "GCP" }'
import http.client conn = http.client.HTTPSConnection("api-yourfqdn") payload = "{\"instance_id\":\"string\",\"cloud_provider\":\"GCP\"}" headers = { 'content-type': "application/json" } conn.request("POST", "/public_api/v1/cloud_onboarding/get_identifiers", 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/v1/cloud_onboarding/get_identifiers") 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["content-type"] = 'application/json' request.body = "{\"instance_id\":\"string\",\"cloud_provider\":\"GCP\"}" response = http.request(request) puts response.read_body
const data = JSON.stringify({ "instance_id": "string", "cloud_provider": "GCP" }); 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/v1/cloud_onboarding/get_identifiers"); xhr.setRequestHeader("content-type", "application/json"); xhr.send(data);
HttpResponse<String> response = Unirest.post("https://api-yourfqdn/public_api/v1/cloud_onboarding/get_identifiers") .header("content-type", "application/json") .body("{\"instance_id\":\"string\",\"cloud_provider\":\"GCP\"}") .asString();
import Foundation let headers = ["content-type": "application/json"] let parameters = [ "instance_id": "string", "cloud_provider": "GCP" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api-yourfqdn/public_api/v1/cloud_onboarding/get_identifiers")! 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/v1/cloud_onboarding/get_identifiers", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "{\"instance_id\":\"string\",\"cloud_provider\":\"GCP\"}", CURLOPT_HTTPHEADER => [ "content-type: application/json" ], ]); $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/v1/cloud_onboarding/get_identifiers"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "content-type: application/json"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\"instance_id\":\"string\",\"cloud_provider\":\"GCP\"}"); CURLcode ret = curl_easy_perform(hnd);
var client = new RestClient("https://api-yourfqdn/public_api/v1/cloud_onboarding/get_identifiers"); var request = new RestRequest(Method.POST); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"instance_id\":\"string\",\"cloud_provider\":\"GCP\"}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
Body parameters
required
application/json
instance_idstring

The cloud instance ID for which you want to list the authorization details.

cloud_providerstring (Enum)

The cloud service provider for which you want to list the authorization details.

Allowed values:"GCP"
REQUEST
{ "instance_id": "example", "cloud_provider": "GCP" }
Responses

Successful Response

Body
application/json
replyobject
cortex_discovery_rolestring

The Cortex discovery role identifier

cortex_scan_platform_rolestring

The Cortex scan platform role identifier

cortex_log_collection_rolestring

The Cortex log collection role identifier

cortex_outpost_rolestring

The Cortex outpost role identifier

RESPONSE
{ "reply": { "cortex_discovery_role": "example", "cortex_scan_platform_role": "example", "cortex_log_collection_role": "example", "cortex_outpost_role": "example" } }

Bad Request

Body
application/json
replyobject
err_codestring

Error code

err_msgstring

Error message

err_extrastring

Extra information about the error

RESPONSE
{ "reply": { "err_code": "example", "err_msg": "example", "err_extra": "example" } }

Internal Server Error

Body
application/json
replyobject
err_codestring

Error code

err_msgstring

Error message

err_extrastring

Extra information about the error

RESPONSE
{ "reply": { "err_code": "example", "err_msg": "example", "err_extra": "example" } }