How to get version of dashboard to variable?

Grafana ver. 8.4.0
I would like to know if it is possible to get a dashboard version? I know that i can get it with:
GET /api/dashboards/id/:dashboardId/versions/:version
I wanted to get this value in the Grafana itself, and then create a variable with the version and place it on the dashboard for users.