@@ -983,6 +983,83 @@ const docTemplate = `{
983
983
}
984
984
}
985
985
},
986
+ "/workspaceagents/me/app-health": {
987
+ "post": {
988
+ "security": [
989
+ {
990
+ "CoderSessionToken": []
991
+ }
992
+ ],
993
+ "produces": [
994
+ "application/json"
995
+ ],
996
+ "tags": [
997
+ "Agents"
998
+ ],
999
+ "summary": "Submit workspace application health",
1000
+ "operationId": "submit-workspace-workspace-agent-health",
1001
+ "parameters": [
1002
+ {
1003
+ "description": "Application health request",
1004
+ "name": "request",
1005
+ "in": "body",
1006
+ "required": true,
1007
+ "schema": {
1008
+ "$ref": "#/definitions/codersdk.PostWorkspaceAppHealthsRequest"
1009
+ }
1010
+ }
1011
+ ],
1012
+ "responses": {
1013
+ "200": {
1014
+ "description": "OK"
1015
+ }
1016
+ }
1017
+ }
1018
+ },
1019
+ "/workspaceagents/me/gitauth": {
1020
+ "get": {
1021
+ "security": [
1022
+ {
1023
+ "CoderSessionToken": []
1024
+ }
1025
+ ],
1026
+ "consumes": [
1027
+ "application/json"
1028
+ ],
1029
+ "produces": [
1030
+ "application/json"
1031
+ ],
1032
+ "tags": [
1033
+ "Agents"
1034
+ ],
1035
+ "summary": "Get workspace agent Git auth",
1036
+ "operationId": "get-workspace-agent-git-auth",
1037
+ "parameters": [
1038
+ {
1039
+ "type": "string",
1040
+ "format": "uri",
1041
+ "description": "Git URL",
1042
+ "name": "url",
1043
+ "in": "query",
1044
+ "required": true
1045
+ },
1046
+ {
1047
+ "type": "boolean",
1048
+ "description": "Wait for a new token to be issued",
1049
+ "name": "listen",
1050
+ "in": "query"
1051
+ }
1052
+ ],
1053
+ "responses": {
1054
+ "200": {
1055
+ "description": "OK",
1056
+ "schema": {
1057
+ "$ref": "#/definitions/codersdk.WorkspaceAgentGitAuthResponse"
1058
+ }
1059
+ }
1060
+ }
1061
+ }
1062
+ },
986
1063
"/workspaceagents/me/metadata": {
987
1064
"get": {
988
1065
"security": [
@@ -1011,6 +1088,75 @@ const docTemplate = `{
1011
1088
}
1012
1089
}
1013
1090
},
1091
+ "/workspaceagents/me/report-stats": {
1092
+ "post": {
1093
+ "security": [
1094
+ {
1095
+ "CoderSessionToken": []
1096
+ }
1097
+ ],
1098
+ "produces": [
1099
+ "application/json"
1100
+ ],
1101
+ "tags": [
1102
+ "Agents"
1103
+ ],
1104
+ "summary": "Submit workspace agent stats",
1105
+ "operationId": "submit-workspace-workspace-agent-stats",
1106
+ "parameters": [
1107
+ {
1108
+ "description": "Stats request",
1109
+ "name": "request",
1110
+ "in": "body",
1111
+ "required": true,
1112
+ "schema": {
1113
+ "$ref": "#/definitions/codersdk.AgentStats"
1114
+ }
1115
+ }
1116
+ ],
1117
+ "responses": {
1118
+ "200": {
1119
+ "description": "OK",
1120
+ "schema": {
1121
+ "$ref": "#/definitions/codersdk.AgentStatsResponse"
1122
+ }
1123
+ }
1124
+ }
1125
+ }
1126
+ },
1127
+ "/workspaceagents/me/version": {
1128
+ "post": {
1129
+ "security": [
1130
+ {
1131
+ "CoderSessionToken": []
1132
+ }
1133
+ ],
1134
+ "produces": [
1135
+ "application/json"
1136
+ ],
1137
+ "tags": [
1138
+ "Agents"
1139
+ ],
1140
+ "summary": "Submit workspace agent version",
1141
+ "operationId": "submit-workspace-workspace-agent-version",
1142
+ "parameters": [
1143
+ {
1144
+ "description": "Version request",
1145
+ "name": "request",
1146
+ "in": "body",
1147
+ "required": true,
1148
+ "schema": {
1149
+ "$ref": "#/definitions/codersdk.PostWorkspaceAgentVersionRequest"
1150
+ }
1151
+ }
1152
+ ],
1153
+ "responses": {
1154
+ "200": {
1155
+ "description": "OK"
1156
+ }
1157
+ }
1158
+ }
1159
+ },
1014
1160
"/workspacebuilds/{workspacebuild}": {
1015
1161
"get": {
1016
1162
"security": [
@@ -1560,6 +1706,47 @@ const docTemplate = `{
1560
1706
}
1561
1707
}
1562
1708
},
1709
+ "codersdk.AgentStats": {
1710
+ "type": "object",
1711
+ "properties": {
1712
+ "conns_by_proto": {
1713
+ "description": "ConnsByProto is a count of connections by protocol.",
1714
+ "type": "object",
1715
+ "additionalProperties": {
1716
+ "type": "integer"
1717
+ }
1718
+ },
1719
+ "num_comms": {
1720
+ "description": "NumConns is the number of connections received by an agent.",
1721
+ "type": "integer"
1722
+ },
1723
+ "rx_bytes": {
1724
+ "description": "RxBytes is the number of received bytes.",
1725
+ "type": "integer"
1726
+ },
1727
+ "rx_packets": {
1728
+ "description": "RxPackets is the number of received packets.",
1729
+ "type": "integer"
1730
+ },
1731
+ "tx_bytes": {
1732
+ "description": "TxBytes is the number of transmitted bytes.",
1733
+ "type": "integer"
1734
+ },
1735
+ "tx_packets": {
1736
+ "description": "TxPackets is the number of transmitted bytes.",
1737
+ "type": "integer"
1738
+ }
1739
+ }
1740
+ },
1741
+ "codersdk.AgentStatsResponse": {
1742
+ "type": "object",
1743
+ "properties": {
1744
+ "report_interval": {
1745
+ "description": "ReportInterval is the duration after which the agent should send stats\nagain.",
1746
+ "type": "integer"
1747
+ }
1748
+ }
1749
+ },
1563
1750
"codersdk.AuditDiff": {
1564
1751
"type": "object",
1565
1752
"additionalProperties": {
@@ -2395,6 +2582,26 @@ const docTemplate = `{
2395
2582
}
2396
2583
}
2397
2584
},
2585
+ "codersdk.PostWorkspaceAgentVersionRequest": {
2586
+ "type": "object",
2587
+ "properties": {
2588
+ "version": {
2589
+ "type": "string"
2590
+ }
2591
+ }
2592
+ },
2593
+ "codersdk.PostWorkspaceAppHealthsRequest": {
2594
+ "type": "object",
2595
+ "properties": {
2596
+ "healths": {
2597
+ "description": "Healths is a map of the workspace app name and the health of the app.",
2598
+ "type": "object",
2599
+ "additionalProperties": {
2600
+ "type": "string"
2601
+ }
2602
+ }
2603
+ }
2604
+ },
2398
2605
"codersdk.PprofConfig": {
2399
2606
"type": "object",
2400
2607
"properties": {
@@ -2975,6 +3182,20 @@ const docTemplate = `{
2975
3182
}
2976
3183
}
2977
3184
},
3185
+ "codersdk.WorkspaceAgentGitAuthResponse": {
3186
+ "type": "object",
3187
+ "properties": {
3188
+ "password": {
3189
+ "type": "string"
3190
+ },
3191
+ "url": {
3192
+ "type": "string"
3193
+ },
3194
+ "username": {
3195
+ "type": "string"
3196
+ }
3197
+ }
3198
+ },
2978
3199
"codersdk.WorkspaceAgentMetadata": {
2979
3200
"type": "object",
2980
3201
"properties": {
0 commit comments