refactors api router for dev mode only methods