added support for namespaced API endpoints