Create Rule Modification Change Request

Creates a rule modification change request. It accepts details about the modifications needed for rule configurations, including custom fields, actions to be applied, and the rule template to be used.

Resource name: /FireFlow/api/change-requests/rule-modification

Request Method: POST

Request parameters:

Parameter Type Description
fields array An array of objects, each containing `name` and `values` for custom fields to be included in the rule modification request.
name string

The name of a field in the Change Request.

For example, enter Owner to set the value of the Owner field in the Change Request.

FireFlow validates the API for the mandatory field devices.

Note: devices field can contain one device only.

For more details, see:

values array An array of strings representing the values for the custom field.

requestActions

mandatory

array

An array of objects detailing actions to be applied to a rules (ruleId): application, destination, service, and source.

At least one of the fields (application, destination, service, and source) must be included.

Each request supports one requestAction only, and one single rule.

application object Details actions to be applied to the application.
destination object Details actions to be applied to the destination.

ruleId

mandatory

string The identifier of the rule to be modified.
service object Details actions to be applied to the service.
source object Details actions to be applied to the source.

actions

mandatory

array Array of objects determining the action to take.
action

mandatory

string

Determines the action to take. One of the following:

  • remove. Removes the item from the rule field.

  • add. Adds the item to the rule field.

item

mandatory

string The item to apply the action to.
template

mandatory

string

The name of the change request template to use.

Request example:

{
    "template": "145: Rule Modification Request",
    "fields": [{
            "key": "subject",
            "values": ["rule modification request"]
        }, {
            "key": "devices",
            "values": ["10_20_127_5_Modric_vsys1_default"]
        }, {
            "key": "due",
            "values": ["2025-01-09"]
        }, {
            "name": "requestor",
            "values": [
                "[email protected]"
            ]
        }, {
            "name": "CMS ticket id",
            "values": [
                "123"
            ]
        }, {
            "name": "expires",
            "values": [
                "2023-11-26"
            ]
        }
    ],
    "requestActions": [{
            "ruleId": "13-1",
            "source": {
                "actions": [{
                        "action": "add",
                        "item": "1.1.1.1"
                    }
                ]
            },
            "destination": {
                "actions": [{
                        "action": "remove",
                        "item": "ip-41.0.0.250"
                    }, {
                        "action": "add",
                        "item": "3.3.3.3"
                    }
                ]
            },
            "service": {
                "actions": [{
                        "action": "add",
                        "item": "ssh"
                    }, {
                        "action": "remove",
                        "item": "tcp-78"
                    }
                ]
            }
        }
    ]
}

cUrl Example:

curl -X POST "https://<localhost>/FireFlow/api/change-requests/rule-modification" -H "Content-Type: application/json" -d '{"template":"145: Rule Modification Request","fields":[{"key":"subject","values":["rule modification request"]},{"key":"devices","values":["10_20_127_5_Modric_vsys1_default"]},{"key":"due","values":["2025-01-09"]},{"name":"requestor","values":["[email protected]"]},{"name":"CMS ticket id","values":["123"]},{"name":"expires","values":["2023-11-26"]}],"requestActions":[{"ruleId":"13-1","source":{"actions":[{"action":"add","item":"1.1.1.1"}]},"destination":{"actions":[{"action":"remove","item":"ip-41.0.0.250"},{"action":"add","item":"3.3.3.3"}]},"service":{"actions":[{"action":"add","item":"ssh"},{"action":"remove","item":"tcp-78"}]}}]}'

Status codes:

Code Description  
200 Operation completed successfully  
400

Input validation failure

 
403

Authentication failure

 
500

Failed to complete operation.

 

Response parameters:

Element Type Description
status String

One of the following:

  • Success
  • Failure
messages Array
  code String A string that indicates the error message.
  message String Further details about the response, if needed.
data Array
  changeRequestID String The ID of the new Change Request created.
  redirectURL String A link to the new Change Request in FireFlow.

Response example success 200:

{
  "status": "Success",
  "messages": [],
  "data": {
    "changeRequestId": 3583,
    "redirectUrl": "https://10.20.10.26/FireFlow/Ticket/Display.html?id=3583"
  }
}

Response example failure 400:

{
  "data": null,
  "messages": [
    {
      "code": "INVALID_RULEID",
      "message": "Invalid input parameters."
    }
  ],
  "status": "Failure"
}