Query Proposed Security Policy Rules

Query Proposed Security Policy Rules
Query rules for proposed security policy

Retrieves a paginated list of rules for a specific proposed security policy.

Notes

  • Rules are always returned ordered by sequence number ascending.
  • Filtering and sorting parameters in the request body are not applied.
  • Returns 200 on success
Request
URI
POST
https://{api_host}/ssp/segmentation/{session-id}/results/proposed-security-policies/{policy-id}/rules
COPY
Path Parameters
string
session-id
Required  

Unique identifier of the segmentation session.

string
policy-id
Required  

Unique identifier of the proposed security policy.


Request Body

Pagination parameters. Only offset and page_size are applied; filtering and sort parameters are accepted but ignored - rules are always returned ordered by sequence number ascending.

ProposedSecurityPolicyRulesRequest of type(s) application/json
Required  
This request body class requires all of the following: ListRequestParameters , InlineProposedSecurityPolicyRulesRequest1
{
    "offset": 0,
    "page_size": 50
}
Authentication
This operation uses the following authentication methods.
Responses
200

Successfully retrieved rules

Returns ProposedSecurityPolicyRulesListResponse of type(s) application/json
This response body class contains all of the following: ListResult , InlineProposedSecurityPolicyRulesListResponse1
{
    "offset": 0,
    "number_of_results": 2,
    "total_result_count": 2,
    "total_pages": 1,
    "sort_ascending": true,
    "sort_by": "sequenceNumber",
    "results": [
        {
            "id": "SSP_Infra_tcp_80_Rule",
            "display_name": "SSP_tcp_80",
            "description": "SSP created rule for tcp_80 for SSP_Infra_tcp_80",
            "action": "ALLOW",
            "disabled": false,
            "proposed_sync_action": "OVERWRITE",
            "nsx_rule": {
                "resource_type": "Rule",
                "id": "SSP_Infra_tcp_80_Rule",
                "sequence_number": 1000,
                "source_groups": [
                    "ANY"
                ],
                "destination_groups": [
                    "/infra/domains/default/groups/6a2b432f-9a52-3898-ad88-2900435a1d1a"
                ],
                "action": "ALLOW",
                "services": [
                    "ANY"
                ],
                "service_entries": [
                    {
                        "resource_type": "L4PortSetServiceEntry",
                        "l4_protocol": "TCP",
                        "destination_ports": [
                            "80"
                        ]
                    }
                ]
            }
        },
        {
            "id": "SSP_Infra_udp_85_Rule",
            "display_name": "SSP_udp_85",
            "description": "SSP created rule for udp_85 for SSP_Infra_udp_85",
            "action": "ALLOW",
            "disabled": false,
            "proposed_sync_action": "OVERWRITE",
            "nsx_rule": {
                "resource_type": "Rule",
                "id": "SSP_Infra_udp_85_Rule",
                "sequence_number": 1100,
                "source_groups": [
                    "ANY"
                ],
                "destination_groups": [
                    "/infra/domains/default/groups/0b7a2831-dff9-32fa-99ff-4831cb922e97"
                ],
                "action": "ALLOW",
                "services": [
                    "ANY"
                ],
                "service_entries": [
                    {
                        "resource_type": "L4PortSetServiceEntry",
                        "l4_protocol": "UDP",
                        "destination_ports": [
                            "85"
                        ]
                    }
                ]
            }
        }
    ]
}

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

Unexpected 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}/ssp/segmentation/{session-id}/results/proposed-security-policies/{policy-id}/rules