FabrikFabrik
FabrikQuery Builder

Building a query

The end-to-end flow — drag from a handle, pick a node type, find the right ACI class in the browser, and wire it into your query graph.

With the canvas mechanics and the node-type reference out of the way, this page is the "how": given a blank canvas, how do you actually put a working query together? The answer is a single gesture repeated — drag from a handle, drop, configure — and one dialog, the Class Browser, that does most of the heavy lifting.

We'll work fvTenant → fvBD as the running example: list every bridge domain on the fabric, grouped by tenant.

The core gesture

Every node has a source handle on its right edge. Drag from that handle and you're drawing an edge. Where you drop decides what happens next.

Where you dropWhat happens
On empty canvasThe Add Node menu opens at your cursor with the legal next node types for the source.
On another node's body or left handleA direct edge is drawn between the two existing nodes. No menu.

That's the whole interaction. Every node after the first lands through one of those two drops.

The Add Node menu

Drop on empty canvas and a small context menu appears. The options depend on the source node's type — the canvas never offers something the graph can't legally accept.

Source nodeMenu offers
StartClass Query (the first class)
ClassChild Class, Filter, Post-Processor, Output
Filter / Post-ProcessorChild Class, Post-Processor, Output
OutputPipeline Stage (a new Class that reads this output's results — see Pipelines)

Press Esc or click outside the menu to dismiss it.

Picking a class: the Class Browser

Picking Class Query or Child Class opens the Class Browser — a dialog that renders the ACI classes from the MIM graph you loaded earlier.

The dialog has three zones:

  • Left — tree and search. Type to search by class name. A package dropdown filters to a specific package (fv, vz, bgp, l3ext, …). A star-toggle filters to your favourites.
  • Right — details. Hovering or clicking a class shows its properties (with types and descriptions), its containment relationships (what it contains, what contains it), and the package it belongs to.
  • Footer — Confirm / Cancel. Confirm drops the selected class onto the canvas at the position where you released the drag.

A few quality-of-life touches:

  • Favourites — click the star next to any class to pin it. Your favourites list is per-user and persists across sessions.
  • Recent history — classes you've recently added appear near the top of the tree, so repeat work is fast.
  • Keyboard navigation — arrow keys move through the list, Enter confirms.
  • Monitoring children, collapsed by default. When the detail panel lists a class's child classes, monitoring and stats variants (*stats*, *fault*, *health*, 15-minute / hourly aggregations, and so on) are collapsed behind a Show monitoring toggle so they don't drown the useful ones. Click the toggle to see them all.

Child classes vs. top-level classes

The menu item makes this explicit: Class Query is a top-level pick, Child Class is scoped.

When you pick Child Class, Fabrik walks the edges backwards from the source node until it finds the nearest Class ancestor, then restricts the browser to classes that have a containment relationship from that ancestor in the MIM.

  • From fvTenant → Child Class lists exactly what a tenant can contain: fvBD, fvAp, vzBrCP, fvCtx, and so on.
  • From a Filter or Post-Processor that sits downstream of fvTenant, the same rule applies — the tenant is still the nearest class ancestor, and the browser is scoped the same way.

Top-level Class Query (the option that appears from Start) has no parent restriction; every class in the MIM is fair game.

Adding Filter and Post-Processor nodes

These two node types don't need the Class Browser — they drop immediately when you pick them from the menu.

  • Filter lands as an empty rule-set; configure it by clicking the node and using the right panel. See Filters.
  • Post-Processor lands with no processor type set; pick one from the right panel. See Post-processors.

Both are safe to add, configure, and delete without affecting the classes upstream.

Closing the graph with Output

Same gesture: drag out, Add Node menu, pick Output. The Output node drops with defaults good enough for a first run — no pagination, Time Machine off, validation off. Its settings matter later; for now, adding it lets the query run.

Without an Output at the end of the chain, Run stays disabled.

Wiring to a node that already exists

Sometimes the node you want to connect to is already on the canvas. Drag from the source's right handle and drop directly onto the target node (its left handle or body) — no menu, just a new edge.

To rewire an existing edge, drag its midpoint onto a different target. React Flow handles that natively.

Worked example — tenants and bridge domains

Start with the APIC connection

If you have only one saved APIC connection it's already selected on the Start node. Otherwise click Select APIC and pick the fabric.

Add fvTenant

Drag from the Start node's right handle out onto empty canvas and release. The Add Node menu opens → Class Query. The Class Browser opens. Type fvTenant, click Confirm.

Add fvBD as a child class

Drag from fvTenant's right handle and release. Add Node menu → Child Class. The Class Browser opens, already scoped to what a tenant can contain. Type fvBD, click Confirm.

Terminate with an Output

Drag from fvBD's right handle and release. Add Node menu → Output. The graph now reads Start → fvTenant → fvBD → Output.

Run

Click Run in the toolbar. The right panel opens with the result set — every bridge domain on the fabric, with its parent tenant reachable in the row's DN.

What the canvas won't let you do

The canvas actively refuses a few things so you can't build a graph the backend would reject at run time:

  • Invalid parent/child combinations. Class-to-class edges must respect the ACI containment hierarchy encoded in the MIM. Trying to connect fvTenant → vnsLDevVip fails as you draw it because the MIM has no such containment. See Connection rules for the detail.
  • A second Start, or a second Output on the same chain. Both are structural singletons. If you need a multi-stage query, use a Pipeline instead.
  • Drag-to-add while the canvas is locked. Interactive mode must be on (the green unlock icon in the bottom zoom bar).

Building is mechanical once you see the shape of it. The next page — Connection rules — explains why the canvas rejects some edges, and why that's the MIM doing its job.