Template:R to API function