Save a deployment as a template
Makes a template from the deployment's apps, how it gets snapshots, the services it uses and where it runs, and records it as the deployment's origin.
better-auth.session_token<token>Better Auth session cookie. Production uses the __Secure- prefixed name.
deploymentId*stringuuidIdempotency-Key?stringMakes retries safe. A repeated key with the same request returns the first result and sets
Idempotent-Replayed: true. The same key with a different request answers 409
idempotency.key_reused, and while the first request is still running 409
idempotency.in_progress. Results are kept for 24 hours. Server errors and refusals for lack
of sign-in or permission are not kept, so a retry runs again.
^[A-Za-z0-9_.:-]+$1 <= length <= 255application/json- body
name*stringdescription?stringThe template.
application/json- response
id*stringuuidname*stringdescription*stringlatestVersion*integercontent*autoAdd*Adds a deployment of the template to every cluster whose labels hold all of these.
usedBy*integerHow many deployments came from the template.
updatedAt*stringdate-timeupdatedByName*stringcurl -X POST 'https://wardn.example.com/api/v1/deployments/497f6eca-6276-4993-bfeb-53cbbbba6f08/templates' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "description": "string", "latestVersion": 0, "content": { "apps": [ { "appId": "28c365d5-df94-4a54-8217-3ce51d068868", "follow": { "kind": "branch", "ref": "string" }, "valuesFiles": [ "string" ] } ], "services": [ { "serviceId": "8f8bb40f-b96b-40fe-9064-5031fbe483f9", "mode": "shared" } ], "settings": { "arrival": "branch", "healthWatchSeconds": 0 }, "environmentId": "19f5cc2e-7657-437a-9268-83cd3d563563", "clusterId": "a3d24843-7014-4490-bdd3-b7cb39b400c8", "namePattern": "string", "pullRequests": { "status": true, "button": true, "comment": true, "graceMinutes": 0 } }, "autoAdd": { "enabled": true, "labels": { "property1": "string", "property2": "string" } }, "usedBy": 0, "updatedAt": "2019-08-24T14:15:22Z", "updatedByName": "string"}List the deployments made from a template GET
The deployments the caller may read that came from the template, with the version each came from and whether a newer one exists.
Get the template a deployment came from GET
Which template and version the deployment came from and the latest version. A deployment made blank is not linked.