Skip to Content

Deploy a template

Preview. Build a container image into a template of the API key's workspace. A new name makes a template, and a name that exists gets a new version. The answer comes at once: the build takes from seconds to minutes, and the last ready version serves meanwhile. The credential of the registry goes to the build only.

POST
/templates

Authorization

headerAuthorizationBearer <token>

Your Munito API key.

Request Body

application/json
  1. body

Deploy a container image as a template. A new name makes a template; a known name gets a new version.

name*string

A DNS label, unique in the workspace, that no built-in template has. A name that exists gets a new version, and its last ready version serves until the new one is ready.

image*string

An image name with a tag or a digest, such as python:3.12-slim or ghcr.io/acme/agent:1.4. A name with no registry is on Docker Hub. The image is for linux/amd64, and its files take at most 9 GiB.

registry_auth?|

The credential of a private registry. The build uses it once, and no answer returns it.

Response Body

The template, with its new build. Read it until the build is ready or failed.

application/json
  1. response
id*string
object?string
Default"template"
name*string
status*TemplateStatus

building until a version is ready, then ready. failed when no version ever built. A failed new version leaves a ready template ready.

Value in"building""ready""failed"
version?|

The version that new sandboxes start from, or null before one is ready.

image?|

The image of that version.

digest?|

The digest of that version's manifest.

size_bytes?|

The bytes of the files of that version.

build*

The newest version, which can still build.

created_at*integer

Unix seconds.

updated_at*integer

Unix seconds.

curl -X POST 'https://api.munito.ai/sandboxes/v1/templates' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "image": "string"
}'
Example Response
{
  "id": "string",
  "object": "template",
  "name": "string",
  "status": "building",
  "version": 0,
  "image": "string",
  "digest": "string",
  "size_bytes": 0,
  "build": {
    "version": 0,
    "image": "string",
    "status": "building",
    "digest": "string",
    "error": {
      "code": "string",
      "message": "string"
    },
    "log": "",
    "started_at": 0,
    "ended_at": 0
  },
  "created_at": 0,
  "updated_at": 0
}