API URL templates
URI templates: expansion, encoding and destination boundaries
A template is a data-to-text contract. Choose the operator for the URI component you intend to construct, then review the generated destination in its real application.
Content updated: · Maintainer and corrections
Operators decide separators and escaping
Simple expansion, reserved expansion, path segments and query expansion are different operations. A value such as a/b may be encoded as one value or retain a delimiter depending on the operator. Do not replace the whole algorithm with encodeURIComponent or concatenate unescaped query strings.
Level 4 adds prefix and explode modifiers for supported value shapes. Undefined variables, empty strings and empty lists are not interchangeable. Read the tool's explicit input contract and expression diagnostics; JSON objects here supply variables, not executable code.
Expanded text is not a trusted endpoint
The tester copies generated text without opening or requesting it. A syntactically expandable template can still construct an unintended scheme, host, path or query. Applications must separately restrict destinations, validate permissions and use the correct HTTP method.
Do not put credentials or personal data in a demonstration URL. Copying or sharing the result exposes its components even when expansion happened locally. No input is added to this tool's URL, saved in browser storage or submitted as an analytics value.
/items{/id}{?fields*}
{"id":"a/b","fields":["name","price"]}Data provenance