---
search:
  tags:
    - Architecture
    - GET
seo:
  description: >-
    Security… Reference for the GET
    /v1/warehouses/{warehouseId}/architectureElements/{elementId}/hierarchy/subtree
    endpoint in the Bpanda REST API (experimental).
sidebar:
  label: >-
    List an element and its parts in the Composition hierarchy down to a given
    depth.
  badge: GET
title: >-
  List an element and its parts in the Composition hierarchy down to a given
  depth.
type: openapi-operation
---
List an element and its parts in the Composition hierarchy down to a given depth.
    The element itself comes at depth 0. Every element appears once, also when legacy data contains cycles or parts
    with several wholes. Without maxDepth the server limit of 100 levels applies.

**Security:** Any user holding a Bpanda licence for the process space.

`GET /v1/warehouses/{warehouseId}/architectureElements/{elementId}/hierarchy/subtree`

**Responses**

- `200` — The element and its parts
- `400` — Negative maxDepth
- `403` — The edition of this process space does not include the element's type
- `404` — Element not found

Response example, 200:

```json
{
  "nodes": [
    {
      "depth": 0,
      "element": {
        "conceptualClass": "ApplicationCollaboration",
        "created": {
          "at": "string",
          "by": "string"
        },
        "elementId": "string",
        "hasPredecessor": true,
        "id": "string",
        "layer": "ApplicationLayer",
        "modified": {
          "at": "string",
          "by": "string"
        },
        "owners": [
          {
            "type": "GroupId",
            "value": "string"
          }
        ],
        "principalIsOwner": true,
        "properties": [
          {
            "meta": {
              "key": "string",
              "label": "string"
            },
            "value": "string"
          }
        ],
        "published": {
          "at": "string",
          "by": "string"
        },
        "representation": {
          "type": "string"
        },
        "specialization": "string",
        "validityState": "Draft",
        "visibility": {
          "lastChange": {
            "at": "string",
            "by": "string"
          },
          "visible": true
        }
      },
      "hasChildren": true,
      "parentElementId": "string"
    }
  ]
}
```
