Management Plane API > Security > Services > Service Insertion

Get All the Rules for a Section

Return all serviceinsertion rule(s) information for a given serviceinsertion section.

Request:

Method:
GET
URI Path(s):
/api/v1/serviceinsertion/sections/<section-id>/rules
Request Headers:
n/a
Query Parameters:
ServiceInsertionListRequestParameters+
Request Body:
n/a

Example Request:

GET https://<nsx-mgr>/api/v1/serviceinsertion/sections/16a93c39-5822-469e-b0be-70728153642e/rules?page_size=1

Successful Response:

Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
ServiceInsertionRuleListResult+

Example Response:

{ "cursor": "003600000000-0000-0000-0000-0000000000022305843009213694015", "sort_by": "priority", "result_count": 2, "results": [ { "id": "111616", "display_name": "redirect-icmp", "section_id": "16a93c39-5822-469e-b0be-70728153642e", "notes": "", "destinations_excluded": false, "redirect_tos": [ { "target_display_name": "service-1", "is_valid": true, "target_type": "ServiceInstance", "target_id": "1d9fb5cb-0344-4d7f-899a-afd93276899f" } ], "destinations": [ { "target_display_name": "app-switch", "is_valid": true, "target_type": "LogicalSwitch", "target_id": "1d9fb5cb-0344-4d7f-899a-afd93276899f" }, { "target_display_name": "web-switch", "is_valid": true, "target_type": "LogicalSwitch", "target_id": "b489b427-9f14-401e-81db-d1105a1917fe" } ], "applied_tos": [ { "target_display_name": "plr1_uplink1", "is_valid": true, "target_type": "LogicalRouterPort", "target_id": "bd91fc7f-cd76-438b-8d4f-21dbdc707af7" } ], "services": [ { "service": { "resource_type": "ICMPTypeNSService", "icmp_type": 8, "protocol": "ICMPv4", "icmp_code": 0 } } ], "ip_protocol": "IPV4_IPV6", "rule_tag": "", "logged": false, "action": "REDIRECT", "sources_excluded": false, "disabled": false, "direction": "IN_OUT", "_revision": 3 }, { "id": "2", "display_name": "00000000-0000-0000-0000-000000000002", "section_id": "16a93c39-5822-469e-b0be-70728153642e", "notes": "", "destinations_excluded": false, "redirect_tos": [ { "target_display_name": "service-1", "is_valid": true, "target_type": "ServiceInstance", "target_id": "1d9fb5cb-0344-4d7f-899a-afd93276899f" } ], "ip_protocol": "IPV4_IPV6", "rule_tag": "", "logged": false, "action": "REDIRECT", "sources_excluded": false, "disabled": false, "direction": "IN_OUT", "_revision": 3 } ] }

Required Permissions:

read

Feature:

service_insertion

Additional Errors: