api rest for templates