PHP code example of saschahemleb / php-grafana-api-client

1. Go to this page and download the library: Download saschahemleb/php-grafana-api-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

saschahemleb / php-grafana-api-client example snippets


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
bash
$ composer