How to call API from Grafana on user click on refresh button in dashboard

Hi There,

Hope you are fine.

I am new to grafana, I have Windows Service which is collecting logs and dumping them into SQL Server database table.Then using Grafana SQL datasouce I am visualizing all logs in form of graph on UI.

Here I want to trigger this windows service to gather all records when certain event occured in Grafana such user login or click on refresh button.

Help would be appreciated.

Sujay Adkar