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:
Marcin Tojek 2023-01-10 15:47:08 +01:00 committed by GitHub
parent bbe33fef41
commit a23a471034
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 1413 additions and 553 deletions

View File

@ -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

View File

@ -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,9 +2042,13 @@ 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.",
"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"
}
]
}
}
},
"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.",
"allOf": [
{
"$ref": "#/definitions/codersdk.DeploymentConfigField-string"
}
]
},
"agent_fallback_troubleshooting_url": {
"$ref": "#/definitions/codersdk.DeploymentConfigField-string"
@ -2445,9 +2503,12 @@ const docTemplate = `{
"type": "string"
},
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/codersdk.GitAuthConfig"
}
}
}
},
"codersdk.DeploymentConfigField-array_string": {
"type": "object",
@ -2480,9 +2541,12 @@ const docTemplate = `{
"type": "string"
},
"value": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"codersdk.DeploymentConfigField-bool": {
"type": "object",
@ -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.",
"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": {

View File

@ -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,9 +1795,13 @@
"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.",
"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"
}
]
}
}
},
"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.",
"allOf": [
{
"$ref": "#/definitions/codersdk.DeploymentConfigField-string"
}
]
},
"agent_fallback_troubleshooting_url": {
"$ref": "#/definitions/codersdk.DeploymentConfigField-string"
@ -2178,9 +2226,12 @@
"type": "string"
},
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/codersdk.GitAuthConfig"
}
}
}
},
"codersdk.DeploymentConfigField-array_string": {
"type": "object",
@ -2213,9 +2264,12 @@
"type": "string"
},
"value": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"codersdk.DeploymentConfigField-bool": {
"type": "object",
@ -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.",
"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": {

View File

@ -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

View File

@ -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.

View File

@ -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,

View File

@ -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"

View File

@ -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"
}
@ -238,24 +238,26 @@ 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 | | |
| `» 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` |
| `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,
@ -370,21 +372,21 @@ 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 | | |
| `»»» 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` | string | 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. |
@ -400,14 +402,14 @@ Status Code **200**
| `»» 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 | | |
| `»»» [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` | string | false | | |
| `»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
| `»» troubleshooting_url` | string | false | | |
| `»» updated_at` | string(date-time) | false | | |
| `»» version` | string | false | | |
@ -423,12 +425,16 @@ Status Code **200**
| `»» value` | string | false | | |
| `» name` | string | false | | |
| `» type` | string | false | | |
| `» workspace_transition` | 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,
@ -735,7 +741,7 @@ 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 | | |
@ -744,7 +750,7 @@ Status Code **200**
| `» id` | string(uuid) | false | | |
| `» initiator_id` | string(uuid) | false | | |
| `» initiator_name` | string | false | | |
| `» job` | `codersdk.ProvisionerJob` | 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 | | |
@ -752,25 +758,25 @@ Status Code **200**
| `»» file_id` | string(uuid) | false | | |
| `»» id` | string(uuid) | false | | |
| `»» started_at` | string(date-time) | false | | |
| `»» status` | string | false | | |
| `»» status` | [codersdk.ProvisionerJobStatus](schemas.md#codersdkprovisionerjobstatus) | false | | |
| `»» tags` | object | false | | |
| `»»» [any property]` | string | false | | |
| `»» worker_id` | string(uuid) | false | | |
| `» reason` | string | 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` | string | false | | |
| `»»»» healthcheck` | `codersdk.Healthcheck` | false | | |
| `»»»» 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` | string | 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. |
@ -786,14 +792,14 @@ Status Code **200**
| `»»» 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 | | |
| `»»»» [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` | string | false | | |
| `»»» status` | [codersdk.WorkspaceAgentStatus](schemas.md#codersdkworkspaceagentstatus) | false | | |
| `»»» troubleshooting_url` | string | false | | |
| `»»» updated_at` | string(date-time) | false | | |
| `»»» version` | string | false | | |
@ -809,11 +815,11 @@ Status Code **200**
| `»»» value` | string | false | | |
| `»» name` | string | false | | |
| `»» type` | string | false | | |
| `»» workspace_transition` | string | false | | |
| `» status` | 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` | string | false | | |
| `» transition` | [codersdk.WorkspaceTransition](schemas.md#codersdkworkspacetransition) | false | | |
| `» updated_at` | string(date-time) | false | | |
| `» workspace_id` | string(uuid) | false | | |
| `» workspace_name` | string | false | | |
@ -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,

View File

@ -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,7 +299,8 @@ curl -X GET http://coder-server:8080/api/v2/config/deployment \
"secret": true,
"shorthand": "string",
"usage": "string",
"value": {
"value": [
{
"auth_url": "string",
"client_id": "string",
"id": "string",
@ -310,6 +311,7 @@ curl -X GET http://coder-server:8080/api/v2/config/deployment \
"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",

View File

@ -60,15 +60,15 @@ 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 | | |
| `» destination_scheme` | [codersdk.ParameterDestinationScheme](schemas.md#codersdkparameterdestinationscheme) | false | | |
| `» id` | string(uuid) | false | | |
| `» name` | string | false | | |
| `» scope` | string | false | | |
| `» scope` | [codersdk.ParameterScope](schemas.md#codersdkparameterscope) | false | | |
| `» scope_id` | string(uuid) | false | | |
| `» source_scheme` | string | false | | |
| `» source_scheme` | [codersdk.ParameterSourceScheme](schemas.md#codersdkparametersourcescheme) | false | | |
| `» updated_at` | string(date-time) | false | | |
#### Enumerated Values

View File

@ -90,6 +90,24 @@
| ----------------- | ------- | -------- | ------------ | ------------------------------------------------------------------------------ |
| `report_interval` | integer | false | | Report interval is the duration after which the agent should send stats again. |
## codersdk.AuditAction
```json
"create"
```
### Properties
#### Enumerated Values
| Value |
| -------- |
| `create` |
| `write` |
| `delete` |
| `start` |
| `stop` |
## codersdk.AuditDiff
```json
@ -135,7 +153,7 @@
```json
{
"action": "string",
"action": "create",
"additional_fields": [0],
"description": "string",
"diff": {
@ -151,7 +169,7 @@
}
},
"id": "string",
"ip": {},
"ip": "string",
"is_deleted": true,
"organization_id": "string",
"request_id": "string",
@ -159,7 +177,7 @@
"resource_id": "string",
"resource_link": "string",
"resource_target": "string",
"resource_type": "string",
"resource_type": "organization",
"status_code": 0,
"time": "string",
"user": {
@ -175,7 +193,7 @@
"name": "string"
}
],
"status": "string",
"status": "active",
"username": "string"
},
"user_agent": "string"
@ -185,13 +203,13 @@
### Properties
| Name | Type | Required | Restrictions | Description |
| ------------------- | ---------------------------------------- | -------- | ------------ | -------------------------------------------- |
| `action` | string | false | | |
| ------------------- | ---------------------------------------------- | -------- | ------------ | -------------------------------------------- |
| `action` | [codersdk.AuditAction](#codersdkauditaction) | false | | |
| `additional_fields` | array of integer | false | | |
| `description` | string | false | | |
| `diff` | [codersdk.AuditDiff](#codersdkauditdiff) | false | | |
| `id` | string | false | | |
| `ip` | [netip.Addr](#netipaddr) | false | | |
| `ip` | string | false | | |
| `is_deleted` | boolean | false | | |
| `organization_id` | string | false | | |
| `request_id` | string | false | | |
@ -199,7 +217,7 @@
| `resource_id` | string | false | | |
| `resource_link` | string | false | | |
| `resource_target` | string | false | | Resource target is the name of the resource. |
| `resource_type` | string | false | | |
| `resource_type` | [codersdk.ResourceType](#codersdkresourcetype) | false | | |
| `status_code` | integer | false | | |
| `time` | string | false | | |
| `user` | [codersdk.User](#codersdkuser) | false | | |
@ -211,7 +229,7 @@
{
"audit_logs": [
{
"action": "string",
"action": "create",
"additional_fields": [0],
"description": "string",
"diff": {
@ -227,7 +245,7 @@
}
},
"id": "string",
"ip": {},
"ip": "string",
"is_deleted": true,
"organization_id": "string",
"request_id": "string",
@ -235,7 +253,7 @@
"resource_id": "string",
"resource_link": "string",
"resource_target": "string",
"resource_type": "string",
"resource_type": "organization",
"status_code": 0,
"time": "string",
"user": {
@ -251,7 +269,7 @@
"name": "string"
}
],
"status": "string",
"status": "active",
"username": "string"
},
"user_agent": "string"
@ -287,9 +305,9 @@ AuthorizationCheck is used to check if the currently authenticated user (or the
### Properties
| Name | Type | Required | Restrictions | Description |
| -------- | ------------------------------------------------------------ | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| -------- | ------------------------------------------------------------ | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `action` | string | false | | |
| `object` | [codersdk.AuthorizationObject](#codersdkauthorizationobject) | false | | 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` | [codersdk.AuthorizationObject](#codersdkauthorizationobject) | false | | 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 owned by 'me', try to also add an 'OrganizationID' to the settings. Omitting the 'OrganizationID' could produce the incorrect value, as workspaces have both `user` and `organization` owners. |
#### Enumerated Values
@ -403,6 +421,22 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
| `external_url` | string | false | | External URL references the current Coder version. For production builds, this will link directly to a release. For development builds, this will link to a commit. |
| `version` | string | false | | Version returns the semantic version of the build. |
## codersdk.BuildReason
```json
"initiator"
```
### Properties
#### Enumerated Values
| Value |
| ----------- |
| `initiator` |
| `autostart` |
| `autostop` |
## codersdk.CreateParameterRequest
```json
@ -420,11 +454,11 @@ CreateParameterRequest is a structure used to create a new parameter value for a
### Properties
| Name | Type | Required | Restrictions | Description |
| --------------------- | ------ | -------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| --------------------- | -------------------------------------------------------------------------- | -------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `copy_from_parameter` | string | false | | Copy from parameter allows copying the value of another parameter. The other param must be related to the same template_id for this to succeed. No other fields are required if using this, as all fields will be copied from the other parameter. |
| `destination_scheme` | string | true | | |
| `destination_scheme` | [codersdk.ParameterDestinationScheme](#codersdkparameterdestinationscheme) | true | | |
| `name` | string | true | | |
| `source_scheme` | string | true | | |
| `source_scheme` | [codersdk.ParameterSourceScheme](#codersdkparametersourcescheme) | true | | |
| `source_value` | string | true | | |
#### Enumerated Values
@ -488,10 +522,10 @@ CreateParameterRequest is a structure used to create a new parameter value for a
### Properties
| Name | Type | Required | Restrictions | Description |
| --------------- | ------ | -------- | ------------ | ----------- |
| `action` | string | false | | |
| --------------- | ---------------------------------------------- | -------- | ------------ | ----------- |
| `action` | [codersdk.AuditAction](#codersdkauditaction) | false | | |
| `resource_id` | string | false | | |
| `resource_type` | string | false | | |
| `resource_type` | [codersdk.ResourceType](#codersdkresourcetype) | false | | |
| `time` | string | false | | |
#### Enumerated Values
@ -543,7 +577,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
| `parameter_values` | array of [codersdk.CreateParameterRequest](#codersdkcreateparameterrequest) | false | | Parameter values are optional. It will write params to the 'workspace' scope. This will overwrite any existing parameters with the same name. This will not delete old params not included in this list. |
| `state` | array of integer | false | | |
| `template_version_id` | string | false | | |
| `transition` | string | true | | |
| `transition` | [codersdk.WorkspaceTransition](#codersdkworkspacetransition) | true | | |
#### Enumerated Values
@ -647,7 +681,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
"value": ["string"]
}
}
}
@ -780,7 +814,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
"value": ["string"]
}
}
```
@ -978,7 +1012,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
"value": ["string"]
}
}
},
@ -1014,7 +1048,8 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"secret": true,
"shorthand": "string",
"usage": "string",
"value": {
"value": [
{
"auth_url": "string",
"client_id": "string",
"id": "string",
@ -1025,6 +1060,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"type": "string",
"validate_url": "string"
}
]
},
"http_address": {
"default": "string",
@ -1103,7 +1139,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
"value": ["string"]
},
"allowed_teams": {
"default": ["string"],
@ -1114,7 +1150,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
"value": ["string"]
},
"client_id": {
"default": "string",
@ -1194,7 +1230,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
"value": ["string"]
},
"ignore_email_verified": {
"default": true,
@ -1227,7 +1263,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
"value": ["string"]
},
"username_field": {
"default": "string",
@ -1355,7 +1391,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
"value": ["string"]
},
"proxy_trusted_origins": {
"default": ["string"],
@ -1366,7 +1402,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
"value": ["string"]
},
"rate_limit": {
"api": {
@ -1494,7 +1530,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
"value": ["string"]
},
"client_auth": {
"default": "string",
@ -1560,7 +1596,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
"value": ["string"]
},
"min_version": {
"default": "string",
@ -1648,9 +1684,9 @@ CreateParameterRequest is a structure used to create a new parameter value for a
### Properties
| Name | Type | Required | Restrictions | Description |
| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- | -------- | ------------ | ----------- |
| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- | -------- | ------------ | ----------------------------------------------- |
| `access_url` | [codersdk.DeploymentConfigField-string](#codersdkdeploymentconfigfield-string) | false | | |
| `address` | [codersdk.DeploymentConfigField-string](#codersdkdeploymentconfigfield-string) | false | | |
| `address` | [codersdk.DeploymentConfigField-string](#codersdkdeploymentconfigfield-string) | false | | Address Use HTTPAddress or TLS.Address instead. |
| `agent_fallback_troubleshooting_url` | [codersdk.DeploymentConfigField-string](#codersdkdeploymentconfigfield-string) | false | | |
| `agent_stat_refresh_interval` | [codersdk.DeploymentConfigField-time_Duration](#codersdkdeploymentconfigfield-time_duration) | false | | |
| `audit_logging` | [codersdk.DeploymentConfigField-bool](#codersdkdeploymentconfigfield-bool) | false | | |
@ -1707,7 +1743,8 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"secret": true,
"shorthand": "string",
"usage": "string",
"value": {
"value": [
{
"auth_url": "string",
"client_id": "string",
"id": "string",
@ -1718,6 +1755,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"type": "string",
"validate_url": "string"
}
]
}
```
@ -1733,7 +1771,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
| `secret` | boolean | false | | |
| `shorthand` | string | false | | |
| `usage` | string | false | | |
| `value` | [codersdk.GitAuthConfig](#codersdkgitauthconfig) | false | | |
| `value` | array of [codersdk.GitAuthConfig](#codersdkgitauthconfig) | false | | |
## codersdk.DeploymentConfigField-array_string
@ -1747,7 +1785,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
"value": ["string"]
}
```
@ -1763,7 +1801,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
| `secret` | boolean | false | | |
| `shorthand` | string | false | | |
| `usage` | string | false | | |
| `value` | string | false | | |
| `value` | array of string | false | | |
## codersdk.DeploymentConfigField-bool
@ -1961,6 +1999,39 @@ CreateParameterRequest is a structure used to create a new parameter value for a
| `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. |
## codersdk.LogLevel
```json
"trace"
```
### Properties
#### Enumerated Values
| Value |
| ------- |
| `trace` |
| `debug` |
| `info` |
| `warn` |
| `error` |
## codersdk.LogSource
```json
"provisioner_daemon"
```
### Properties
#### Enumerated Values
| Value |
| -------------------- |
| `provisioner_daemon` |
| `provisioner` |
## codersdk.OAuth2Config
```json
@ -1997,7 +2068,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
"value": ["string"]
},
"allowed_teams": {
"default": ["string"],
@ -2008,7 +2079,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
"value": ["string"]
},
"client_id": {
"default": "string",
@ -2088,7 +2159,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
"value": ["string"]
},
"allowed_teams": {
"default": ["string"],
@ -2099,7 +2170,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
"value": ["string"]
},
"client_id": {
"default": "string",
@ -2195,7 +2266,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
"value": ["string"]
},
"ignore_email_verified": {
"default": true,
@ -2228,7 +2299,7 @@ CreateParameterRequest is a structure used to create a new parameter value for a
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
"value": ["string"]
},
"username_field": {
"default": "string",
@ -2277,14 +2348,14 @@ Parameter represents a set value for the scope.
### Properties
| Name | Type | Required | Restrictions | Description |
| -------------------- | ------ | -------- | ------------ | ----------- |
| -------------------- | -------------------------------------------------------------------------- | -------- | ------------ | ----------- |
| `created_at` | string | false | | |
| `destination_scheme` | string | false | | |
| `destination_scheme` | [codersdk.ParameterDestinationScheme](#codersdkparameterdestinationscheme) | false | | |
| `id` | string | false | | |
| `name` | string | false | | |
| `scope` | string | false | | |
| `scope` | [codersdk.ParameterScope](#codersdkparameterscope) | false | | |
| `scope_id` | string | false | | |
| `source_scheme` | string | false | | |
| `source_scheme` | [codersdk.ParameterSourceScheme](#codersdkparametersourcescheme) | false | | |
| `updated_at` | string | false | | |
#### Enumerated Values
@ -2300,13 +2371,60 @@ Parameter represents a set value for the scope.
| `source_scheme` | `none` |
| `source_scheme` | `data` |
## codersdk.ParameterDestinationScheme
```json
"none"
```
### Properties
#### Enumerated Values
| Value |
| ---------------------- |
| `none` |
| `environment_variable` |
| `provisioner_variable` |
## codersdk.ParameterScope
```json
"template"
```
### Properties
#### Enumerated Values
| Value |
| ------------ |
| `template` |
| `workspace` |
| `import_job` |
## codersdk.ParameterSourceScheme
```json
"none"
```
### Properties
#### Enumerated Values
| Value |
| ------ |
| `none` |
| `data` |
## codersdk.PostWorkspaceAppHealthsRequest
```json
{
"healths": {
"property1": "string",
"property2": "string"
"property1": "disabled",
"property2": "disabled"
}
}
```
@ -2314,9 +2432,9 @@ Parameter represents a set value for the scope.
### Properties
| Name | Type | Required | Restrictions | Description |
| ------------------ | ------ | -------- | ------------ | --------------------------------------------------------------------- |
| ------------------ | ---------------------------------------------------------- | -------- | ------------ | --------------------------------------------------------------------- |
| `healths` | object | false | | Healths is a map of the workspace app name and the health of the app. |
| » `[any property]` | string | false | | |
| » `[any property]` | [codersdk.WorkspaceAppHealth](#codersdkworkspaceapphealth) | false | | |
## codersdk.PprofConfig
@ -2473,7 +2591,7 @@ Parameter represents a set value for the scope.
### Properties
| Name | Type | Required | Restrictions | Description |
| ------------------ | ------ | -------- | ------------ | ----------- |
| ------------------ | -------------------------------------------------------------- | -------- | ------------ | ----------- |
| `canceled_at` | string | false | | |
| `completed_at` | string | false | | |
| `created_at` | string | false | | |
@ -2481,7 +2599,7 @@ Parameter represents a set value for the scope.
| `file_id` | string | false | | |
| `id` | string | false | | |
| `started_at` | string | false | | |
| `status` | string | false | | |
| `status` | [codersdk.ProvisionerJobStatus](#codersdkprovisionerjobstatus) | false | | |
| `tags` | object | false | | |
| » `[any property]` | string | false | | |
| `worker_id` | string | false | | |
@ -2504,7 +2622,7 @@ Parameter represents a set value for the scope.
"created_at": "2019-08-24T14:15:22Z",
"id": 0,
"log_level": "trace",
"log_source": "string",
"log_source": "provisioner_daemon",
"output": "string",
"stage": "string"
}
@ -2513,11 +2631,11 @@ Parameter represents a set value for the scope.
### Properties
| Name | Type | Required | Restrictions | Description |
| ------------ | ------- | -------- | ------------ | ----------- |
| ------------ | ---------------------------------------- | -------- | ------------ | ----------- |
| `created_at` | string | false | | |
| `id` | integer | false | | |
| `log_level` | string | false | | |
| `log_source` | string | false | | |
| `log_level` | [codersdk.LogLevel](#codersdkloglevel) | false | | |
| `log_source` | [codersdk.LogSource](#codersdklogsource) | false | | |
| `output` | string | false | | |
| `stage` | string | false | | |
@ -2531,6 +2649,25 @@ Parameter represents a set value for the scope.
| `log_level` | `warn` |
| `log_level` | `error` |
## codersdk.ProvisionerJobStatus
```json
"pending"
```
### Properties
#### Enumerated Values
| Value |
| ----------- |
| `pending` |
| `running` |
| `succeeded` |
| `canceling` |
| `canceled` |
| `failed` |
## codersdk.PutExtendWorkspaceRequest
```json
@ -2581,6 +2718,28 @@ Parameter represents a set value for the scope.
| `api` | [codersdk.DeploymentConfigField-int](#codersdkdeploymentconfigfield-int) | false | | |
| `disable_all` | [codersdk.DeploymentConfigField-bool](#codersdkdeploymentconfigfield-bool) | false | | |
## codersdk.ResourceType
```json
"organization"
```
### Properties
#### Enumerated Values
| Value |
| ------------------ |
| `organization` |
| `template` |
| `template_version` |
| `user` |
| `workspace` |
| `workspace_build` |
| `git_ssh_key` |
| `api_key` |
| `group` |
## codersdk.Response
```json
@ -2668,7 +2827,7 @@ Parameter represents a set value for the scope.
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
"value": ["string"]
},
"client_auth": {
"default": "string",
@ -2734,7 +2893,7 @@ Parameter represents a set value for the scope.
"secret": true,
"shorthand": "string",
"usage": "string",
"value": "string"
"value": ["string"]
},
"min_version": {
"default": "string",
@ -2851,7 +3010,7 @@ Parameter represents a set value for the scope.
"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
}
@ -2879,6 +3038,12 @@ Parameter represents a set value for the scope.
| `updated_at` | string | false | | |
| `workspace_owner_count` | integer | false | | |
#### Enumerated Values
| Property | Value |
| ------------- | ----------- |
| `provisioner` | `terraform` |
## codersdk.TemplateBuildTimeStats
```json
@ -3054,7 +3219,7 @@ Parameter represents a set value for the scope.
"name": "string"
}
],
"status": "string",
"status": "active",
"username": "string"
}
```
@ -3062,7 +3227,7 @@ Parameter represents a set value for the scope.
### Properties
| Name | Type | Required | Restrictions | Description |
| ------------------ | --------------------------------------- | -------- | ------------ | ----------- |
| ------------------ | ------------------------------------------ | -------- | ------------ | ----------- |
| `avatar_url` | string | false | | |
| `created_at` | string | true | | |
| `email` | string | true | | |
@ -3070,9 +3235,24 @@ Parameter represents a set value for the scope.
| `last_seen_at` | string | false | | |
| `organization_ids` | array of string | false | | |
| `roles` | array of [codersdk.Role](#codersdkrole) | false | | |
| `status` | string | false | | |
| `status` | [codersdk.UserStatus](#codersdkuserstatus) | false | | |
| `username` | string | true | | |
## codersdk.UserStatus
```json
"active"
```
### Properties
#### Enumerated Values
| Value |
| ----------- |
| `active` |
| `suspended` |
## codersdk.ValidationError
```json
@ -3130,7 +3310,7 @@ Parameter represents a set value for the scope.
"command": "string",
"display_name": "string",
"external": true,
"health": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
"threshold": 0,
@ -3249,7 +3429,7 @@ Parameter represents a set value for the scope.
"command": "string",
"display_name": "string",
"external": true,
"health": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
"threshold": 0,
@ -3300,7 +3480,7 @@ Parameter represents a set value for the scope.
### Properties
| Name | Type | Required | Restrictions | Description |
| ---------------------------- | ------------------------------------------------------- | -------- | ------------ | ------------------------------------------------------------------- |
| ---------------------------- | -------------------------------------------------------------- | -------- | ------------ | ------------------------------------------------------------------- |
| `apps` | array of [codersdk.WorkspaceApp](#codersdkworkspaceapp) | false | | |
| `architecture` | string | false | | |
| `connection_timeout_seconds` | integer | false | | |
@ -3319,7 +3499,7 @@ Parameter represents a set value for the scope.
| `operating_system` | string | false | | |
| `resource_id` | string | false | | |
| `startup_script` | string | false | | |
| `status` | string | false | | |
| `status` | [codersdk.WorkspaceAgentStatus](#codersdkworkspaceagentstatus) | false | | |
| `troubleshooting_url` | string | false | | |
| `updated_at` | string | false | | |
| `version` | string | false | | |
@ -3374,7 +3554,7 @@ Parameter represents a set value for the scope.
"command": "string",
"display_name": "string",
"external": true,
"health": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
"threshold": 0,
@ -3465,6 +3645,23 @@ Parameter represents a set value for the scope.
| `startup_script` | string | false | | |
| `vscode_port_proxy_uri` | string | false | | |
## codersdk.WorkspaceAgentStatus
```json
"connecting"
```
### Properties
#### Enumerated Values
| Value |
| -------------- |
| `connecting` |
| `connected` |
| `disconnected` |
| `timeout` |
## codersdk.WorkspaceApp
```json
@ -3472,7 +3669,7 @@ Parameter represents a set value for the scope.
"command": "string",
"display_name": "string",
"external": true,
"health": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
"threshold": 0,
@ -3490,15 +3687,15 @@ Parameter represents a set value for the scope.
### Properties
| Name | Type | Required | Restrictions | Description |
| --------------- | -------------------------------------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| --------------- | ---------------------------------------------------------------------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `command` | string | false | | |
| `display_name` | string | false | | Display name is a friendly name for the app. |
| `external` | boolean | false | | External specifies whether the URL should be opened externally on the client or not. |
| `health` | string | false | | |
| `healthcheck` | [codersdk.Healthcheck](#codersdkhealthcheck) | false | | |
| `health` | [codersdk.WorkspaceAppHealth](#codersdkworkspaceapphealth) | false | | |
| `healthcheck` | [codersdk.Healthcheck](#codersdkhealthcheck) | false | | Healthcheck specifies the configuration for checking app health. |
| `icon` | string | false | | Icon is a relative path or external URL that specifies an icon to be displayed in the dashboard. |
| `id` | string | false | | |
| `sharing_level` | string | false | | |
| `sharing_level` | [codersdk.WorkspaceAppSharingLevel](#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 `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
| `url` | string | false | | URL is the address being proxied to inside the workspace. If external is specified, this will be opened on the client. |
@ -3511,6 +3708,39 @@ Parameter represents a set value for the scope.
| `sharing_level` | `authenticated` |
| `sharing_level` | `public` |
## codersdk.WorkspaceAppHealth
```json
"disabled"
```
### Properties
#### Enumerated Values
| Value |
| -------------- |
| `disabled` |
| `initializing` |
| `healthy` |
| `unhealthy` |
## codersdk.WorkspaceAppSharingLevel
```json
"owner"
```
### Properties
#### Enumerated Values
| Value |
| --------------- |
| `owner` |
| `authenticated` |
| `public` |
## codersdk.WorkspaceBuild
```json
@ -3547,7 +3777,7 @@ Parameter represents a set value for the scope.
"command": "string",
"display_name": "string",
"external": true,
"health": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
"threshold": 0,
@ -3636,12 +3866,12 @@ Parameter represents a set value for the scope.
| `initiator_id` | string | false | | |
| `initiator_name` | string | false | | |
| `job` | [codersdk.ProvisionerJob](#codersdkprovisionerjob) | false | | |
| `reason` | string | false | | |
| `reason` | [codersdk.BuildReason](#codersdkbuildreason) | false | | |
| `resources` | array of [codersdk.WorkspaceResource](#codersdkworkspaceresource) | false | | |
| `status` | string | false | | |
| `status` | [codersdk.WorkspaceStatus](#codersdkworkspacestatus) | false | | |
| `template_version_id` | string | false | | |
| `template_version_name` | string | false | | |
| `transition` | string | false | | |
| `transition` | [codersdk.WorkspaceTransition](#codersdkworkspacetransition) | false | | |
| `updated_at` | string | false | | |
| `workspace_id` | string | false | | |
| `workspace_name` | string | false | | |
@ -3680,7 +3910,7 @@ Parameter represents a set value for the scope.
"command": "string",
"display_name": "string",
"external": true,
"health": "string",
"health": "disabled",
"healthcheck": {
"interval": 0,
"threshold": 0,
@ -3760,7 +3990,7 @@ Parameter represents a set value for the scope.
| `metadata` | array of [codersdk.WorkspaceResourceMetadata](#codersdkworkspaceresourcemetadata) | false | | |
| `name` | string | false | | |
| `type` | string | false | | |
| `workspace_transition` | string | false | | |
| `workspace_transition` | [codersdk.WorkspaceTransition](#codersdkworkspacetransition) | false | | |
#### Enumerated Values
@ -3788,6 +4018,45 @@ Parameter represents a set value for the scope.
| `sensitive` | boolean | false | | |
| `value` | string | false | | |
## codersdk.WorkspaceStatus
```json
"pending"
```
### Properties
#### Enumerated Values
| Value |
| ----------- |
| `pending` |
| `starting` |
| `running` |
| `stopping` |
| `stopped` |
| `failed` |
| `canceling` |
| `canceled` |
| `deleting` |
| `deleted` |
## codersdk.WorkspaceTransition
```json
"start"
```
### Properties
#### Enumerated Values
| Value |
| -------- |
| `start` |
| `stop` |
| `delete` |
## codersdk.WorkspacesResponse
```json
@ -3832,7 +4101,7 @@ Parameter represents a set value for the scope.
"command": "string",
"display_name": "string",
"external": true,
"health": "string",
"health": "disabled",
"healthcheck": {},
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
@ -3926,16 +4195,6 @@ Parameter represents a set value for the scope.
| `count` | integer | false | | |
| `workspaces` | array of [codersdk.Workspace](#codersdkworkspace) | false | | |
## netip.Addr
```json
{}
```
### Properties
_None_
## tailcfg.DERPMap
```json

View File

@ -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
}
@ -156,13 +156,13 @@ 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 | | |
| `» 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 | | |
@ -179,6 +179,12 @@ Status Code **200**
| `» 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).
## Get templates by organization and template name
@ -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
}

View File

@ -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,

View File

@ -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" \

View File

@ -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 }}
{{?}}

View File

@ -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') {