Search for a group
Search for a global security group. The returned security ID can then be used when adding members to create a local security group mapping. A local security group reference is not created until members are added.
The object ID of the returned security group is only valid for use when creating new local security groups.
HTTP request syntax (URI)
POST <base_URI>/v8/storage/virtual-servers/{virtualServerId}/local-groups
Parameters
Name | Type | Required | Values | Description |
virtualServerId | URI_PARAM | Y | string/number | Specifies either the virtual server object ID or the HNAS storage virtual server ID. |
securityId | BODY | Y | string | Either a SID or name of a group to search for |
Return codes
Code | Data | Description |
200 | localGroup | Group security ID retrieved successfully. |
400 | Error Message | Missing or invalid request contents. |
403 | Error Message | Operation forbidden by access level. |
404 | Error Message | Requested resource not found. |
500 | Error message | Error associated with the storage system. |
Any HTTP status code other than 200 indicates that the API did not complete successfully.
Request example 1: Looking up a Windows group name
curl -vk -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.11.11:8444/v8/storage/virtual-srevers/1/local-groups -X POST -d '{"securityId":"EXAMPLE\\Domain Users"}'
Response example 1
HTTP/1.1 200 OK { "localGroup": { "context": "GLOBAL", "groupName": "EXAMPLE\\Domain Users", "groupSid": "S-1-5-21-2890616873-2892883911-788580134-513", "objectId": "303a3a3a532d312d352d32312d323839303631363837332d323839323838333931312d3738383538303133342d3531333a3a3a303a3a3a4f49445f24232140255f56" } }
Request example 2: Looking up a Unix group name
curl -vk -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.11.11:8444/v8/storage/virtual-srevers/1/local-groups -X POST -d '{"securityId":"Unix group\\700"}'
Response example 2
HTTP/1.1 200 OK { "localGroup": { "context": "GLOBAL", "groupName": "Unix group\\700", "groupSid": "S-1-77-1-700", "objectId": "303a3a3a532d312d37372d312d3730303a3a3a303a3a3a4f49445f24232140255f56" } }