Rewrite the 2.0 api servlet.
Also separate out the v1 API servlet.