Delete Unused Tags

Cortex Xpanse REST API

post /public_api/v1/assets/delete_unused_tag/

Delete unused tags by specifying tag IDs or tag names. You don't have to provide both tag_ids and tag_names, but you can use both to specify different 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/delete_unused_tag/" \ -d '{ "request_data" : { "tag_ids" : [ "tag_ids", "tag_ids" ], "tag_names" : [ "tag_names", "tag_names" ], "tag_family" : "assets" } }'
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":{"tag_family":"ip_ranges","tag_ids":["IPR:abcd12345"],"tag_names":["tag-1"]}}
request_data
required

A dictionary containing the API request fields.

An empty dictionary returns all results.

tag_family
optional
String (Enum)
Allowed values:
assets
ip_ranges
tag_ids
optional
Array of strings
IDs of tags to be deleted.
tag_names
optional
Array of strings
Names of tags to be deleted.
Responses

OK

Body
reply
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.