SandboxesSandbox TemplatesTemplate builds

Tail a template build's log

Server-sent events. Replays the log from the cursor, then continues live. A line frame's SSE id resumes the stream as Last-Event-ID. Comment frames keep a quiet build's connection open.

GET
/v1/template-builds/{buildId}/logs/stream

Server-sent events. Replays the log from the cursor, then continues live. A line frame's SSE id resumes the stream as Last-Event-ID. Comment frames keep a quiet build's connection open.

AuthorizationBearer <token>

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

In: header

Path Parameters

buildId*string

Build ULID

Lengthlength <= 64

Query Parameters

cursor?string

Start strictly after this position. Omit it to replay the build from its first line.

Lengthlength <= 128

Header Parameters

Last-Event-ID?string

The cursor of the last frame this client received. Set by the browser on a reconnect, and it overrides cursor.

Lengthlength <= 128

Response Body

text/event-stream

application/problem+json

curl -X GET "https://example.com/v1/template-builds/string/logs/stream"
{  "final": true,  "line": {    "at": "2019-08-24T14:15:22Z",    "attempt": 0,    "level": "debug",    "message": "string",    "step_index": 0,    "step_name": "string"  },  "step": {    "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"  }}