ln.templates/ln.templates.service/api.REST.md

1.1 KiB

REST Endpoints

The TemplateService binds by default to localhost:9980 and uses HTTP

GET /templates

Retrieve JSON list of all templates available

GET /templates/

Retrieve source of template identified by which must end in .html

POST /templates/

Create or update template identified by which must end in .html POST content-type must be either text/html or application/json. If text/html is posted, the template source is saved. If application/json is posted, the template meta data object is to be saved.

GET, POST /render/

Renders the template identified by which must end in .html to HTML Optional JSON object may be posted to be used as globals for this rendering.

GET, POST /pdf/

Renders the template identified by which must end in .html to PDF Optional JSON object may be posted to be used as globals for this rendering.