Post Workspace Usage by ID
POST
CoderSessionTokenheader
Coder-Session-Token<token>workspace*stringWorkspace ID
Format
uuidPost workspace usage request
application/json- body
agent_id?stringFormat
uuidapp_name?stringAppName is any name for the app reporting usage. The server normalizes it at ingestion, so a new app needs no server change. The UsageAppName constants are the well-known names.
No Content
The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.
curl -X POST \ "$CODER_URL/api/v2/workspaces/{workspace}/usage" \ -H "Coder-Session-Token: $CODER_SESSION_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978", "app_name": "string"}'Example Response204
Empty