1. Docs
  2. API Reference
  3. List the hierarchy as parent edges

List the hierarchy as parent edges

GET/api/v1/nodes/parents

Returns the same hierarchy GET /api/v1/nodes describes, scoped identically, but as a flat list of { id, parent_node_id } and nothing else. Intended for a client that evaluates authorization locally: it walks upward from a node and reads none of the tree's names, statuses, access flags or counts. At fifty thousand nodes the tree is roughly 18.6 MB against 4 MB of edges, on a read that runs at every consuming process's startup. Supports the same If-None-Match revalidation, with a validator distinct from the tree's — a tag from one representation never satisfies a request for the other.

Authentication

Bearer TokenAuthorization Option A

JWT access token

API KeyX-API-Key Option B

API key for management-tier access

Headers

  • If-None-Match

    An `ETag` from a previous response. Answers `304 Not Modified` when the hierarchy has not changed since, so a client holding a cached tree can revalidate on a short interval without re-reading it.

Responses

application/json

  • itemsNodeParentEdgeResponseDto[]*

The hierarchy is unchanged since the supplied `ETag`. No body; keep using the cached tree.

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

Returned object

Request
curl -X GET "https://auth.canopy-io.com/api/v1/nodes/parents" \
  -H "If-None-Match: value" \
  -H "X-API-Key: $CANOPY_API_KEY"
Response
{
  "items": [
    {
      "id": "string",
      "parent_node_id": "string"
    }
  ]
}
Related endpoints
GETList hierarchy (scoped tree)
POSTCreate a hierarchy node
GETGet a hierarchy node
PATCHUpdate a hierarchy node
DELETEDelete a hierarchy node
GETGet subtree from a node
GETGet ancestor chain for a node
GETGet direct children of a node
POSTMove (reparent) a node
GETList identities at a node
GETGet identity summary for a node
Was this page helpful?

Tell us how we can improve this guide.