Create User-Defined IP Range

Cortex Xpanse REST API

post /public_api/v1/assets/create_user_defined_ip_range/

Define an IP address range and assign a business unit (BU) or IP address tag (IPR) to that range. Note the following guidelines: - Use the shouldReplace field to indicate whether to replace all previously applied BUs on overlapping ranges. - Tags and notes on overlapping ranges will be deleted. - If only startIp is supplied, the endpoint will create a range for that single IP address. - If only endIP is supplied, the endpoint will create a range for that single IP address. - Define the range using either the startIp and endIp OR the cidrIp range, not both. Xpanse will run the request on only one range.

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/create_user_defined_ip_range/" \ -d '{ "request_data" : { "endIp" : "endIp", "iprTagIds" : [ "iprTagIds", "iprTagIds" ], "startIp" : "startIp", "buTagIds" : [ "buTagIds", "buTagIds" ], "shouldReplace" : true, "cidrIp" : "cidrIp" } }'
Request headers
authorization
required
String
api-key
Example: {{api-key}}
x-xdr-auth-id
required
String
api-key-id
Example: {{api-key-id}}
Request
Body
optional
Example: {"request_data":{"startIp":"x.x.x.24","endIp":"x.x.x.25","cidrIp":"null","buTagIds":["BU:af500527-9f45-4bd8-8eb5-e161d18a47b3"],"iprTagIds":["IPR:cc1d6312306d48c79fb3023b93d69923"],"shouldReplace":false}}
request_data
required
startIp
optional
String
First IP address of the range.
endIp
optional
String
Ending IP address of the range.
cidrIp
optional
String
IP range in CIDR notation.
buTagIds
optional
Array of strings
List of business unit tag IDs that will be applied to the IP range.
iprTagIds
optional
Array of strings
List of IP range tag IDs (IPR) that will be applied to the IP range.
shouldReplace
optional
Boolean
Boolean denoting whether to replace all previously applied business units on overlapping ranges.
Responses

OK

Body
reply
optional
user_defined_ip_range
optional
String

Bad Request. Got an invalid JSON.

Body
reply
required
Object
The query results 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
reply
required
Object
The query results 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
reply
required
Object
The query results 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
reply
required
Object
The query results upon error.
err_code
optional
String
HTTP response code.
err_msg
optional
String
Error message.
err_extra
optional
String
Additional information describing the error.

Unprocessable Entity

Body
code
optional
Integer
Error code
status
optional
String
Error name
message
optional
String
Error message
errors
optional
Object
Errors

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

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