http-request-zabbix
A Rust client library for interacting with the Zabbix API.
Features
- Builder Pattern: Easy to configure the client (e.g., TLS verification).
- Strongly Typed Authentication: Enforces valid login states using Rust's type system to ensure requests are authenticated.
- Robust Error Handling: Uses
thiserrorto provide fine-grained, matchable errors (Network,Json,ApiError, etc.) rather than generic strings. - Flexible Parameters: Pass parameters to API requests directly as raw JSON strings or
serde_json::Value. - Version Awareness: Intelligently handles the authentication flow changes introduced in Zabbix >= 6.4 (Bearer tokens instead of body-embedded auth).
Usage
Add this to your Cargo.toml:
[]
= "0.1.0"
Example
use ;
Testing
The library uses mockito for unit testing the HTTP interactions. Run the tests with:
License
MIT