Skip to main content
Planview Customer Success Center

Hierarchy Service

GET /hierarchy/{entityBn}

Description:

Read an entity's hierarchy, including ancestor, descendant, and root relationships.

Path Parameters

  • entityBn: (String) (Required) This is the starting point for the search.

Query Parameters

  • relationshipType: (String) This defines the relationship type you would like to focus on. To view a Parent-Child hierarchy, supply the relationship type HAS_CHILD. The default value is ANY.
  • ancestors: (Boolean) This indicates whether the request should search for ancestor relationships. The default value is TRUE.
  • descendants: (Boolean) This indicates whether the request should search for descendant relationships. The default value is TRUE.
  • rootRelationships: (Boolean) Find the root relationships in a hierarchy. If the {entityBn} has multiple roots, all of the root relationships will be returned. The default value is FALSE.

Headers:

  • Authorization: (Your Basic Auth String)
  • Accept: application/plain;charset=UTF-8

Example:

Request:

https://[tenant-end-point]/api/c/hierarchy/040Y0000033P
Authorization: Basic {your basic auth}
Accept: application/json;charset=UTF-8

Response:

{
  "nodes": [
    {
      "name": "Org 2",
      "bn": "040Y0000033P"
    },
    {
      "name": "Org 3",
      "bn": "040Y0000033Q"
    },
    {
      "name": "Org 1",
      "bn": "040Y0000033N"
    }
  ],
  "relationships": [
    {
      "fromBn": "040Y0000033P",
      "toBn": "040Y0000033Q",
      "relationshipType": "HAS_CHILD",
      "qualifier": null,
      "properties": null
    },
    {
      "fromBn": "040Y0000033N",
      "toBn": "040Y0000033P",
      "relationshipType": "HAS_CHILD",
      "qualifier": null,
      "properties": null
    }
  ]
}