Get All Owned IP Ranges

Cortex Xpanse REST API

post /public_api/v1/assets/get_external_ip_address_ranges/

Get a list of all your owned IP address ranges filtered by business units and organization handles.
The maximum result limit is 1000 ranges.
Note: You can send a request to retrieve either all or filtered results.
Required license: Cortex Xpanse Expander

Request headers
authorization
String
required
api-key
Example: {{api_key}}
x-xdr-auth-id
String
required
api-key-id
Example: {{api_key_id}}
Body parameters
required
request_dataObject

A dictionary containing the API request fields. An empty dictionary returns all results.

filtersArray

Array of filter fields.

[
fieldString (Enum)

Identifies the external IP ranges field the filter is matching. Filters are based on the following case-sensitive keywords: - business_units_list - organization_handles - Ipaddress_version - has_bu_overrides - tags

Allowed values:"organization_handles""tags""business_units_list""ipaddress_version""has_bu_overrides"
operatorString (Enum)

Identifies the comparison operator you want to use for this filter. Valid keywords and values are: - contains / not_contains - organization_handles - in - business_units_list - tags - eq / neq - ipaddress_version - has_bu_overrides

Allowed values:"in""contains""neq""eq""not_contains"
valueObject

Values depend on the filter field used. - organization_handles — string - business_units_list — string or list of strings with syntax “Acme & Co, Inc.” or “BU:Acme & Co, Inc.” - tags — list of strings in format “{family alias}:{tag name}” - ipaddress_version — integer - has_bu_overrides - boolean (true/false)

Free-Form object
]
search_fromInteger

Represents the start offset index of results.

search_toInteger

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.
Default value - 500
Max value - 1000

sortObject

Identifies the sort order for the result set.

fieldString (Enum)

Values are: - Id - first_ip - last_ip
Case sensitive.
Default is first_ip.

Allowed values:"last_ip""last_ipv6""first_ipv6""first_ip""ipaddress_version""range_id_list"
keywordString (Enum)

Value are: - ASC (ascending order)
- DESC (descending order). Case sensitive. Default is DESC.

Allowed values:"ASC""asc""DESC""desc"
Free-Form object
use_page_tokenBoolean

Use "use_page_token":true in the initial request to paginate the response data.

next_page_tokenString

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.

Free-Form object
REQUEST BODY
{ "request_data": { "search_from": 0, "next_page_token": "next_page_token", "filters": [ { "field": "organization_handles", "value": "ExternalIpAddressRangesFilter_value", "operator": "in" }, { "field": "organization_handles", "value": "ExternalIpAddressRangesFilter_value", "operator": "in" } ], "sort": { "field": "first_ip", "keyword": "desc" }, "search_to": 0, "use_page_token": true } }
CURL
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_external_ip_address_ranges/'
-d '{ "request_data" : { "search_from" : 0, "next_page_token" : "next_page_token", "filters" : [ { "field" : "organization_handles", "value" : "ExternalIpAddressRangesFilter_value", "operator" : "in" }, { "field" : "organization_handles", "value" : "ExternalIpAddressRangesFilter_value", "operator" : "in" } ], "sort" : { "field" : "first_ip", "keyword" : "desc" }, "search_to" : 0, "use_page_token" : true } }'
Responses

OK

Body
replyObject
total_countInteger
result_countInteger
external_ip_address_rangesArray
[
range_idString
first_ipString
last_ipString
ips_countInteger
active_responsive_ips_countInteger
date_addedInteger
organization_handlesArray[string]
ipaddress_versionInteger
tagsArray[string]
first_ipv6String
last_ipv6String
annotationString
has_bu_overridesBoolean
Free-Form object
]
next_page_tokenString

This attribute is only returned if use_page_token is provided in the request with value true

Free-Form object
Free-Form object
RESPONSE
{ "reply": { "total_count": 0, "result_count": 0, "external_ip_address_ranges": [ { "range_id": "range_id_example", "first_ip": "first_ip_example", "last_ip": "last_ip_example", "ips_count": 0, "active_responsive_ips_count": 0, "date_added": 0, "organization_handles": [ "organization_handles_example" ], "ipaddress_version": 0, "tags": [ "tags_example" ], "first_ipv6": "first_ipv6_example", "last_ipv6": "last_ipv6_example", "annotation": "annotation_example", "has_bu_overrides": false } ], "next_page_token": "next_page_token_example" } }

Bad Request. Got an invalid JSON.

Body
replyObject

The query results upon error.

Free-Form object
RESPONSE
{ "reply": {} }

Unauthorized access. An issue occurred during authentication. This can indicate an incorrect key, id, or other invalid authentication parameters.

Body
replyObject

The query results upon error.

Free-Form object
RESPONSE
{ "reply": {} }

Unauthorized access. User does not have the required license type to run this API.

Body
replyObject

The query results upon error.

Free-Form object
RESPONSE
{ "reply": {} }

Forbidden access. The provided API Key does not have the required RBAC permissions to run this API.

Body
replyObject

The query results upon error.

Free-Form object
RESPONSE
{ "reply": {} }

Unprocessable Entity

Body
codeInteger

Error code

statusString

Error name

messageString

Error message

errorsObject

Errors

RESPONSE
{ "code": 0, "status": "status_example", "message": "message_example", "errors": {} }

Internal server error. A unified status for API communication type errors.

Body
replyObject

The query results upon error.

Free-Form object
RESPONSE
{ "reply": {} }