Retire a template
Retire a template you published, so it stops resolving and stops counting against your ceiling.
WITH version this retires that one version. WITHOUT it, this retires EVERY version of the name — which is what “retire this template” means, and is deliberately not the read route’s “the newest”: a delete that quietly took the latest one would let a script walk backwards through a history it never asked about.
COMPUTERS ARE NOT AFFECTED. A computer is built from the IMAGE the ref resolved to and holds no reference to the document, so anything already running, stopped or suspended is untouched, before and after. What a retire breaks is resolution: a NEW create naming the ref is refused.
THE REF IS STILL SPOKEN FOR, AND STILL COUNTS ONCE. Retiring frees the row the templates ceiling counts; it does not free the name, and it does not reduce refs_claimed — the much larger ceiling on refs an account may ever claim. Publishing namespace/name@version again after retiring it is a 409, identical bytes included — a ref that resolves, then does not, then does again is worse than either. Publish the next version instead.
A ref that was never yours is a 403, including system. One you already retired is a 404 that says when it went. An API key confined to a workspace is a 403 whatever it names: retiring is for an account-wide key.
OMITTING version AND SENDING IT EMPTY ARE DIFFERENT. ?version= — which is what most clients send for an unset optional string — is a 400, not a request to retire the whole name. So is any value that is not a MAJOR.MINOR.PATCH. Leaving the parameter off the URL entirely is the only way to ask for every version.
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 the parameter entirely to retire every version of this name; sending it empty or malformed is a 400.
Response
What went, what is left of the name, and how many templates the account now holds.
Changes
No recorded changes to this operation across all 1 revision of this API.