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.

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
request_dataObject

A dictionary containing the API request fields.

An empty dictionary returns all results.

tag_familyObject (Enum)
Allowed values:"assets""ip_ranges"
tag_idsArray[string]

IDs of tags to be deleted.

tag_namesArray[string]

Names of tags to be deleted.

REQUEST BODY
{ "request_data": { "tag_family": "ip_ranges", "tag_ids": [ "IPR:abcd12345" ], "tag_names": [ "tag-1" ] } }
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 ''
Responses

OK

Body
replyString
RESPONSE
{ "reply": "succeeded" }

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": {} }