add API for registering and listing namespaces