Allow TENT_ENTITY to be different from api root

fixes #119