NSX-T Data Center REST API

Get services to which the given nsgroup belongs to

Returns information about services that are associated with the given NSGroup.
The service name is passed by service_type parameter

Request:

Method:
GET
URI Path(s):
/api/v1/ns-groups/<nsgroup-id>/service-associations
Request Headers:
n/a
Query Parameters:
NSGroupServiceAssociationListRequestParameters+
Request Body:
n/a

Example Request:

GET https://<nsx-mgr>/api/v1/ns-groups/bf250578-c0a5-4ca0-b237-0375966d23ce/service-associations?service_type=firewall&fetch_parentgroup_associations=true

Successful Response:

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

Example Response:

{ "cursor": "003600000000-0000-0000-0000-0000000000022305843009213694015", "sort_by": "priority", "result_count": 2, "results": [ { "id": "111616", "display_name": "allow-icmp", "notes": "", "destinations_excluded": false, "destinations": [ { "target_display_name": "app-switch", "is_valid": true, "target_type": "NSgroup", "target_id": "1d9fb5cb-0344-4d7f-899a-afd93276899f" }, { "target_display_name": "web-switch", "is_valid": true, "target_type": "NSgroup", "target_id": "b489b427-9f14-401e-81db-d1105a1917fe" } ], "services": [ { "service": { "resource_type": "ICMPTypeNSService", "icmp_type": 8, "protocol": "ICMPv4", "icmp_code": 0 } } ], "ip_protocol": "IPV4_IPV6", "rule_tag": "", "logged": false, "action": "ALLOW", "sources_excluded": false, "disabled": false, "direction": "IN_OUT", "_revision": 3 }, { "id": "2", "display_name": "00000000-0000-0000-0000-000000000002", "notes": "", "destinations_excluded": false, "ip_protocol": "IPV4_IPV6", "rule_tag": "", "logged": false, "action": "ALLOW", "sources_excluded": false, "disabled": false, "direction": "IN_OUT", "_revision": 3 } ] }

Required Permissions:

read

Feature:

services_services

Additional Errors: