Get App Related Rules

Get App Related Rules
Get DFW rules and policies related to an application

Returns DFW rules organized by parent security policies for the specified application. Each result entry is a security policy containing its list of related DFW rules.

Notes:

  • start_time is required. Either site_id or site_ids must also be provided.
  • When exact_match is true, only policies whose applied-to scope exactly matches the application (single-element applied-to equal to the application's policy path) are returned.
  • When exact_match is false (default), the system resolves all member computes of the application, finds every group those computes belong to, then returns all rules whose applied-to, source, or destination scope intersects with those groups.
  • filters accepts up to 300 filter entries.
  • Obtain app-id from the topology graph returned by POST /visualization/topology/apps-flow-topology, where each node represents an application.
  • To see flow records for this application, use POST /visualization/flow-analysis/applications/{app-id}/flow-details.
Request
URI
POST
https://{api_host}/intelligence/visualization/security-analysis/applications/{app-id}/related-dfw-rules
COPY
Path Parameters
string
app-id
Required  

The NSX application group ID. Obtain valid IDs from POST /visualization/topology/apps-flow-topology, where each node in the topology graph represents an application and carries its ID.

Query Parameters
boolean
exact_match
Optional

When true, returns only policies whose applied-to scope exactly matches the application. When false (default), resolves all member computes and returns all rules whose scope intersects with the groups those computes belong to.


Request Body

Wrapper request for ApplicationsIdRelatedDfwRules with restricted filter keys

VizApplicationsIdRelatedDfwRulesRequest of type(s) application/json
Required  
This request body class requires all of the following: VizTimeIntervalListSiteRequest , InlineVizApplicationsIdRelatedDfwRulesRequest1
{
    "start_time": 0,
    "page_size": 10000,
    "site_id": "17f7c7e5-7f8c-490a-97e9-b9c9193c45e1"
}
Authentication
This operation uses the following authentication methods.
Responses
200

success

Returns RelatedDfwRuleListResult of type(s) application/json
This response body class contains all of the following: VizTimeIntervalListResult , InlineRelatedDfwRuleListResult1
{
    "offset": 0,
    "number_of_results": 1,
    "total_result_count": 1,
    "total_pages": 1,
    "time_interval": {
        "start_time": 0,
        "end_time": 1782173106038
    },
    "results": [
        {
            "site_id": "17f7c7e5-7f8c-490a-97e9-b9c9193c45e1",
            "policy_path": "/infra/domains/default/security-policies/default-layer3-section",
            "related_rules": [
                {
                    "policy_path": "/infra/domains/default/security-policies/default-layer3-section/rules/default_rule_NDP"
                },
                {
                    "policy_path": "/infra/domains/default/security-policies/default-layer3-section/rules/default_rule_DHCP"
                },
                {
                    "policy_path": "/infra/domains/default/security-policies/default-layer3-section/rules/default-layer3-rule"
                }
            ]
        }
    ]
}

400

Bad Request

Returns BadRequest of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


401

Unauthorized

Returns Unauthorized of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


403

Forbidden

Returns Forbidden of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


412

Precondition Failed

Returns PreconditionFailed of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


428

Precondition Required

Returns PreconditionRequired of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


429

Too Many Requests

Returns TooManyRequests of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


default

Error

Returns Error of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/intelligence/visualization/security-analysis/applications/{app-id}/related-dfw-rules