List Recommended Rules

List Recommended Rules

Get recommended firewall rules based on the flow data gathered by Operations for Networks. This API provides service to retrieve recommended rules based on flow traffic that is observed between two groups OR for a single group based on all the inbound and outboud traffic for that group. In case two groups are provided, both the groups should be of same type. Currently supported groups are Application, Tier, NSXSecurityGroup, EC2SecurityGroup.

Request
URI
POST
https://{api_host}/api/ni/micro-seg/recommended-rules
COPY
Request Body

Recommended Rules Request

RecommendedRulesRequest of type(s) application/json
Optional
{
    "group_1": {
        "entity": {
            "entity_id": "string",
            "entity_type": "VirtualMachine",
            "entity_name": "string"
        }
    },
    "group_2": {
        "entity": {
            "entity_id": "string",
            "entity_type": "VirtualMachine",
            "entity_name": "string"
        }
    },
    "time_range": {
        "start_time": 1597247025,
        "end_time": 1597247999
    },
    "include_external": false
}
group_1
Optional

group_1

group_2
Optional

group_2

time_range
Optional

time_range

boolean
include_external
Optional

When True, includes ungrouped endpoints outside defined scope

Authentication
This operation uses the following authentication methods.
Responses
200

Success

Returns RecommendedRules of type(s) application/json
{
    "results": [
        {
            "sources": [
                {
                    "entity_id": "string",
                    "entity_type": "VirtualMachine",
                    "entity_name": "string"
                }
            ],
            "destinations": [
                {
                    "entity_id": "string",
                    "entity_type": "VirtualMachine",
                    "entity_name": "string"
                }
            ],
            "protocols": [
                "string"
            ],
            "port_ranges": [
                {
                    "start": 0,
                    "end": 0
                }
            ],
            "action": "string"
        }
    ],
    "time_range": {
        "start_time": 1597247025,
        "end_time": 1597247999
    }
}
results
Optional

results

time_range
Optional

time_range


400

Bad Request

Returns ApiError of type(s) application/json
{
    "code": 0,
    "message": "string",
    "details": [
        {
            "code": 0,
            "message": "string",
            "target": [
                "string"
            ]
        }
    ]
}
integer As int32 As int32
code
Optional

code

string
message
Optional

message

details
Optional

details


401

Unauthorized

Operation doesn't return any data structure

500

Internal Error

Operation doesn't return any data structure