Get logs by workspace agent
GET
CoderSessionTokenheader
Coder-Session-Token<token>workspaceagent*stringWorkspace agent ID
Format
uuidbefore?integerBefore log id
after?integerAfter log id
follow?booleanFollow log stream
no_compression?booleanDisable compression for WebSocket connection
format?stringLog output format. Accepted: 'json' (default), 'text' (plain text with RFC3339 timestamps and ANSI colors). Not supported with follow=true.
Value in
"json""text"OK
application/json- response
[index: integer]?The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.
curl -X GET \ "$CODER_URL/api/v2/workspaceagents/{workspaceagent}/logs" \ -H "Coder-Session-Token: $CODER_SESSION_TOKEN"Example Response200
[ { "created_at": "2019-08-24T14:15:22Z", "id": 0, "level": "trace", "output": "string", "source_id": "ae50a35c-df42-4eff-ba26-f8bc28d2af81" }]