Get remediation path rules

Cortex Xpanse REST API

post /public_api/v1/xpanse_remediation_rules/rules/

Get the list of the remediation path rules associated with an attack surface rule.
Required License: Cortex Xpanse Expander + Active Response Module Add-On

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.

filtersArray

Array of filter fields. Each JSON object must contain the following: - field - operator - value

[
fieldString (Enum)

String that identifies the attack surface rule field for filtering.

Allowed values:"attack_surface_rule_id"
operatorString (Enum)

Identifies the comparison operator to use for this filter. Valid keywords are - eq - neq

Allowed values:"neq""eq"
valueString

Value that the filter must match. Value must be the following: - {attack_surface_rule_id}: String of the attack surface rule to filter on

Free-Form object
]
sortObject

Identifies the sort order for the result set. By default, the sort is defined as created_at, DESC.

search_fromInteger
search_toInteger
Free-Form object
Free-Form object
REQUEST BODY
{ "request_data": { "search_from": 0, "filters": [ { "field": "attack_surface_rule_id", "value": "value", "operator": "neq" }, { "field": "attack_surface_rule_id", "value": "value", "operator": "neq" } ], "sort": "", "search_to": 0 } }
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/xpanse_remediation_rules/rules/'
-d '{ "request_data" : { "search_from" : 0, "filters" : [ { "field" : "attack_surface_rule_id", "value" : "value", "operator" : "neq" }, { "field" : "attack_surface_rule_id", "value" : "value", "operator" : "neq" } ], "sort" : "", "search_to" : 0 } }'
Responses

OK

Body
replyObjectrequired
result_countInteger
remediation_rulesArray
[
rule_idString
descriptionString
attack_surface_rule_idString
criteriaArray
[
fieldString
valueString
operatorString
Free-Form object
]
criteria_conjunctionString
actionString
created_byString
created_by_prettyString
created_atInteger
detailsString
Free-Form object
]
Free-Form object
Free-Form object
RESPONSE
{ "reply": { "result_count": 0, "remediation_rules": [ { "rule_id": "rule_id_example", "description": "description_example", "attack_surface_rule_id": "attack_surface_rule_id_example", "criteria": [ { "field": "field_example", "value": "value_example", "operator": "operator_example" } ], "criteria_conjunction": "criteria_conjunction_example", "action": "action_example", "created_by": "created_by_example", "created_by_pretty": "created_by_pretty_example", "created_at": 0, "details": "details_example" } ] } }

Bad Request. Got an invalid JSON.

Body
replyObject

The query results upon error.

Free-Form object
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.

Free-Form object
RESPONSE
{ "reply": {} }

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

Body
replyObject

The query results upon error.

Free-Form object
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.

Free-Form object
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.

Free-Form object
RESPONSE
{ "reply": {} }