---
title: "Get environment variable hierarchy for a device"
method: GET
path: "/v1/projects/{projectOrProductUID}/environment_hierarchy"
tags: ["project"]
---

# Get environment variable hierarchy for a device

`GET /v1/projects/{projectOrProductUID}/environment_hierarchy`

## Path parameters

- `projectOrProductUID` string, required

## Response `200`

Successfully retrieved project environment hierarchy

- EnvTreeJsonNode
  - `app_label` string
  - `app_uid` string
  - `children` EnvTreeJsonNode[], required
  - `device_uid` string
  - `fleet_label` string
  - `fleet_uid` string
  - `inherited_var_count` integer, required
  - `type` string, required
  - `url` string, uri
  - `var_count` integer, required
  - `variables` EnvVar[], required
    - `key` string
    - `note` string — Optional free-form text for annotating the environment variable.
    - `precedence` integer
    - `used` boolean
    - `value` string

## Other responses

- `404` — Project or device not found
- `500` — Server error

---

[API](https://skmtc.net/notefile/apis/notehub-api.md) · [All operations](https://skmtc.net/notefile/apis/notehub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/notefile/notehub-api/versions/9c5b2b63a991/schema)
