rest api with swig template renderer