Agents

Get logs by workspace agent

Changed on
get/api/v2/workspaceagents/{workspaceagent}/logs

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v2/workspaceagents/{workspaceagent}/logs
  • Auth
    API key in header Coder-Session-Token

Path parameters

workspaceagentstring uuid required

Workspace agent ID

Query parameters

beforeinteger

Before log id

afterinteger

After log id

followboolean

Follow log stream

no_compressionboolean

Disable compression for WebSocket connection

format'json' | 'text'

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

Response

OK

created_atstring date-time
idinteger
level'trace' | 'debug' | 'info' | 'warn' | 'error'
outputstring
source_idstring uuid

Changes