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

CURL
curl -X POST \ -H "Accept: application/json" \ -H "Content-Type: application/json" -H "authorization: authorization_example" -H "x-xdr-auth-id: xXdrAuthId_example" \ "https://api-yourfqdn/public_api/v1/assets/get_external_ip_address_ranges" \ -d '{ "request_data" : { "search_from" : 0, "next_page_token" : "next_page_token", "filters" : [ { "field" : "field", "value" : [ "", "" ], "operator" : "operator" }, { "field" : "field", "value" : [ "", "" ], "operator" : "operator" } ], "sort" : { "field" : "field", "keyword" : "keyword" }, "search_to" : 6, "use_page_token" : true } }'
Request headers
authorization
required
String
api_key
Example: authorization_example
x-xdr-auth-id
required
String
api_key_id
Example: xXdrAuthId_example
Request
Body
optional
Example: {"request_data":{"filters":[{"field":"organization_handles","operator":"contains","value":"irt"}],"search_from":0,"search_to":500}}
request_data
required

A dictionary containing the API request fields.

An empty dictionary returns all results.

filters
optional
Array
Array of filter fields.
field
optional
String

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
operator
optional
String

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
value
optional
Array of objects

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)
search_from
optional
Integer
Represents the start offset index of results.
search_to
optional
Integer

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

sort
optional
Identifies the sort order for the result set.
field
optional
String

Values are:

  • Id
  • first_ip
  • last_ip Case sensitive. Default is first_ip.
keyword
optional
String

Value are:

  • ASC (ascending order)
  • DESC (descending order). Case sensitive. Default is DESC.
use_page_token
optional
Boolean
Use "use_page_token":true in the initial request to paginate the response data. Sort is not supported when using the use_page_token/next_page_token fields.
next_page_token
optional
String
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.
Responses

OK

Body
reply
optional
total_count
optional
Integer
result_count
optional
Integer
external_ip_address_ranges
optional
Array
range_id
optional
String
first_ip
optional
String
last_ip
optional
String
ips_count
optional
Integer
active_responsive_ips_count
optional
Integer
date_added
optional
Integer
organization_handles
optional
Array of strings
ipaddress_version
optional
Integer
tags
optional
Array of strings
first_ipv6
optional
String
last_ipv6
optional
String
annotation
optional
String
has_bu_overrides
optional
Boolean

Bad Request. Got an invalid JSON.

Body
The query result upon error.
err_code
optional
String
HTTP response code.
err_msg
optional
String
Error message.
err_extra
optional
String
Additional information describing the error.

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

Body
The query result upon error.
err_code
optional
String
HTTP response code.
err_msg
optional
String
Error message.
err_extra
optional
String
Additional information describing the error.

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

Body
The query result upon error.
err_code
optional
String
HTTP response code.
err_msg
optional
String
Error message.
err_extra
optional
String
Additional information describing the error.

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

Body
The query result upon error.
err_code
optional
String
HTTP response code.
err_msg
optional
String
Error message.
err_extra
optional
String
Additional information describing the error.

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

Body
The query result upon error.
err_code
optional
String
HTTP response code.
err_msg
optional
String
Error message.
err_extra
optional
String
Additional information describing the error.