Initial implementation of public dashboards api

Have tried to refactor along those lines but I think I'm actually finding it easier to reason about the current situation... It is late in the day though...

Going to make a small change that should make this clearer however.