Trust an existing rule

Trust an existing rule . To get risky_rule_ids, go to the Risky Rules Resource Group Get /api/v1/riskyRules/getByReport method and return the UID from the risky rule data in the response (you will need the report name. You can get the report name from Device Information Resource Group API GET /api/v1/device/{device}. Response parameter: lastReport).

Resource Name: /api/v1/trustedTraffic/trustRiskyRule

Request Method: POST

Request Parameters:

Element

Type

Description

risky_rule_ids

Mandatory

string

Array of risky Ruled IDs. To get risky_rule_ids, go to the Risky Rules Resource Group Get /api/v1/riskyRules/getByReport method and return the trustParam from the risky rule data in the response trustRuleLinkParams (you will need the report name. You can get the report name from Device Information Resource Group GET /api/v1/device/{device}. Response parameter: lastReport).

risky_rule_lines array of strings Risky Rule Line Numbers to trust.
trusted_traffic_risky_rules_requestMandatory

List of Import trusted traffic request type object

Import trusted traffic request.

See Import trusted traffic request type object.

useEffectiveDestination Boolean Specifies whether to use the effective destination. If it is not provided, the default value is false.

Import trusted traffic request type

The following table describes the elements in the Import trusted traffic request type object:

Element

Type

Description

comment

string

Comment

expiration_date integer Milliseconds from 1.1.1970. See: https://currentmillis.com - UNIX time. Expiration date must be in the future.
tree_name Mandatory string The firewall name. Do not use group or ALL_FIREWALLS here. Use the Devices Setup Resource Group GET /devices method to return the firewall name.
trust_Traffic_Level_To_apply Mandatory string Trusted traffic level: ALL_FIREWALLS or the tree name of the firewall/group.
trust_future_host_groups_changes Mandatory boolean

Trust future host group changes:

  • true

  • false

Response:

Code

Description

200

Operation completed successfully

400

Validation error

401

Unauthorized

Request cURL examples

curl -X POST "https://api.example.com/api/v1/trustedTraffic/trustRiskyRule?useEffectiveDestination=false" -H  "accept: */*" -H  "Content-Type: application/json" -d "{\"risky_rule_ids\":[\"string\"],\"risky_rule_lines\":[\"string\"],\"trusted_traffic_risky_rules_request\":{\"comment\":\"string\",\"expiration_date\":0,\"tree_name\":\"string\",\"trust_Traffic_Level_To_apply\":\"string\",\"trust_future_host_groups_changes\":true}}"

Request examples

{
  "risky_rule_ids": [
    "string"
  ],
  "risky_rule_lines": [
    "string"
  ],
  "trusted_traffic_risky_rules_request": {
    "comment": "string",
    "expiration_date": 0,
    "tree_name": "string",
    "trust_Traffic_Level_To_apply": "string",
    "trust_future_host_groups_changes": true
  }
}

Status Codes:

Code Description
200 OK
400 Validation error
401 Unauthorized

Response example (200 - successful)

[
{
"result": "Rule 1234 trusted successfully."
},
{
"result": "Rule 5678 trusted successfully."
}
]

Response example (400 -failure)

{
  "apiFailure": {
    "description": "string",
    "message": "string"
  },
  "cause": {
    "stackTrace": [
      {
        "className": "string",
        "fileName": "string",
        "lineNumber": 0,
        "methodName": "string",
        "nativeMethod": true
      }
    ],
    "suppressed": [
      {
        "stackTrace": [
          {
            "className": "string",
            "fileName": "string",
            "lineNumber": 0,
            "methodName": "string",
            "nativeMethod": true
          }
        ],
        "suppressed": [
          null
        ],
        "cause": {
          "stackTrace": [
            {
              "className": "string",
              "fileName": "string",
              "lineNumber": 0,
              "methodName": "string",
              "nativeMethod": true
            }
          ],
          "suppressed": [
            null
          ],
          "cause": {
            "stackTrace": [
              {
                "className": "string",
                "fileName": "string",