Skip to content
Skip to Content
Coder Docs

Post workspace agent log source

POST
/api/v2/workspaceagents/me/log-source

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Request Body

Log source request

application/json
  1. body
display_name?string
icon?string
id?string

ID is a unique identifier for the log source. It is scoped to a workspace agent, and can be statically defined inside code to prevent duplicate sources from being created for the same agent.

Response Body

OK

application/json
  1. response
created_at?string
Formatdate-time
display_name?string
icon?string
id?string
Formatuuid
workspace_agent_id?string
Formatuuid

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

curl -X POST \	"$CODER_URL/api/v2/workspaceagents/me/log-source" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN" \	-H "Content-Type: application/json" \	-d '{  "display_name": "string",  "icon": "string",  "id": "string"}'
Example Response200
{  "created_at": "2019-08-24T14:15:22Z",  "display_name": "string",  "icon": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "workspace_agent_id": "7ad2e618-fea7-4c1a-b70a-f501566a72f1"}