Skip to content
Skip to Content
Coder Docs

Get workspace build timings by ID

GET
/api/v2/workspacebuilds/{workspacebuild}/timings

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Path Parameters

workspacebuild*string

Workspace build ID

Formatuuid

Response Body

OK

application/json
  1. response
agent_connection_timings?array<>
agent_script_timings?array<>

TODO: Consolidate agent-related timing metrics into a single struct when updating the API version

provisioner_timings?array<>

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

curl -X GET \	"$CODER_URL/api/v2/workspacebuilds/{workspacebuild}/timings" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN"
Example Response200
{  "agent_connection_timings": [    {      "ended_at": "2019-08-24T14:15:22Z",      "stage": "init",      "started_at": "2019-08-24T14:15:22Z",      "workspace_agent_id": "string",      "workspace_agent_name": "string"    }  ],  "agent_script_timings": [    {      "display_name": "string",      "ended_at": "2019-08-24T14:15:22Z",      "exit_code": 0,      "stage": "init",      "started_at": "2019-08-24T14:15:22Z",      "status": "ok",      "workspace_agent_id": "string",      "workspace_agent_name": "string"    }  ],  "provisioner_timings": [    {      "action": "string",      "ended_at": "2019-08-24T14:15:22Z",      "job_id": "453bd7d7-5355-4d6d-a38e-d9e7eb218c3f",      "resource": "string",      "source": "string",      "stage": "init",      "started_at": "2019-08-24T14:15:22Z"    }  ]}