Add Tags to IP Address Ranges

Cortex Xpanse REST API

post /public_api/v1/assets/tags/external_ip_address_ranges/assign/

Add tags in bulk to owned IP ranges.

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

An array of filter fields.

fieldString (Enum)

range_id_list: indicates that the set of IP ranges will be a list of IDs.

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

in

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

List of strings, the ip range IDs that should be removed from the tag.

tagsArray[string]

Name of the tag to add to the ranges. The tag name does not need to include the tag family.

REQUEST BODY
{ "request_data": { "filters": [ { "field": "organization_handles", "value": "AssignOrRemoveTagsFromIpRangesRequestFilter_value", "operator": "in" }, { "field": "organization_handles", "value": "AssignOrRemoveTagsFromIpRangesRequestFilter_value", "operator": "in" } ], "tags": [ "tags", "tags" ] } }
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/tags/external_ip_address_ranges/assign/'
-d '{ "request_data" : { "filters" : [ { "field" : "organization_handles", "value" : "AssignOrRemoveTagsFromIpRangesRequestFilter_value", "operator" : "in" }, { "field" : "organization_handles", "value" : "AssignOrRemoveTagsFromIpRangesRequestFilter_value", "operator" : "in" } ], "tags" : [ "tags", "tags" ] } }'
Responses

OK

Body
replyObjectrequired
assign_tagsString

succeeded if request was successful

RESPONSE
{ "reply": { "assign_tags": "assign_tags_example" } }

Bad Request. Got an invalid JSON.

Body
replyObject

The query results upon error.

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.

RESPONSE
{ "reply": {} }

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

Body
replyObject

The query results upon error.

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.

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.

RESPONSE
{ "reply": {} }