add get_templates method in api