mirror of https://github.com/coder/coder.git
docs: update swaggo/swag v1.8.9 (#5590)
* docs: update swaggo/swag v1.8.9 * Fix: format * swaggo: time.Duration * swaggo: provisionertype * Fix: AuthorizationObject * Fix: enums * Fix: netip.Addr * Fix: clickable response properties
This commit is contained in:
parent
bbe33fef41
commit
a23a471034
6
.swaggo
6
.swaggo
|
@ -1,2 +1,8 @@
|
|||
// Replace all NullTime with string
|
||||
replace github.com/coder/coder/codersdk.NullTime string
|
||||
// Prevent swaggo from rendering enums for time.Duration
|
||||
replace time.Duration int64
|
||||
// Do not expose "echo" provider
|
||||
replace github.com/coder/coder/codersdk.ProvisionerType string
|
||||
// Do not render netip.Addr
|
||||
replace netip.Addr string
|
||||
|
|
|
@ -1918,6 +1918,23 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"codersdk.AuditAction": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"create",
|
||||
"write",
|
||||
"delete",
|
||||
"start",
|
||||
"stop"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"AuditActionCreate",
|
||||
"AuditActionWrite",
|
||||
"AuditActionDelete",
|
||||
"AuditActionStart",
|
||||
"AuditActionStop"
|
||||
]
|
||||
},
|
||||
"codersdk.AuditDiff": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
|
@ -1938,7 +1955,7 @@ const docTemplate = `{
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/codersdk.AuditAction"
|
||||
},
|
||||
"additional_fields": {
|
||||
"type": "array",
|
||||
|
@ -1956,7 +1973,7 @@ const docTemplate = `{
|
|||
"type": "string"
|
||||
},
|
||||
"ip": {
|
||||
"$ref": "#/definitions/netip.Addr"
|
||||
"type": "string"
|
||||
},
|
||||
"is_deleted": {
|
||||
"type": "boolean"
|
||||
|
@ -1981,7 +1998,7 @@ const docTemplate = `{
|
|||
"type": "string"
|
||||
},
|
||||
"resource_type": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/codersdk.ResourceType"
|
||||
},
|
||||
"status_code": {
|
||||
"type": "integer"
|
||||
|
@ -2025,8 +2042,12 @@ const docTemplate = `{
|
|||
]
|
||||
},
|
||||
"object": {
|
||||
"description": "Object can represent a \"set\" of objects, such as:\n\t- All workspaces in an organization\n\t- All workspaces owned by me\n\t- All workspaces across the entire product\nWhen defining an object, use the most specific language when possible to\nproduce the smallest set. Meaning to set as many fields on 'Object' as\nyou can. Example, if you want to check if you can update all workspaces\nowned by 'me', try to also add an 'OrganizationID' to the settings.\nOmitting the 'OrganizationID' could produce the incorrect value, as\nworkspaces have both ` + "`" + `user` + "`" + ` and ` + "`" + `organization` + "`" + ` owners.",
|
||||
"$ref": "#/definitions/codersdk.AuthorizationObject"
|
||||
"description": "Object can represent a \"set\" of objects, such as: all workspaces in an organization, all workspaces owned by me, and all workspaces across the entire product.\nWhen defining an object, use the most specific language when possible to\nproduce the smallest set. Meaning to set as many fields on 'Object' as\nyou can. Example, if you want to check if you can update all workspaces\nowned by 'me', try to also add an 'OrganizationID' to the settings.\nOmitting the 'OrganizationID' could produce the incorrect value, as\nworkspaces have both ` + "`" + `user` + "`" + ` and ` + "`" + `organization` + "`" + ` owners.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.AuthorizationObject"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2098,6 +2119,19 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"codersdk.BuildReason": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"initiator",
|
||||
"autostart",
|
||||
"autostop"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"BuildReasonInitiator",
|
||||
"BuildReasonAutostart",
|
||||
"BuildReasonAutostop"
|
||||
]
|
||||
},
|
||||
"codersdk.CreateParameterRequest": {
|
||||
"description": "CreateParameterRequest is a structure used to create a new parameter value for a scope.",
|
||||
"type": "object",
|
||||
|
@ -2113,21 +2147,29 @@ const docTemplate = `{
|
|||
"type": "string"
|
||||
},
|
||||
"destination_scheme": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"none",
|
||||
"environment_variable",
|
||||
"provisioner_variable"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.ParameterDestinationScheme"
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"source_scheme": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"none",
|
||||
"data"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.ParameterSourceScheme"
|
||||
}
|
||||
]
|
||||
},
|
||||
"source_value": {
|
||||
|
@ -2182,20 +2224,23 @@ const docTemplate = `{
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"create",
|
||||
"write",
|
||||
"delete",
|
||||
"start",
|
||||
"stop"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.AuditAction"
|
||||
}
|
||||
]
|
||||
},
|
||||
"resource_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"resource_type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"organization",
|
||||
"template",
|
||||
|
@ -2206,6 +2251,11 @@ const docTemplate = `{
|
|||
"git_ssh_key",
|
||||
"api_key",
|
||||
"group"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.ResourceType"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
|
@ -2243,12 +2293,16 @@ const docTemplate = `{
|
|||
"type": "string"
|
||||
},
|
||||
"transition": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"create",
|
||||
"start",
|
||||
"stop",
|
||||
"delete"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.WorkspaceTransition"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -2317,7 +2371,11 @@ const docTemplate = `{
|
|||
},
|
||||
"address": {
|
||||
"description": "DEPRECATED: Use HTTPAddress or TLS.Address instead.",
|
||||
"$ref": "#/definitions/codersdk.DeploymentConfigField-string"
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.DeploymentConfigField-string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"agent_fallback_troubleshooting_url": {
|
||||
"$ref": "#/definitions/codersdk.DeploymentConfigField-string"
|
||||
|
@ -2445,7 +2503,10 @@ const docTemplate = `{
|
|||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"$ref": "#/definitions/codersdk.GitAuthConfig"
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/codersdk.GitAuthConfig"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2480,7 +2541,10 @@ const docTemplate = `{
|
|||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2684,6 +2748,34 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"codersdk.LogLevel": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"trace",
|
||||
"debug",
|
||||
"info",
|
||||
"warn",
|
||||
"error"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"LogLevelTrace",
|
||||
"LogLevelDebug",
|
||||
"LogLevelInfo",
|
||||
"LogLevelWarn",
|
||||
"LogLevelError"
|
||||
]
|
||||
},
|
||||
"codersdk.LogSource": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"provisioner_daemon",
|
||||
"provisioner"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"LogSourceProvisionerDaemon",
|
||||
"LogSourceProvisioner"
|
||||
]
|
||||
},
|
||||
"codersdk.OAuth2Config": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -2756,11 +2848,15 @@ const docTemplate = `{
|
|||
"format": "date-time"
|
||||
},
|
||||
"destination_scheme": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"none",
|
||||
"environment_variable",
|
||||
"provisioner_variable"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.ParameterDestinationScheme"
|
||||
}
|
||||
]
|
||||
},
|
||||
"id": {
|
||||
|
@ -2771,11 +2867,15 @@ const docTemplate = `{
|
|||
"type": "string"
|
||||
},
|
||||
"scope": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"template",
|
||||
"workspace",
|
||||
"import_job"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.ParameterScope"
|
||||
}
|
||||
]
|
||||
},
|
||||
"scope_id": {
|
||||
|
@ -2783,10 +2883,14 @@ const docTemplate = `{
|
|||
"format": "uuid"
|
||||
},
|
||||
"source_scheme": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"none",
|
||||
"data"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.ParameterSourceScheme"
|
||||
}
|
||||
]
|
||||
},
|
||||
"updated_at": {
|
||||
|
@ -2795,6 +2899,43 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"codersdk.ParameterDestinationScheme": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"none",
|
||||
"environment_variable",
|
||||
"provisioner_variable"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"ParameterDestinationSchemeNone",
|
||||
"ParameterDestinationSchemeEnvironmentVariable",
|
||||
"ParameterDestinationSchemeProvisionerVariable"
|
||||
]
|
||||
},
|
||||
"codersdk.ParameterScope": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"template",
|
||||
"workspace",
|
||||
"import_job"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"ParameterTemplate",
|
||||
"ParameterWorkspace",
|
||||
"ParameterImportJob"
|
||||
]
|
||||
},
|
||||
"codersdk.ParameterSourceScheme": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"none",
|
||||
"data"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"ParameterSourceSchemeNone",
|
||||
"ParameterSourceSchemeData"
|
||||
]
|
||||
},
|
||||
"codersdk.PostWorkspaceAgentVersionRequest": {
|
||||
"description": "x-apidocgen:skip",
|
||||
"type": "object",
|
||||
|
@ -2811,7 +2952,7 @@ const docTemplate = `{
|
|||
"description": "Healths is a map of the workspace app name and the health of the app.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAppHealth"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2886,7 +3027,6 @@ const docTemplate = `{
|
|||
"format": "date-time"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pending",
|
||||
"running",
|
||||
|
@ -2894,6 +3034,11 @@ const docTemplate = `{
|
|||
"canceling",
|
||||
"canceled",
|
||||
"failed"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.ProvisionerJobStatus"
|
||||
}
|
||||
]
|
||||
},
|
||||
"tags": {
|
||||
|
@ -2919,17 +3064,21 @@ const docTemplate = `{
|
|||
"type": "integer"
|
||||
},
|
||||
"log_level": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"trace",
|
||||
"debug",
|
||||
"info",
|
||||
"warn",
|
||||
"error"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.LogLevel"
|
||||
}
|
||||
]
|
||||
},
|
||||
"log_source": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/codersdk.LogSource"
|
||||
},
|
||||
"output": {
|
||||
"type": "string"
|
||||
|
@ -2939,6 +3088,25 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"codersdk.ProvisionerJobStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pending",
|
||||
"running",
|
||||
"succeeded",
|
||||
"canceling",
|
||||
"canceled",
|
||||
"failed"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"ProvisionerJobPending",
|
||||
"ProvisionerJobRunning",
|
||||
"ProvisionerJobSucceeded",
|
||||
"ProvisionerJobCanceling",
|
||||
"ProvisionerJobCanceled",
|
||||
"ProvisionerJobFailed"
|
||||
]
|
||||
},
|
||||
"codersdk.PutExtendWorkspaceRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
@ -2961,6 +3129,31 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"codersdk.ResourceType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"organization",
|
||||
"template",
|
||||
"template_version",
|
||||
"user",
|
||||
"workspace",
|
||||
"workspace_build",
|
||||
"git_ssh_key",
|
||||
"api_key",
|
||||
"group"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"ResourceTypeOrganization",
|
||||
"ResourceTypeTemplate",
|
||||
"ResourceTypeTemplateVersion",
|
||||
"ResourceTypeUser",
|
||||
"ResourceTypeWorkspace",
|
||||
"ResourceTypeWorkspaceBuild",
|
||||
"ResourceTypeGitSSHKey",
|
||||
"ResourceTypeAPIKey",
|
||||
"ResourceTypeGroup"
|
||||
]
|
||||
},
|
||||
"codersdk.Response": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -3100,7 +3293,10 @@ const docTemplate = `{
|
|||
"format": "uuid"
|
||||
},
|
||||
"provisioner": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"terraform"
|
||||
]
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
|
@ -3231,13 +3427,24 @@ const docTemplate = `{
|
|||
}
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/codersdk.UserStatus"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.UserStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"active",
|
||||
"suspended"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"UserStatusActive",
|
||||
"UserStatusSuspended"
|
||||
]
|
||||
},
|
||||
"codersdk.ValidationError": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
@ -3380,12 +3587,16 @@ const docTemplate = `{
|
|||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"connecting",
|
||||
"connected",
|
||||
"disconnected",
|
||||
"timeout"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentStatus"
|
||||
}
|
||||
]
|
||||
},
|
||||
"troubleshooting_url": {
|
||||
|
@ -3458,6 +3669,21 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"codersdk.WorkspaceAgentStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"connecting",
|
||||
"connected",
|
||||
"disconnected",
|
||||
"timeout"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"WorkspaceAgentConnecting",
|
||||
"WorkspaceAgentConnected",
|
||||
"WorkspaceAgentDisconnected",
|
||||
"WorkspaceAgentTimeout"
|
||||
]
|
||||
},
|
||||
"codersdk.WorkspaceApp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -3473,11 +3699,15 @@ const docTemplate = `{
|
|||
"type": "boolean"
|
||||
},
|
||||
"health": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAppHealth"
|
||||
},
|
||||
"healthcheck": {
|
||||
"description": "Healthcheck specifies the configuration for checking app health.",
|
||||
"$ref": "#/definitions/codersdk.Healthcheck"
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.Healthcheck"
|
||||
}
|
||||
]
|
||||
},
|
||||
"icon": {
|
||||
"description": "Icon is a relative path or external URL that specifies\nan icon to be displayed in the dashboard.",
|
||||
|
@ -3488,11 +3718,15 @@ const docTemplate = `{
|
|||
"format": "uuid"
|
||||
},
|
||||
"sharing_level": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"owner",
|
||||
"authenticated",
|
||||
"public"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAppSharingLevel"
|
||||
}
|
||||
]
|
||||
},
|
||||
"slug": {
|
||||
|
@ -3509,6 +3743,34 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"codersdk.WorkspaceAppHealth": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"disabled",
|
||||
"initializing",
|
||||
"healthy",
|
||||
"unhealthy"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"WorkspaceAppHealthDisabled",
|
||||
"WorkspaceAppHealthInitializing",
|
||||
"WorkspaceAppHealthHealthy",
|
||||
"WorkspaceAppHealthUnhealthy"
|
||||
]
|
||||
},
|
||||
"codersdk.WorkspaceAppSharingLevel": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"owner",
|
||||
"authenticated",
|
||||
"public"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"WorkspaceAppSharingLevelOwner",
|
||||
"WorkspaceAppSharingLevelAuthenticated",
|
||||
"WorkspaceAppSharingLevelPublic"
|
||||
]
|
||||
},
|
||||
"codersdk.WorkspaceBuild": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -3541,11 +3803,15 @@ const docTemplate = `{
|
|||
"$ref": "#/definitions/codersdk.ProvisionerJob"
|
||||
},
|
||||
"reason": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"initiator",
|
||||
"autostart",
|
||||
"autostop"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.BuildReason"
|
||||
}
|
||||
]
|
||||
},
|
||||
"resources": {
|
||||
|
@ -3555,7 +3821,6 @@ const docTemplate = `{
|
|||
}
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pending",
|
||||
"starting",
|
||||
|
@ -3567,6 +3832,11 @@ const docTemplate = `{
|
|||
"canceled",
|
||||
"deleting",
|
||||
"deleted"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.WorkspaceStatus"
|
||||
}
|
||||
]
|
||||
},
|
||||
"template_version_id": {
|
||||
|
@ -3577,11 +3847,15 @@ const docTemplate = `{
|
|||
"type": "string"
|
||||
},
|
||||
"transition": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"start",
|
||||
"stop",
|
||||
"delete"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.WorkspaceTransition"
|
||||
}
|
||||
]
|
||||
},
|
||||
"updated_at": {
|
||||
|
@ -3647,11 +3921,15 @@ const docTemplate = `{
|
|||
"type": "string"
|
||||
},
|
||||
"workspace_transition": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"start",
|
||||
"stop",
|
||||
"delete"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.WorkspaceTransition"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3670,6 +3948,46 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"codersdk.WorkspaceStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pending",
|
||||
"starting",
|
||||
"running",
|
||||
"stopping",
|
||||
"stopped",
|
||||
"failed",
|
||||
"canceling",
|
||||
"canceled",
|
||||
"deleting",
|
||||
"deleted"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"WorkspaceStatusPending",
|
||||
"WorkspaceStatusStarting",
|
||||
"WorkspaceStatusRunning",
|
||||
"WorkspaceStatusStopping",
|
||||
"WorkspaceStatusStopped",
|
||||
"WorkspaceStatusFailed",
|
||||
"WorkspaceStatusCanceling",
|
||||
"WorkspaceStatusCanceled",
|
||||
"WorkspaceStatusDeleting",
|
||||
"WorkspaceStatusDeleted"
|
||||
]
|
||||
},
|
||||
"codersdk.WorkspaceTransition": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"start",
|
||||
"stop",
|
||||
"delete"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"WorkspaceTransitionStart",
|
||||
"WorkspaceTransitionStop",
|
||||
"WorkspaceTransitionDelete"
|
||||
]
|
||||
},
|
||||
"codersdk.WorkspacesResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -3684,9 +4002,6 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"netip.Addr": {
|
||||
"type": "object"
|
||||
},
|
||||
"tailcfg.DERPMap": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
@ -1682,6 +1682,17 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"codersdk.AuditAction": {
|
||||
"type": "string",
|
||||
"enum": ["create", "write", "delete", "start", "stop"],
|
||||
"x-enum-varnames": [
|
||||
"AuditActionCreate",
|
||||
"AuditActionWrite",
|
||||
"AuditActionDelete",
|
||||
"AuditActionStart",
|
||||
"AuditActionStop"
|
||||
]
|
||||
},
|
||||
"codersdk.AuditDiff": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
|
@ -1702,7 +1713,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/codersdk.AuditAction"
|
||||
},
|
||||
"additional_fields": {
|
||||
"type": "array",
|
||||
|
@ -1720,7 +1731,7 @@
|
|||
"type": "string"
|
||||
},
|
||||
"ip": {
|
||||
"$ref": "#/definitions/netip.Addr"
|
||||
"type": "string"
|
||||
},
|
||||
"is_deleted": {
|
||||
"type": "boolean"
|
||||
|
@ -1745,7 +1756,7 @@
|
|||
"type": "string"
|
||||
},
|
||||
"resource_type": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/codersdk.ResourceType"
|
||||
},
|
||||
"status_code": {
|
||||
"type": "integer"
|
||||
|
@ -1784,8 +1795,12 @@
|
|||
"enum": ["create", "read", "update", "delete"]
|
||||
},
|
||||
"object": {
|
||||
"description": "Object can represent a \"set\" of objects, such as:\n\t- All workspaces in an organization\n\t- All workspaces owned by me\n\t- All workspaces across the entire product\nWhen defining an object, use the most specific language when possible to\nproduce the smallest set. Meaning to set as many fields on 'Object' as\nyou can. Example, if you want to check if you can update all workspaces\nowned by 'me', try to also add an 'OrganizationID' to the settings.\nOmitting the 'OrganizationID' could produce the incorrect value, as\nworkspaces have both `user` and `organization` owners.",
|
||||
"$ref": "#/definitions/codersdk.AuthorizationObject"
|
||||
"description": "Object can represent a \"set\" of objects, such as: all workspaces in an organization, all workspaces owned by me, and all workspaces across the entire product.\nWhen defining an object, use the most specific language when possible to\nproduce the smallest set. Meaning to set as many fields on 'Object' as\nyou can. Example, if you want to check if you can update all workspaces\nowned by 'me', try to also add an 'OrganizationID' to the settings.\nOmitting the 'OrganizationID' could produce the incorrect value, as\nworkspaces have both `user` and `organization` owners.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.AuthorizationObject"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1854,6 +1869,15 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"codersdk.BuildReason": {
|
||||
"type": "string",
|
||||
"enum": ["initiator", "autostart", "autostop"],
|
||||
"x-enum-varnames": [
|
||||
"BuildReasonInitiator",
|
||||
"BuildReasonAutostart",
|
||||
"BuildReasonAutostop"
|
||||
]
|
||||
},
|
||||
"codersdk.CreateParameterRequest": {
|
||||
"description": "CreateParameterRequest is a structure used to create a new parameter value for a scope.",
|
||||
"type": "object",
|
||||
|
@ -1869,15 +1893,23 @@
|
|||
"type": "string"
|
||||
},
|
||||
"destination_scheme": {
|
||||
"type": "string",
|
||||
"enum": ["none", "environment_variable", "provisioner_variable"]
|
||||
"enum": ["none", "environment_variable", "provisioner_variable"],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.ParameterDestinationScheme"
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"source_scheme": {
|
||||
"type": "string",
|
||||
"enum": ["none", "data"]
|
||||
"enum": ["none", "data"],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.ParameterSourceScheme"
|
||||
}
|
||||
]
|
||||
},
|
||||
"source_value": {
|
||||
"type": "string"
|
||||
|
@ -1928,14 +1960,17 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"action": {
|
||||
"type": "string",
|
||||
"enum": ["create", "write", "delete", "start", "stop"]
|
||||
"enum": ["create", "write", "delete", "start", "stop"],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.AuditAction"
|
||||
}
|
||||
]
|
||||
},
|
||||
"resource_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"resource_type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"organization",
|
||||
"template",
|
||||
|
@ -1946,6 +1981,11 @@
|
|||
"git_ssh_key",
|
||||
"api_key",
|
||||
"group"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.ResourceType"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
|
@ -1981,8 +2021,12 @@
|
|||
"type": "string"
|
||||
},
|
||||
"transition": {
|
||||
"type": "string",
|
||||
"enum": ["create", "start", "stop", "delete"]
|
||||
"enum": ["create", "start", "stop", "delete"],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.WorkspaceTransition"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2050,7 +2094,11 @@
|
|||
},
|
||||
"address": {
|
||||
"description": "DEPRECATED: Use HTTPAddress or TLS.Address instead.",
|
||||
"$ref": "#/definitions/codersdk.DeploymentConfigField-string"
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.DeploymentConfigField-string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"agent_fallback_troubleshooting_url": {
|
||||
"$ref": "#/definitions/codersdk.DeploymentConfigField-string"
|
||||
|
@ -2178,7 +2226,10 @@
|
|||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"$ref": "#/definitions/codersdk.GitAuthConfig"
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/codersdk.GitAuthConfig"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2213,7 +2264,10 @@
|
|||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2415,6 +2469,22 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"codersdk.LogLevel": {
|
||||
"type": "string",
|
||||
"enum": ["trace", "debug", "info", "warn", "error"],
|
||||
"x-enum-varnames": [
|
||||
"LogLevelTrace",
|
||||
"LogLevelDebug",
|
||||
"LogLevelInfo",
|
||||
"LogLevelWarn",
|
||||
"LogLevelError"
|
||||
]
|
||||
},
|
||||
"codersdk.LogSource": {
|
||||
"type": "string",
|
||||
"enum": ["provisioner_daemon", "provisioner"],
|
||||
"x-enum-varnames": ["LogSourceProvisionerDaemon", "LogSourceProvisioner"]
|
||||
},
|
||||
"codersdk.OAuth2Config": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -2487,8 +2557,12 @@
|
|||
"format": "date-time"
|
||||
},
|
||||
"destination_scheme": {
|
||||
"type": "string",
|
||||
"enum": ["none", "environment_variable", "provisioner_variable"]
|
||||
"enum": ["none", "environment_variable", "provisioner_variable"],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.ParameterDestinationScheme"
|
||||
}
|
||||
]
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
|
@ -2498,16 +2572,24 @@
|
|||
"type": "string"
|
||||
},
|
||||
"scope": {
|
||||
"type": "string",
|
||||
"enum": ["template", "workspace", "import_job"]
|
||||
"enum": ["template", "workspace", "import_job"],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.ParameterScope"
|
||||
}
|
||||
]
|
||||
},
|
||||
"scope_id": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"source_scheme": {
|
||||
"type": "string",
|
||||
"enum": ["none", "data"]
|
||||
"enum": ["none", "data"],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.ParameterSourceScheme"
|
||||
}
|
||||
]
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
|
@ -2515,6 +2597,32 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"codersdk.ParameterDestinationScheme": {
|
||||
"type": "string",
|
||||
"enum": ["none", "environment_variable", "provisioner_variable"],
|
||||
"x-enum-varnames": [
|
||||
"ParameterDestinationSchemeNone",
|
||||
"ParameterDestinationSchemeEnvironmentVariable",
|
||||
"ParameterDestinationSchemeProvisionerVariable"
|
||||
]
|
||||
},
|
||||
"codersdk.ParameterScope": {
|
||||
"type": "string",
|
||||
"enum": ["template", "workspace", "import_job"],
|
||||
"x-enum-varnames": [
|
||||
"ParameterTemplate",
|
||||
"ParameterWorkspace",
|
||||
"ParameterImportJob"
|
||||
]
|
||||
},
|
||||
"codersdk.ParameterSourceScheme": {
|
||||
"type": "string",
|
||||
"enum": ["none", "data"],
|
||||
"x-enum-varnames": [
|
||||
"ParameterSourceSchemeNone",
|
||||
"ParameterSourceSchemeData"
|
||||
]
|
||||
},
|
||||
"codersdk.PostWorkspaceAgentVersionRequest": {
|
||||
"description": "x-apidocgen:skip",
|
||||
"type": "object",
|
||||
|
@ -2531,7 +2639,7 @@
|
|||
"description": "Healths is a map of the workspace app name and the health of the app.",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAppHealth"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2606,7 +2714,6 @@
|
|||
"format": "date-time"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pending",
|
||||
"running",
|
||||
|
@ -2614,6 +2721,11 @@
|
|||
"canceling",
|
||||
"canceled",
|
||||
"failed"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.ProvisionerJobStatus"
|
||||
}
|
||||
]
|
||||
},
|
||||
"tags": {
|
||||
|
@ -2639,11 +2751,15 @@
|
|||
"type": "integer"
|
||||
},
|
||||
"log_level": {
|
||||
"type": "string",
|
||||
"enum": ["trace", "debug", "info", "warn", "error"]
|
||||
"enum": ["trace", "debug", "info", "warn", "error"],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.LogLevel"
|
||||
}
|
||||
]
|
||||
},
|
||||
"log_source": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/codersdk.LogSource"
|
||||
},
|
||||
"output": {
|
||||
"type": "string"
|
||||
|
@ -2653,6 +2769,25 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"codersdk.ProvisionerJobStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pending",
|
||||
"running",
|
||||
"succeeded",
|
||||
"canceling",
|
||||
"canceled",
|
||||
"failed"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"ProvisionerJobPending",
|
||||
"ProvisionerJobRunning",
|
||||
"ProvisionerJobSucceeded",
|
||||
"ProvisionerJobCanceling",
|
||||
"ProvisionerJobCanceled",
|
||||
"ProvisionerJobFailed"
|
||||
]
|
||||
},
|
||||
"codersdk.PutExtendWorkspaceRequest": {
|
||||
"type": "object",
|
||||
"required": ["deadline"],
|
||||
|
@ -2673,6 +2808,31 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"codersdk.ResourceType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"organization",
|
||||
"template",
|
||||
"template_version",
|
||||
"user",
|
||||
"workspace",
|
||||
"workspace_build",
|
||||
"git_ssh_key",
|
||||
"api_key",
|
||||
"group"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"ResourceTypeOrganization",
|
||||
"ResourceTypeTemplate",
|
||||
"ResourceTypeTemplateVersion",
|
||||
"ResourceTypeUser",
|
||||
"ResourceTypeWorkspace",
|
||||
"ResourceTypeWorkspaceBuild",
|
||||
"ResourceTypeGitSSHKey",
|
||||
"ResourceTypeAPIKey",
|
||||
"ResourceTypeGroup"
|
||||
]
|
||||
},
|
||||
"codersdk.Response": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -2812,7 +2972,8 @@
|
|||
"format": "uuid"
|
||||
},
|
||||
"provisioner": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"enum": ["terraform"]
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
|
@ -2938,13 +3099,18 @@
|
|||
}
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/codersdk.UserStatus"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.UserStatus": {
|
||||
"type": "string",
|
||||
"enum": ["active", "suspended"],
|
||||
"x-enum-varnames": ["UserStatusActive", "UserStatusSuspended"]
|
||||
},
|
||||
"codersdk.ValidationError": {
|
||||
"type": "object",
|
||||
"required": ["detail", "field"],
|
||||
|
@ -3084,8 +3250,12 @@
|
|||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": ["connecting", "connected", "disconnected", "timeout"]
|
||||
"enum": ["connecting", "connected", "disconnected", "timeout"],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentStatus"
|
||||
}
|
||||
]
|
||||
},
|
||||
"troubleshooting_url": {
|
||||
"type": "string"
|
||||
|
@ -3157,6 +3327,16 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"codersdk.WorkspaceAgentStatus": {
|
||||
"type": "string",
|
||||
"enum": ["connecting", "connected", "disconnected", "timeout"],
|
||||
"x-enum-varnames": [
|
||||
"WorkspaceAgentConnecting",
|
||||
"WorkspaceAgentConnected",
|
||||
"WorkspaceAgentDisconnected",
|
||||
"WorkspaceAgentTimeout"
|
||||
]
|
||||
},
|
||||
"codersdk.WorkspaceApp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -3172,11 +3352,15 @@
|
|||
"type": "boolean"
|
||||
},
|
||||
"health": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAppHealth"
|
||||
},
|
||||
"healthcheck": {
|
||||
"description": "Healthcheck specifies the configuration for checking app health.",
|
||||
"$ref": "#/definitions/codersdk.Healthcheck"
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.Healthcheck"
|
||||
}
|
||||
]
|
||||
},
|
||||
"icon": {
|
||||
"description": "Icon is a relative path or external URL that specifies\nan icon to be displayed in the dashboard.",
|
||||
|
@ -3187,8 +3371,12 @@
|
|||
"format": "uuid"
|
||||
},
|
||||
"sharing_level": {
|
||||
"type": "string",
|
||||
"enum": ["owner", "authenticated", "public"]
|
||||
"enum": ["owner", "authenticated", "public"],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAppSharingLevel"
|
||||
}
|
||||
]
|
||||
},
|
||||
"slug": {
|
||||
"description": "Slug is a unique identifier within the agent.",
|
||||
|
@ -3204,6 +3392,25 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"codersdk.WorkspaceAppHealth": {
|
||||
"type": "string",
|
||||
"enum": ["disabled", "initializing", "healthy", "unhealthy"],
|
||||
"x-enum-varnames": [
|
||||
"WorkspaceAppHealthDisabled",
|
||||
"WorkspaceAppHealthInitializing",
|
||||
"WorkspaceAppHealthHealthy",
|
||||
"WorkspaceAppHealthUnhealthy"
|
||||
]
|
||||
},
|
||||
"codersdk.WorkspaceAppSharingLevel": {
|
||||
"type": "string",
|
||||
"enum": ["owner", "authenticated", "public"],
|
||||
"x-enum-varnames": [
|
||||
"WorkspaceAppSharingLevelOwner",
|
||||
"WorkspaceAppSharingLevelAuthenticated",
|
||||
"WorkspaceAppSharingLevelPublic"
|
||||
]
|
||||
},
|
||||
"codersdk.WorkspaceBuild": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -3236,8 +3443,12 @@
|
|||
"$ref": "#/definitions/codersdk.ProvisionerJob"
|
||||
},
|
||||
"reason": {
|
||||
"type": "string",
|
||||
"enum": ["initiator", "autostart", "autostop"]
|
||||
"enum": ["initiator", "autostart", "autostop"],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.BuildReason"
|
||||
}
|
||||
]
|
||||
},
|
||||
"resources": {
|
||||
"type": "array",
|
||||
|
@ -3246,7 +3457,6 @@
|
|||
}
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pending",
|
||||
"starting",
|
||||
|
@ -3258,6 +3468,11 @@
|
|||
"canceled",
|
||||
"deleting",
|
||||
"deleted"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.WorkspaceStatus"
|
||||
}
|
||||
]
|
||||
},
|
||||
"template_version_id": {
|
||||
|
@ -3268,8 +3483,12 @@
|
|||
"type": "string"
|
||||
},
|
||||
"transition": {
|
||||
"type": "string",
|
||||
"enum": ["start", "stop", "delete"]
|
||||
"enum": ["start", "stop", "delete"],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.WorkspaceTransition"
|
||||
}
|
||||
]
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
|
@ -3334,8 +3553,12 @@
|
|||
"type": "string"
|
||||
},
|
||||
"workspace_transition": {
|
||||
"type": "string",
|
||||
"enum": ["start", "stop", "delete"]
|
||||
"enum": ["start", "stop", "delete"],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.WorkspaceTransition"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -3353,6 +3576,42 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"codersdk.WorkspaceStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pending",
|
||||
"starting",
|
||||
"running",
|
||||
"stopping",
|
||||
"stopped",
|
||||
"failed",
|
||||
"canceling",
|
||||
"canceled",
|
||||
"deleting",
|
||||
"deleted"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"WorkspaceStatusPending",
|
||||
"WorkspaceStatusStarting",
|
||||
"WorkspaceStatusRunning",
|
||||
"WorkspaceStatusStopping",
|
||||
"WorkspaceStatusStopped",
|
||||
"WorkspaceStatusFailed",
|
||||
"WorkspaceStatusCanceling",
|
||||
"WorkspaceStatusCanceled",
|
||||
"WorkspaceStatusDeleting",
|
||||
"WorkspaceStatusDeleted"
|
||||
]
|
||||
},
|
||||
"codersdk.WorkspaceTransition": {
|
||||
"type": "string",
|
||||
"enum": ["start", "stop", "delete"],
|
||||
"x-enum-varnames": [
|
||||
"WorkspaceTransitionStart",
|
||||
"WorkspaceTransitionStop",
|
||||
"WorkspaceTransitionDelete"
|
||||
]
|
||||
},
|
||||
"codersdk.WorkspacesResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -3367,9 +3626,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"netip.Addr": {
|
||||
"type": "object"
|
||||
},
|
||||
"tailcfg.DERPMap": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
@ -24,10 +24,7 @@ type AuthorizationRequest struct {
|
|||
//
|
||||
// @Description AuthorizationCheck is used to check if the currently authenticated user (or the specified user) can do a given action to a given set of objects.
|
||||
type AuthorizationCheck struct {
|
||||
// Object can represent a "set" of objects, such as:
|
||||
// - All workspaces in an organization
|
||||
// - All workspaces owned by me
|
||||
// - All workspaces across the entire product
|
||||
// Object can represent a "set" of objects, such as: all workspaces in an organization, all workspaces owned by me, and all workspaces across the entire product.
|
||||
// When defining an object, use the most specific language when possible to
|
||||
// produce the smallest set. Meaning to set as many fields on 'Object' as
|
||||
// you can. Example, if you want to check if you can update all workspaces
|
||||
|
|
|
@ -20,7 +20,7 @@ type Template struct {
|
|||
OrganizationID uuid.UUID `json:"organization_id" format:"uuid"`
|
||||
Name string `json:"name"`
|
||||
DisplayName string `json:"display_name"`
|
||||
Provisioner ProvisionerType `json:"provisioner"`
|
||||
Provisioner ProvisionerType `json:"provisioner" enums:"terraform"`
|
||||
ActiveVersionID uuid.UUID `json:"active_version_id"`
|
||||
WorkspaceOwnerCount uint32 `json:"workspace_owner_count"`
|
||||
// ActiveUserCount is set to -1 when loading.
|
||||
|
|
|
@ -160,8 +160,8 @@ curl -X POST http://coder-server:8080/api/v2/workspaceagents/me/app-health \
|
|||
```json
|
||||
{
|
||||
"healths": {
|
||||
"property1": "string",
|
||||
"property2": "string"
|
||||
"property1": "disabled",
|
||||
"property2": "disabled"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@ -299,7 +299,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/me/metadata \
|
|||
"command": "string",
|
||||
"display_name": "string",
|
||||
"external": true,
|
||||
"health": "string",
|
||||
"health": "disabled",
|
||||
"healthcheck": {
|
||||
"interval": 0,
|
||||
"threshold": 0,
|
||||
|
|
|
@ -32,7 +32,7 @@ curl -X GET http://coder-server:8080/api/v2/audit?q=string \
|
|||
{
|
||||
"audit_logs": [
|
||||
{
|
||||
"action": "string",
|
||||
"action": "create",
|
||||
"additional_fields": [0],
|
||||
"description": "string",
|
||||
"diff": {
|
||||
|
@ -48,7 +48,7 @@ curl -X GET http://coder-server:8080/api/v2/audit?q=string \
|
|||
}
|
||||
},
|
||||
"id": "string",
|
||||
"ip": {},
|
||||
"ip": "string",
|
||||
"is_deleted": true,
|
||||
"organization_id": "string",
|
||||
"request_id": "string",
|
||||
|
@ -56,7 +56,7 @@ curl -X GET http://coder-server:8080/api/v2/audit?q=string \
|
|||
"resource_id": "string",
|
||||
"resource_link": "string",
|
||||
"resource_target": "string",
|
||||
"resource_type": "string",
|
||||
"resource_type": "organization",
|
||||
"status_code": 0,
|
||||
"time": "string",
|
||||
"user": {
|
||||
|
@ -72,7 +72,7 @@ curl -X GET http://coder-server:8080/api/v2/audit?q=string \
|
|||
"name": "string"
|
||||
}
|
||||
],
|
||||
"status": "string",
|
||||
"status": "active",
|
||||
"username": "string"
|
||||
},
|
||||
"user_agent": "string"
|
||||
|
|
|
@ -59,7 +59,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild} \
|
|||
"command": "string",
|
||||
"display_name": "string",
|
||||
"external": true,
|
||||
"health": "string",
|
||||
"health": "disabled",
|
||||
"healthcheck": {
|
||||
"interval": 0,
|
||||
"threshold": 0,
|
||||
|
@ -220,7 +220,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/log
|
|||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"id": 0,
|
||||
"log_level": "trace",
|
||||
"log_source": "string",
|
||||
"log_source": "provisioner_daemon",
|
||||
"output": "string",
|
||||
"stage": "string"
|
||||
}
|
||||
|
@ -237,25 +237,27 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/log
|
|||
|
||||
Status Code **200**
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| -------------- | ----------------- | -------- | ------------ | ----------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» id` | integer | false | | |
|
||||
| `» log_level` | string | false | | |
|
||||
| `» log_source` | string | false | | |
|
||||
| `» output` | string | false | | |
|
||||
| `» stage` | string | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| -------------- | -------------------------------------------------- | -------- | ------------ | ----------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» id` | integer | false | | |
|
||||
| `» log_level` | [codersdk.LogLevel](schemas.md#codersdkloglevel) | false | | |
|
||||
| `» log_source` | [codersdk.LogSource](schemas.md#codersdklogsource) | false | | |
|
||||
| `» output` | string | false | | |
|
||||
| `» stage` | string | false | | |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
| Property | Value |
|
||||
| ----------- | ------- |
|
||||
| `log_level` | `trace` |
|
||||
| `log_level` | `debug` |
|
||||
| `log_level` | `info` |
|
||||
| `log_level` | `warn` |
|
||||
| `log_level` | `error` |
|
||||
| Property | Value |
|
||||
| ------------ | -------------------- |
|
||||
| `log_level` | `trace` |
|
||||
| `log_level` | `debug` |
|
||||
| `log_level` | `info` |
|
||||
| `log_level` | `warn` |
|
||||
| `log_level` | `error` |
|
||||
| `log_source` | `provisioner_daemon` |
|
||||
| `log_source` | `provisioner` |
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
|
@ -292,7 +294,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/res
|
|||
"command": "string",
|
||||
"display_name": "string",
|
||||
"external": true,
|
||||
"health": "string",
|
||||
"health": "disabled",
|
||||
"healthcheck": {
|
||||
"interval": 0,
|
||||
"threshold": 0,
|
||||
|
@ -369,66 +371,70 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/res
|
|||
|
||||
Status Code **200**
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------------------------- | ---------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» agents` | array | false | | |
|
||||
| `»» apps` | array | false | | |
|
||||
| `»»» command` | string | false | | |
|
||||
| `»»» display_name` | string | false | | DisplayName is a friendly name for the app. |
|
||||
| `»»» external` | boolean | false | | External specifies whether the URL should be opened externally on<br>the client or not. |
|
||||
| `»»» health` | string | false | | |
|
||||
| `»»» healthcheck` | `codersdk.Healthcheck` | false | | |
|
||||
| `»»»» interval` | integer | false | | Interval specifies the seconds between each health check. |
|
||||
| `»»»» threshold` | integer | false | | Threshold specifies the number of consecutive failed health checks before returning "unhealthy". |
|
||||
| `»»»» url` | string | false | | URL specifies the endpoint to check for the app health. |
|
||||
| `»»» icon` | string | false | | Icon is a relative path or external URL that specifies<br>an icon to be displayed in the dashboard. |
|
||||
| `»»» id` | string(uuid) | false | | |
|
||||
| `»»» sharing_level` | string | false | | |
|
||||
| `»»» slug` | string | false | | Slug is a unique identifier within the agent. |
|
||||
| `»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the<br>`coder server` or via a hostname-based dev URL. If this is set to true<br>and there is no app wildcard configured on the server, the app will not<br>be accessible in the UI. |
|
||||
| `»»» url` | string | false | | URL is the address being proxied to inside the workspace.<br>If external is specified, this will be opened on the client. |
|
||||
| `»» architecture` | string | false | | |
|
||||
| `»» connection_timeout_seconds` | integer | false | | |
|
||||
| `»» created_at` | string(date-time) | false | | |
|
||||
| `»» directory` | string | false | | |
|
||||
| `»» disconnected_at` | string(date-time) | false | | |
|
||||
| `»» environment_variables` | object | false | | |
|
||||
| `»»» [any property]` | string | false | | |
|
||||
| `»» first_connected_at` | string(date-time) | false | | |
|
||||
| `»» id` | string(uuid) | false | | |
|
||||
| `»» instance_id` | string | false | | |
|
||||
| `»» last_connected_at` | string(date-time) | false | | |
|
||||
| `»» latency` | object | false | | DERPLatency is mapped by region name (e.g. "New York City", "Seattle"). |
|
||||
| `»»» [any property]` | `codersdk.DERPRegion` | false | | |
|
||||
| `»»»» latency_ms` | number | false | | |
|
||||
| `»»»» preferred` | boolean | false | | |
|
||||
| `»» name` | string | false | | |
|
||||
| `»» operating_system` | string | false | | |
|
||||
| `»» resource_id` | string(uuid) | false | | |
|
||||
| `»» startup_script` | string | false | | |
|
||||
| `»» status` | string | false | | |
|
||||
| `»» troubleshooting_url` | string | false | | |
|
||||
| `»» updated_at` | string(date-time) | false | | |
|
||||
| `»» version` | string | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» daily_cost` | integer | false | | |
|
||||
| `» hide` | boolean | false | | |
|
||||
| `» icon` | string | false | | |
|
||||
| `» id` | string(uuid) | false | | |
|
||||
| `» job_id` | string(uuid) | false | | |
|
||||
| `» metadata` | array | false | | |
|
||||
| `»» key` | string | false | | |
|
||||
| `»» sensitive` | boolean | false | | |
|
||||
| `»» value` | string | false | | |
|
||||
| `» name` | string | false | | |
|
||||
| `» type` | string | false | | |
|
||||
| `» workspace_transition` | string | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» agents` | array | false | | |
|
||||
| `»» apps` | array | false | | |
|
||||
| `»»» command` | string | false | | |
|
||||
| `»»» display_name` | string | false | | DisplayName is a friendly name for the app. |
|
||||
| `»»» external` | boolean | false | | External specifies whether the URL should be opened externally on<br>the client or not. |
|
||||
| `»»» health` | [codersdk.WorkspaceAppHealth](schemas.md#codersdkworkspaceapphealth) | false | | |
|
||||
| `»»» healthcheck` | [codersdk.Healthcheck](schemas.md#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
|
||||
| `»»»» interval` | integer | false | | Interval specifies the seconds between each health check. |
|
||||
| `»»»» threshold` | integer | false | | Threshold specifies the number of consecutive failed health checks before returning "unhealthy". |
|
||||
| `»»»» url` | string | false | | URL specifies the endpoint to check for the app health. |
|
||||
| `»»» icon` | string | false | | Icon is a relative path or external URL that specifies<br>an icon to be displayed in the dashboard. |
|
||||
| `»»» id` | string(uuid) | false | | |
|
||||
| `»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
|
||||
| `»»» slug` | string | false | | Slug is a unique identifier within the agent. |
|
||||
| `»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the<br>`coder server` or via a hostname-based dev URL. If this is set to true<br>and there is no app wildcard configured on the server, the app will not<br>be accessible in the UI. |
|
||||
| `»»» url` | string | false | | URL is the address being proxied to inside the workspace.<br>If external is specified, this will be opened on the client. |
|
||||
| `»» architecture` | string | false | | |
|
||||
| `»» connection_timeout_seconds` | integer | false | | |
|
||||
| `»» created_at` | string(date-time) | false | | |
|
||||
| `»» directory` | string | false | | |
|
||||
| `»» disconnected_at` | string(date-time) | false | | |
|
||||
| `»» environment_variables` | object | false | | |
|
||||
| `»»» [any property]` | string | false | | |
|
||||
| `»» first_connected_at` | string(date-time) | false | | |
|
||||
| `»» id` | string(uuid) | false | | |
|
||||
| `»» instance_id` | string | false | | |
|
||||
| `»» last_connected_at` | string(date-time) | false | | |
|
||||
| `»» latency` | object | false | | DERPLatency is mapped by region name (e.g. "New York City", "Seattle"). |
|
||||
| `»»» [any property]` | [codersdk.DERPRegion](schemas.md#codersdkderpregion) | false | | |
|
||||
| `»»»» latency_ms` | number | false | | |
|
||||
| `»»»» preferred` | boolean | false | | |
|
||||
| `»» name` | string | false | | |
|
||||
| `»» operating_system` | string | false | | |
|
||||
| `»» resource_id` | string(uuid) | false | | |
|
||||
| `»» startup_script` | string | false | | |
|
||||
| `»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
|
||||
| `»» troubleshooting_url` | string | false | | |
|
||||
| `»» updated_at` | string(date-time) | false | | |
|
||||
| `»» version` | string | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» daily_cost` | integer | false | | |
|
||||
| `» hide` | boolean | false | | |
|
||||
| `» icon` | string | false | | |
|
||||
| `» id` | string(uuid) | false | | |
|
||||
| `» job_id` | string(uuid) | false | | |
|
||||
| `» metadata` | array | false | | |
|
||||
| `»» key` | string | false | | |
|
||||
| `»» sensitive` | boolean | false | | |
|
||||
| `»» value` | string | false | | |
|
||||
| `» name` | string | false | | |
|
||||
| `» type` | string | false | | |
|
||||
| `» workspace_transition` | [codersdk.WorkspaceTransition](schemas.md#codersdkworkspacetransition) | false | | |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
| Property | Value |
|
||||
| ---------------------- | --------------- |
|
||||
| `health` | `disabled` |
|
||||
| `health` | `initializing` |
|
||||
| `health` | `healthy` |
|
||||
| `health` | `unhealthy` |
|
||||
| `sharing_level` | `owner` |
|
||||
| `sharing_level` | `authenticated` |
|
||||
| `sharing_level` | `public` |
|
||||
|
@ -499,7 +505,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/sta
|
|||
"command": "string",
|
||||
"display_name": "string",
|
||||
"external": true,
|
||||
"health": "string",
|
||||
"health": "disabled",
|
||||
"healthcheck": {
|
||||
"interval": 0,
|
||||
"threshold": 0,
|
||||
|
@ -646,7 +652,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{id}/builds \
|
|||
"command": "string",
|
||||
"display_name": "string",
|
||||
"external": true,
|
||||
"health": "string",
|
||||
"health": "disabled",
|
||||
"healthcheck": {
|
||||
"interval": 0,
|
||||
"threshold": 0,
|
||||
|
@ -734,91 +740,91 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{id}/builds \
|
|||
|
||||
Status Code **200**
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| -------------------------------- | ------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» build_number` | integer | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» daily_cost` | integer | false | | |
|
||||
| `» deadline` | string(date-time) | false | | |
|
||||
| `» id` | string(uuid) | false | | |
|
||||
| `» initiator_id` | string(uuid) | false | | |
|
||||
| `» initiator_name` | string | false | | |
|
||||
| `» job` | `codersdk.ProvisionerJob` | false | | |
|
||||
| `»» canceled_at` | string(date-time) | false | | |
|
||||
| `»» completed_at` | string(date-time) | false | | |
|
||||
| `»» created_at` | string(date-time) | false | | |
|
||||
| `»» error` | string | false | | |
|
||||
| `»» file_id` | string(uuid) | false | | |
|
||||
| `»» id` | string(uuid) | false | | |
|
||||
| `»» started_at` | string(date-time) | false | | |
|
||||
| `»» status` | string | false | | |
|
||||
| `»» tags` | object | false | | |
|
||||
| `»»» [any property]` | string | false | | |
|
||||
| `»» worker_id` | string(uuid) | false | | |
|
||||
| `» reason` | string | false | | |
|
||||
| `» resources` | array | false | | |
|
||||
| `»» agents` | array | false | | |
|
||||
| `»»» apps` | array | false | | |
|
||||
| `»»»» command` | string | false | | |
|
||||
| `»»»» display_name` | string | false | | DisplayName is a friendly name for the app. |
|
||||
| `»»»» external` | boolean | false | | External specifies whether the URL should be opened externally on<br>the client or not. |
|
||||
| `»»»» health` | string | false | | |
|
||||
| `»»»» healthcheck` | `codersdk.Healthcheck` | false | | |
|
||||
| `»»»»» interval` | integer | false | | Interval specifies the seconds between each health check. |
|
||||
| `»»»»» threshold` | integer | false | | Threshold specifies the number of consecutive failed health checks before returning "unhealthy". |
|
||||
| `»»»»» url` | string | false | | URL specifies the endpoint to check for the app health. |
|
||||
| `»»»» icon` | string | false | | Icon is a relative path or external URL that specifies<br>an icon to be displayed in the dashboard. |
|
||||
| `»»»» id` | string(uuid) | false | | |
|
||||
| `»»»» sharing_level` | string | false | | |
|
||||
| `»»»» slug` | string | false | | Slug is a unique identifier within the agent. |
|
||||
| `»»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the<br>`coder server` or via a hostname-based dev URL. If this is set to true<br>and there is no app wildcard configured on the server, the app will not<br>be accessible in the UI. |
|
||||
| `»»»» url` | string | false | | URL is the address being proxied to inside the workspace.<br>If external is specified, this will be opened on the client. |
|
||||
| `»»» architecture` | string | false | | |
|
||||
| `»»» connection_timeout_seconds` | integer | false | | |
|
||||
| `»»» created_at` | string(date-time) | false | | |
|
||||
| `»»» directory` | string | false | | |
|
||||
| `»»» disconnected_at` | string(date-time) | false | | |
|
||||
| `»»» environment_variables` | object | false | | |
|
||||
| `»»»» [any property]` | string | false | | |
|
||||
| `»»» first_connected_at` | string(date-time) | false | | |
|
||||
| `»»» id` | string(uuid) | false | | |
|
||||
| `»»» instance_id` | string | false | | |
|
||||
| `»»» last_connected_at` | string(date-time) | false | | |
|
||||
| `»»» latency` | object | false | | DERPLatency is mapped by region name (e.g. "New York City", "Seattle"). |
|
||||
| `»»»» [any property]` | `codersdk.DERPRegion` | false | | |
|
||||
| `»»»»» latency_ms` | number | false | | |
|
||||
| `»»»»» preferred` | boolean | false | | |
|
||||
| `»»» name` | string | false | | |
|
||||
| `»»» operating_system` | string | false | | |
|
||||
| `»»» resource_id` | string(uuid) | false | | |
|
||||
| `»»» startup_script` | string | false | | |
|
||||
| `»»» status` | string | false | | |
|
||||
| `»»» troubleshooting_url` | string | false | | |
|
||||
| `»»» updated_at` | string(date-time) | false | | |
|
||||
| `»»» version` | string | false | | |
|
||||
| `»» created_at` | string(date-time) | false | | |
|
||||
| `»» daily_cost` | integer | false | | |
|
||||
| `»» hide` | boolean | false | | |
|
||||
| `»» icon` | string | false | | |
|
||||
| `»» id` | string(uuid) | false | | |
|
||||
| `»» job_id` | string(uuid) | false | | |
|
||||
| `»» metadata` | array | false | | |
|
||||
| `»»» key` | string | false | | |
|
||||
| `»»» sensitive` | boolean | false | | |
|
||||
| `»»» value` | string | false | | |
|
||||
| `»» name` | string | false | | |
|
||||
| `»» type` | string | false | | |
|
||||
| `»» workspace_transition` | string | false | | |
|
||||
| `» status` | string | false | | |
|
||||
| `» template_version_id` | string(uuid) | false | | |
|
||||
| `» template_version_name` | string | false | | |
|
||||
| `» transition` | string | false | | |
|
||||
| `» updated_at` | string(date-time) | false | | |
|
||||
| `» workspace_id` | string(uuid) | false | | |
|
||||
| `» workspace_name` | string | false | | |
|
||||
| `» workspace_owner_id` | string(uuid) | false | | |
|
||||
| `» workspace_owner_name` | string | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| -------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» build_number` | integer | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» daily_cost` | integer | false | | |
|
||||
| `» deadline` | string(date-time) | false | | |
|
||||
| `» id` | string(uuid) | false | | |
|
||||
| `» initiator_id` | string(uuid) | false | | |
|
||||
| `» initiator_name` | string | false | | |
|
||||
| `» job` | [codersdk.ProvisionerJob](schemas.md#codersdkprovisionerjob) | false | | |
|
||||
| `»» canceled_at` | string(date-time) | false | | |
|
||||
| `»» completed_at` | string(date-time) | false | | |
|
||||
| `»» created_at` | string(date-time) | false | | |
|
||||
| `»» error` | string | false | | |
|
||||
| `»» file_id` | string(uuid) | false | | |
|
||||
| `»» id` | string(uuid) | false | | |
|
||||
| `»» started_at` | string(date-time) | false | | |
|
||||
| `»» status` | [codersdk.ProvisionerJobStatus](schemas.md#codersdkprovisionerjobstatus) | false | | |
|
||||
| `»» tags` | object | false | | |
|
||||
| `»»» [any property]` | string | false | | |
|
||||
| `»» worker_id` | string(uuid) | false | | |
|
||||
| `» reason` | [codersdk.BuildReason](schemas.md#codersdkbuildreason) | false | | |
|
||||
| `» resources` | array | false | | |
|
||||
| `»» agents` | array | false | | |
|
||||
| `»»» apps` | array | false | | |
|
||||
| `»»»» command` | string | false | | |
|
||||
| `»»»» display_name` | string | false | | DisplayName is a friendly name for the app. |
|
||||
| `»»»» external` | boolean | false | | External specifies whether the URL should be opened externally on<br>the client or not. |
|
||||
| `»»»» health` | [codersdk.WorkspaceAppHealth](schemas.md#codersdkworkspaceapphealth) | false | | |
|
||||
| `»»»» healthcheck` | [codersdk.Healthcheck](schemas.md#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
|
||||
| `»»»»» interval` | integer | false | | Interval specifies the seconds between each health check. |
|
||||
| `»»»»» threshold` | integer | false | | Threshold specifies the number of consecutive failed health checks before returning "unhealthy". |
|
||||
| `»»»»» url` | string | false | | URL specifies the endpoint to check for the app health. |
|
||||
| `»»»» icon` | string | false | | Icon is a relative path or external URL that specifies<br>an icon to be displayed in the dashboard. |
|
||||
| `»»»» id` | string(uuid) | false | | |
|
||||
| `»»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
|
||||
| `»»»» slug` | string | false | | Slug is a unique identifier within the agent. |
|
||||
| `»»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the<br>`coder server` or via a hostname-based dev URL. If this is set to true<br>and there is no app wildcard configured on the server, the app will not<br>be accessible in the UI. |
|
||||
| `»»»» url` | string | false | | URL is the address being proxied to inside the workspace.<br>If external is specified, this will be opened on the client. |
|
||||
| `»»» architecture` | string | false | | |
|
||||
| `»»» connection_timeout_seconds` | integer | false | | |
|
||||
| `»»» created_at` | string(date-time) | false | | |
|
||||
| `»»» directory` | string | false | | |
|
||||
| `»»» disconnected_at` | string(date-time) | false | | |
|
||||
| `»»» environment_variables` | object | false | | |
|
||||
| `»»»» [any property]` | string | false | | |
|
||||
| `»»» first_connected_at` | string(date-time) | false | | |
|
||||
| `»»» id` | string(uuid) | false | | |
|
||||
| `»»» instance_id` | string | false | | |
|
||||
| `»»» last_connected_at` | string(date-time) | false | | |
|
||||
| `»»» latency` | object | false | | DERPLatency is mapped by region name (e.g. "New York City", "Seattle"). |
|
||||
| `»»»» [any property]` | [codersdk.DERPRegion](schemas.md#codersdkderpregion) | false | | |
|
||||
| `»»»»» latency_ms` | number | false | | |
|
||||
| `»»»»» preferred` | boolean | false | | |
|
||||
| `»»» name` | string | false | | |
|
||||
| `»»» operating_system` | string | false | | |
|
||||
| `»»» resource_id` | string(uuid) | false | | |
|
||||
| `»»» startup_script` | string | false | | |
|
||||
| `»»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
|
||||
| `»»» troubleshooting_url` | string | false | | |
|
||||
| `»»» updated_at` | string(date-time) | false | | |
|
||||
| `»»» version` | string | false | | |
|
||||
| `»» created_at` | string(date-time) | false | | |
|
||||
| `»» daily_cost` | integer | false | | |
|
||||
| `»» hide` | boolean | false | | |
|
||||
| `»» icon` | string | false | | |
|
||||
| `»» id` | string(uuid) | false | | |
|
||||
| `»» job_id` | string(uuid) | false | | |
|
||||
| `»» metadata` | array | false | | |
|
||||
| `»»» key` | string | false | | |
|
||||
| `»»» sensitive` | boolean | false | | |
|
||||
| `»»» value` | string | false | | |
|
||||
| `»» name` | string | false | | |
|
||||
| `»» type` | string | false | | |
|
||||
| `»» workspace_transition` | [codersdk.WorkspaceTransition](schemas.md#codersdkworkspacetransition) | false | | |
|
||||
| `» status` | [codersdk.WorkspaceStatus](schemas.md#codersdkworkspacestatus) | false | | |
|
||||
| `» template_version_id` | string(uuid) | false | | |
|
||||
| `» template_version_name` | string | false | | |
|
||||
| `» transition` | [codersdk.WorkspaceTransition](schemas.md#codersdkworkspacetransition) | false | | |
|
||||
| `» updated_at` | string(date-time) | false | | |
|
||||
| `» workspace_id` | string(uuid) | false | | |
|
||||
| `» workspace_name` | string | false | | |
|
||||
| `» workspace_owner_id` | string(uuid) | false | | |
|
||||
| `» workspace_owner_name` | string | false | | |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
|
@ -833,6 +839,10 @@ Status Code **200**
|
|||
| `reason` | `initiator` |
|
||||
| `reason` | `autostart` |
|
||||
| `reason` | `autostop` |
|
||||
| `health` | `disabled` |
|
||||
| `health` | `initializing` |
|
||||
| `health` | `healthy` |
|
||||
| `health` | `unhealthy` |
|
||||
| `sharing_level` | `owner` |
|
||||
| `sharing_level` | `authenticated` |
|
||||
| `sharing_level` | `public` |
|
||||
|
@ -939,7 +949,7 @@ curl -X POST http://coder-server:8080/api/v2/workspaces/{id}/builds \
|
|||
"command": "string",
|
||||
"display_name": "string",
|
||||
"external": true,
|
||||
"health": "string",
|
||||
"health": "disabled",
|
||||
"healthcheck": {
|
||||
"interval": 0,
|
||||
"threshold": 0,
|
||||
|
|
|
@ -263,7 +263,7 @@ curl -X GET http://coder-server:8080/api/v2/config/deployment \
|
|||
"secret": true,
|
||||
"shorthand": "string",
|
||||
"usage": "string",
|
||||
"value": "string"
|
||||
"value": ["string"]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -299,17 +299,19 @@ curl -X GET http://coder-server:8080/api/v2/config/deployment \
|
|||
"secret": true,
|
||||
"shorthand": "string",
|
||||
"usage": "string",
|
||||
"value": {
|
||||
"auth_url": "string",
|
||||
"client_id": "string",
|
||||
"id": "string",
|
||||
"no_refresh": true,
|
||||
"regex": "string",
|
||||
"scopes": ["string"],
|
||||
"token_url": "string",
|
||||
"type": "string",
|
||||
"validate_url": "string"
|
||||
}
|
||||
"value": [
|
||||
{
|
||||
"auth_url": "string",
|
||||
"client_id": "string",
|
||||
"id": "string",
|
||||
"no_refresh": true,
|
||||
"regex": "string",
|
||||
"scopes": ["string"],
|
||||
"token_url": "string",
|
||||
"type": "string",
|
||||
"validate_url": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"http_address": {
|
||||
"default": "string",
|
||||
|
@ -388,7 +390,7 @@ curl -X GET http://coder-server:8080/api/v2/config/deployment \
|
|||
"secret": true,
|
||||
"shorthand": "string",
|
||||
"usage": "string",
|
||||
"value": "string"
|
||||
"value": ["string"]
|
||||
},
|
||||
"allowed_teams": {
|
||||
"default": ["string"],
|
||||
|
@ -399,7 +401,7 @@ curl -X GET http://coder-server:8080/api/v2/config/deployment \
|
|||
"secret": true,
|
||||
"shorthand": "string",
|
||||
"usage": "string",
|
||||
"value": "string"
|
||||
"value": ["string"]
|
||||
},
|
||||
"client_id": {
|
||||
"default": "string",
|
||||
|
@ -479,7 +481,7 @@ curl -X GET http://coder-server:8080/api/v2/config/deployment \
|
|||
"secret": true,
|
||||
"shorthand": "string",
|
||||
"usage": "string",
|
||||
"value": "string"
|
||||
"value": ["string"]
|
||||
},
|
||||
"ignore_email_verified": {
|
||||
"default": true,
|
||||
|
@ -512,7 +514,7 @@ curl -X GET http://coder-server:8080/api/v2/config/deployment \
|
|||
"secret": true,
|
||||
"shorthand": "string",
|
||||
"usage": "string",
|
||||
"value": "string"
|
||||
"value": ["string"]
|
||||
},
|
||||
"username_field": {
|
||||
"default": "string",
|
||||
|
@ -640,7 +642,7 @@ curl -X GET http://coder-server:8080/api/v2/config/deployment \
|
|||
"secret": true,
|
||||
"shorthand": "string",
|
||||
"usage": "string",
|
||||
"value": "string"
|
||||
"value": ["string"]
|
||||
},
|
||||
"proxy_trusted_origins": {
|
||||
"default": ["string"],
|
||||
|
@ -651,7 +653,7 @@ curl -X GET http://coder-server:8080/api/v2/config/deployment \
|
|||
"secret": true,
|
||||
"shorthand": "string",
|
||||
"usage": "string",
|
||||
"value": "string"
|
||||
"value": ["string"]
|
||||
},
|
||||
"rate_limit": {
|
||||
"api": {
|
||||
|
@ -779,7 +781,7 @@ curl -X GET http://coder-server:8080/api/v2/config/deployment \
|
|||
"secret": true,
|
||||
"shorthand": "string",
|
||||
"usage": "string",
|
||||
"value": "string"
|
||||
"value": ["string"]
|
||||
},
|
||||
"client_auth": {
|
||||
"default": "string",
|
||||
|
@ -845,7 +847,7 @@ curl -X GET http://coder-server:8080/api/v2/config/deployment \
|
|||
"secret": true,
|
||||
"shorthand": "string",
|
||||
"usage": "string",
|
||||
"value": "string"
|
||||
"value": ["string"]
|
||||
},
|
||||
"min_version": {
|
||||
"default": "string",
|
||||
|
|
|
@ -59,17 +59,17 @@ curl -X GET http://coder-server:8080/api/v2/parameters/{scope}/{id} \
|
|||
|
||||
Status Code **200**
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ---------------------- | ----------------- | -------- | ------------ | ------------------------------------------------- |
|
||||
| `[array item]` | array | false | | [Parameter represents a set value for the scope.] |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» destination_scheme` | string | false | | |
|
||||
| `» id` | string(uuid) | false | | |
|
||||
| `» name` | string | false | | |
|
||||
| `» scope` | string | false | | |
|
||||
| `» scope_id` | string(uuid) | false | | |
|
||||
| `» source_scheme` | string | false | | |
|
||||
| `» updated_at` | string(date-time) | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ---------------------- | ------------------------------------------------------------------------------------ | -------- | ------------ | ------------------------------------------------- |
|
||||
| `[array item]` | array | false | | [Parameter represents a set value for the scope.] |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» destination_scheme` | [codersdk.ParameterDestinationScheme](schemas.md#codersdkparameterdestinationscheme) | false | | |
|
||||
| `» id` | string(uuid) | false | | |
|
||||
| `» name` | string | false | | |
|
||||
| `» scope` | [codersdk.ParameterScope](schemas.md#codersdkparameterscope) | false | | |
|
||||
| `» scope_id` | string(uuid) | false | | |
|
||||
| `» source_scheme` | [codersdk.ParameterSourceScheme](schemas.md#codersdkparametersourcescheme) | false | | |
|
||||
| `» updated_at` | string(date-time) | false | | |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -75,7 +75,7 @@ curl -X POST http://coder-server:8080/api/v2/organizations/{organization-id}/tem
|
|||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"name": "string",
|
||||
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
|
||||
"provisioner": "string",
|
||||
"provisioner": "terraform",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
"workspace_owner_count": 0
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/templat
|
|||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"name": "string",
|
||||
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
|
||||
"provisioner": "string",
|
||||
"provisioner": "terraform",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
"workspace_owner_count": 0
|
||||
}
|
||||
|
@ -155,29 +155,35 @@ curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/templat
|
|||
|
||||
Status Code **200**
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------------------------------ | --------------------------------- | -------- | ------------ | ------------------------------------------ |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» active_user_count` | integer | false | | ActiveUserCount is set to -1 when loading. |
|
||||
| `» active_version_id` | string | false | | |
|
||||
| `» allow_user_cancel_workspace_jobs` | boolean | false | | |
|
||||
| `» build_time_stats` | `codersdk.TemplateBuildTimeStats` | false | | |
|
||||
| `»» [any property]` | `codersdk.TransitionStats` | false | | |
|
||||
| `»»» p50` | integer | false | | |
|
||||
| `»»» p95` | integer | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» created_by_id` | string(uuid) | false | | |
|
||||
| `» created_by_name` | string | false | | |
|
||||
| `» default_ttl_ms` | integer | false | | |
|
||||
| `» description` | string | false | | |
|
||||
| `» display_name` | string | false | | |
|
||||
| `» icon` | string | false | | |
|
||||
| `» id` | string(uuid) | false | | |
|
||||
| `» name` | string | false | | |
|
||||
| `» organization_id` | string(uuid) | false | | |
|
||||
| `» provisioner` | string | false | | |
|
||||
| `» updated_at` | string(date-time) | false | | |
|
||||
| `» workspace_owner_count` | integer | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------------------------------ | ---------------------------------------------------------------------------- | -------- | ------------ | ------------------------------------------ |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» active_user_count` | integer | false | | ActiveUserCount is set to -1 when loading. |
|
||||
| `» active_version_id` | string | false | | |
|
||||
| `» allow_user_cancel_workspace_jobs` | boolean | false | | |
|
||||
| `» build_time_stats` | [codersdk.TemplateBuildTimeStats](schemas.md#codersdktemplatebuildtimestats) | false | | |
|
||||
| `»» [any property]` | [codersdk.TransitionStats](schemas.md#codersdktransitionstats) | false | | |
|
||||
| `»»» p50` | integer | false | | |
|
||||
| `»»» p95` | integer | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» created_by_id` | string(uuid) | false | | |
|
||||
| `» created_by_name` | string | false | | |
|
||||
| `» default_ttl_ms` | integer | false | | |
|
||||
| `» description` | string | false | | |
|
||||
| `» display_name` | string | false | | |
|
||||
| `» icon` | string | false | | |
|
||||
| `» id` | string(uuid) | false | | |
|
||||
| `» name` | string | false | | |
|
||||
| `» organization_id` | string(uuid) | false | | |
|
||||
| `» provisioner` | string | false | | |
|
||||
| `» updated_at` | string(date-time) | false | | |
|
||||
| `» workspace_owner_count` | integer | false | | |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
| Property | Value |
|
||||
| ------------- | ----------- |
|
||||
| `provisioner` | `terraform` |
|
||||
|
||||
To perform this operation, you must be authenticated. [Learn more](authentication.md).
|
||||
|
||||
|
@ -230,7 +236,7 @@ curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/templat
|
|||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"name": "string",
|
||||
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
|
||||
"provisioner": "string",
|
||||
"provisioner": "terraform",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
"workspace_owner_count": 0
|
||||
}
|
||||
|
@ -292,7 +298,7 @@ curl -X GET http://coder-server:8080/api/v2/templates/{id} \
|
|||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"name": "string",
|
||||
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
|
||||
"provisioner": "string",
|
||||
"provisioner": "terraform",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
"workspace_owner_count": 0
|
||||
}
|
||||
|
@ -398,7 +404,7 @@ curl -X PATCH http://coder-server:8080/api/v2/templates/{id} \
|
|||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"name": "string",
|
||||
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
|
||||
"provisioner": "string",
|
||||
"provisioner": "terraform",
|
||||
"updated_at": "2019-08-24T14:15:22Z",
|
||||
"workspace_owner_count": 0
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/member
|
|||
"command": "string",
|
||||
"display_name": "string",
|
||||
"external": true,
|
||||
"health": "string",
|
||||
"health": "disabled",
|
||||
"healthcheck": {
|
||||
"interval": 0,
|
||||
"threshold": 0,
|
||||
|
@ -226,7 +226,7 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
|
|||
"command": "string",
|
||||
"display_name": "string",
|
||||
"external": true,
|
||||
"health": "string",
|
||||
"health": "disabled",
|
||||
"healthcheck": {
|
||||
"interval": 0,
|
||||
"threshold": 0,
|
||||
|
@ -410,7 +410,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces \
|
|||
"command": "string",
|
||||
"display_name": "string",
|
||||
"external": true,
|
||||
"health": "string",
|
||||
"health": "disabled",
|
||||
"healthcheck": {},
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
|
@ -568,7 +568,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{id} \
|
|||
"command": "string",
|
||||
"display_name": "string",
|
||||
"external": true,
|
||||
"health": "string",
|
||||
"health": "disabled",
|
||||
"healthcheck": {
|
||||
"interval": 0,
|
||||
"threshold": 0,
|
||||
|
|
|
@ -18,7 +18,7 @@ trap cleanup EXIT
|
|||
log "Use temporary file: ${API_MD_TMP_FILE}"
|
||||
|
||||
pushd "${PROJECT_ROOT}"
|
||||
go run github.com/swaggo/swag/cmd/swag@v1.8.6 init \
|
||||
go run github.com/swaggo/swag/cmd/swag@v1.8.9 init \
|
||||
--generalInfo="coderd.go" \
|
||||
--dir="./coderd,./codersdk" \
|
||||
--output="./coderd/apidoc" \
|
||||
|
|
|
@ -133,10 +133,10 @@
|
|||
|
||||
{{? block===blocks[0] }}
|
||||
{{= data.tags.section }}
|
||||
|
||||
### Properties
|
||||
{{?}}
|
||||
|
||||
{{? block.rows.length > 0 && block.rows[0].displayName != "*anonymous*"}}
|
||||
{{? block.rows.length}}|Name|Type|Required|Restrictions|Description|
|
||||
|---|---|---|---|---|{{?}}
|
||||
{{~ block.rows :p}}|{{= renderDisplayName(p)}}|{{= renderPropertyType(p)}}|{{=p.required}}|{{=p.restrictions||''}}|{{= renderDescription(p)}}|
|
||||
|
@ -145,16 +145,24 @@
|
|||
{{? (blocks[0].rows.length === 0) && (blocks.length === 1) }}
|
||||
*None*
|
||||
{{?}}
|
||||
{{?}}
|
||||
|
||||
{{? enums.length > 0 }}
|
||||
{{= data.tags.section }}
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
{{? block.rows.length > 0 && block.rows[0].displayName != "*anonymous*"}}
|
||||
|Property|Value|
|
||||
|---|---|
|
||||
{{~ enums :e}}|`{{=e.name}}`|`{{=data.utils.toPrimitive(e.value)}}`|
|
||||
{{~}}
|
||||
{{??}}
|
||||
|Value|
|
||||
|---|
|
||||
{{~ enums :e}}|`{{=data.utils.toPrimitive(e.value)}}`|
|
||||
{{~}}
|
||||
{{?}}
|
||||
|
||||
{{= data.tags.endSection }}
|
||||
{{?}}
|
||||
|
|
|
@ -35,7 +35,8 @@
|
|||
|
||||
function renderResponsePropertyType(p) {
|
||||
if (p.$ref) {
|
||||
return '`' + p.$ref + '`';
|
||||
const href = p.$ref.replace(".","").toLowerCase();
|
||||
return "[" + p.$ref + "](schemas.md#" + href + ")";
|
||||
}
|
||||
|
||||
if (p.type == 'array') {
|
||||
|
|
Loading…
Reference in New Issue