Skip to main content
The Anyshift Graph Query Language gives you deterministic, read-only access to infrastructure graph data. Use it when you know the operation you need and want the same query to produce the same typed result in a terminal, script, CI job, or application. This page is generated from the versioned query catalog published in the Graph API OpenAPI contract. The same catalog is embedded in Annie CLI and published with the Graph SDK.

Discover queries from Annie CLI

You do not need to memorize table or filter names. Annie CLI can inspect its embedded catalog without authentication, a selected project, or network access:
The second command explains that spof accepts a kind filter, lists serviceaccount as an accepted value, and prints a copy-pasteable query. See the Annie CLI guide for authentication, project selection, and output modes.

Syntax

Selectors: *, count(*). Accepted selector aliases: count(1). Values may be bare words or single- or double-quoted strings. Filters use equality and can be combined with AND. A target only accepts the filters and enum values documented below. LIMIT and OFFSET are listed per target because not every result supports both modifiers.

Query targets

resolve

Resolve a resource name or fragment to ranked current graph resources. Result intent: resolve
Aliases: search
Modifiers: LIMIT

Resolve resources

Return ranked candidates for a resource name or fragment.

events

Read the infrastructure change-event timeline. Result intent: events
Aliases: event
Modifiers: LIMIT, OFFSET

Recent resource events

Read recent events for a resource inside a time window.

resources

Count and sample current resources of one graph resource type. Result intent: inventory
Aliases: resource, inventory
Modifiers: LIMIT, OFFSET

Resource inventory

Return the inventory for one resource type.

connections

Inspect direct upstream and downstream relationships for a resource. Result intent: connections
Aliases: connection, deps
Modifiers: LIMIT

Direct connections

Return the resource and its direct graph neighbors.

hotspots

Rank noisy resources, namespaces, alert rules, or alerting workloads. Result intent: hotspots
Aliases: hotspot
Modifiers: LIMIT

Resource hotspots

Rank resources by recent event activity.

incidents

Reconstruct a correlated incident around a target or correlation identifier. Result intent: incident
Aliases: incident
Modifiers: None

Incident by target

At least one of target or id is required.

Incident by correlation id

Load one exact correlation group.

failures

Read recent failure-class infrastructure events. Result intent: failures
Aliases: None
Modifiers: LIMIT, OFFSET

Recent failures

Read failures for a target, namespace, or the whole project.

deployments

Read recent workload deployments and image changes. Result intent: deployments
Aliases: deployment, rollouts
Modifiers: LIMIT, OFFSET

Recent deployments

Read deployments for a target, namespace, or the whole project.

audit

Read configuration, identity, and infrastructure audit events. Result intent: audit
Aliases: changes
Modifiers: LIMIT, OFFSET

RBAC audit

Read recent RBAC-related changes.

nodes

Read node lifecycle and capacity events. Result intent: nodes
Aliases: node
Modifiers: LIMIT, OFFSET

Node activity

Read recent node events.

deploy_impact

Join recent deployments to the failures that followed them. Result intent: deployimpact
Aliases: impact, risky
Modifiers: LIMIT

Deployment impact

Rank recent deployment fallout or inspect one workload.

common_cause

Find shared infrastructure or dependencies behind recent failures. Result intent: commoncause
Aliases: commoncause, cause
Modifiers: LIMIT

Shared failure causes

Intersect recent failures by node, workload, datastore, and external dependency.

blast_radius

Calculate the transitive workloads, pods, and services affected by a resource. Result intent: blast
Aliases: blast
Modifiers: LIMIT

Resource blast radius

Walk impact outward from one resource.

spof

Rank highly shared ConfigMaps, service accounts, or nodes by fan-in. Result intent: spof
Aliases: spofs
Modifiers: LIMIT

Shared service accounts

Rank service accounts by dependent workloads and pods.

orphans

Find unused or dangling Kubernetes resources. Result intent: orphans
Aliases: orphan, unused, dangling
Modifiers: LIMIT

Orphaned roles

Find roles with no observed consumers.

coverage

Find service, monitor, or metrics coverage gaps. Result intent: coverage
Aliases: blindspots, unmonitored, uncovered
Modifiers: LIMIT

Monitoring gaps

Find unmonitored services in one namespace.

access

Inspect RBAC reach or rank over-privileged service accounts. Result intent: access
Aliases: rbac, permissions
Modifiers: LIMIT

Subject reach

Reach mode requires resource.

Privileged identities

Privileged mode can optionally scope resource to a namespace.

exposure

Trace public ingress exposure to or from a resource. Result intent: exposure
Aliases: exposed, attack_surface
Modifiers: LIMIT

Public exposure

Trace how a resource is publicly exposed.

tenancy

Find workloads co-located with a resource on the same node. Result intent: tenancy
Aliases: colocation, colocated, neighbors
Modifiers: LIMIT

Noisy neighbors

Inspect resources sharing a node with the target.

sharedconfig

Find workloads coupled through shared configuration. Result intent: sharedconfig
Aliases: shared_config, configsiblings, config_siblings, configcoupled
Modifiers: LIMIT

Shared configuration

Find workloads sharing configuration with the target.

path

Find the shortest infrastructure or operational path between two resources. Result intent: path
Aliases: paths
Modifiers: None

Shortest path

Each endpoint requires a name or id. Typed selectors resolve same-named resources deterministically.

