Get a list of all your assets or a filtered list of your assets.
The maximum result limit is 5000 assets.
Required license: Cortex Xpanse Expander
authorization
String
required
api-key
api-key
{{api_key}}
x-xdr-auth-id
String
required
api-key-id
api-key-id
{{api_key_id}}
curl -X 'POST'
-H
'Accept: application/json'
-H
'Content-Type: application/json'
-H
'authorization: {{api_key}}'
-H
'x-xdr-auth-id: {{api_key_id}}'
'https://api-}/public_api/v1/assets/get_assets_internet_exposure/'
-d
'{
"request_data" : {
"search_from" : 0,
"next_page_token" : "next_page_token",
"filters" : [ {
"field" : "name",
"value" : "AsmAssetsFilter_value",
"operator" : "in"
}, {
"field" : "name",
"value" : "AsmAssetsFilter_value",
"operator" : "in"
} ],
"sort" : {
"field" : "name",
"keyword" : "asc"
},
"search_to" : 0,
"use_page_token" : true
}
}'
import http.client
conn = http.client.HTTPSConnection("api-")
payload = "{\"request_data\":{\"filters\":[{\"field\":\"name\",\"operator\":\"in\",\"value\":\"string\"}],\"search_from\":0,\"search_to\":500,\"sort\":{\"field\":\"first_observed\",\"keyword\":\"ASC\"},\"use_page_token\":true,\"next_page_token\":\"string\"}}"
headers = {
'authorization': "{{api_key}}",
'x-xdr-auth-id': "{{api_key_id}}",
'content-type': "application/json"
}
conn.request("POST", "%7B%7Bfqdn%7D%7D/public_api/v1/assets/get_assets_internet_exposure/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api-/%7B%7Bfqdn%7D%7D/public_api/v1/assets/get_assets_internet_exposure/")
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["authorization"] = '{{api_key}}'
request["x-xdr-auth-id"] = '{{api_key_id}}'
request["content-type"] = 'application/json'
request.body = "{\"request_data\":{\"filters\":[{\"field\":\"name\",\"operator\":\"in\",\"value\":\"string\"}],\"search_from\":0,\"search_to\":500,\"sort\":{\"field\":\"first_observed\",\"keyword\":\"ASC\"},\"use_page_token\":true,\"next_page_token\":\"string\"}}"
response = http.request(request)
puts response.read_bodyconst data = JSON.stringify({
"request_data": {
"filters": [
{
"field": "name",
"operator": "in",
"value": "string"
}
],
"search_from": 0,
"search_to": 500,
"sort": {
"field": "first_observed",
"keyword": "ASC"
},
"use_page_token": true,
"next_page_token": "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-/%7B%7Bfqdn%7D%7D/public_api/v1/assets/get_assets_internet_exposure/");
xhr.setRequestHeader("authorization", "{{api_key}}");
xhr.setRequestHeader("x-xdr-auth-id", "{{api_key_id}}");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);HttpResponse<String> response = Unirest.post("https://api-/%7B%7Bfqdn%7D%7D/public_api/v1/assets/get_assets_internet_exposure/")
.header("authorization", "{{api_key}}")
.header("x-xdr-auth-id", "{{api_key_id}}")
.header("content-type", "application/json")
.body("{\"request_data\":{\"filters\":[{\"field\":\"name\",\"operator\":\"in\",\"value\":\"string\"}],\"search_from\":0,\"search_to\":500,\"sort\":{\"field\":\"first_observed\",\"keyword\":\"ASC\"},\"use_page_token\":true,\"next_page_token\":\"string\"}}")
.asString();import Foundation
let headers = [
"authorization": "{{api_key}}",
"x-xdr-auth-id": "{{api_key_id}}",
"content-type": "application/json"
]
let parameters = ["request_data": [
"filters": [
[
"field": "name",
"operator": "in",
"value": "string"
]
],
"search_from": 0,
"search_to": 500,
"sort": [
"field": "first_observed",
"keyword": "ASC"
],
"use_page_token": true,
"next_page_token": "string"
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api-/%7B%7Bfqdn%7D%7D/public_api/v1/assets/get_assets_internet_exposure/")! 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-/%7B%7Bfqdn%7D%7D/public_api/v1/assets/get_assets_internet_exposure/",
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\":{\"filters\":[{\"field\":\"name\",\"operator\":\"in\",\"value\":\"string\"}],\"search_from\":0,\"search_to\":500,\"sort\":{\"field\":\"first_observed\",\"keyword\":\"ASC\"},\"use_page_token\":true,\"next_page_token\":\"string\"}}",
CURLOPT_HTTPHEADER => [
"authorization: {{api_key}}",
"content-type: application/json",
"x-xdr-auth-id: {{api_key_id}}"
],
]);
$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-/%7B%7Bfqdn%7D%7D/public_api/v1/assets/get_assets_internet_exposure/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: {{api_key}}");
headers = curl_slist_append(headers, "x-xdr-auth-id: {{api_key_id}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\"request_data\":{\"filters\":[{\"field\":\"name\",\"operator\":\"in\",\"value\":\"string\"}],\"search_from\":0,\"search_to\":500,\"sort\":{\"field\":\"first_observed\",\"keyword\":\"ASC\"},\"use_page_token\":true,\"next_page_token\":\"string\"}}");
CURLcode ret = curl_easy_perform(hnd);var client = new RestClient("https://api-/%7B%7Bfqdn%7D%7D/public_api/v1/assets/get_assets_internet_exposure/");
var request = new RestRequest(Method.POST);
request.AddHeader("authorization", "{{api_key}}");
request.AddHeader("x-xdr-auth-id", "{{api_key_id}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"request_data\":{\"filters\":[{\"field\":\"name\",\"operator\":\"in\",\"value\":\"string\"}],\"search_from\":0,\"search_to\":500,\"sort\":{\"field\":\"first_observed\",\"keyword\":\"ASC\"},\"use_page_token\":true,\"next_page_token\":\"string\"}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);request_dataobjectA dictionary containing the API request fields.
An empty dictionary returns all results.
A dictionary containing the API request fields. An empty dictionary returns all results.
filtersarrayAn array of filter fields.
An array of filter fields.
fieldstring (Enum)Identifies the assets field the filter is matching. Case-sensitive.
Identifies the assets field the filter is matching. Case-sensitive.
operatorstring (Enum)Identifies the comparison operator you want to use for this filter. Valid keywords and values are:
- contains / not_contains: use with
externally_detected_providers, externally_inferred_cves, name
- eq / neq: use with
name, ip_address, has_bu_overrides.
- gte: Filters data from a specific timestamp onwards. Use with
first_observed, last_observed.
- in: use with
has_active_external_services, type, business_units_list, ip_address.
- lte: Filters data up to a specific timestamp. Use with
first_observed, last_observed.
- range: Filters data between two specific timestamps.Use with
first_observed, last_observed.
- relative_timestamp: Filters data relative to the current time (e.g., last 30 days). Use with
first_observed or last_observed.
Identifies the comparison operator you want to use for this filter. Valid keywords and values are:
- contains / not_contains: use with
externally_detected_providers,externally_inferred_cves,name - eq / neq: use with
name,ip_address,has_bu_overrides. - gte: Filters data from a specific timestamp onwards. Use with
first_observed,last_observed. - in: use with
has_active_external_services,type,business_units_list,ip_address. - lte: Filters data up to a specific timestamp. Use with
first_observed,last_observed. - range: Filters data between two specific timestamps.Use with
first_observed,last_observed. - relative_timestamp: Filters data relative to the current time (e.g., last 30 days). Use with
first_observedorlast_observed.
valueobjectValue depends on the filter field used.
- business_un****its_list: string or list of strings in the format "BU name" or "BU:BU name", for example “Acme & Co, Inc.” or “BU:Acme & Co, Inc.”
- externally_detected_providers: string
- externally_inferred_cves: string
- first_observed — values in milliseconds format
- with gte or lte operator, specify a specific date or time as a timestamp in milliseconds format
- with range operator, specify "to" and "from" values as timestamps in milliseconds format
"value": { "from": "{{previous30Days}}","to": "{{previous7Days}}"
- with relative_timestamp operator, specify time interval to look back on (24H, 7D, 30D, etc.) as a value in milliseconds format
- has_active_external_services: list of strings (enum values: "yes", "no", "unknown")
- has_bu_overrides: boolean ("true" or "false")
- ip_address: list of strings
- ipv6_address: string
- last_observed — values in milliseconds format
- with gte or lte operator, specify a specific date or time as a timestamp in milliseconds format
- with range operator, specify "to" and "from" values as timestamps in milliseconds format, as follows
"value": { "from": "{{previous30Days}}","to": "{{previous7Days}}"
- with relative_timestamp operator, specify time interval to look back on (24H, 7D, 30D, etc.) as a value in milliseconds format
- name: string
- type: List of strings (enum values: "certificate", "cloud_integration", "cloud_compute_instance", "domain", "unassociated_responsive_ip")
- tags: List of strings indicating the tags to filter on in the format
"tag-family:tag-name", for example "AR:registered to you".
- type: string
Value depends on the filter field used.
- business_un****its_list: string or list of strings in the format "BU name" or "BU:BU name", for example “Acme & Co, Inc.” or “BU:Acme & Co, Inc.”
- externally_detected_providers: string
- externally_inferred_cves: string
- first_observed — values in milliseconds format
- with gte or lte operator, specify a specific date or time as a timestamp in milliseconds format
- with range operator, specify "to" and "from" values as timestamps in milliseconds format "value": { "from": "{{previous30Days}}","to": "{{previous7Days}}"
- with relative_timestamp operator, specify time interval to look back on (24H, 7D, 30D, etc.) as a value in milliseconds format
- has_active_external_services: list of strings (enum values: "yes", "no", "unknown")
- has_bu_overrides: boolean ("true" or "false")
- ip_address: list of strings
- ipv6_address: string
- last_observed — values in milliseconds format
- with gte or lte operator, specify a specific date or time as a timestamp in milliseconds format
- with range operator, specify "to" and "from" values as timestamps in milliseconds format, as follows "value": { "from": "{{previous30Days}}","to": "{{previous7Days}}"
- with relative_timestamp operator, specify time interval to look back on (24H, 7D, 30D, etc.) as a value in milliseconds format
- name: string
- type: List of strings (enum values: "certificate", "cloud_integration", "cloud_compute_instance", "domain", "unassociated_responsive_ip")
- tags: List of strings indicating the tags to filter on in the format
"tag-family:tag-name", for example"AR:registered to you". - type: string
stringValue depends on the filter field used.
- business_un****its_list: string or list of strings in the format "BU name" or "BU:BU name", for example “Acme & Co, Inc.” or “BU:Acme & Co, Inc.”
- externally_detected_providers: string
- externally_inferred_cves: string
- first_observed — values in milliseconds format
- with gte or lte operator, specify a specific date or time as a timestamp in milliseconds format
- with range operator, specify "to" and "from" values as timestamps in milliseconds format
"value": { "from": "{{previous30Days}}","to": "{{previous7Days}}"
- with relative_timestamp operator, specify time interval to look back on (24H, 7D, 30D, etc.) as a value in milliseconds format
- has_active_external_services: list of strings (enum values: "yes", "no", "unknown")
- has_bu_overrides: boolean ("true" or "false")
- ip_address: list of strings
- ipv6_address: string
- last_observed — values in milliseconds format
- with gte or lte operator, specify a specific date or time as a timestamp in milliseconds format
- with range operator, specify "to" and "from" values as timestamps in milliseconds format, as follows
"value": { "from": "{{previous30Days}}","to": "{{previous7Days}}"
- with relative_timestamp operator, specify time interval to look back on (24H, 7D, 30D, etc.) as a value in milliseconds format
- name: string
- type: List of strings (enum values: "certificate", "cloud_integration", "cloud_compute_instance", "domain", "unassociated_responsive_ip")
- tags: List of strings indicating the tags to filter on in the format
"tag-family:tag-name", for example "AR:registered to you".
- type: string
Value depends on the filter field used.
- business_un****its_list: string or list of strings in the format "BU name" or "BU:BU name", for example “Acme & Co, Inc.” or “BU:Acme & Co, Inc.”
- externally_detected_providers: string
- externally_inferred_cves: string
- first_observed — values in milliseconds format
- with gte or lte operator, specify a specific date or time as a timestamp in milliseconds format
- with range operator, specify "to" and "from" values as timestamps in milliseconds format "value": { "from": "{{previous30Days}}","to": "{{previous7Days}}"
- with relative_timestamp operator, specify time interval to look back on (24H, 7D, 30D, etc.) as a value in milliseconds format
- has_active_external_services: list of strings (enum values: "yes", "no", "unknown")
- has_bu_overrides: boolean ("true" or "false")
- ip_address: list of strings
- ipv6_address: string
- last_observed — values in milliseconds format
- with gte or lte operator, specify a specific date or time as a timestamp in milliseconds format
- with range operator, specify "to" and "from" values as timestamps in milliseconds format, as follows "value": { "from": "{{previous30Days}}","to": "{{previous7Days}}"
- with relative_timestamp operator, specify time interval to look back on (24H, 7D, 30D, etc.) as a value in milliseconds format
- name: string
- type: List of strings (enum values: "certificate", "cloud_integration", "cloud_compute_instance", "domain", "unassociated_responsive_ip")
- tags: List of strings indicating the tags to filter on in the format
"tag-family:tag-name", for example"AR:registered to you". - type: string
booleanValue depends on the filter field used.
- business_un****its_list: string or list of strings in the format "BU name" or "BU:BU name", for example “Acme & Co, Inc.” or “BU:Acme & Co, Inc.”
- externally_detected_providers: string
- externally_inferred_cves: string
- first_observed — values in milliseconds format
- with gte or lte operator, specify a specific date or time as a timestamp in milliseconds format
- with range operator, specify "to" and "from" values as timestamps in milliseconds format
"value": { "from": "{{previous30Days}}","to": "{{previous7Days}}"
- with relative_timestamp operator, specify time interval to look back on (24H, 7D, 30D, etc.) as a value in milliseconds format
- has_active_external_services: list of strings (enum values: "yes", "no", "unknown")
- has_bu_overrides: boolean ("true" or "false")
- ip_address: list of strings
- ipv6_address: string
- last_observed — values in milliseconds format
- with gte or lte operator, specify a specific date or time as a timestamp in milliseconds format
- with range operator, specify "to" and "from" values as timestamps in milliseconds format, as follows
"value": { "from": "{{previous30Days}}","to": "{{previous7Days}}"
- with relative_timestamp operator, specify time interval to look back on (24H, 7D, 30D, etc.) as a value in milliseconds format
- name: string
- type: List of strings (enum values: "certificate", "cloud_integration", "cloud_compute_instance", "domain", "unassociated_responsive_ip")
- tags: List of strings indicating the tags to filter on in the format
"tag-family:tag-name", for example "AR:registered to you".
- type: string
Value depends on the filter field used.
- business_un****its_list: string or list of strings in the format "BU name" or "BU:BU name", for example “Acme & Co, Inc.” or “BU:Acme & Co, Inc.”
- externally_detected_providers: string
- externally_inferred_cves: string
- first_observed — values in milliseconds format
- with gte or lte operator, specify a specific date or time as a timestamp in milliseconds format
- with range operator, specify "to" and "from" values as timestamps in milliseconds format "value": { "from": "{{previous30Days}}","to": "{{previous7Days}}"
- with relative_timestamp operator, specify time interval to look back on (24H, 7D, 30D, etc.) as a value in milliseconds format
- has_active_external_services: list of strings (enum values: "yes", "no", "unknown")
- has_bu_overrides: boolean ("true" or "false")
- ip_address: list of strings
- ipv6_address: string
- last_observed — values in milliseconds format
- with gte or lte operator, specify a specific date or time as a timestamp in milliseconds format
- with range operator, specify "to" and "from" values as timestamps in milliseconds format, as follows "value": { "from": "{{previous30Days}}","to": "{{previous7Days}}"
- with relative_timestamp operator, specify time interval to look back on (24H, 7D, 30D, etc.) as a value in milliseconds format
- name: string
- type: List of strings (enum values: "certificate", "cloud_integration", "cloud_compute_instance", "domain", "unassociated_responsive_ip")
- tags: List of strings indicating the tags to filter on in the format
"tag-family:tag-name", for example"AR:registered to you". - type: string
integerValue depends on the filter field used.
- business_un****its_list: string or list of strings in the format "BU name" or "BU:BU name", for example “Acme & Co, Inc.” or “BU:Acme & Co, Inc.”
- externally_detected_providers: string
- externally_inferred_cves: string
- first_observed — values in milliseconds format
- with gte or lte operator, specify a specific date or time as a timestamp in milliseconds format
- with range operator, specify "to" and "from" values as timestamps in milliseconds format
"value": { "from": "{{previous30Days}}","to": "{{previous7Days}}"
- with relative_timestamp operator, specify time interval to look back on (24H, 7D, 30D, etc.) as a value in milliseconds format
- has_active_external_services: list of strings (enum values: "yes", "no", "unknown")
- has_bu_overrides: boolean ("true" or "false")
- ip_address: list of strings
- ipv6_address: string
- last_observed — values in milliseconds format
- with gte or lte operator, specify a specific date or time as a timestamp in milliseconds format
- with range operator, specify "to" and "from" values as timestamps in milliseconds format, as follows
"value": { "from": "{{previous30Days}}","to": "{{previous7Days}}"
- with relative_timestamp operator, specify time interval to look back on (24H, 7D, 30D, etc.) as a value in milliseconds format
- name: string
- type: List of strings (enum values: "certificate", "cloud_integration", "cloud_compute_instance", "domain", "unassociated_responsive_ip")
- tags: List of strings indicating the tags to filter on in the format
"tag-family:tag-name", for example "AR:registered to you".
- type: string
Value depends on the filter field used.
- business_un****its_list: string or list of strings in the format "BU name" or "BU:BU name", for example “Acme & Co, Inc.” or “BU:Acme & Co, Inc.”
- externally_detected_providers: string
- externally_inferred_cves: string
- first_observed — values in milliseconds format
- with gte or lte operator, specify a specific date or time as a timestamp in milliseconds format
- with range operator, specify "to" and "from" values as timestamps in milliseconds format "value": { "from": "{{previous30Days}}","to": "{{previous7Days}}"
- with relative_timestamp operator, specify time interval to look back on (24H, 7D, 30D, etc.) as a value in milliseconds format
- has_active_external_services: list of strings (enum values: "yes", "no", "unknown")
- has_bu_overrides: boolean ("true" or "false")
- ip_address: list of strings
- ipv6_address: string
- last_observed — values in milliseconds format
- with gte or lte operator, specify a specific date or time as a timestamp in milliseconds format
- with range operator, specify "to" and "from" values as timestamps in milliseconds format, as follows "value": { "from": "{{previous30Days}}","to": "{{previous7Days}}"
- with relative_timestamp operator, specify time interval to look back on (24H, 7D, 30D, etc.) as a value in milliseconds format
- name: string
- type: List of strings (enum values: "certificate", "cloud_integration", "cloud_compute_instance", "domain", "unassociated_responsive_ip")
- tags: List of strings indicating the tags to filter on in the format
"tag-family:tag-name", for example"AR:registered to you". - type: string
search_fromintegerRepresents the start offset index of results.
Represents the start offset index of results.
search_tointegerAn integer representing the start offset index of results. Use this field to specify the number of results on a page when using page token pagination.
Max value - 5000
An integer representing the start offset index of results. Use this field to specify the number of results on a page when using page token pagination.
Max value - 5000
500sortobjectIdentifies the sort order for the result set.
Identifies the sort order for the result set.
fieldstring (Enum)Case sensitive.
Case sensitive.
"name"keywordstring (Enum)Case sensitive.
Case sensitive.
"asc"use_page_tokenbooleanUse "use_page_token":true in the initial request to paginate the response data.
Use "use_page_token":true in the initial request to paginate the response data.
next_page_tokenstringIf "use_page_token":true was included in the initial request, the response for that request will include a page token.
Use "next_page_token":"string" to pass that page token into the next request to paginate the next set of data.'
If "use_page_token":true was included in the initial request, the response for that request will include a page token.
Use "next_page_token":"string" to pass that page token into the next request to paginate the next set of data.'
{
"request_data": {
"filters": [
{
"field": "name",
"operator": "in",
"value": "string"
}
],
"search_from": 0,
"search_to": 500,
"sort": {
"field": "name",
"keyword": "asc"
},
"use_page_token": true,
"next_page_token": "string"
}
}{
"request_data": {
"filters": [
{
"field": "last_observed",
"value": {
"from": "{{previous30Days}}",
"to": "{{previous7Days}}"
},
"operator": "range"
}
]
}
}