List the hierarchy as parent edges
/api/v1/nodes/parentsReturns the same hierarchy GET /api/v1/nodes describes, scoped identically, but as { id, parent_node_id } pairs and nothing else, one page at a time, ordered by node id. Intended for a client that evaluates authorization locally: it walks every page into a child-to-parent map and reads none of the nodes' names, statuses, access flags or counts. At fifty thousand nodes the full listing 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 node listing's and from every other page's: a tag from one representation or page never satisfies a request for another. A 304 on the first page means the whole hierarchy is unchanged.
Authentication
Authorization Option A JWT access token. Never send alongside X-API-Key: a request carrying both is refused.
X-API-Key Option B API key for management-tier access. Never send alongside an Authorization header: a request carrying both is refused.
Query Parameters
pagenumber Optional Page number (1-based)
takenumber Optional Items per page (1-100, default 20)
Headers
If-None-MatchAn `ETag` from a previous response for the same page and query. Answers `304 Not Modified` when the hierarchy has not changed since, so a client holding a cached copy can revalidate on a short interval without re-reading it.
Responses
application/json
model_version *integerThe version of the authorization model these rows describe. A client that evaluates from them refuses a version it does not know rather than guessing.
items *NodeParentEdgeResponseDto[]pagination *PageMetaDto
The hierarchy is unchanged since the supplied `ETag`. No body; keep using the cached copy.
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
Pagination
This endpoint returns a paginated collection. Use the query parameters below to page through results.
pagenumberPage number (1-indexed). Defaults to 1.
takenumberItems per page (1 to 100). Defaults to 20.
Each response includes an items array alongside a pagination object with item_count, page_count, has_previous_page, and has_next_page fields.
Returned object
curl -X GET "https://auth.canopy-io.com/api/v1/nodes/parents?page=0&take=0" \ -H "If-None-Match: value" \ -H "X-API-Key: $CANOPY_API_KEY"
{ "model_version": 0, "items": [ { "id": "string", "parent_node_id": "string" } ], "pagination": { "page": 0, "take": 0, "item_count": 0, "page_count": 0, "has_previous_page": false, "has_next_page": false } }
Tell us how we can improve this guide.