cascade

Trace an incident correlation group in propagation order. Result intent: cascade
Aliases: cascades
Modifiers: None

Cascade by target

At least one of target or id is required.

Cascade by correlation id

Trace one exact correlation group.

alert_impact

Find monitors and SLOs affected by a resource failure. Result intent: alertimpact
Aliases: alertimpact
Modifiers: LIMIT

Alert impact

Map an infrastructure resource to affected observability objects.

monitor

Resolve a monitor to the infrastructure it observes. Result intent: monitor
Aliases: monitors
Modifiers: None

Monitor infrastructure

Map one monitor to its service, workload, and node.

datastore

Inspect datastore dependencies or rank widely used datastores. Result intent: datastore
Aliases: datastores
Modifiers: LIMIT

Rank datastores

Omit target to rank datastore fan-in.

Datastore dependencies

Inspect services connected to one datastore or datastores used by one service.

flow

Inspect stream producers and consumers or rank busy streams. Result intent: flow
Aliases: flows, stream
Modifiers: LIMIT

Stream dependencies

Inspect producers and consumers for a stream.

external_dep

Inspect external dependencies or rank high-fan-in external hosts. Result intent: externaldep
Aliases: externaldep, external
Modifiers: LIMIT

External dependencies

Inspect services depending on one external host.

alerts

List currently firing monitors, optionally scoped to a service. Result intent: alerts
Aliases: alert, firing
Modifiers: LIMIT

Current alerts

List firing monitors for the project or one target.

alert_noise

Rank flapping or stuck monitors. Result intent: alertnoise
Aliases: alertnoise, noise, flapping, noisy
Modifiers: LIMIT

Flapping alerts

Rank recently flapping monitors.

calls

Inspect service callers and callees or rank call-graph fan-in. Result intent: calls
Aliases: call, callgraph
Modifiers: LIMIT

Service calls

Inspect callers and callees for one service.

servicetree

Expand a service’s downstream services, datastores, and external dependencies. Result intent: servicetree
Aliases: service_tree, footprint
Modifiers: LIMIT

Service tree

Expand the downstream footprint of one service.

alert_cause

Join a firing service or workload to recent Kubernetes changes. Result intent: alertcause
Aliases: alertcause, rootcause
Modifiers: LIMIT

Alert cause

Find recent infrastructure changes behind a firing target.

slo

Inspect one SLO or rank breaching and at-risk SLOs. Result intent: slo
Aliases: slos
Modifiers: LIMIT

SLO health

Inspect one SLO by name.

alertrules

Inspect Grafana and VictoriaMetrics alert-rule coverage and inventory. Result intent: alertrules
Aliases: alert_rules, grafana, victoria
Modifiers: LIMIT

Alert-rule coverage

Find services or workloads without alert rules.

Rules for a target

Target subject requires target.

gitops

Inspect GitOps drift, unmanaged workloads, or resource ownership. Result intent: gitops
Aliases: argocd, drift
Modifiers: LIMIT

GitOps drift

List drifted applications, optionally scoped to a namespace.

Resource owner

Owner subject requires resource.

image

Inspect image usage, workload containers, or container hygiene gaps. Result intent: image
Aliases: images, containers
Modifiers: LIMIT

Image usage

Inspect who runs an image or what image a target runs.

Container hygiene

Kind selects a hygiene scan and namespace optionally scopes it.

netpol

Inspect NetworkPolicy coverage, policies, or east-west reach. Result intent: netpol
Aliases: netpols, networkpolicy, segmentation, defaultallow
Modifiers: LIMIT

NetworkPolicy gaps

Find default-allow namespaces.

East-west reach

Segmentation mode requires target.

priority

Inspect scheduling priority gaps, the class ladder, or one target’s priority. Result intent: priority
Aliases: priorityclass, preemption, nopriority
Modifiers: LIMIT

Missing priority classes

Find workloads without a priority class.

Target priority

Inspect the priority class for one workload or pod.

storage

Inspect workload storage and find orphaned or unclaimed volumes. Result intent: storage
Aliases: volumes, pv, pvc, storageclass
Modifiers: LIMIT

Workload storage

Footprint mode requires workload or resource.

Unclaimed PVCs

Find unclaimed claims, optionally scoped to a namespace.

pdb

Find workloads without PodDisruptionBudgets or inspect one workload or PDB. Result intent: pdb
Aliases: pdbs, unprotected, disruption
Modifiers: LIMIT

PDB coverage gaps

Omit filters to list workloads without PDB protection.

Target PDB coverage

Inspect one workload or PDB by target, workload, or pdb.

scaling

Find workloads without HPAs, list autoscaled workloads, or inspect one target. Result intent: scaling
Aliases: hpa, hpas, autoscaling, autoscalers
Modifiers: LIMIT

Autoscaling gaps

Find workloads without HPAs.

Target autoscaling

Target mode requires target.

topology

Build a typed service topology at a selected level. Result intent: topology
Aliases: diagram, c4
Modifiers: None

Service topology

Service is required; level selects the topology depth.

Use the catalog programmatically

The OpenAPI document exposes this catalog under the root x-anyshift-query-language extension. Tooling can read that versioned object to generate completion, validation, documentation, or custom query builders without duplicating the language by hand. For typed TypeScript helpers, see Graph SDK Capabilities. For raw query execution and error handling, see the Graph SDK guide.