Delete Trusted Rules

Deletes specified trusted rules for a device.

Resource name: /api/v1/trusted-rules/rules

Request Method: DELETE

Request parameters

Parameter Type Description
deviceNamemandatory string The device tree name. Use the GET /devices method from the Devices Setup Resource Group to get device tree names. Do not use group or ALL_FIREWALLS.
ruleIds array of strings IDs of the rules to be removed from the trusted list. Use the Rules Main API GET api/v1/rule/{device} to get the ruleId.

Request example:

{
 "deviceName": "Device1",
 "ruleIds": ["rule1", "rule2", "rule3"]
}
			

cUrl Example:

Copy
curl -X DELETE "https://api.example.com/api/v1/trusted-rules/rules" \
     -H "Content-Type: application/json" \
     -d '{
          "deviceName": "Device1",
          "ruleIds": ["rule1", "rule2", "rule3"]
     }'

Status codes:

Code Description
200 List of saved and failed rules
400 Validation error: Bad request due to invalid input
401 Unauthorized
403 Forbidden
404 Not Found
423 Locked
429 Too Many Requests
500 Internal Server Error
503 Service Unavailable

Response parameters:

Parameter Type Description
trustedRuleIds array of strings IDs of successfully deleted trusted rules.
failedRuleIds array of strings IDs of rules that could not be deleted.
failureReasons object Mapping of failedRuleIds to error messages explaining the failure.
description string Provides details about the error.
error string Type of the error, e.g., "Validation Error".
fieldErrors array Details of individual field validation errors.
field string The specific field that caused the error.
error string The error message associated with the field.

Response example success 200:

Copy
{
  "trustedRuleIds": ["rule1", "rule2"],
  "failedRuleIds": ["rule3"],
  "failureReasons": {
    "rule3": "Rule is currently locked."
  }
}

Response example failure 400:

Copy
{
  "description": "Invalid input data",
  "error": "Validation Error",
  "fieldErrors": [
    {
      "field": "ruleIds",
      "error": "Rule IDs cannot be empty"
    }
  ]
}