HTTP API to edit query panel

Hi,

We are developing time series graphs for three types of data for a user namely usage, peak and average data metrics.

each data metric has two columns namely datetime and value. we need to edit three query panels for the column inputs and data limit which is making user interface more complicated.

We want to configure query panel editing through http Api’s so that user need not to know the input configurations.

Thanks,
Rammohan

Welcome @rammohanbasavaraju to the Grafana forum.

Once your panels / graphs are configured, you can restrict certain users from editing them via the user permissions (i.e. read only). They will only need to use the time picker (if they choose).

The HTTP API choices are explained further here.

Thanks Grant!

I am using MySQL data source and producing graphs for each table.
so whenever I choose new table, I need to configure columns and data limit every time. this is making user experience little complicated.

is there any way i can fix columns and data limit even when we shift to different tables?

please provide DDL and DML for each table as sample.
Also when you say “whenever I choose new table” how are you choosing a new table? Is it a drop down?

Please find the sample DDL and DML commands.

DDL Commands:
"CREATE TABLE IF NOT EXISTS "
"DROP TABLE IF EXISTS "
“INSERT INTO”
“UPDATE "
command += table_name +” "
command += variable_string
try:
mycursor.execute(command,val_tuple)

DML Commands:
SELECT DATE_TIME, Column1 FROM table1 LIMIT 100000 

Yes, it’s a drop down of selecting each table.

1 Like