mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
feat: expose insights into user activity (#9807)
This commit is contained in:
86
coderd/apidoc/docs.go
generated
86
coderd/apidoc/docs.go
generated
@ -934,6 +934,31 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/insights/user-activity": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"CoderSessionToken": []
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Insights"
|
||||
],
|
||||
"summary": "Get insights about user activity",
|
||||
"operationId": "get-insights-about-user-activity",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/codersdk.UserActivityInsightsResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/insights/user-latency": {
|
||||
"get": {
|
||||
"security": [
|
||||
@ -10378,6 +10403,67 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.UserActivity": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"avatar_url": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
},
|
||||
"seconds": {
|
||||
"type": "integer",
|
||||
"example": 80500
|
||||
},
|
||||
"template_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
}
|
||||
},
|
||||
"user_id": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.UserActivityInsightsReport": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"end_time": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"start_time": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"template_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
}
|
||||
},
|
||||
"users": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/codersdk.UserActivity"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.UserActivityInsightsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"report": {
|
||||
"$ref": "#/definitions/codersdk.UserActivityInsightsReport"
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.UserLatency": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
82
coderd/apidoc/swagger.json
generated
82
coderd/apidoc/swagger.json
generated
@ -804,6 +804,27 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/insights/user-activity": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"CoderSessionToken": []
|
||||
}
|
||||
],
|
||||
"produces": ["application/json"],
|
||||
"tags": ["Insights"],
|
||||
"summary": "Get insights about user activity",
|
||||
"operationId": "get-insights-about-user-activity",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/codersdk.UserActivityInsightsResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/insights/user-latency": {
|
||||
"get": {
|
||||
"security": [
|
||||
@ -9392,6 +9413,67 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.UserActivity": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"avatar_url": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
},
|
||||
"seconds": {
|
||||
"type": "integer",
|
||||
"example": 80500
|
||||
},
|
||||
"template_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
}
|
||||
},
|
||||
"user_id": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.UserActivityInsightsReport": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"end_time": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"start_time": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"template_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
}
|
||||
},
|
||||
"users": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/codersdk.UserActivity"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.UserActivityInsightsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"report": {
|
||||
"$ref": "#/definitions/codersdk.UserActivityInsightsReport"
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.UserLatency": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
Reference in New Issue
Block a user