Skip to content
Skip to Content
Coder Docs

Get logs by template version

GET
/api/v2/templateversions/{templateversion}/logs

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Path Parameters

templateversion*string

Template version ID

Formatuuid

Query Parameters

before?integer

Before log id

after?integer

After log id

follow?boolean

Follow log stream

format?string

Log output format. Accepted: 'json' (default), 'text' (plain text with RFC3339 timestamps and ANSI colors). Not supported with follow=true.

Value in"json""text"

Response Body

OK

application/json
  1. response
[index: integer]?

The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.

curl -X GET \	"$CODER_URL/api/v2/templateversions/{templateversion}/logs" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN"
Example Response200
[  {    "created_at": "2019-08-24T14:15:22Z",    "id": 0,    "log_level": "trace",    "log_source": "provisioner_daemon",    "output": "string",    "stage": "string"  }]