SandboxesSandbox TemplatesTemplate builds

Start a build of an organization template

Start a build. This returns at once, before the build runs. A build takes minutes. Requires the organization admin or owner role.

POST
/v1/orgs/{org}/template-builds

Start a build. This returns at once, before the build runs. A build takes minutes. Requires the organization admin or owner role.

AuthorizationBearer <token>

API key starting with tektona_. Create one at app-dev.tektona.ai under API Keys.

In: header

Path Parameters

org*string

Organization name

Header Parameters

Idempotency-Key?string

Optional retry-safety key. Send the same key to retry a submit safely: you get the build the first request started, and no second build runs. The key is scoped to the template and does not expire.

Lengthlength <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

build*
sandbox?
tag?|

The tag this build moves on success. Omit it, or send null, and the build moves no tag: the version it publishes is reached by its id. A tag cannot be shaped like a version id.

Match^[a-zA-Z0-9_][a-zA-Z0-9._-]{0,127}$
Lengthlength <= 128
template*string

Template name within this scope

Match^[a-z]([a-z0-9-]*[a-z0-9])?$
Length1 <= length <= 80

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/v1/orgs/string/template-builds" \  -H "Content-Type: application/json" \  -d '{    "build": {      "image": "string"    },    "template": "string"  }'
{  "can_cancel": true,  "cancelled_by": {    "display_name": "string",    "id": "string",    "username": "string"  },  "created_at": "2019-08-24T14:15:22Z",  "error": "string",  "finished_at": "2019-08-24T14:15:22Z",  "id": "string",  "image_ref": "string",  "project": {    "display_name": "Online Shop",    "name": "online-shop"  },  "resolved_digest": "string",  "started_at": "2019-08-24T14:15:22Z",  "status": "pending",  "steps": [    {      "attempt": 0,      "context": {        "user": "string",        "workdir": "string"      },      "exit_code": 0,      "finished_at": "2019-08-24T14:15:22Z",      "name": "string",      "started_at": "2019-08-24T14:15:22Z",      "status": "running",      "step_index": 0,      "tolerated": true,      "type": "string"    }  ],  "tags_on_success": [    "string"  ],  "template": {    "deleted": true,    "display_name": "Go Development",    "id": "string",    "name": "go-dev"  },  "version_id": "string",  "wait_reason": "string"}