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.
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}}')