move /metadata REST calls outside of the old service