Skip to content

docs: API workspace agents and builds #5538

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
workspaceagents.go in progress
  • Loading branch information
mtojek committed Jan 2, 2023
commit 67a85b93f42d4aeefcb7f01c7ade6699db773f44
221 changes: 221 additions & 0 deletions coderd/apidoc/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,83 @@ const docTemplate = `{
}
}
},
"/workspaceagents/me/app-health": {
"post": {
"security": [
{
"CoderSessionToken": []
}
],
"produces": [
"application/json"
],
"tags": [
"Agents"
],
"summary": "Submit workspace application health",
"operationId": "submit-workspace-workspace-agent-health",
"parameters": [
{
"description": "Application health request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/codersdk.PostWorkspaceAppHealthsRequest"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/workspaceagents/me/gitauth": {
"get": {
"security": [
{
"CoderSessionToken": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Agents"
],
"summary": "Get workspace agent Git auth",
"operationId": "get-workspace-agent-git-auth",
"parameters": [
{
"type": "string",
"format": "uri",
"description": "Git URL",
"name": "url",
"in": "query",
"required": true
},
{
"type": "boolean",
"description": "Wait for a new token to be issued",
"name": "listen",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/codersdk.WorkspaceAgentGitAuthResponse"
}
}
}
}
},
"/workspaceagents/me/metadata": {
"get": {
"security": [
Expand Down Expand Up @@ -1011,6 +1088,75 @@ const docTemplate = `{
}
}
},
"/workspaceagents/me/report-stats": {
"post": {
"security": [
{
"CoderSessionToken": []
}
],
"produces": [
"application/json"
],
"tags": [
"Agents"
],
"summary": "Submit workspace agent stats",
"operationId": "submit-workspace-workspace-agent-stats",
"parameters": [
{
"description": "Stats request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/codersdk.AgentStats"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/codersdk.AgentStatsResponse"
}
}
}
}
},
"/workspaceagents/me/version": {
"post": {
"security": [
{
"CoderSessionToken": []
}
],
"produces": [
"application/json"
],
"tags": [
"Agents"
],
"summary": "Submit workspace agent version",
"operationId": "submit-workspace-workspace-agent-version",
"parameters": [
{
"description": "Version request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/codersdk.PostWorkspaceAgentVersionRequest"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/workspacebuilds/{workspacebuild}": {
"get": {
"security": [
Expand Down Expand Up @@ -1560,6 +1706,47 @@ const docTemplate = `{
}
}
},
"codersdk.AgentStats": {
"type": "object",
"properties": {
"conns_by_proto": {
"description": "ConnsByProto is a count of connections by protocol.",
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"num_comms": {
"description": "NumConns is the number of connections received by an agent.",
"type": "integer"
},
"rx_bytes": {
"description": "RxBytes is the number of received bytes.",
"type": "integer"
},
"rx_packets": {
"description": "RxPackets is the number of received packets.",
"type": "integer"
},
"tx_bytes": {
"description": "TxBytes is the number of transmitted bytes.",
"type": "integer"
},
"tx_packets": {
"description": "TxPackets is the number of transmitted bytes.",
"type": "integer"
}
}
},
"codersdk.AgentStatsResponse": {
"type": "object",
"properties": {
"report_interval": {
"description": "ReportInterval is the duration after which the agent should send stats\nagain.",
"type": "integer"
}
}
},
"codersdk.AuditDiff": {
"type": "object",
"additionalProperties": {
Expand Down Expand Up @@ -2395,6 +2582,26 @@ const docTemplate = `{
}
}
},
"codersdk.PostWorkspaceAgentVersionRequest": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
}
},
"codersdk.PostWorkspaceAppHealthsRequest": {
"type": "object",
"properties": {
"healths": {
"description": "Healths is a map of the workspace app name and the health of the app.",
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"codersdk.PprofConfig": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -2975,6 +3182,20 @@ const docTemplate = `{
}
}
},
"codersdk.WorkspaceAgentGitAuthResponse": {
"type": "object",
"properties": {
"password": {
"type": "string"
},
"url": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"codersdk.WorkspaceAgentMetadata": {
"type": "object",
"properties": {
Expand Down
Loading