Retrieving nested and parent groups
You can use the representational state transfer (REST) application programming interface (API) to retrieve nested and parent groups.
| URI | /deployment/resources/groups/group<UUID>?showNested=true | |
|---|---|---|
| Method | GET | |
| Request body | JSON | |
| Returns | 200 | Success |
| 4xx | There were problems retrieving the group. The returned error message contains details about the cause of the failure. | |
| 500 | The system encountered an internal error while processing the request. | |
This API will show all the members (also the nested ones) for the specific group. In order to show the nested members for a “Master Group”, the API defined in section 6.9.1.3 must be run. This is an example of result:
...
"members": [
{
"is_direct": false,
"resource_type": "instances",
"uri": "instances/515ca361-8e01-4d99-ab51-dd3bdef6b9fe"
},
{
"is_direct": true,
"resource_type": "instances",
"uri": "instances/ce640c4f-d2e8-44f9-ac66-c7608d361fd7"
}
],
…
The attribute “is_direct” is used to understand if the Instance is a direct member of the group or if it is a member of a child one.
| URI | /deployment/resources/groups?showNested=true | |
|---|---|---|
| Method | GET | |
| Request body | JSON | |
| Returns | 200 | Success |
| 4xx | There were problems retrieving the group. The returned error message contains details about the cause of the failure. | |
| 500 | The system encountered an internal error while processing the request. | |
This API will show the complete list of groups with all the members (also the nested ones). By Adding to the last query the filter “&isMaster=true” is possible to filter the the list of groups by reporting only the master ones. This API will show only the "master groups" (groups without parent groups).
Retrieving parent groups
| URI | /deployment/resources/instances/<instanceUUID>?resolveparents=1 | |
|---|---|---|
| Method | GET | |
| Request body | JSON | |
| Returns | 200 | Success |
| 4xx | There were problems retrieving the group. The returned error message contains details about the cause of the failure. | |
| 500 | The system encountered an internal error while processing the request. | |
This API will show the selected instance including a section containing the parent groups and its direct/indirect membership.
This is an example of result:
...
"master_groups": [
{
"is_direct": false,
"uri": "groups/0eb3554c-b0e1-42b6-91a6-ffe9c111ddad"
}
],
...
| URI | /deployment/resources/instances?resolveparents=1 | |
|---|---|---|
| Method | GET | |
| Request body | JSON | |
| Returns | 200 | Success |
| 4xx | There were problems retrieving the group. The returned error message contains details about the cause of the failure. | |
| 500 | The system encountered an internal error while processing the request. | |
This API will show all the instances including a section containing the parent groups and its direct/indirect membership.