Summary
- RFC 6570, March 2012, defines URI Templates: "URI Templates are similar to a macro language with a fixed set of macro definitions", where "the expression type determines the expansion process".
- Templates may be absolute or relative, are expanded before resolution, and may carry the wider character set of IRIs, so "a URI Template is also an IRI template".
- The operators are where it gets interesting:
{?query,number}expands with?on the first substitution and&on later ones, and "follows the same pattern as form-style interfaces on the World Wide Web".
The brace everyone was already writing
Every API document ever written contains a small act of faith: /users/{id}. The braces mean "put something here". They have meant that, informally, since the first person typed them, and they have meant something slightly different in every document since.
One team's {id} was a path segment. Another's was a query parameter. A third quietly allowed a slash inside it and found out, in production, that the router disagreed.
RFC 6570's work is to take that shared habit and give it one reading, including the awkward cases everyone had been settling by vibes: undefined variables, reserved characters, and the difference between a path segment and a query parameter.
Operators instead of prose
Rather than one variable syntax, the document defines operators that say how a value is attached: plain expansion, reserved expansion, path segment, label, path-style and form-style parameters.
That table is not invented. It is the internet's existing conventions — path segments, semicolon parameters, ? and & — written as a grammar so both ends can produce identical strings. The specification did not add capability. It removed the need for two programmers to guess the same way.
Why this is a contract between strangers
A client expands a template it received; a server parses the result. Neither knows the other's code, so the template becomes the only shared object, and any disagreement about escaping produces a resource that does not exist.
That is why the specification spends most of its length on percent-encoding rules: the important part is not the substitution but the characters around it. A space, a slash, a question mark — the small stuff is where the contract is either kept or quietly broken.
Levels and their honesty
The spec defines levels of increasing expressiveness, so an implementation can claim a level instead of being quietly wrong about the exotic operators.
Levels are a way of publishing partial support, which is more useful than claiming full support and failing on ;/. A level is a promise with a number attached. "We support URI Templates" is a rumour with a marketing budget.
What it does not decide
A template says how to build a name, not what it means. Two templates can produce the same string for different resources, and a server can document a template that it no longer honours.
Nothing in the notation tells a client whether the resource exists, which is the same gap that any identifier has. The grammar guarantees agreement on spelling. It guarantees nothing about truth.
The lesson about naming schemes
A naming scheme that lives only in documentation is a rumour; written as a notation, it becomes something a program can follow.
The general lesson: when the same convention appears in a hundred documents with small differences, write the convention down with its operators, because shared spelling is the cheapest interoperability there is. RFC 6570 did not invent a language. It noticed that everyone was already speaking one, and wrote down the grammar before the dialects got expensive.
Member Briefing
Read the full trend briefing
Members read the full briefing with the source notes behind every finding.
Strategic Circle
A daily briefing in your language, built from changes we have verified.
Join for USD 20/monthCancel anytime.
Members also get the full research library, a daily briefing on the networks they follow and the private forum.






