Dataczar
Browse helpers

Replace [[tokens]] inside a template using JSON data.

Performs a lightweight token replacement on templates that use double square brackets (e.g., [[name]]). Replacements can be specified inline, via JSON, or by URL. Nested keys can be referenced with dot notation (e.g., [[user.name]]).

GETPOST/templates/bracket/replace

Parameters

Query Parameters

NameTypeDescription
templatestringInline template string that contains [[tokens]].
template_urlstringHTTPS URL pointing to the template contents.
template_base64stringBase64 encoded template text (UTF-8).
replacementsstringJSON object as a string containing replacement values.
replacements_urlstringHTTPS URL returning a JSON object of replacements.
strictbooleanWhen true, missing replacements raise an error instead of leaving tokens untouched.
dryrunbooleanIf 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": "Hello Jamie!",
    "length": 12
  },
  "meta": {
    "service": "tmpl/bracket-replace",
    "dryrun": false,
    "request_id": "req_123"
  }
}

Examples

Request

"GET /tmpl/bracket/replace?template=Welcome%20[[name]]&replacements=%7B%22name%22%3A%20%22Jamie%22%7D&ak=demo"

Response

{
  "ok": true,
  "data": {
    "rendered": "Welcome Jamie",
    "length": 13
  },
  "meta": {
    "dryrun": false
  }
}

Test Contracts

[
  {
    "name": "basic_bracket",
    "method": "POST",
    "body": {
      "template": "ID:[[user.id]]",
      "replacements": {
        "user": {
          "id": 42
        }
      }
    },
    "expect": {
      "rendered": "ID:42"
    }
  }
]

File uploads (multipart form-data)

Attach PDFs or images as multipart fields. We'll fill in the field names for you.

Files
file

Query parameters

Equivalent curl

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.