Get the template schema
The JSON Schema for a mandala/v1 template document — the declarative form a template is written in. Like every route here it needs an API key, so an editor or a $ref resolver pointed at this URL with no Authorization header gets a 401. Fetch it with a key — client.templates.schema(), or curl -H "Authorization: Bearer $MANDALA_API_KEY" — save it to a file, and point your editor at that local copy for completion and validation while you write one.
The document describes what a template IS: its ref (namespace/name@version), the image family it resolves to, what it is layered onto, and the shape a computer gets when the create names no numbers. It describes how one is BUILT as well: spec.build is applied to the parent named by spec.from — apt installs, shell steps, files and directories, in the order written — and spec.env is baked into the image as a profile script, and spec.secrets names secrets a build step may read — by id, never by value. And it can give the computers created from it a default browser proxy, spec.browser_proxy — {server, bypass} under the rules of the create field of that name, which a create may override or clear with null. What it still does NOT describe is a build from nothing (every document layers over a parent; a base is built by a script outside this format) or lifecycle hooks, because nothing runs them: a field arrives here only once something executes it, which is why adding one is not a new apiVersion and a document written today keeps its meaning.
Requires the viewer role or higher.
Request
- Base URL: https://app.mandala.computer/api/v1
- URL: https://app.mandala.computer/api/v1/templates/schema
- Auth: HTTP bearer
Response
The schema, as JSON Schema 2020-12.
Changes
No recorded changes to this operation across all 1 revision of this API.