The right way to Implement filters form and to make REST requests in Panel plugin

I have my REST endpoint like https://myadress/api/getList?days=5&&weeks=1
In my plugin I want to have a form with 2 inputs for days and weeks to allow users to make their choice and then make server request with this parameters and build a chart based on it.


  1. can I make these server requests in Panel plugin directly, or should it be in done outside, say in Datasource or App plugin?
  2. Can I place my form on the bottom of the Panel, where Query and Transform tabs are?

What is the right way to implement stuff like this, please?

  1. We generally recommend against making external request from the panel. Especially if you’re making authenticated requests, since panel options are stored in clear-text in the panel definition. Instead, document the schema of the response the panel expects, and let the user decide what data source to use.

  2. Not sure I know what you mean here. The Query and Transform tabs are part of the query editor, not the panel. Are you asking if you can add another tab, or are you looking to add a form to the panel itself?

Thank you for answer, Marcuso. So

  1. I should move my requests logic to datasource plugin, right?
  2. I still need a form somewhere, to allow user to set request’s parameters (like days or weeks in my example). It would be fine to have it as another tab near Query and Transform, or may be even in Query? Where custom form actually should be? I just want to have this inputs in the most correct for Grafana place, the only goal I have - to let user to define request’s parameters.
    Thank you for the help!