Run your first query
Build a two-node query in Fabrik's visual canvas, pick an APIC, and see live tenant data from your fabric in under a minute.
Everything is in place: you're signed in, oriented, the MIM graph is loaded, and an APIC connection is saved and green-checked. Time to prove the stack end-to-end.
The goal for this page is small on purpose — build a two-node query that returns the list of tenants on your fabric, click Run, and see rows come back. fvTenant is the right starting class for this because every ACI fabric has at least one (common is always present), so the query always returns something. Once you've seen data flow once, the rest of the query builder will make sense quickly.
Open the query builder
The canvas lives at /builder. Three fast ways to get there:
- From Home, click the Query Builder shortcut.
- Press
⌘K(macOS) orCtrl+K(Windows / Linux) and type "Query Builder". - Type the URL directly.
On a fresh canvas you'll see a single Start node in the centre and a floating hint: "Drag from the Start node to add your first query component." That's the whole setup.
Pick an APIC on the Start node
The Start node is where Fabrik binds the query to a specific fabric. It's always present, always leftmost, and every query graph has exactly one.
- If you saved only one APIC connection, Fabrik auto-selects it — the node shows the connection name and a small coloured dot.
- With more than one, click Select APIC on the node itself. A picker opens; pick the fabric you want to query.
- To change the selection later, click the same button — now labelled Change.
The coloured dot on the Start node reflects the last test result for that connection:
| Dot colour | Meaning |
|---|---|
| Green | Last test succeeded |
| Red | Last test failed — creds or network problem |
| Grey | Never tested |
A red dot won't block execution, but it's worth re-testing the connection in Settings → APIC Connections before you chase a query failure.
Add the class node
Drag out from the Start node
Click and drag from the small handle on the right edge of the Start node, then release on empty canvas. When you let go, an Add Node menu appears where you dropped.
Pick "Class Query"
From a Start node, the only valid next step is Class Query — it's the node type that asks APIC for objects of a specific ACI class. Click it.
Find fvTenant in the Class Browser
Selecting Class Query opens the Class Browser — a searchable tree of every ACI class in the MIM graph you loaded earlier. The left side is the tree and search; the right side shows the details of whatever class you hover or select.
Type fvTenant into the search box. The class appears near the top; click it. The detail panel on the right shows its properties — name, descr, dn, modTs, and others — plus a summary of what fvTenant can contain (bridge domains, EPGs, contracts, and so on).
Click Confirm. The new fvTenant node lands on the canvas and the edge from Start is drawn automatically.
Add the Output node
Every runnable query needs an Output node. It's the terminator that tells Fabrik the graph is complete and defines how results come back.
Drag from fvTenant
Drag from the right-side handle of the fvTenant node and release.
Choose Output from the menu
The Add Node menu now lists several options — Child Class, Filter, Post-Processor, Output. Pick Output.
Leave the defaults alone
The Output node has settings for Time Machine tracking, pagination, and validation — all covered later in the Query Builder section. For a first query, defaults are exactly right.
Your canvas now reads: Start → fvTenant → Output. Three nodes, two edges, runnable.
Run it
Click the Run button at the top-right of the canvas. It's the lightning-bolt button — or if your query ever has runtime variables, it turns into Configure & Run and prompts for values first. Neither applies to this query.
While it's running:
- The button becomes Cancel. Clicking it aborts the query cleanly.
- A progress indicator ticks in the toolbar. Status updates stream over a WebSocket, so you see real progress rather than a spinner that pretends.
- Under the hood: Fabrik compiles your graph into an APIC REST path (for this query,
/api/node/class/fvTenant.json), validates it against the MIM, sends it through the saved connection with the stored credentials, and decodes the response.
Read the results
The right panel opens with the result set. You'll see your tenants as rows — common for sure, plus any user-created tenants on the fabric — and their properties as columns.
Use the view switcher in the panel header to flip between:
- Table — spreadsheet-style, sortable columns, good for scanning many rows.
- JSON — the raw APIC response as returned, useful when you need to see nested attributes verbatim.
- Chart — available when the result set has numeric columns worth plotting.
What just happened
The workflow you just ran touched every major layer of Fabrik:
- The frontend turned your visual graph into a concrete APIC query path.
- The backend validated that path against the Neo4j MIM —
fvTenantis a real class, the graph is well-formed, the Output is present. - The APIC client used the encrypted credentials to authenticate, executed the query, and decoded the JSON response.
- The result came back through the post-processor pipeline (no processors yet, so it passed through untouched) and rendered inline.
No YAML, no curl, no token juggling — and every step is audited.
Save it
You'll want to run this again. Open the three-dot menu in the canvas toolbar and pick Save Query. Name it something like "All tenants" and save.
Saved queries appear in the Library (sidebar). From there you can re-run them with one click, share them with teammates, schedule them to run on a cadence, snapshot them for drift detection with Time Machine, or feed them into AWX validation rules.
Where to go next
Query Builder
The full module — filters, post-processors, pipelines, child classes, connection rules.
Class Browser
How to find any ACI class fast, and how to read what the MIM tells you about it.
Scheduled queries
Run a saved query automatically on a cadence and ship the results to a notification channel.
Time Machine
Turn a saved query into a drift detector — capture snapshots and compare them over time.
Troubleshooting
Things that can go wrong on a first run, and what they usually mean:
- The Run button is disabled. The canvas has only the Start node, or your graph has no Output node. Add a class and an Output.
- "No APIC connection selected". Amber banner on the Start node — click Select APIC and pick one.
- Execution fails with 401 Unauthorized. The credentials worked during setup but APIC has since rotated them, or the account is locked. Open Settings → APIC Connections, hit Test, and fix from there.
- Empty result set. The query ran successfully but APIC returned zero rows. For
fvTenantthat means a brand-new fabric with only the hiddencommontenant, or your service account can't read any tenants. Widen the APIC role and try again. - "MIM class not found". The MIM loaded in Fabrik doesn't include the class you picked — usually a version mismatch between the MIM and the APIC release. Install a matching MIM (or a compatibility-declared one) from Settings → MIM Management.
- Query runs, then times out. Large classes on large fabrics return a lot of JSON. Raise the timeout on the APIC connection, or narrow the query with a filter — covered in the Query Builder section.
That's Getting Started done. From here, pick the module you care about most and dig in — the docs are organised so each section stands on its own.