Zabbix API for Non-Programmers

A Spreadsheet Workbench Approach

The Zabbix API is powerful. The usual on-ramp is not:

read API docs → write Python → debug auth → debug JSON →
discover limit defaults → rewrite for the next ticket

If you are comfortable in Excel but not in requests sessions, you still deserve access to that power. ZbxWizz exposes the same JSON-RPC methods (host.get, host.update, item.get, …) through a spreadsheet UI: you write params templates, not full client libraries.

ZbxWizz spreadsheet workbench


What “using the API” actually means

Every Zabbix API call is roughly:

Piece Example
Method host.get, host.update, host.create
Params Filters, output, selectTags, field payloads
Auth API token (Bearer)

ZbxWizz fills method + auth from the dialog (resource, operation, connection). You only edit the params JSON — and you can inject the current row with ${flds…} / ${cols[…]}.

You are still speaking the official API. There is no proprietary dialect.


The four verbs you’ll use

Action Menu API shape Purpose
Import from Zabbix Data → Import → From Zabbix {resource}.get Fill a sheet from scratch
Pull Zabbix → Pull {resource}.get per row Enrich selected rows
Transform Column menu JavaScript expression Reshape cells before write
Push Zabbix → Push {resource}.create/update/delete Write back

Optional: Import CSV / Excel / JavaScript when the source of truth is not Zabbix yet.

Empty sheet — four import entry points


Step 0 — Connect once

Zabbix connection settings

Setting Guidance
API URL Relative api_jsonrpc.php when hosted next to the Zabbix UI; otherwise full URL
Token Users → API tokens — least privilege you can live with
Query mode Sequential for writes; Parallel/Hybrid for heavy reads

Security angle that matters for non-dev teams: the app is client-side. Workbook data and tokens stay in the browser (IndexedDB / localStorage). Network traffic is only your API calls — no SaaS middleman.


Lesson 1 — Read: Import hosts

Data → Import → From Zabbix · Resource host:

{
  "limit": 50,
  "selectTags": ["tag", "value"],
  "selectInterfaces": ["ip", "dns", "type", "main"]
}

Import from Zabbix request editor

Tips that save hours:

Export anytime: Data → Export → CSV or Excel.


Lesson 2 — Reshape: Transform without a script file

Column menu → Transform. Expressions are small JavaScript snippets with helpers:

Helper / value Meaning
flds.name Cell by column name
self Current cell
obj(...) Parse JSON string
json(...) Stringify for storage / Push
data.csv Original imported object for the row
formatUnix(self) Human-readable clocks

Example — build a readable label:

flds.host + " · " + flds.ip

Transform column with live evaluation preview

The preview evaluates on a sample row before you Apply. That feedback loop is what most “API for beginners” tutorials are missing.


Lesson 3 — Write: Push with a preview

Zabbix → Push · host · update:

{
  "hostid": "${flds.hostid}",
  "name": "${flds.name}"
}

Push dialog with templated host.update

Rules of thumb:

  1. Select one row until the preview looks right
  2. Strings stay quoted in the template: "${flds.hostid}"
  3. JSON cells are injected bare: ${cols[3]}
  4. Confirm the destructive-operation warning deliberately
  5. Prefer Sequential mode on production

Delete is available too — treat it like production SQL.


Lesson 4 — Enrich: Pull related objects

You have hosts. You need their items.

  1. Import hosts with hostid
  2. Select rows
  3. Zabbix → Pull · Resource item · Label items
{
  "hostids": ["${flds.hostid}"],
  "output": ["itemid", "name", "key_"],
  "limit": 500
}

Each row gets data.items. Transform a count column:

data.items ? String(data.items.length) : "0"

Same pattern works for triggers, interfaces, discovery rules — any .get that keys off the current row.


Lesson 5 — When data isn’t in Zabbix yet

CSV / Excel — classic onboarding path (full tutorial).

Import from JavaScript — generate or reshape rows ad hoc:

return Array.from({length: 10}, (_, i) => ({
  hostid: String(10000 + i),
  name: "test-host-" + i,
  status: "0"
}));

Import from JavaScript dialog

Useful for demos, load tests, or glue between systems when you can sketch an array of objects.


How this compares to “real” programming

Concern Python / Go script ZbxWizz
Auth & HTTP You write it Built-in
Bulk fan-out Loops / async Parallel / Sequential / Hybrid
Review before write Logs / dry-run you invent Table + preview
Sharing with teammates Repo + venv File → Save workbook / Export CSV
Complex orchestration Better in code Script editor exists for ad-hoc cases
Versioned IaC Ansible / Terraform win Use those for desired-state; use ZbxWizz for cleanup & campaigns

You do not have to choose forever. Many teams: Terraform for baselines, ZbxWizz for migrations and audits.


A 15-minute practice path

  1. Connect to a lab Zabbix
  2. Import 5 hosts with tags
  3. Transform tags to append zbxwizz=was-here
  4. Push host.update on one host
  5. Confirm in the Zabbix UI
  6. File → Save the workbook so you can reload the campaign later

Deeper tag/group campaigns: Mass Update Host Tags and Groups.


Get started

If a particular API method feels awkward in the UI, open an issue or mail support@zbxwizz.app — those friction points are exactly how the workbench improves.

— Sergiu, Creator of ZbxWizz

← Back to blog