Can grafana API that get the hierarchical structure of all folders?

I have enabled the nested folders. Now I need an api to get the relationship between all folders and the dashboard, but there is no direct way to get it. Can you help me? This is very important to me.