Move endpoints returning JSON into an Api namespace.