code: func (hs *HTTPServer) RestoreDashboardVersion(c *m.ReqContext, apiCmd dtos.RestoreDashboardVersionCommand) Response {
  	dash, rsp := getDashboardHelper(c.OrgId, "", c.ParamsInt64(":dashboardId"), "")
  	if rsp != nil {
  		return rsp
  	}
  
  	guardian := guardian.New(dash.Id, c.OrgId, c.SignedInUser)
  	if canSave, err := guardian.CanSave(); err != nil || !canSave {
  		return dashboardGuardianResponse(err)
  	}
  
  	versionQuery := m.GetDashboardVersionQuery{DashboardId: dash.Id, Version: apiCmd.Version, OrgId: c.OrgId}
  	if err := bus.Dispatch(&versionQuery); err != nil {
  		return Error(404, "Dashboard version not found", nil)
  	}
  
  	version := versionQuery.Result
  
  	saveCmd := m.SaveDashboardCommand{}
  	saveCmd.RestoredFrom = version.Version
  	saveCmd.OrgId = c.OrgId
  	saveCmd.UserId = c.UserId
  	saveCmd.Dashboard = version.Data
  	saveCmd.Dashboard.Set("version", dash.Version)
  	saveCmd.Dashboard.Set("uid", dash.Uid)
  	saveCmd.Message = fmt.Sprintf("Restored from version %d", version.Version)
  	saveCmd.FolderId = dash.FolderId
  
  	return hs.PostDashboard(c, saveCmd)
  }
docs: // RestoreDashboardVersion restores a dashboard to the given version.