...
- Discuss usage of template API (Example with curl):
GET ALL TEMPLATES:
curl -k --user mifos -i -H "Accept: application/json" -H "Content-Type: application/json" https://localhost:8443/mifosng-provider/api/v1/templates?tenantIdentifier=default
POST (create) TEMPLATE:
curl -X POST -i -H "Accept: application/json" -H "Content-type: application/json" -k --user mifos -d '{"text":"<html><header><title>This is title</title></header><body>Hello {{world}}</body></html>","name":"foo","metadata":{"client":"client.url"}}' https://localhost:8443/mifosng-provider/api/v1/templates?tenantIdentifier=default
GET BY ID (insert id!):
curl -k --user mifos -i -H "Accept: application/json" -H "Content-Type: application/json" https://localhost:8443/mifosng-provider/api/v1/templates/ <ID> ?tenantIdentifier=default
GET MERGED TEMPLATE (insert id!):
curl -k --user mifos -X POST -i -H "Accept: text/html" -H "Content-type: application/json" -d '{"world":"Template"}' https://localhost:8443/mifosng-provider/api/v1/templates/ <ID> ?tenantIdentifier=default
RETURNS:
<html><header><title>This is title</title></header><body>Hello Template</body></html>
- Have a look at the code code