startMining and stopMining API