There’s no way to know the classNameId from outside of the portal.
Option 1: offer /caches/get-class-name-id?className=com.liferay.portlet.blogs.BlogsEntry
Option 2: offer a specific syntax for className->classNameId transformation
Option 3: automatically accept className where classNameId is asked, but only when no other method matches
Security issue: should only already built classNameIds be returned? (to not pollute the db)