Skip to main content

Rebuild

Queue a new build for an existing template, e.g. after a failed build, or to pick up an updated base image.
Rebuild is idempotent: if an in-flight build already exists with the same configuration, you get back the existing build instead of a duplicate. To wait for the new build to finish, poll it by the ID that rebuild() returns. Continuing from the build above:
rebuild() does not update latestBuildId / latest_build_id. On a template returned by Template.create, waitUntilReady() / wait_until_ready() and streamBuildLogs() / stream_build_logs() keep following the first build. A template returned by Template.connect has no latestBuildId, so they follow the most recent build. Polling getBuild() / get_build() with the ID that rebuild() returns works in both cases.

List and inspect builds

Cancel an in-flight build

cancelBuild is a no-op for builds already in a terminal state.

Delete a template

Both calls are idempotent on 404. If any non-destroyed sandbox still references the template, the call raises ConflictError; destroy those sandboxes first. Once the delete succeeds the template’s name is released for reuse — you can immediately create a new template with the same name.