Group Hierarchy
This operation returns the hierarchy of group configuration. Group configuration represent the hierarchical structure of the organization. A group hierarchy can have GroupClient, GroupAccount and GroupAccountProduct type of nodes. The operation grouphierarchy is available on the groupclients, groupaccounts and groupaccountproducts resources to get the hierarchy.
GroupClient Group Hierarchy
Group hierarchy for group client includes group client, siblings of group client, parent, siblings of parent, grandparent, siblings of grandparent and so on.
The resource representation of a groupclient includes a link to fetch the group hierarchy
{ ... groupclient properties ... "links": [ { "href": "http://://generic/groupclients/<id>", "rel": "self" }, { "href": "http://://grouphierarchy/groupclient/<id>", "rel": "groupclient:grouphierarchy", "httpMethod": "GET" } ] }
GroupAccount Group Hierarchy
Group hierarchy for group account includes group account, siblings group account(s), group client’s hierarchy that group account belongs to.
The resource representation of a groupaccount includes a link to fetch the group hierarchy
{ ... groupaccount properties ... "links": [ { "href": "http://://generic/groupaccounts/<id>", "rel": "self" }, { "href": "http://://grouphierarchy/groupaccount/<id>", "rel": "groupaccount:grouphierarchy", "httpMethod": "GET" } ] }
GroupAccountProduct Group Hierarchy
Group hierarchy for group account product includes group account product, siblings of group account product, and group account’s hierarchy. The resource representation of a groupaccountproduct includes a link to fetch the group hierarchy
{ ... groupaccountproduct properties ... "links": [ { "href": "http://://generic/groupaccountproducts/<id>", "rel": "self" }, { "href": "http://://grouphierarchy/groupaccountproduct/<id>", "rel": "groupaccountproduct:grouphierarchy", "httpMethod": "GET" } ] }
Response Payload
The response payload containing the group hierarchy looks like below example. The example below only represents one level of the hierarchy, parent and sibling element can have own hierarchies, response will include those hierarchies also.
{ "displayName": "", "id": "", "type": "", "parent": { "displayName": "", "id": "", "type": "" }, "siblings": [ { "displayName": "", "id":"", "type": "" } ] }
If group hierarchy contains two level, it looks like below example
{
"displayName": "",
"id": "",
"type": "",
"parent": {
"displayName": "",
"id": "",
"type": "",
"parent": {
"displayName": "",
"id": "",
"type": ""
},
"siblings": [
{
"displayName": "",
"id":"",
"type": ""
}
]
},
"siblings": [
{
"displayName": "",
"id":"",
"type": ""
}
]
}
Example
Id | Group Client | Parent Client |
---|---|---|
1 |
Oracle |
- |
2 |
Oracle Active |
Oracle |
3 |
Oracle Retire |
Oracle |
4 |
Oracle Cobra |
Oracle |
Id |
Group Account |
Group Client |
1 |
Oracle Sales |
Oracle Active |
2 |
Oracle Marketing |
Oracle Active |
3 |
Oracle R&D |
Oracle Active |
Id |
Group Account Product |
Group Account |
1 |
Gold |
Oracle Sales |
2 |
International Travel |
Oracle Sales |
Use Case 1: Get Hierarchy for Group Account Product GOLD
url: /grouphierarchy/groupaccountproduct/1
{ "displayName": "Gold", "id": "1", "type": "GroupAccountProduct", "parent": { "displayName": "Oracle Sales", "id": "1", "type": "GroupAccount", "parent": { "displayName": "Oracle Active", "id": "2", "type": "GroupClient", "parent": { "displayName": "Oracle", "id": "1", "type": "GroupClient" }, "siblings": [ { "displayName": "Oracle Cobra", "id": "4", "type": "GroupClient" }, { "displayName": "Oracle Retire", "id": "3", "type": "GroupClient" } ] }, "siblings": [ { "displayName": "Oracle Marketing", "id": "2", "type": "GroupAccount" }, { "displayName": "Oracle R&D", "id": "3", "type": "GroupAccount" } ] }, "siblings": [ { "displayName": "International Travel", "id": "2", "type": "GroupAccountProduct" } ] }
Use Case 2: Get Hierarchy for Group account Oracle R&D
url: /grouphierarchy/groupaccount/3
{ "displayName": "Oracle R&D", "id": "3", "type": "GroupAccount", "parent": { "displayName": "Oracle Active", "id": "2", "type": "GroupClient", "parent": { "displayName": "Oracle", "id": "1", "type": "GroupClient" }, "siblings": [ { "displayName": "Oracle Cobra", "id": "3", "type": "GroupClient" }, { "displayName": "Oracle Retire", "id": "4", "type": "GroupClient" } ] }, "siblings": [ { "displayName": "Oracle Marketing", "id": "2", "type": "GroupAccount" }, { "displayName": "Oracle Sales", "id": "1", "type": "GroupAccount" } ] }