[minor] extract investigator api code from console to mig/client