feat(coderd): add times_used to coder_apps in insights API (#13292)

For now, only applied to `coder_app`s, same logic can be implemented for
VS Code, SSH, etc.

Part of #13099
This commit is contained in:
Mathias Fredriksson
2024-05-16 16:53:01 +03:00
committed by GitHub
parent 63e06853eb
commit a0fce363cd
24 changed files with 346 additions and 102 deletions
+1
View File
@@ -81,6 +81,7 @@ curl -X GET http://coder-server:8080/api/v2/insights/templates?before=0&after=0
"seconds": 80500,
"slug": "vscode",
"template_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
"times_used": 2,
"type": "builtin"
}
],
+4
View File
@@ -4558,6 +4558,7 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
"seconds": 80500,
"slug": "vscode",
"template_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
"times_used": 2,
"type": "builtin"
}
```
@@ -4571,6 +4572,7 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
| `seconds` | integer | false | | |
| `slug` | string | false | | |
| `template_ids` | array of string | false | | |
| `times_used` | integer | false | | |
| `type` | [codersdk.TemplateAppsType](#codersdktemplateappstype) | false | | |
## codersdk.TemplateAppsType
@@ -4700,6 +4702,7 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
"seconds": 80500,
"slug": "vscode",
"template_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
"times_used": 2,
"type": "builtin"
}
],
@@ -4765,6 +4768,7 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
"seconds": 80500,
"slug": "vscode",
"template_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
"times_used": 2,
"type": "builtin"
}
],