Dynamic dashboards in Grafana

Hello experts,

In my use case, I want to create dynamic dashboards, i.e I want a code that can take inputs as which panel to create, x and y axes, dimensions, etc, and it can provide me a JSON object which I can directly load in Grafana. Is there anything like this already built or do I have to make it from the scratch?

Regards,
Aditya Garg