How to set up the dashboard default range by JSON

Hi guys,
I have one data source with MySQL right now and multiple databases, let’s say 10 different databases.
Meanwhile I have some scripts to switch among these data sources and update the connections between the data sources and Grafana. So far, they are working well, but I am sticking at this point.
My question is that is there a way to change the dashboard time range by using JSON format instead of clicking the tab or bar on the page?
My databases store only a time range of data and they are different, so I would like the users to view the specific range with data as soon as they open the page.
For now, it says “ data points outside time range” and has to manually change it.