feat(coderd): add workspace timings endpoint (#14648)

This commit is contained in:
Bruno Quaresma
2024-09-16 16:31:05 -03:00
committed by GitHub
parent c330af0e4d
commit 705b9ccda8
19 changed files with 640 additions and 2 deletions

75
coderd/apidoc/docs.go generated
View File

@ -8288,6 +8288,41 @@ const docTemplate = `{
}
}
},
"/workspaces/{workspace}/timings": {
"get": {
"security": [
{
"CoderSessionToken": []
}
],
"produces": [
"application/json"
],
"tags": [
"Workspaces"
],
"summary": "Get workspace timings by ID",
"operationId": "get-workspace-timings-by-id",
"parameters": [
{
"type": "string",
"format": "uuid",
"description": "Workspace ID",
"name": "workspace",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/codersdk.WorkspaceTimings"
}
}
}
}
},
"/workspaces/{workspace}/ttl": {
"put": {
"security": [
@ -11697,6 +11732,35 @@ const docTemplate = `{
"ProvisionerStorageMethodFile"
]
},
"codersdk.ProvisionerTiming": {
"type": "object",
"properties": {
"action": {
"type": "string"
},
"ended_at": {
"type": "string",
"format": "date-time"
},
"job_id": {
"type": "string",
"format": "uuid"
},
"resource": {
"type": "string"
},
"source": {
"type": "string"
},
"stage": {
"type": "string"
},
"started_at": {
"type": "string",
"format": "date-time"
}
}
},
"codersdk.ProxyHealthReport": {
"type": "object",
"properties": {
@ -14520,6 +14584,17 @@ const docTemplate = `{
"WorkspaceStatusDeleted"
]
},
"codersdk.WorkspaceTimings": {
"type": "object",
"properties": {
"provisioner_timings": {
"type": "array",
"items": {
"$ref": "#/definitions/codersdk.ProvisionerTiming"
}
}
}
},
"codersdk.WorkspaceTransition": {
"type": "string",
"enum": [