t642: Expose getTemplateType as a rest service.