Remove every unused version of an organization template
Remove every unused version of this template in one call.
- A version is unused when no tag points at it and no sandbox records it. A paused sandbox and a fork both count.
- The state of a version is not a test: an unused active version goes the same way as an unused archived one.
- Send
dry_run: trueto read back what a prune would remove, and remove nothing. - A prune frees no storage on its own. The images are reclaimed later, once no version and no sandbox references them.
Requires the organization admin or owner role.
Authorization
apiKey API key starting with tektona_. Create one at app-dev.tektona.ai under API Keys.
In: header
Path Parameters
Organization name
Template name
length <= 80Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Report what a prune would remove and remove nothing. False by default.
Response Body
application/json
application/problem+json
curl -X PUT "https://example.com/v1/orgs/string/templates/string/versions/prune" \ -H "Content-Type: application/json" \ -d '{}'{ "dry_run": true, "kept_in_use": 3, "kept_tagged": 2, "removed": [ "01K2S8VVQ9F3M6WQ2S0S2Z9J4R" ]}{ "detail": "Property foo is required but is missing.", "errors": [ { "location": "string", "message": "string", "value": null } ], "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"}List a system template's versions GET
List the template's versions, newest first. `tagged=false` finds a version published without moving a tag. Every version names the tags that resolve to it and the build that published it, so a caller needs neither list beside this one. `q` matches the start of a version id, or a word in the base image reference. Send `q` with every page of a filtered list: the cursor carries the position, not the filter. Requires no role: the catalogue belongs to the platform, and every caller reads it.
Remove every unused version of a project template PUT
Remove every unused version of this template in one call. - A version is unused when no tag points at it and no sandbox records it. A paused sandbox and a fork both count. - The state of a version is not a test: an unused active version goes the same way as an unused archived one. - Send `dry_run: true` to read back what a prune would remove, and remove nothing. - A prune frees no storage on its own. The images are reclaimed later, once no version and no sandbox references them. Requires the project admin role.