saschahemleb / php-grafana-api-client
Grafana API client written in PHP
Installs: 4 287
Dependents: 1
Suggesters: 0
Security: 0
Stars: 5
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: ^8.0
- laminas/laminas-hydrator: ^4.3
- php-http/client-common: ^2.4
- php-http/discovery: ^1.14
- psr/http-client-implementation: ^1.0
Requires (Dev)
- guzzlehttp/guzzle: ^7.4
- phpunit/phpunit: ^9.5
- spatie/docker: ^1.7
This package is auto-updated.
Last update: 2025-02-20 10:49:27 UTC
README
A client for the Grafana API, written in PHP.
Project Status
This project is still in an alpha state; not all API endpoints are implemented yet, and the public package API is subject to major changes.
Installation
Via Composer
$ composer require saschahemleb/php-grafana-api-client
Framework Integration
I've written a bridge package for Laravel, providing a facade and a connection manager for controlling multiple grafana instances. You can find it here.
Example
use Saschahemleb\PhpGrafanaApiClient\Client; use Saschahemleb\PhpGrafanaApiClient\Authentication; $client = Client::create( new Uri('http://localhost:3000/'), // url to grafana Authentication::basicAuth('admin', 'admin') ); echo $client->other()->health()->getVersion(); // 8.3.6