Skip to content
UPG is in early alpha. The specification is still evolving and may change between versions.
Tools/Workspace & Portfolios/portfolio_census

portfolio_census

List product-local nodes of ONE type ACROSS the whole portfolio with a chosen projection (the cross-product `list_nodes`). The overflow-safe answer to "every metric across all 16 graphs, with title + description": the read every canonicalisation / coverage pass needs. Unlike `portfolio_query` (which returns full nodes AND traversed edges, and overflows the payload cap past ~195 nodes), a census never traverses and never returns edges, so payload scales only with row count x projected-field size. Each row is `{ product_id, node_id, <projected> }`; `group_by: "product"` nests rows under each product instead. Read-only; never mutates active-product state.

Workspace & Portfoliosatomic (read-only). Never mutates active-product state.

Arguments

typestringrequired

Entity type to census (e.g. "metric", "persona", "primitive"). Required.

includearrayoptional

Projected fields per node: "title", "status", "tags", "description", "properties" (default: ["title"]). id (as node_id) and product_id are always present.

property_includearrayoptional

When "properties" is in include, only return these property keys.

group_bystringoptional

none (one flat `rows` list, default) or product (nest rows under each product, the comparison view).

noneproduct
statusstringoptional

Only census nodes with this lifecycle status.

tagsarrayoptional

Only census nodes carrying at least one of these tags.

scopearrayoptional

Product IDs (or files) to census. Omit to census ALL products in the workspace. Match by product id, relative file, or basename. (`products` is accepted as an alias.)

limitnumberoptional

Max rows in the returned page (default 1000, max 5000). Pages the flat sequence; `total` reports the full match count.

offsetnumberoptional

Skip this many rows before the page (default 0). With `limit`, pages a large census.

Returns

JSON.
Flat (default): { type, rows: Array<{ product_id, node_id, <projected> }>, total, returned, offset, limit, has_more, products_searched, products_with_matches, errored_products?, unmatched_scope? }.
With group_by: "product": a products: Array<{ product_id, file, title, count, rows: Array<{ node_id, <projected> }> }> nesting replaces the flat rows.
total is the full match count across the portfolio; rows/products hold the requested page (offset/limit).
Projection defaults to ["title"].

See Also