Render Mustache templates using inline text, URLs, or base64.
Accepts a Mustache template and JSON data payload, renders the final output, and returns the rendered string. Supports GET-first usage as well as POST with structured JSON. Drop this helper wherever you want to render Mustache templates using inline text, URLs, or base64 with a single HTTP call. Send the documented inputs and the API streams back polished results you can hand directly to your users.
/templates/mustache/renderParameters
Query Parameters
| Name | Type | Description |
|---|---|---|
| template | string | Inline Mustache template string. |
| template_url | string | HTTPS URL pointing to the template contents. |
| template_base64 | string | Base64 encoded template text (UTF-8). |
| data | string | JSON object as a string containing replacements. |
| data_url | string | HTTPS URL returning a JSON object for replacements. |
| partials | string | JSON object mapping partial names to template strings. |
| partials_url | string | HTTPS URL returning JSON partials. |
| dryrun | boolean | If present (and not explicitly false), renders in preview mode. |
All helper calls accept your Dataczar key via the ak query parameter. Need one? Create or copy a key on Dataczar Connect and drop it into each request.
Responses
Status 200
Template rendered successfully.
{
"ok": true,
"data": {
"rendered": "<h1>Hello Jamie</h1>",
"length": 19
},
"meta": {
"service": "tmpl/mustache-render",
"dryrun": false,
"request_id": "req_123"
}
}Examples
Request
"GET /tmpl/mustache/render?template=%3Ch1%3E{{title}}%3C/h1%3E&data=%7B%22title%22%3A%22Hi%22%7D&ak=demo"Response
{
"ok": true,
"data": {
"rendered": "<h1>Hi</h1>",
"length": 10
},
"meta": {
"dryrun": false
}
}Request
"POST /tmpl/mustache/render"Body
{
"template": "<p>{{greeting}}, {{name}}!</p>",
"data": {
"greeting": "Hello",
"name": "Jamie"
},
"dryrun": true
}Response
{
"ok": true,
"data": {
"rendered": "<p>Hello, Jamie!</p>",
"length": 18
},
"meta": {
"dryrun": true
}
}Test Contracts
[
{
"name": "basic_render",
"method": "POST",
"body": {
"template": "{{title}} world",
"data": {
"title": "Hello"
}
},
"expect": {
"rendered": "Hello world"
}
}
]Grab your Dataczar API key
Every helper runs with the same simple API key. Sign in (or create a free Dataczar account) at Dataczar Connect to issue keys in seconds, then drop the key into any `ak=` parameter and start shipping.
Tip: reuse the same key across these helpers, or rotate keys per project from the Connect dashboard.