update controller route handler arguments API

They now take 'ctx' and 'api' as arguments, for ease of use.
Add inspect to CTX and API