Resource Search
Graph Query
/api/insights/{orgName}/graph/queryExecutes a graph selection query over the organization’s resource graph, returning the matching subgraph or flat aggregation buckets. Results are trimmed to the caller’s visible stacks and accounts.
Request Parameters
orgNamestring path requiredThe organization name
Request Body
- Bounds where the anchor set is selected. Traversal may walk beyond the scope; only RBAC visibility and depth/fanout caps bound traversal. Omitted means all visible resources in the organization.
- The anchor (zero-hop) node selection.
- Ordered, typed, depth-bounded traversal steps applied from the anchor set. Each step’s result becomes the frontier for the next step.
- Flat aggregation over the anchor node set (group-by plus metrics). Only valid when ’traverse’ is empty; aggregation fused with traversal is not supported.
- Shapes the response: which named frontiers to return, which node fields to project, and whether to include evidence paths.
- Pagination controls: the page size and the continuation token to resume from. To bound the anchor set itself rather than the page, use anchor.limit.
Responses
- This page’s slice of the selected nodes (id-ordered), from the frontiers named in return.select plus any nodes referenced by returned paths.
- ↳
idstring requiredStable node identifier: the Pulumi URN for IaC resources, the Insights URN for discovered resources, or ‘stack:/ / ’ for stacks. A stack’s id is not the spelling a selector uses: scope.stacks and a stack anchor’s name predicate both take the org-free ‘project/stack’ form, and both reject the org-qualified form. - ↳
nodeTypeenum requiredThe node type.Values:resource,stack - ↳
frontierarray[string] requiredNames of the selected frontiers this node belongs to (‘anchor’ or traversal step aliases). - ↳
urnstring optionalThe resource URN. Absent for stack nodes. - ↳
typestring optionalThe resource type token. Absent for stack nodes. - ↳
stackstring optionalThe Pulumi stack this node belongs to, or that it represents for a stack node. Absent on a resource discovered by a cloud scan. - ↳
projectstring optionalThe Pulumi project this node belongs to, or that it represents for a stack node. Absent on a resource discovered by a cloud scan. - ↳
accountstring optionalThe Insights account a discovered resource was found in, as the complete account name including any ‘/’-separated hierarchy. - ↳
fieldsmap[string]string optionalAdditional projected fields requested via return.fields, plus engine-provided provenance fields where available. - ↳
fieldsUnavailableboolean optionalTrue when this node carries no indexed document, so none of the fields requested in return.fields could be evaluated on it. Absent unless return.fields was requested. - The typed edges revealed by this page: every edge whose higher-id endpoint first appears on this page. Both endpoints are among the nodes returned by this page or an earlier one — process pages cumulatively. A drain over changing data may not be complete.
- ↳
idstring requiredStable edge identifier, unique within the response. - ↳
fromstring requiredThe source node id. - ↳
tostring requiredThe destination node id. - ↳
typestring requiredThe edge type, for example ‘provided_by’ or ‘inferred_reference’. - Evidence paths showing how the query reached its results. Present only when return.paths is true. One path per node of the final traversal frontier, not necessarily the shortest route.
- ↳
nodesarray[string] requiredNode ids along the path, in traversal order. Every id named here is present among the response’s nodes once the page containing it has been retrieved. - ↳
edgesarray[string] requiredEdge ids along the path, in traversal order. One fewer entry than nodes. - Aggregation buckets. Empty unless the query included an aggregate clause.
- The aggregation buckets.
- Result-set pagination information.
- ↳
continuationTokenstring optionalOpaque keyset token for the next page, omitted rather than null when no pages remain. Pass it back as page.continuationToken. - ↳
resultCountinteger requiredThe number of nodes (or aggregation buckets) returned on this page. - Result metadata, including whether anything clipped the underlying result.
- ↳
resultModeenum requiredResult fidelity: whether an engine cap or a partial search-backend response clipped the underlying result. Treat ’truncated’ as disqualifying for any question whose answer depends on completeness, such as an absence check.Values:exact,truncated - ↳
schemaVersionstring requiredThe dated revision of the graph contract this query was evaluated against, for example ‘2026-07-29’. While the graph query API is in preview the contract can change. - ↳
visibilityenum optionalWhether the caller’s permissions limited what the traversal could see. Always present for traversal queries; absent for aggregations, which are always scoped to the caller’s permissions. Anchor selection is likewise caller-scoped and not reported here. Independent of resultMode, which reports engine-side clipping.Values:complete,trimmed
Get Graph Schema
/api/insights/{orgName}/graph/schemaReturns the vocabulary and engine limits that graph query selectors are validated against. With ‘Accept: text/markdown’, returns a self-contained guide to composing selectors instead, kept current with this deployment’s validator.
Request Parameters
orgNamestring path requiredThe organization name
Responses
schemaVersionstring requiredThe dated revision of the graph contract this response describes, for example ‘2026-07-29’.- The selectable node types.
- ↳
nameenum requiredThe node type name, usable as anchor.nodeType.Values:resource,stack - ↳
selectableFieldsarray[string] requiredField names usable in anchor match.fields predicates for this node type. This is the widest of the three vocabularies. - ↳
projectableFieldsarray[string] requiredField names usable in return.fields projections, and — for node types that carry a document — in a traverse step’s target.match. Naming a field outside this list returns a 400. - ↳
groupByFieldsarray[string] requiredField names usable in aggregate.groupBy for this node type. Naming a field outside this list returns a 400. Empty for node types that cannot be aggregated. - ↳
identitystring requiredHow a node of this type is identified in a response and how a selector names one. For stacks the two spellings differ, and the field lists cannot say so: they name fields, never formats. - ↳
fieldValuesmap[string]array requiredFor the subset of selectableFields whose values are a fixed, closed set defined in code, the values themselves, keyed by field name. Absence from this map means no fixed set is advertised, not that the field has none; where such a field also appears in groupByFields, aggregate on it to discover its values. - The traversable edge types.
- ↳
namestring requiredThe edge type name, usable in traverse[].edgeTypes. - ↳
fromenum requiredThe node type at the edge’s source.Values:resource,stack - ↳
toenum requiredThe node type at the edge’s destination.Values:resource,stack - ↳
assertsstring requiredWhat the presence of this edge asserts about the two nodes it connects, and which end is which. - ↳
singleHopboolean requiredWhether this edge type is walked in exactly one hop. A traverse step naming one must leave depth unset or set depth.max to 1. - ↳
directionsarray[string] requiredThe traversal directions this edge type can be walked in, listed in the order ‘in’, ‘out’, ‘both’. A traverse step naming a direction absent from this list is rejected. - ↳
basisenum requiredHow edges of this type are produced.Values:declared,inferred metricOpsarray[string] requiredThe aggregate metric operations usable in aggregate.metrics[].op. A selector naming an operation absent from this list is rejected rather than answered with a differently-computed metric.- Engine limits applied to every query.
- ↳
maxDepthinteger requiredMaximum traversal depth per step. A selector limit: a step whose depth.max exceeds it is rejected. - ↳
maxTraverseStepsinteger requiredMaximum number of traversal steps per query. A selector limit: a query with more steps is rejected. - ↳
maxScopeAccountsinteger requiredMaximum number of cloud accounts scope.accounts may list. A selector limit: a longer list is rejected. - ↳
maxScopeStacksinteger requiredMaximum number of stacks scope.stacks may list. A selector limit: a longer list is rejected. - ↳
maxGroupByFieldsinteger requiredMaximum number of fields aggregate.groupBy may name. A selector limit: naming more is rejected. - ↳
maxAnchorNodesinteger requiredMaximum number of anchor nodes one query resolves, and the upper bound on anchor.limit. When more nodes match, the result is clipped and reported as truncated - except under a selector that also traverses, where an engine-imposed clip is rejected instead. Also a selector limit: a match.fields[…].in list longer than this is rejected. - ↳
maxFanoutinteger requiredMaximum new nodes discovered per traversal level. A result limit. - ↳
maxNodesinteger requiredMaximum total nodes held by one query evaluation. A result limit. - ↳
maxPathsinteger requiredMaximum evidence paths returned. A result limit. - ↳
maxRecordedCrossingsinteger requiredMaximum number of edge crossings a traversal step records while walking. A result that reaches this bound is returned with resultMode ’truncated’ rather than rejected. - ↳
maxPageSizeinteger requiredMaximum page size. Applied silently rather than as a rejection or a truncation: a page.pageSize above this value is reduced to it.
Get Org Resource Search Query
GetOrgResourceSearchV2Query instead./api/orgs/{orgName}/search/resourcesSearches for resources within an organization. Deprecated: use GetOrgResourceSearchV2Query for improved search functionality.
Request Parameters
orgNamestring path requiredThe organization namecollapseboolean query optionalCollapse results to show one entry per stack instead of per resourcecursorstring query optionalCursor for paginated resultsfacetarray query optionalFacet filters to applygroupBystring query optionalGroup results by this fieldpageinteger query optionalPage number for paginationpropertiesboolean query optionalInclude resource properties in search results (may increase response size)querystring query optionalSearch query stringsizeinteger query optionalNumber of results to returnsortarray query optionalSort order for resultstopinteger query optionalNumber of top aggregation buckets to return
Responses
totalinteger optionalThe total number of matching resources.- The list of matching resource results.
- ↳
createdstring optionalThe ISO 8601 timestamp when the resource was first indexed. - ↳
customboolean optionalWhether this is a custom resource managed by a provider plugin. - ↳
deleteboolean optionalWhether this resource is pending deletion. - ↳
dependenciesarray[string] optionalURNs of resources that this resource depends on. - ↳
externalboolean optionalWhether the lifecycle of this resource is not managed by Pulumi. - ↳
idstring optionalThe provider-assigned resource ID. - ↳
matchesmap[string]array optionalMatched search terms mapped to their highlighted values. - ↳
modifiedstring optionalThe ISO 8601 timestamp when the resource was last updated in the index. - ↳
modulestring requiredThe module that contains this resource. - ↳
namestring optionalThe name of the resource. - ↳
packagestring requiredThe package that provides this resource. - ↳
parent_urnstring optionalThe URN of the parent resource, if any. - ↳
pendingstring optionalThe pending operation on this resource, if any (e.g. creating, updating, deleting). - ↳
projectstring optionalThe project that contains this resource. - ↳
protectedboolean optionalWhether this resource is protected from deletion. - ↳
provider_urnstring optionalThe URN of the provider for this resource. - ↳
stackstring optionalThe stack that contains this resource. - ↳
typestring optionalThe full type token of the resource (e.g. aws:s3/bucket:Bucket). - ↳
urnstring optionalThe URN uniquely identifying this resource within a stack. - ↳
teamsarray[string] optionalThe teams that have access to this resource. - ↳
propertiesobject optionalThe resource’s input/output properties as a JSON object. Only populated when explicitly requested. - ↳
metadataobject optionalAdditional metadata associated with the resource. - ↳
categorystring optionalThe category of the resource. - ↳
accountstring optionalThe Insights account name that discovered or manages this resource. - ↳
dependentsarray[string] optionalURNs of resources that depend on this resource. - ↳
managedstring optionalWhat manages this resource’s lifecycle: ‘Pulumi’ for a resource in a Pulumi IaC stack, ‘Terraform’ / ‘CloudFormation’ / ‘ARM’ for one discovered under another IaC tool, and ‘Other’ for one Insights scanning found under no known tool. - ↳
fingerprintstring optionalA fingerprint uniquely identifying this resource’s state. - ↳
sourceCountinteger optionalThe number of sources for this resource. - Aggregation buckets for faceted search.
- Pagination links for navigating through results.
- ↳
previousstring optionalLink to the previous page of results. - ↳
nextstring optionalLink to the next page of results. - ↳
cursorstring optionalAn opaque cursor for resuming pagination.
Get Resource Dashboard Aggregations
/api/orgs/{orgName}/search/resources/dashboardGetResourceDashboardAggregations returns aggregated resource data for display on organization dashboard cards, including resource counts grouped by package and other dimensions.
Request Parameters
orgNamestring path requiredThe organization name
Responses
totalinteger optionalThe total number of matching resources.- The list of matching resource results.
- ↳
createdstring optionalThe ISO 8601 timestamp when the resource was first indexed. - ↳
customboolean optionalWhether this is a custom resource managed by a provider plugin. - ↳
deleteboolean optionalWhether this resource is pending deletion. - ↳
dependenciesarray[string] optionalURNs of resources that this resource depends on. - ↳
externalboolean optionalWhether the lifecycle of this resource is not managed by Pulumi. - ↳
idstring optionalThe provider-assigned resource ID. - ↳
matchesmap[string]array optionalMatched search terms mapped to their highlighted values. - ↳
modifiedstring optionalThe ISO 8601 timestamp when the resource was last updated in the index. - ↳
modulestring requiredThe module that contains this resource. - ↳
namestring optionalThe name of the resource. - ↳
packagestring requiredThe package that provides this resource. - ↳
parent_urnstring optionalThe URN of the parent resource, if any. - ↳
pendingstring optionalThe pending operation on this resource, if any (e.g. creating, updating, deleting). - ↳
projectstring optionalThe project that contains this resource. - ↳
protectedboolean optionalWhether this resource is protected from deletion. - ↳
provider_urnstring optionalThe URN of the provider for this resource. - ↳
stackstring optionalThe stack that contains this resource. - ↳
typestring optionalThe full type token of the resource (e.g. aws:s3/bucket:Bucket). - ↳
urnstring optionalThe URN uniquely identifying this resource within a stack. - ↳
teamsarray[string] optionalThe teams that have access to this resource. - ↳
propertiesobject optionalThe resource’s input/output properties as a JSON object. Only populated when explicitly requested. - ↳
metadataobject optionalAdditional metadata associated with the resource. - ↳
categorystring optionalThe category of the resource. - ↳
accountstring optionalThe Insights account name that discovered or manages this resource. - ↳
dependentsarray[string] optionalURNs of resources that depend on this resource. - ↳
managedstring optionalWhat manages this resource’s lifecycle: ‘Pulumi’ for a resource in a Pulumi IaC stack, ‘Terraform’ / ‘CloudFormation’ / ‘ARM’ for one discovered under another IaC tool, and ‘Other’ for one Insights scanning found under no known tool. - ↳
fingerprintstring optionalA fingerprint uniquely identifying this resource’s state. - ↳
sourceCountinteger optionalThe number of sources for this resource. - Aggregation buckets for faceted search.
- Pagination links for navigating through results.
- ↳
previousstring optionalLink to the previous page of results. - ↳
nextstring optionalLink to the next page of results. - ↳
cursorstring optionalAn opaque cursor for resuming pagination.
Get Natural Language Query
/api/orgs/{orgName}/search/resources/parseGetNaturalLanguageQuery converts a natural language query into a structured Pulumi search query using AI. For example, converts ‘show me all S3 buckets in production’ into a proper search syntax.
Request Parameters
orgNamestring path requiredThe organization namequerystring query optionalSearch query string
Responses
Get Org Resource Search V2Query
/api/orgs/{orgName}/search/resourcesv2Searches for resources within an organization with advanced filtering, sorting, and pagination capabilities.
Pagination: The page parameter supports up to 10,000 results. For larger result sets, use the cursor parameter instead (Enterprise plans only). Note that pagination is not transactional — result ordering may change if a stack update completes during pagination.
Sorting: The sort parameter accepts: created, custom, delete, dependencies, id, modified, module, name, package, parentUrn, project, protected, providerUrn, stack, type, urn, managed, category. If omitted, results are sorted by search relevance (or last modified time when no query is provided).
Properties: Set properties=true to include resource input/output values.
Collapse: Set collapse=true to consolidate resources that exist in multiple sources (e.g., both IaC stacks and Insights scans) into a single result.
Request Parameters
orgNamestring path requiredThe organization nameascboolean query optionalSort in ascending order when true, descending when falsecollapseboolean query optionalCollapse results to show one entry per stack instead of per resourcecursorstring query optionalCursor for paginated resultsfacetarray query optionalFacet filters to applygroupBystring query optionalGroup results by this fieldpageinteger query optionalPage number for paginationpropertiesboolean query optionalInclude resource properties in search results (may increase response size)querystring query optionalSearch query stringsizeinteger query optionalNumber of results to returnsortarray query optionalSort order for resultstopinteger query optionalNumber of top aggregation buckets to return
Responses
totalinteger optionalThe total number of matching resources.- The list of matching resource results.
- ↳
createdstring optionalThe ISO 8601 timestamp when the resource was first indexed. - ↳
customboolean optionalWhether this is a custom resource managed by a provider plugin. - ↳
deleteboolean optionalWhether this resource is pending deletion. - ↳
dependenciesarray[string] optionalURNs of resources that this resource depends on. - ↳
externalboolean optionalWhether the lifecycle of this resource is not managed by Pulumi. - ↳
idstring optionalThe provider-assigned resource ID. - ↳
matchesmap[string]array optionalMatched search terms mapped to their highlighted values. - ↳
modifiedstring optionalThe ISO 8601 timestamp when the resource was last updated in the index. - ↳
modulestring requiredThe module that contains this resource. - ↳
namestring optionalThe name of the resource. - ↳
packagestring requiredThe package that provides this resource. - ↳
parent_urnstring optionalThe URN of the parent resource, if any. - ↳
pendingstring optionalThe pending operation on this resource, if any (e.g. creating, updating, deleting). - ↳
projectstring optionalThe project that contains this resource. - ↳
protectedboolean optionalWhether this resource is protected from deletion. - ↳
provider_urnstring optionalThe URN of the provider for this resource. - ↳
stackstring optionalThe stack that contains this resource. - ↳
typestring optionalThe full type token of the resource (e.g. aws:s3/bucket:Bucket). - ↳
urnstring optionalThe URN uniquely identifying this resource within a stack. - ↳
teamsarray[string] optionalThe teams that have access to this resource. - ↳
propertiesobject optionalThe resource’s input/output properties as a JSON object. Only populated when explicitly requested. - ↳
metadataobject optionalAdditional metadata associated with the resource. - ↳
categorystring optionalThe category of the resource. - ↳
accountstring optionalThe Insights account name that discovered or manages this resource. - ↳
dependentsarray[string] optionalURNs of resources that depend on this resource. - ↳
managedstring optionalWhat manages this resource’s lifecycle: ‘Pulumi’ for a resource in a Pulumi IaC stack, ‘Terraform’ / ‘CloudFormation’ / ‘ARM’ for one discovered under another IaC tool, and ‘Other’ for one Insights scanning found under no known tool. - ↳
fingerprintstring optionalA fingerprint uniquely identifying this resource’s state. - ↳
sourceCountinteger optionalThe number of sources for this resource. - Aggregation buckets for faceted search.
- Pagination links for navigating through results.
- ↳
previousstring optionalLink to the previous page of results. - ↳
nextstring optionalLink to the next page of results. - ↳
cursorstring optionalAn opaque cursor for resuming pagination.