Syntax for Retrieving Security Groups
GET /api/security-groups/{id} retrieves a security group identified by its ID.
Input
Use the supported input parameters to control the command output.
Parameter | Description |
---|---|
URL | https://$vRA/network-service/api/security-groups/{id}, where id is the ID of the security group. |
$vRA |
Specifies the appliance name and fully qualified domain name, or IP address of the vRealize Automation server. |
$token |
Specifies a valid HTTP bearer token with necessary credentials. |
Output
The command output contains property names and values based on the command input parameters.
Parameter | Description |
---|---|
Content | Specifies an array of data rows, each of
which represents one of the security objects returned in a pageable list. Each
security object can contain the following information:
|
curl Command to Retrieve Security Groups
The following example command
retrieves information about security group with ID=24.
curl -X --insecure -H "accept: application/json" -H "Authorization: Bearer $token” https://$vRA/network-service/api/security-groups/24
The response in JSON lists the information for the security group specified.
{ "links": [], "content": [ { "@type": "SecurityGroup", "id": "24", "name": "security-group-name", "description": "Managed by VMware vRealize Automation", "externalId": "securitygroup-19567", "tenantId": null, "extensionData": { "entries": [...] }, "securityGroupTypeId": "Infrastructure.Network.SecurityGroup.NSX", "internal": false, "machineIdCollection": null, "ipAddressCollection": null } ], }