Get a template
One template, as the document it was written as — which is the half GET /templates drops: the lineage in spec.from, the build steps, and the digest.
Works for your own namespace and for system, so you can read what you are layering onto — though note that a document with spec.build steps or spec.env may only layer onto a system template, so reading your own is for inspecting it rather than for building on it. See POST /templates. Another account’s namespace is a 404, the same answer a name that does not exist gets.
Your account’s own namespace needs an account-wide key: an API key confined to a workspace is a 403 there, because the document is the account’s and may carry its build steps and scripts. It can still read system templates.
Without version this is the newest published version of that name — which is also what a create naming the unpinned namespace/name resolves to. versions lists the rest, newest first.
A ref you have RETIRED is still a 404 — there is no document to return — but the message names the date it went rather than telling you the template never existed. Same for a name whose every version has been retired.
Requires the member role or higher.
Request
- Base URL: https://app.mandala.computer/api/v1
- URL: https://app.mandala.computer/api/v1/templates/{namespace}/{name}
- Auth: HTTP bearer
Path parameters
Your account id, or system for the templates we publish.
The template’s metadata.name — the part of the ref between the slash and the @.
Query parameters
A specific MAJOR.MINOR.PATCH. Omit it for the newest. Sending it EMPTY or malformed is a 400 rather than a silent default — the same rule DELETE applies, where it matters much more.
Response
The template.
Changes
No recorded changes to this operation across all 1 revision of this API.