Grafana does not support this any more.
If you want to build dashboards programmatically we recommend doing that in a tool outside Grafana. Then you can use a tool like https://github.com/utkarshcmu/wizzy to import them (or do that manully using the HTTP api)