post
/public_api/v1/ciem/access/search
Retrieves a list of access entries based on specified filters, sorting, and pagination.
Required license: Cortex Cloud Runtime Security or Cortex Cloud Posture Management
Request headers
x-xdr-auth-id
String
required
{api_key_id}
{api_key_id}
Example:
xXdrAuthId_example
Authorization
String
required
{api_key}
{api_key}
Example:
authorization_example
Content-Type
String
required
Specifies the request body format.
Specifies the request body format.
Example:
contentType_example
CLIENT REQUEST
curl -X 'POST'
-H
'Accept: application/json'
-H
'Content-Type: application/json'
-H
'x-xdr-auth-id: xXdrAuthId_example'
-H
'Authorization: authorization_example'
-H
'Content-Type: contentType_example'
'https://api-yourfqdn/public_api/v1/ciem/access/search'
-d
'{
"filter" : {
"AND" : [ {
"search_field" : "dest_cloud_resource_id",
"search_type" : "EQ",
"search_value" : "abc"
} ]
},
"sort" : [ {
"field" : "dest_cloud_resource_id",
"order" : "DESC"
} ],
"metadata" : {
"next_page_token" : "some_base64_string"
}
}'
import http.client
conn = http.client.HTTPSConnection("api-yourfqdn")
payload = "{\"filter\":{\"AND\":[{\"search_field\":\"dest_cloud_resource_id\",\"search_type\":\"EQ\",\"search_value\":\"abc\"}]},\"sort\":[{\"field\":\"dest_cloud_resource_id\",\"order\":\"DESC\"}],\"metadata\":{\"next_page_token\":\"some_base64_string\"}}"
headers = {
'x-xdr-auth-id': "SOME_STRING_VALUE",
'Authorization': "SOME_STRING_VALUE",
'Content-Type': "SOME_STRING_VALUE",
'content-type': "application/json"
}
conn.request("POST", "/public_api/v1/ciem/access/search", 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/ciem/access/search")
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"] = 'SOME_STRING_VALUE'
request["Authorization"] = 'SOME_STRING_VALUE'
request["Content-Type"] = 'SOME_STRING_VALUE'
request["content-type"] = 'application/json'
request.body = "{\"filter\":{\"AND\":[{\"search_field\":\"dest_cloud_resource_id\",\"search_type\":\"EQ\",\"search_value\":\"abc\"}]},\"sort\":[{\"field\":\"dest_cloud_resource_id\",\"order\":\"DESC\"}],\"metadata\":{\"next_page_token\":\"some_base64_string\"}}"
response = http.request(request)
puts response.read_bodyconst data = JSON.stringify({
"filter": {
"AND": [
{
"search_field": "dest_cloud_resource_id",
"search_type": "EQ",
"search_value": "abc"
}
]
},
"sort": [
{
"field": "dest_cloud_resource_id",
"order": "DESC"
}
],
"metadata": {
"next_page_token": "some_base64_string"
}
});
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/ciem/access/search");
xhr.setRequestHeader("x-xdr-auth-id", "SOME_STRING_VALUE");
xhr.setRequestHeader("Authorization", "SOME_STRING_VALUE");
xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);HttpResponse<String> response = Unirest.post("https://api-yourfqdn/public_api/v1/ciem/access/search")
.header("x-xdr-auth-id", "SOME_STRING_VALUE")
.header("Authorization", "SOME_STRING_VALUE")
.header("Content-Type", "SOME_STRING_VALUE")
.header("content-type", "application/json")
.body("{\"filter\":{\"AND\":[{\"search_field\":\"dest_cloud_resource_id\",\"search_type\":\"EQ\",\"search_value\":\"abc\"}]},\"sort\":[{\"field\":\"dest_cloud_resource_id\",\"order\":\"DESC\"}],\"metadata\":{\"next_page_token\":\"some_base64_string\"}}")
.asString();import Foundation
let headers = [
"x-xdr-auth-id": "SOME_STRING_VALUE",
"Authorization": "SOME_STRING_VALUE",
"Content-Type": "SOME_STRING_VALUE",
"content-type": "application/json"
]
let parameters = [
"filter": ["AND": [
[
"search_field": "dest_cloud_resource_id",
"search_type": "EQ",
"search_value": "abc"
]
]],
"sort": [
[
"field": "dest_cloud_resource_id",
"order": "DESC"
]
],
"metadata": ["next_page_token": "some_base64_string"]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api-yourfqdn/public_api/v1/ciem/access/search")! 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/ciem/access/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"filter\":{\"AND\":[{\"search_field\":\"dest_cloud_resource_id\",\"search_type\":\"EQ\",\"search_value\":\"abc\"}]},\"sort\":[{\"field\":\"dest_cloud_resource_id\",\"order\":\"DESC\"}],\"metadata\":{\"next_page_token\":\"some_base64_string\"}}",
CURLOPT_HTTPHEADER => [
"Authorization: SOME_STRING_VALUE",
"Content-Type: SOME_STRING_VALUE",
"content-type: application/json",
"x-xdr-auth-id: SOME_STRING_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-yourfqdn/public_api/v1/ciem/access/search");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-xdr-auth-id: SOME_STRING_VALUE");
headers = curl_slist_append(headers, "Authorization: SOME_STRING_VALUE");
headers = curl_slist_append(headers, "Content-Type: SOME_STRING_VALUE");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\"filter\":{\"AND\":[{\"search_field\":\"dest_cloud_resource_id\",\"search_type\":\"EQ\",\"search_value\":\"abc\"}]},\"sort\":[{\"field\":\"dest_cloud_resource_id\",\"order\":\"DESC\"}],\"metadata\":{\"next_page_token\":\"some_base64_string\"}}");
CURLcode ret = curl_easy_perform(hnd);var client = new RestClient("https://api-yourfqdn/public_api/v1/ciem/access/search");
var request = new RestRequest(Method.POST);
request.AddHeader("x-xdr-auth-id", "SOME_STRING_VALUE");
request.AddHeader("Authorization", "SOME_STRING_VALUE");
request.AddHeader("Content-Type", "SOME_STRING_VALUE");
request.AddHeader("content-type", "application/json");
request.AddParameter("SOME_STRING_VALUE", "{\"filter\":{\"AND\":[{\"search_field\":\"dest_cloud_resource_id\",\"search_type\":\"EQ\",\"search_value\":\"abc\"}]},\"sort\":[{\"field\":\"dest_cloud_resource_id\",\"order\":\"DESC\"}],\"metadata\":{\"next_page_token\":\"some_base64_string\"}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);Body parameters
required
filterobject
ANDarray
sortarray
metadataobject
next_page_tokenstring
application/json
filterobjectOptional filters to apply to the search results.
Optional filters to apply to the search results.
ANDarrayA list of filter conditions. Currently only supports AND logic.
A list of filter conditions. Currently only supports AND logic.
[search_fieldstring (Enum)required
search_typestring (Enum)required
search_valuestringrequired
]
search_fieldstring (Enum)requiredIdentifies the field to filter.
Identifies the field to filter.
Allowed values:"access_levels""account_access_transformed""dest_cloud_account_id""dest_cloud_account_name""dest_cloud_region""dest_cloud_resource_id""dest_cloud_resource_name""dest_cloud_resource_type""dest_cloud_resource_uai""dest_cloud_service_name""destCategory""destination_access_labels""excessive_policies_count""grantedby_cloud_entity_id""grantedby_cloud_entity_name""grantedby_cloud_entity_type""grantedby_cloud_entity_uai""granterCategory""last_used""permission_scope""source_cloud_account_id""source_cloud_account_is_vendor""source_cloud_account_name""source_cloud_region""source_cloud_resource_id""source_cloud_resource_name""source_cloud_resource_type""source_cloud_resource_uai""source_cloud_service_name""sourceCategory""sourceVendorName""unused_actions_count"
search_typestring (Enum)requiredIdentifies the comparison operator you want to use for this filter. Valid values are:
EQ
Identifies the comparison operator you want to use for this filter. Valid values are:
EQ
Allowed values:"EQ"
search_valuestringrequiredValue that this filter must match.
Value that this filter must match.
sortarrayOptional sorting criteria for the search results.
Optional sorting criteria for the search results.
[fieldstring (Enum)required
orderstring (Enum)required
]
fieldstring (Enum)requiredThe field to sort by.
The field to sort by.
Allowed values:"account_access_transformed""dest_cloud_account_id""dest_cloud_account_name""dest_cloud_resource_id""dest_cloud_resource_name""dest_cloud_resource_type""dest_cloud_resource_uai""dest_cloud_service_name""excessive_policies_count""grantedby_cloud_entity_id""grantedby_cloud_entity_name""grantedby_cloud_entity_type""grantedby_cloud_entity_uai""is_last_access_supported""last_used""permission_scope""source_cloud_account_id""source_cloud_account_is_vendor""source_cloud_account_name""source_cloud_resource_id""source_cloud_resource_name""source_cloud_resource_type""source_cloud_resource_uai""source_cloud_service_name""unused_actions_count"
orderstring (Enum)requiredThe sort order.
The sort order.
Allowed values:"ASC""DESC"
metadataobjectOptional metadata for pagination.
Optional metadata for pagination.
next_page_tokenstringA token provided by a previous response to fetch the next page of results.
A token provided by a previous response to fetch the next page of results.
REQUEST
{
"filter": {
"AND": [
{
"search_field": "dest_cloud_resource_id",
"search_type": "EQ",
"search_value": "abc"
}
]
},
"sort": [
{
"field": "dest_cloud_resource_id",
"order": "DESC"
}
],
"metadata": {
"next_page_token": "some_base64_string"
}
}Responses