Connecting Grafana to 3CX documentation

Grafana Cloud or Grafana on-premise
Using WebAPI, Grafana makes POST requests to the 3CX database using the standard port (default is 5001). The received data in JSON format is used to display reports and dashboards.
You need to have a WebAPI & Webhook bundle license to use Grafana 3CX connection.
0
You should have an active Grafana Cloud account or have Grafana Enterprise installed
1
Add Infinity JSON Data Source, specify it's name
2
Use NoAuth in Authentication tab, because 3CX uses API Key in URL and doesn't require additional auth.
3
Specify your 3CX API URL in the URL, Headers & Params tab.
URL template: https://{3CXFQDN}/webapi/{API_KEY}/query
No additional changes needed.
Then push Save & Test button to save the data source.
4
Add Visualization panel to a dashboard
Select your Infinity data source, set Method = POST, Type = JSON, Parser = Frontend / Backend (depending on your needs), Format = Table.

Specify a POST JSON request as a body
e.g. {"query":"SELECT * FROM public.call_history_view where segment_start_time >= '${__from:date}' and segment_start_time <= '${__to:date}';",
"count":"100"
}

4
Specify a 0 - n... as a Selector fields in Parsing options & Result fields
You can specify as many fields as columns your request contains
5
For using variables add Query Type and use a similar connection scheme.
For using variable in panel use where Ext = ANY('{${Extension:raw}}')
6
Integration tutorial 3CX and Grafana BI
3CX custom reports and wallboards with Grafana BI