code: func DeleteDashboardSnapshot(c *m.ReqContext) Response {
  	key := c.Params(":key")
  
  	query := &m.GetDashboardSnapshotQuery{Key: key}
  
  	err := bus.Dispatch(query)
  	if err != nil {
  		return Error(500, "Failed to get dashboard snapshot", err)
  	}
  
  	if query.Result == nil {
  		return Error(404, "Failed to get dashboard snapshot", nil)
  	}
  	dashboard := query.Result.Dashboard
  	dashboardID := dashboard.Get("id").MustInt64()
  
  	guardian := guardian.New(dashboardID, c.OrgId, c.SignedInUser)
  	canEdit, err := guardian.CanEdit()
  	if err != nil {
  		return Error(500, "Error while checking permissions for snapshot", err)
  	}
  
  	if !canEdit && query.Result.UserId != c.SignedInUser.UserId {
  		return Error(403, "Access denied to this snapshot", nil)
  	}
  
  	if query.Result.External {
  		err := deleteExternalDashboardSnapshot(query.Result.ExternalDeleteUrl)
  		if err != nil {
  			return Error(500, "Failed to delete external dashboard", err)
  		}
  	}
  
  	cmd := &m.DeleteDashboardSnapshotCommand{DeleteKey: query.Result.DeleteKey}
  
  	if err := bus.Dispatch(cmd); err != nil {
  		return Error(500, "Failed to delete dashboard snapshot", err)
  	}
  
  	return JSON(200, util.DynMap{"message": "Snapshot deleted. It might take an hour before it's cleared from any CDN caches."})
  }
docs: // DELETE /api/snapshots/:key