- Implement query optimization (reduced output, parameter skipping) to minimize Zabbix API traffic. - Add indirect dependency handling: deviceType implies tags and state implies items. - Move schema extensions to samples/extensions/ to clarify their role as samples. - Enhance DistanceTrackerDevice with String time fields to support optional date portions. - Ensure allDevices strictly filters by deviceType and populates the field in results. - Refactor runAllRegressionTests mutation to use internal unique names and improve stability. - Fix unnecessary Zabbix API calls for item preprocessing during template and host imports. - Update documentation including cookbook recipes, test specifications, and optimization guides. - Add extensive unit, integration, and regression tests covering all implemented changes. - Update docker-compose.yml to mount the samples/ directory as a volume. - Update IntelliJ .idea run configurations to reflect the new sample extension paths.
2 KiB
2 KiB
Sample Queries & Mutations
This directory contains practical examples of GraphQL operations for the Zabbix GraphQL API. You can use these as templates for your own automation or integration tasks.
📁 Available Samples
🖥️ Hosts
- Query All Hosts: Retrieve basic host information and inventory.
- Import Hosts: Create or update multiple hosts with tags and group assignments.
- Query All Devices: Query specialized devices using the
allDevicesquery. - Distance Tracker Test Query: Comprehensive query for testing specialized
DistanceTrackerDevicetypes.
📄 Templates
- Query Templates: List available templates and their items.
- Import Templates: Create or update complex templates with item definitions and preprocessing.
- Import Distance Tracker Template: Example of importing a template for a schema extension.
- Delete Templates: Remove templates by ID or name pattern.
📂 Template Groups
- Import Host Template Groups: Create groups specifically for host templates.
- Import Permissions Template Groups: Create groups for the permission system.
- Delete Template Groups: Remove template groups by ID or name pattern.
🔐 User Rights
- Export User Rights: Export existing user roles and groups for auditing or migration.
- Import User Rights: Provision user roles and group permissions at scale.
🍳 Related Recipes
For step-by-step guides on how to use these operations in common scenarios, see the Cookbook.